Skip to content

Commit

Permalink
merge range and main stats
Browse files Browse the repository at this point in the history
  • Loading branch information
cesswairimu committed Feb 25, 2019
1 parent a4aadab commit c74a0f3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions app/controllers/stats_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def range
end

def index
range
@title = 'Stats'
@time = if params[:time]
Time.parse(params[:time])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
<%# <p> There is a lot of content being added to the website everyday. In this page you can select a range to see the statistics of different types of content on the website within that range </p> %>
<%# <%= render 'stats_nav' %1> %>
<%# </div> %>
<div class="col-md-8 col-md-offset-1">
<p>
Choose a period i.e week, month or year in the drop-down below to see the activity in the past week,<br>
month or year respectively. You can also choose a starting and an ending date in the field further<br> down
to see activity during that range
</p>
<%= form_tag request.url, method: 'get' do %>
<div class="row">
Expand Down Expand Up @@ -41,7 +44,6 @@
<%= @questions.count %> questions asked and <%= @answers %> questions answered during this period
</h4>
<hr>
<p><i>Member registration may include spam accounts</i></p>

<%# <table class="table"> %>
<%# <tr> %>
Expand Down Expand Up @@ -142,12 +144,12 @@


<br>
</div>
<div class="col-md-10">
<%# <div class="col-md-10"> %>
<div id="chart">
</div>
<p><i>Member registration may include spam accounts</i></p>
<br>
</div>
<%# </div> %>

<%# <p> Move back or forward using the buttons below </p> %>
<%# <div class="btn-group" role="group" aria-label="Basic example"> %>
Expand Down Expand Up @@ -224,7 +226,7 @@ var options = {
colors: ['#006dcc'],
plotOptions: {
bar: {
horizontal: true,
horizontal: false,

}

Expand Down
5 changes: 3 additions & 2 deletions app/views/stats/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<div class="col-md-3">
<div class="col-md-2">

<%= raw t('notes.stats.about_this_page') %>
<%= render 'stats_nav' %>

</div>

<div class="col-md-8 col-md-offset-1" style="margin-bottom:20px;">
<div class="col-md-9 col-md-offset-1" style="margin-bottom:20px;">

<h2><%= raw t('notes.stats.contributors_statistics') %></h2>
<hr>
Expand Down Expand Up @@ -62,6 +62,7 @@
<br> <br>
<hr />

<%= render 'range' %>
<%# <h4> %>
<%# <%= raw t('notes.stats.notes_and_wiki_edits_past_week', :url1 => "/research", :note_count => @weekly_notes, %>
<%# :url2 => "/wiki", :wiki_count => @weekly_wikis) %1> %>
Expand Down

0 comments on commit c74a0f3

Please sign in to comment.