Orbit/app/views/admin/dashboards/_most_visited.html.erb

31 lines
1.1 KiB
Plaintext

<div class="box-header">
<h2>
<i class="icons-trophy"></i>
<span class="break"></span>
<%= t(:most_visited_page) %>
</h2>
</div>
<div class="box-content">
<table class="table table-bordered table-striped table-hover">
<thead>
<tr>
<th><%= t(:title) %></th>
<th class="span2"><%= t(:module) %></th>
<th class="span1"><%= t(:hits) %></th>
</tr>
</thead>
<tbody>
<% @most_visited.each do |object| %>
<tr>
<td><%= link_to ((object[0].title rescue nil) || (object[0].page.title rescue nil)), get_link_to_object(object[0]) %></td>
<td><%= link_to t("dashboard.#{object[0].class.to_s.underscore}"), get_link(object[0].class.to_s.underscore) %></td>
<td><%= object[1] %></td>
</tr>
<% end %>
</tbody>
</table>
<ul class="pager">
<li><%= link_to_previous_page @most_visited, t(:previous), params: {controller: 'admin/dashboards', action: 'reload_most_visited'}, remote: true %></li>
<li><%= link_to_next_page @most_visited, t(:next), params: {controller: 'admin/dashboards', action: 'reload_most_visited'}, remote: true %></li>
</ul>
</div>