From 6452442f42a09b54d9e72e93b1b97d705d84ce31 Mon Sep 17 00:00:00 2001 From: Kyle Drake Date: Sat, 6 Jun 2015 07:13:04 -0700 Subject: [PATCH] updates to stats --- app/site.rb | 2 ++ views/site/stats.erb | 17 +++++++---------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/app/site.rb b/app/site.rb index d673ae4a..4291edce 100644 --- a/app/site.rb +++ b/app/site.rb @@ -47,6 +47,8 @@ get '/site/:username/stats' do @site = Site[username: params[:username]] not_found if @site.nil? + @title = "Site stats for #{@site.host}" + @stats = {} %i{referrers locations paths}.each do |stat| diff --git a/views/site/stats.erb b/views/site/stats.erb index 1014c6cc..3d5b16d7 100644 --- a/views/site/stats.erb +++ b/views/site/stats.erb @@ -1,7 +1,9 @@ +
-
-

Your Stats

+
+

Site Statistics

+
<% if !@events.empty? && (site.followings_dataset.count > 0) %> class="selected"<% end %>>All @@ -9,10 +11,6 @@ <% end %>
-
-

Your Site

- Edit Site -
@@ -23,7 +21,6 @@
-

Most popular locations (this week)

-

Total Visitors (last 7 days)

+

Total Visitors last 7 days

<% if current_site && current_site.id == @site.id %> @@ -156,7 +153,7 @@
-

Top Paths

+

Top Paths last 7 days

@@ -175,7 +172,7 @@
-

Top Locations

+

Top Locations last 7 days