make popular tags human readable

This commit is contained in:
David Morley 2012-02-19 21:28:12 -06:00
parent c41923081a
commit a63bcd0080
5 changed files with 8 additions and 69 deletions

View file

@ -36,7 +36,7 @@ class AdminsController < ApplicationController
end
def stats
@popular_tags = ActsAsTaggableOn::Tagging.joins(:tag).limit(15).count(:group => :tag, :order => 'count(taggings.id) DESC')
@popular_tags = ActsAsTaggableOn::Tagging.joins(:tag).limit(50).count(:group => :tag, :order => 'count(taggings.id) DESC')
case params[:range]
when "week"

View file

@ -7,7 +7,6 @@
%li= link_to 'Pod Stats', pod_stats_path
%li= link_to 'Correlations', correlations_path
- if AppConfig[:mount_resque_web]
%li= link_to 'Resque', '/admins/resque'
%li= link_to 'Resque Overview', resque_web_path

View file

@ -1,6 +0,0 @@
-# Copyright (c) 2010-2011, Diaspora Inc. This file is
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
.stream
= render :partial => resque_web_path

View file

@ -49,8 +49,6 @@
%span.percent_change{:class => (model[:change] > 0 ? "green" : "red")}
= "(#{model[:change]}%)"
%br
%br
%br
%br
%br
@ -65,63 +63,12 @@
%b
#{@posts[:day_before]/@user_count.to_f}
/%h3
/ Posts over time
/#stats_graph{:style => "text-align:right;position:relative;vertical-align:bottom;background-color:#eee;"}
/ = @posts_per_day.inspect
/ /- @posts_per_day.each do |key, val|
/ /.asdo{:style => "display:inline-block;width:35px;vertical-align:bottom;background-color:#666;height:#{(val/@most_posts_within)*200}px;"}
%br
%br
%br
%br
%br
%br
%br
%br
%br
%br
%br
%br
%br
%br
%br
%br
%br
%br
%br
%br
%br
%br
%br
.span-24.last
%h2
Misc Stuff
%br
%br
%h3
= for tg in @popular_tags
= link_to tg, tags_path(tg)
%br
%br
.span-12
%h3
New public posts
/.stream
/ /= render 'shared/stream', :posts => @new_public_posts
.span-12.last
%h3
Most Liked
.stream
= render 'shared/stream', :posts => @most_liked_posts
50 Most Popular Tags
- @popular_tags.each do |name,count|
Tag Name:
%b= name
Count:
%b= count
%br

View file

@ -110,7 +110,6 @@ Diaspora::Application.routes.draw do
get :admin_inviter
get :weekly_user_stats
get :correlations
get :resque
get :stats, :as => 'pod_stats'
end