Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
discourse-annotator / app / views / lib / _codes_view_nav.html.erb
Size: Mime:
<% options = {tree: 'Tree', translate: 'Translate', list: 'Plain List', table: 'Plain Table'} %>

<div class="dropdown" style="float:right; margin-right:50px;">
  <div class="dropdown-btn" aria-haspopup="true" role="button" tabindex="0">
    <div class="dropdown-btn-text">
      View: <%= params[:view].blank? ? options.first.last : options[params[:view].to_sym] %>
    </div>
    <span class="dropdown-arrow"></span>
  </div>

  <div class="dropdown-content">
    <% options.each do |key, label| %>
      <%= link_to label,
                  request.query_parameters.except(:page).merge(view: key),
                  class: ((params[:view].blank? && key == options.first.first) || params[:view]&.to_sym == key ? 'active' : nil) %>
    <% end %>
  </div>
</div>