Skip to content
This repository
tree: f5561f5b31
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 33 lines (26 sloc) 1.262 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
<%
  quick_search_tab_active = params[:action] == 'quick_search' ? 'active' : ''
  advance_search_tab_active = params[:action] == 'advance_search' ? 'active' : ''
  analytics_tab_active = params[:controller] == 'admin_data/analytics' ? 'active' : ''
  table_structure_tab_active = params[:controller] == 'admin_data/table_structure' ? 'active' : ''
  add_new_record_tab_active = %w(new create).include?(params[:action]) ? 'active' : ''
%>
<ul>

  <li class="first <%=quick_search_tab_active%>">
    <%= link_to 'Quick Search', admin_data_search_path(:klass => klass.name.underscore) %>
  </li>

  <li class="<%=advance_search_tab_active%>">
    <%= link_to 'Advance Search', admin_data_advance_search_path(:klass => klass.name.underscore) %>
  </li>

  <li class="<%=analytics_tab_active%>">
    <%= link_to 'Analytics', admin_data_daily_analytics_path(:klass => klass.name.underscore) %>
  </li>

  <li class="<%=table_structure_tab_active%>">
    <%= link_to 'Table Structure', admin_data_table_structure_path(:klass => klass.name.underscore) %>
  </li>

  <% if is_allowed_to_update? %>
    <li class="<%=add_new_record_tab_active%>">
      <%= link_to '+Add New Record', admin_data_new_path(:klass => klass.name.underscore) %>
    </li>
  <% end %>

</ul>
Something went wrong with that request. Please try again.