Sha256: fa443e23798be3631ad27879e1e1a9fdc79d5e9f70910209b2c18b17f49d32e6

Contents?: true

Size: 1.58 KB

Versions: 5

Compression:

Stored size: 1.58 KB

Contents

<ul class="nav pull-right">
  <li class="divider-vertical"></li>
  <li id="language_selection" class="dropdown">
    <a href="javascript:;" class="dropdown-toggle">
      <%= t("txt.views.lang_widget.caption") %>
      <b class="caret"></b>
    </a>

    <ul class="lang-widget dropdown-menu">
      <%- if Iqvoc::Concept.pref_labeling_languages.reject(&:nil?).any? -%>
        <li class="lang-widget-header"><h3><%= t("txt.views.lang_widget.primary") %></h3></li>
        <% Iqvoc::Concept.pref_labeling_languages.each do |lang| %>
          <li class="lang-widget-item">
          <%= link_to t("languages.#{lang.presence || "-"}", :default => lang.presence || "-"), params.merge(:lang => lang || "none"),
              :class => ("current" if lang == I18n.locale.to_s) %>
          </li>
    <% end %>
  <% end %>

  <% secondary_languages = Iqvoc.all_languages.reject { |lang| lang == I18n.locale.to_s } %>
  <% if secondary_languages.any? %>
    <li class="lang-widget-header"><h3><%= t("txt.views.lang_widget.secondary") %></h3></li>
    <% secondary_languages.each do |lang| %>
      <li class="lang-widget-item">
        <label>
          <input type="checkbox" value="<%= lang %>"> <%= t("languages.#{lang.presence || "-"}", :default => lang.presence || "-") %>
        </label>
      </li>
    <% end %>
  <% end %>
</ul>
</li>

<li>
  <% if current_user %>
    <%= link_to t("txt.views.layouts.application.logout"), user_session_path, :method => :delete %>
  <% else %>
    <%= link_to t("txt.views.layouts.application.login"), new_user_session_path(:back_to => @return_url) %>
  <% end %>
</li>
</ul>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
iqvoc-4.3.3 app/views/layouts/_controls.html.erb
iqvoc-4.3.2 app/views/layouts/_controls.html.erb
iqvoc-4.3.1 app/views/layouts/_controls.html.erb
iqvoc-4.3.0 app/views/layouts/_controls.html.erb
iqvoc-4.2.0 app/views/layouts/_controls.html.erb