Files
grecia/app/components/admin/budgets_wizard/headings/group_switcher_component.html.erb
Julian Herrero f8d6ba12d7 Add headings step to budget creation
Co-Authored-By: decabeza <alberto@decabeza.es>
2021-06-08 18:45:53 +02:00

22 lines
928 B
Plaintext

<div class="budget-group-switcher">
<% if other_groups.one? %>
<p>
<%= t("admin.budget_headings.group_switcher.currently_showing", group: group.name) %>
<%= link_to t("admin.budget_headings.group_switcher.the_other_group", group: other_groups.first.name),
headings_path(other_groups.first) %>
</p>
<% else %>
<p><%= t("admin.budget_headings.group_switcher.currently_showing", group: group.name) %></p>
<ul class="dropdown menu" data-dropdown-menu data-disable-hover="true" data-click-open="true">
<li class="has-submenu">
<button type="button"><%= t("admin.budget_headings.group_switcher.different_group") %></button>
<ul class="menu" data-submenu>
<% other_groups.each do |other_group| %>
<li><%= link_to other_group.name, headings_path(other_group) %></li>
<% end %>
</ul>
</li>
</ul>
<% end %>
</div>