tracks/app/views/stats/index.html.erb
Katrina Owen 615a9e46c9 Encapsulate counts and totals into a class.
Move queries out of the view and into the model layer.
2013-03-02 17:22:15 -07:00

27 lines
854 B
Text
Executable file

<div class="stats_content">
<h2><%= t('stats.totals') %></h2>
<%= render :partial => 'totals', :locals => {:totals => @totals} -%>
<% unless current_user.todos.empty? -%>
<h2><%= t('stats.actions') %></h2>
<%= render :partial => 'actions', :locals => {:actions => @actions} -%>
<h2><%= t('stats.contexts') %></h2>
<%= render :partial => 'contexts', :locals => {:contexts => @contexts} -%>
<h2><%= t('stats.projects') %></h2>
<%= render :partial => 'projects', :locals => {:projects => @projects} -%>
<h2><%= t('stats.tags') %></h2>
<%= render :partial => 'tags', :locals => {:tag_cloud => @tag_cloud, :key => ''} -%>
<%= render :partial => 'tags', :locals => {:tag_cloud => @tag_cloud_90days, :key => '_90days'} -%>
<% else -%>
<p><%= t('stats.more_stats_will_appear') %></p>
<% end -%>
</div>