Sha256: 367daa11325193cfa588c30cdd861539c2a4e6cf4969642e0005ce4647177142

Contents?: true

Size: 1.52 KB

Versions: 4

Compression:

Stored size: 1.52 KB

Contents

<div class="translations_navigation">
  <div style="font-size:22px; font-weight: bold;padding-bottom:15px;">
	 <%=tra("Translation Tools", "Tabs header") %>
	 <% unless tr8n_current_language.default? %> 
		 - <%=tra("{language} Language", nil, :language => tr8n_current_language.native_name)%>
			 <% if tr8n_current_user_is_manager? %>
			   <%=link_to(tra("manage", "Link to management section"), "/tr8n/language", :style => "font-size:12px;")%>
			 <% end %>
	 <% end %>  
	</div>
  
  <ul class="translations_tab_nav translations_tabs">
      <% tr8n_features_tabs.each do |tab| %>
        <%  classes = []
            section_key_condition = tab[:key].to_s == "sitemap" ? (@section_key != nil) : (@section_key == nil)

            if tab[:actions].any?
              current = (tab[:controller] == controller.controller_name and tab[:actions].include?(controller.action_name) and section_key_condition) 
            else
              current = (tab[:controller] == controller.controller_name and section_key_condition) 
            end 

            classes << "current" if current
            if tr8n_features_tabs.first == tab
              classes << "first" 
              classes << "first_current" if current
            elsif tr8n_features_tabs.last == tab
              classes << "last"
              classes << "last_current" if current
            end   
        %>
        
        <li class="<%=classes.join(' ') %>">
          <%=link_to(tra(tab[:title], "Feature title"), tab[:link])%>
        </li>

      <% end %>
  </ul>
</div>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tr8n-3.1.1 app/views/tr8n/common/_tabs.html.erb
tr8n-3.0.5 app/views/tr8n/common/_tabs.html.erb
tr8n-3.0.3 app/views/tr8n/common/_tabs.html.erb
tr8n-3.0.2 app/views/tr8n/common/_tabs.html.erb