Skip to content

Commit

Permalink
Reformat range stats page to table (publiclab#2792)
Browse files Browse the repository at this point in the history
  • Loading branch information
devamaz authored and SidharthBansal committed Jun 19, 2018
1 parent e803580 commit 297cdd7
Showing 1 changed file with 32 additions and 15 deletions.
47 changes: 32 additions & 15 deletions app/views/stats/range.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,49 @@

<hr />

<h4><%= @notes %> notes in this period</h4>

<h4><%= @wikis %> wiki edits in this period</h4>

<h4><%= @people %> new member registrations in this period</h4>

<h4><%= @answers %> answers posted in this period</h4>

<h4><%= @comments %> comments posted in this period</h4>

<h4><%= @questions.count %> questions posted in this period</h4>

<h4><%= @contributors %> contributors in this period</h4>
<table class="table">
<tr>
<td><%= @notes %></td>
<td>notes in this period</td>
</tr>
<tr>
<%= @wikis %></td>
wiki edits in this period</td>
</tr>
<tr>
<td><%= @people %></td>
<td>new member registrations in this period</td>
</tr>
<tr>
<td><%= @answers %></td>
<td>answers posted in this period</td>
</tr>
<tr>
<td><%= @comments %></td>
<td>comments posted in this period</td>
</tr>
<tr>
<td><%= @questions.count %></td>
<td>questions posted in this period</td>
</tr>
<tr>
<td><%= @contributors %></td>
<td>contributors in this period</td>
</tr>
<table>

<p><i>Member registration may include spam accounts</i></p>

<p>
Back by:
Back by:
<a href="/stats/range/<%= (@start - 1.week).to_formatted_s(:long) %>/<%= (@end - 1.week).to_formatted_s(:long) %>">one week</a>,
<a href="/stats/range/<%= (@start - 1.month).to_formatted_s(:long) %>/<%= (@end - 1.month).to_formatted_s(:long) %>">one month</a>,
<a href="/stats/range/<%= (@start - 3.months).to_formatted_s(:long) %>/<%= (@end - 3.months).to_formatted_s(:long) %>">three months</a>,
<a href="/stats/range/<%= (@start - 1.year).to_formatted_s(:long) %>/<%= (@end - 1.year).to_formatted_s(:long) %>">one year</a>
</p>

<p>
Forward by:
Forward by:
<a href="/stats/range/<%= (@start + 1.week).to_formatted_s(:long) %>/<%= (@end + 1.week).to_formatted_s(:long) %>">one week</a>,
<a href="/stats/range/<%= (@start + 1.month).to_formatted_s(:long) %>/<%= (@end + 1.month).to_formatted_s(:long) %>">one month</a>,
<a href="/stats/range/<%= (@start + 3.months).to_formatted_s(:long) %>/<%= (@end + 3.months).to_formatted_s(:long) %>">three months</a>,
Expand Down

0 comments on commit 297cdd7

Please sign in to comment.