Newer
Older
dmpopidor / app / views / org_admin / templates / _admin_nav_tabs.html.erb
<ul class="nav nav-tabs" role="tablist">
    <li role="presentation" <%= isActivePage(edit_org_admin_template_path(template)) ? ' class=active' : '' %>>
        <%= link_to(_('Template details'), edit_org_admin_template_path(template, r: current_tab), { 'aria-controls': 'show_template', role: 'tab' }) %>
    </li>
    <% template.phases.each do |phase| %>
        <li role="presentation" <%= isActivePage(admin_show_phase_path(phase.id)) ||
            isActivePage(admin_preview_phase_path(phase)) ? ' class=active' : '' %>>
            <%= link_to(phase.title, admin_show_phase_path(phase.id, r: current_tab), { 'aria-controls': "#{phase.id}", role: 'tab' }) %>
        </li>
    <% end %>
    <!-- Add another phase button -->
    <% if current_user.can_org_admin? && template.customization_of.nil? && edit %>
        <li role="presentation" <%= isActivePage(admin_add_phase_path(template)) ? ' class=active' : '' %>>
        <%= link_to(_('Add new phase'), admin_add_phase_path(template, r: current_tab), { 'aria-controls': 'add_phase', role: 'tab' }) %>
        </li>
    <% end %>
</ul>