adds admin creation of budgets

This commit is contained in:
Juanjo Bazán
2016-07-29 13:34:41 +02:00
parent 9014de2693
commit 6fce9df451
6 changed files with 67 additions and 135 deletions

View File

@@ -2,142 +2,29 @@
<div class="small-12 medium-9 column">
<h2><%= t("admin.budgets.new.title") %></h2>
<form>
<label><%= t("admin.budgets.new.name") %></label>
<input type="text" placeholder="<%= t("admin.budgets.new.name") %>">
<label><%= t("admin.budgets.new.description") %></label>
<textarea rows="3" placeholder="<%= t("admin.budgets.new.description") %>"></textarea>
<%= form_for [:admin, @budget] do |f| %>
<%= f.label :name, t("admin.budgets.new.name") %>
<%= f.text_field :name,
label: false,
maxlength: 30,
placeholder: t("admin.budgets.new.name") %>
<%= f.label :description, t("admin.budgets.new.description") %>
<%= f.text_area :description, rows: 3, maxlength: 6000, label: false, placeholder: t("admin.budgets.new.description") %>
<div class="row">
<div class="small-12 medium-9 column">
<select>
<option><%= t("admin.budgets.new.phase") %></option>
<option>Seleccionando</option>
<option>Votación final</option>
<option>Terminado</option>
</select>
<%= f.label :description, t("admin.budgets.new.phase") %>
<%= f.select :phase, budget_phases_select_options, {label: false} %>
</div>
<div class="small-12 medium-3 column">
<select>
<option><%= t("admin.budgets.new.currency") %></option>
<option>€</option>
<option>$</option>
<option>£</option>
<option>¥</option>
</select>
<%= f.label :description, t("admin.budgets.new.currency") %>
<%= f.select :currency_symbol, budget_currency_symbol_select_options, {label: false} %>
</div>
</div>
<input type="submit" value="<%= t("admin.budgets.new.create") %>" class="button success">
</form>
<% end %>
</div>
</div>
<div class="row">
<div class="small-12 column">
<h3 class="inline-block">Nombre del budget</h3>
<%= link_to t("admin.budgets.new.add_group"), "#", class: "button float-right" %>
<form>
<div class="input-group">
<span class="input-group-label">
<label><%= t("admin.budgets.new.group") %></label>
</span>
<input type="text" placeholder="<%= t("admin.budgets.new.group") %>">
<div class="input-group-button">
<input type="submit" value="<%= t("admin.budgets.new.create_group") %>", class="button success">
</div>
</div>
</form>
</div>
</div>
<div class="row">
<div class="small-12 column">
<table>
<thead>
<tr>
<th colspan="3" class="with-button">
Nombre del grupo
<%= link_to t("admin.budgets.new.add_heading"), "#", class: "button float-right" %>
</th>
</tr>
<tr>
<th><%= t("admin.budgets.new.table_heading") %></th>
<th><%= t("admin.budgets.new.table_amount") %></th>
<th><%= t("admin.budgets.new.table_geozone") %></th>
</tr>
</thead>
<tbody>
<!-- if heading == 0 -->
<tr>
<td colspan="3">
<div class="callout primary">
<%= t("admin.budgets.new.no_heading") %>
</div>
</td>
</tr>
<!-- end -->
<!-- new heading form -->
<tr>
<td colspan="3">
<form>
<label><%= t("admin.budgets.new.heading") %></label>
<input type="text" placeholder="<%= t("admin.budgets.new.heading") %>">
<div class="row">
<div class="small-12 medium-6 column">
<label><%= t("admin.budgets.new.amount") %></label>
<input type="text" placeholder="<%= t("admin.budgets.new.amount") %>">
</div>
<div class="small-12 medium-6 column">
<label><%= t("admin.budgets.new.geozone") %></label>
<select>
<option><%= t("admin.budgets.new.no_geozone") %></option>
</select>
</div>
</div>
<input type="submit" value="<%= t("admin.budgets.new.save_heading") %>", class="button success">
</form>
</td>
</tr>
<!-- /. new heading form -->
<!-- headings list -->
<tr>
<td>
Heading 1 name
</td>
<td>
190.000€
</td>
<td>
Geozone B
</td>
</tr>
<tr>
<td>
Heading 2 name
</td>
<td>
24.000.000€
</td>
<td>
Does not apply
</td>
</tr>
<tr>
<td>
Heading 3 name
</td>
<td>
1.265.000€
</td>
<td>
Geozone A
</td>
</tr>
<!-- /. headings list -->
</tbody>
</table>
</div>
</div>