Merge pull request #2898 from papayalabs/2889-show-active-tab-in-custom-info-texts
Show active tab in custom info texts
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
<ul id="information-texts-tabs" class="tabs" >
|
||||
<% [:debates, :community, :proposals, :polls, :layouts, :mailers, :management, :guides, :welcome].each do |tab| %>
|
||||
<li class="tabs-title <%= "is-active" if tab.to_s == @tab %>">
|
||||
<li class="tabs-title">
|
||||
<% if tab.to_s == @tab %>
|
||||
<%= link_to t("admin.menu.site_customization.information_texts_menu.#{tab}"), admin_site_customization_information_texts_path(tab: tab), :class => 'is-active' %>
|
||||
<% else %>
|
||||
<%= link_to t("admin.menu.site_customization.information_texts_menu.#{tab}"), admin_site_customization_information_texts_path(tab: tab) %>
|
||||
</li>
|
||||
<% end %>
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
@@ -48,6 +48,13 @@ feature "Admin custom information texts" do
|
||||
click_link 'Welcome'
|
||||
expect(page).to have_content 'See all debates'
|
||||
end
|
||||
|
||||
scenario 'check that tabs are highlight when click it' do
|
||||
visit admin_site_customization_information_texts_path
|
||||
|
||||
click_link 'Proposals'
|
||||
expect(find("a[href=\"/admin/site_customization/information_texts?tab=proposals\"].is-active")).to have_content "Proposals"
|
||||
end
|
||||
|
||||
context "Globalization" do
|
||||
|
||||
|
||||
Reference in New Issue
Block a user