Merge pull request #5587 from AugierLe42e/fix-statistics-design
Fixes the header problem rendering statistics page
This commit is contained in:
commit
ccd7561072
4 changed files with 27 additions and 25 deletions
|
|
@ -10,7 +10,8 @@ class StatisticsController < ApplicationController
|
||||||
@statistics = StatisticsPresenter.new
|
@statistics = StatisticsPresenter.new
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.json { render json: @statistics }
|
format.json { render json: @statistics }
|
||||||
format.any(:html, :mobile) { render 'statistics/statistics.html.haml' }
|
format.mobile { render layout: 'application' }
|
||||||
|
format.html { render layout: 'with_header_with_footer' }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
23
app/views/statistics/_statistics.haml
Normal file
23
app/views/statistics/_statistics.haml
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
-# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
||||||
|
-# licensed under the Affero General Public License version 3 or later. See
|
||||||
|
-# the COPYRIGHT file.
|
||||||
|
|
||||||
|
.row-fluid
|
||||||
|
%h1
|
||||||
|
= t('_statistics')
|
||||||
|
= render 'statistics/statistic', name: t('statistics.name'), value: @statistics.name, activated: "serv-enabled"
|
||||||
|
= render 'statistics/statistic', name: t('statistics.version'), value: @statistics.version, activated: "serv-enabled"
|
||||||
|
= render 'statistics/statistic', name: t('statistics.registrations'), value: registrations_status(@statistics), activated: "serv-enabled"
|
||||||
|
- if @statistics.expose_user_counts?
|
||||||
|
= render 'statistics/statistic', name: t('statistics.total_users'), value: @statistics.total_users, activated: "serv-enabled"
|
||||||
|
= render 'statistics/statistic', name: t('statistics.active_users_halfyear'), value: @statistics.halfyear_users, activated: "serv-enabled"
|
||||||
|
= render 'statistics/statistic', name: t('statistics.active_users_monthly'), value: @statistics.monthly_users, activated: "serv-enabled"
|
||||||
|
- if @statistics.expose_posts_counts?
|
||||||
|
= render 'statistics/statistic', name: t('statistics.local_posts'), value: @statistics.local_posts, activated: "serv-enabled"
|
||||||
|
- if @statistics.expose_comment_counts?
|
||||||
|
= render 'statistics/statistic', name: t('statistics.local_comments'), value: @statistics.local_comments, activated: "serv-enabled"
|
||||||
|
.row-fluid
|
||||||
|
%h1
|
||||||
|
= t('statistics.services')
|
||||||
|
- Configuration::KNOWN_SERVICES.each do |service|
|
||||||
|
= render 'statistics/statistic', name: "#{service.capitalize}", value: service_status(service, @statistics.available_services), activated: service_class(service, @statistics.available_services)
|
||||||
|
|
@ -1,24 +1 @@
|
||||||
-# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
= render('statistics/statistics')
|
||||||
-# licensed under the Affero General Public License version 3 or later. See
|
|
||||||
-# the COPYRIGHT file.
|
|
||||||
%header
|
|
||||||
|
|
||||||
.row-fluid
|
|
||||||
%h1
|
|
||||||
= t('_statistics')
|
|
||||||
= render 'statistics/statistic', name: t('statistics.name'), value: @statistics.name, activated: "serv-enabled"
|
|
||||||
= render 'statistics/statistic', name: t('statistics.version'), value: @statistics.version, activated: "serv-enabled"
|
|
||||||
= render 'statistics/statistic', name: t('statistics.registrations'), value: registrations_status(@statistics), activated: "serv-enabled"
|
|
||||||
- if @statistics.expose_user_counts?
|
|
||||||
= render 'statistics/statistic', name: t('statistics.total_users'), value: @statistics.total_users, activated: "serv-enabled"
|
|
||||||
= render 'statistics/statistic', name: t('statistics.active_users_halfyear'), value: @statistics.halfyear_users, activated: "serv-enabled"
|
|
||||||
= render 'statistics/statistic', name: t('statistics.active_users_monthly'), value: @statistics.monthly_users, activated: "serv-enabled"
|
|
||||||
- if @statistics.expose_posts_counts?
|
|
||||||
= render 'statistics/statistic', name: t('statistics.local_posts'), value: @statistics.local_posts, activated: "serv-enabled"
|
|
||||||
- if @statistics.expose_comment_counts?
|
|
||||||
= render 'statistics/statistic', name: t('statistics.local_comments'), value: @statistics.local_comments, activated: "serv-enabled"
|
|
||||||
.row-fluid
|
|
||||||
%h1
|
|
||||||
= t('statistics.services')
|
|
||||||
- Configuration::KNOWN_SERVICES.each do |service|
|
|
||||||
= render 'statistics/statistic', name: "#{service.capitalize}", value: service_status(service, @statistics.available_services), activated: service_class(service, @statistics.available_services)
|
|
||||||
1
app/views/statistics/statistics.mobile.haml
Normal file
1
app/views/statistics/statistics.mobile.haml
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
= render('statistics/statistics')
|
||||||
Loading…
Reference in a new issue