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
|
end
|
||||||
|
|
||||||
def stats
|
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]
|
case params[:range]
|
||||||
when "week"
|
when "week"
|
||||||
|
|
|
||||||
|
|
@ -49,8 +49,6 @@
|
||||||
%span.percent_change{:class => (model[:change] > 0 ? "green" : "red")}
|
%span.percent_change{:class => (model[:change] > 0 ? "green" : "red")}
|
||||||
= "(#{model[:change]}%)"
|
= "(#{model[:change]}%)"
|
||||||
|
|
||||||
%br
|
|
||||||
%br
|
|
||||||
%br
|
%br
|
||||||
%br
|
%br
|
||||||
%br
|
%br
|
||||||
|
|
@ -65,63 +63,12 @@
|
||||||
%b
|
%b
|
||||||
#{@posts[:day_before]/@user_count.to_f}
|
#{@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
|
.span-24.last
|
||||||
%h2
|
|
||||||
Misc Stuff
|
|
||||||
%br
|
|
||||||
%br
|
|
||||||
|
|
||||||
%h3
|
%h3
|
||||||
= for tg in @popular_tags
|
50 Most Popular Tags
|
||||||
= link_to tg, tags_path(tg)
|
- @popular_tags.each do |name,count|
|
||||||
|
Tag Name:
|
||||||
%br
|
%b= name
|
||||||
%br
|
Count:
|
||||||
|
%b= count
|
||||||
.span-12
|
%br
|
||||||
%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:
|
email:
|
||||||
= text_field_tag 'user[email]', params[:user][:email]
|
= text_field_tag 'user[email]', params[:user][:email]
|
||||||
|
|
||||||
invitation identifier
|
invitation identifier:
|
||||||
= text_field_tag 'user[invitation_identifier]', params[:user][:invitation_identifier]
|
= text_field_tag 'user[invitation_identifier]', params[:user][:invitation_identifier]
|
||||||
|
|
||||||
invitation token:
|
invitation token:
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,9 @@
|
||||||
%br
|
%br
|
||||||
|
|
||||||
.span-24.last
|
.span-24.last
|
||||||
%h1
|
%h2
|
||||||
= "Users per week (Current server date is: #{Time.now.to_date}) "
|
= "Users per week (Current server date is: #{Time.now.to_date}) "
|
||||||
%ul
|
%ul
|
||||||
- @created_users_by_week.keys.sort.each do |k|
|
- @created_users_by_week.keys.sort.reverse.each do |k|
|
||||||
%li
|
%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