Merge pull request #2908 from diasporg/adminclean
clean up admin page [ci skip]
This commit is contained in:
commit
0db2bd9e40
4 changed files with 12 additions and 65 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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
|
||||
%h3
|
||||
50 Most Popular Tags
|
||||
- @popular_tags.each do |name,count|
|
||||
Tag Name:
|
||||
%b= name
|
||||
Count:
|
||||
%b= count
|
||||
%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
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@
|
|||
email:
|
||||
= text_field_tag 'user[email]', params[:user][:email]
|
||||
|
||||
invitation identifier
|
||||
invitation identifier:
|
||||
= text_field_tag 'user[invitation_identifier]', params[:user][:invitation_identifier]
|
||||
|
||||
invitation token:
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@
|
|||
%br
|
||||
|
||||
.span-24.last
|
||||
%h1
|
||||
%h2
|
||||
= "Users per week (Current server date is: #{Time.now.to_date}) "
|
||||
%ul
|
||||
- @created_users_by_week.keys.sort.each do |k|
|
||||
- @created_users_by_week.keys.sort.reverse.each do |k|
|
||||
%li
|
||||
= "Week stating on #{k} , #{@created_users_by_week[k]}"
|
||||
= "Week starting on #{k} , #{@created_users_by_week[k]}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue