Cambios para hacer commit: modificado: app/controllers/admin/budget_headings_controller.rb modificado: app/models/budget/heading.rb nuevo archivo: app/views/admin/budget_headings/_errors.html.erb nuevo archivo: app/views/admin/budget_headings/edit.js.erb nuevo archivo: app/views/admin/budget_headings/update.js.erb modificado: app/views/admin/budgets/_group.html.erb nuevo archivo: app/views/admin/budgets/_heading.html.erb nuevo archivo: app/views/admin/budgets/_heading_form.html.erb modificado: config/locales/en/activerecord.yml modificado: config/locales/es/activerecord.yml modificado: spec/features/admin/budgets_spec.rb modificado: spec/models/budget/heading_spec.rb
45 lines
1.3 KiB
Plaintext
45 lines
1.3 KiB
Plaintext
<table>
|
|
<thead>
|
|
<tr>
|
|
<th colspan="4" class="with-button">
|
|
<%= group.name %>
|
|
<%= link_to t("admin.budgets.form.add_heading"), "#", class: "button float-right js-toggle-link", data: { "toggle-selector" => "#group-#{group.id}-new-heading-form" } %>
|
|
</th>
|
|
</tr>
|
|
|
|
<% if headings.blank? %>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td colspan="4">
|
|
<div class="callout primary">
|
|
<%= t("admin.budgets.form.no_heading") %>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<% else %>
|
|
<tr>
|
|
<th><%= t("admin.budgets.form.table_heading") %></th>
|
|
<th><%= t("admin.budgets.form.table_amount") %></th>
|
|
<th><%= t("admin.budgets.form.table_population") %></th>
|
|
<th><%= t("admin.actions.actions") %></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% end %>
|
|
|
|
<!-- new heading form -->
|
|
<tr id="group-<%= group.id %>-new-heading-form" style="display:none">
|
|
<td colspan="4">
|
|
<%= render "admin/budgets/heading_form", group: group, budget: @budget, heading: Budget::Heading.new %>
|
|
</td>
|
|
</tr>
|
|
<!-- /. new heading form -->
|
|
<!-- headings list -->
|
|
<% headings.each do |heading| %>
|
|
<%= render "admin/budgets/heading", group: group, budget: @budget, heading: heading %>
|
|
<% end %>
|
|
<!-- /. headings list -->
|
|
</tbody>
|
|
</table>
|