Meilleur affichage des stats
This commit is contained in:
parent
cda595d0f5
commit
4320902f06
42
app/assets/stylesheets/_awesome_mixins.scss
Normal file
42
app/assets/stylesheets/_awesome_mixins.scss
Normal file
@ -0,0 +1,42 @@
|
||||
// Mixins
|
||||
// --------------------------
|
||||
|
||||
@mixin fa-icon-rotate($degrees, $rotation) {
|
||||
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation});
|
||||
-webkit-transform: rotate($degrees);
|
||||
-moz-transform: rotate($degrees);
|
||||
-ms-transform: rotate($degrees);
|
||||
-o-transform: rotate($degrees);
|
||||
transform: rotate($degrees);
|
||||
}
|
||||
|
||||
@mixin fa-icon-flip($horiz, $vert, $rotation) {
|
||||
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=#{$rotation});
|
||||
-webkit-transform: scale($horiz, $vert);
|
||||
-moz-transform: scale($horiz, $vert);
|
||||
-ms-transform: scale($horiz, $vert);
|
||||
-o-transform: scale($horiz, $vert);
|
||||
transform: scale($horiz, $vert);
|
||||
}
|
||||
|
||||
@mixin fa-icon-base() {
|
||||
&:before {
|
||||
display: inline-block;
|
||||
font-family: FontAwesome;
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
line-height: 1;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
@mixin fa-icon($icon-char) {
|
||||
@include fa-icon-base();
|
||||
&:before {
|
||||
@if($icon-char != null) {
|
||||
content: $icon-char;
|
||||
}
|
||||
}
|
||||
}
|
@ -112,7 +112,8 @@ main
|
||||
margin-left: 2em
|
||||
line-height: 1.3em
|
||||
p
|
||||
margin: 0.95em 0
|
||||
margin: 0.95em auto
|
||||
max-width: 80em
|
||||
text-align: justify
|
||||
line-height: 1.3em
|
||||
&.label
|
||||
|
@ -14,6 +14,17 @@
|
||||
*= require_self
|
||||
*/
|
||||
|
||||
body.application.infos
|
||||
h4
|
||||
@import 'awesome_mixins'
|
||||
|
||||
body.application
|
||||
&.infos h4
|
||||
text-align: left
|
||||
|
||||
&.infos main h2:first-child
|
||||
@include fa-icon('')
|
||||
|
||||
&.contact main h2:first-child
|
||||
@include fa-icon('')
|
||||
|
||||
&.rules main h2:first-child
|
||||
@include fa-icon('')
|
||||
|
@ -1,20 +1,34 @@
|
||||
@import "compass"
|
||||
|
||||
table
|
||||
margin: auto
|
||||
margin: 1em auto
|
||||
border-spacing: 2px
|
||||
th
|
||||
padding: 0.3em 0.6em
|
||||
|
||||
table.list
|
||||
tr:nth-child(odd)
|
||||
background-color: #D1EAFF
|
||||
tr:nth-child(even)
|
||||
background-color: #C9E2F5
|
||||
td
|
||||
padding: 0.2em
|
||||
&.quantity
|
||||
text-align: right
|
||||
&.list
|
||||
tr:nth-child(odd)
|
||||
background-color: #D1EAFF
|
||||
tr:nth-child(even)
|
||||
background-color: #C9E2F5
|
||||
th
|
||||
font-size: larger
|
||||
td
|
||||
padding: 0.2em
|
||||
&.quantity
|
||||
text-align: right
|
||||
|
||||
dl
|
||||
margin: 1em auto
|
||||
max-width: 40em
|
||||
dt
|
||||
float: left
|
||||
padding: 0.2em 1em
|
||||
.quantity
|
||||
text-align: right
|
||||
dd
|
||||
padding: 0.2em 1em
|
||||
border-top: 1px solid #999
|
||||
|
||||
.view_link:link, .edit_link:link, .delete_link:link
|
||||
font-size: 0
|
||||
|
@ -3,7 +3,7 @@ h2.warning
|
||||
|
||||
.events.edit, .events.update, .events.cancel, .moderations, .notes
|
||||
table.list
|
||||
width: 100%
|
||||
min-width: 90%
|
||||
margin-top: 15px
|
||||
thead tr
|
||||
background-color: transparent
|
||||
@ -30,6 +30,8 @@ h2.warning
|
||||
th.actions
|
||||
padding: 0
|
||||
a
|
||||
padding: 0.2em
|
||||
display: inline-block
|
||||
font-weight: normal
|
||||
|
||||
main > h3
|
||||
|
@ -1,7 +1,3 @@
|
||||
.regions.stats
|
||||
table.list
|
||||
margin: 1em 0
|
||||
min-width: 60%
|
||||
text-align: left
|
||||
td.item
|
||||
width: 90%
|
||||
body.stats
|
||||
h3
|
||||
text-align: center
|
||||
|
@ -5,8 +5,8 @@ class RegionsController < InheritedResources::Base
|
||||
@city_events = Event.group(:city).having('count(city) > 3').order('count(city) desc').count(:city)
|
||||
|
||||
@month_events = Event
|
||||
.group('extract(year from start_time)')
|
||||
.group('extract(month from start_time)')
|
||||
.group('strftime("%Y", start_time)')
|
||||
.group('strftime("%m", start_time)')
|
||||
.count()
|
||||
end
|
||||
end
|
||||
|
@ -2,41 +2,35 @@
|
||||
%em.fa.fa-signal
|
||||
= title t '.title'
|
||||
|
||||
%h3=t '.general'
|
||||
%dl
|
||||
%dt=t '.all'
|
||||
%dd.quantity= Event.count()
|
||||
|
||||
%table.list
|
||||
%tr
|
||||
%td.item=t '.all'
|
||||
%td.quantity= Event.count()
|
||||
%tr
|
||||
%td.item=t '.allModeration'
|
||||
%td.quantity= Event.unscoped.where(moderated: 0).count()
|
||||
%dt=t '.allModeration'
|
||||
%dd.quantity= Event.unscoped.where(moderated: 0).count()
|
||||
|
||||
%h3=t '.regional'
|
||||
|
||||
%table.list
|
||||
%dl
|
||||
- @region_events.each do |region|
|
||||
%tr
|
||||
%td.item= region[0]
|
||||
%td.quantity= region[1]
|
||||
%dt.item= region[0]
|
||||
%dd.quantity= region[1]
|
||||
|
||||
%h3=t '.city'
|
||||
|
||||
%p=t '.city_conditions'
|
||||
|
||||
%table.list
|
||||
%dl
|
||||
- @city_events.each do |city|
|
||||
%tr
|
||||
%td.item= city[0]
|
||||
%td.quantity= city[1]
|
||||
%dt.item= city[0]
|
||||
%dd.quantity= city[1]
|
||||
|
||||
%h3=t '.dates'
|
||||
|
||||
%table.list
|
||||
%dl
|
||||
- @month_events.each do |month|
|
||||
%tr
|
||||
%td.item= l(Date.new(month[0][0], month[0][1]), format: :month).capitalize
|
||||
%td.quantity= month[1]
|
||||
%dt.item= l(Date.new(month[0][0].to_i, month[0][1].to_i), format: :month).capitalize
|
||||
%dd.quantity= month[1]
|
||||
|
||||
%h3=t '.web'
|
||||
|
||||
|
@ -163,13 +163,12 @@ Exemple: `%{tag}`\n
|
||||
Exemple: `%{daylimit}`"
|
||||
stats:
|
||||
title: Statistiques
|
||||
general: Statistiques générales
|
||||
all: Nombre d'événements validés depuis la création de l'Agenda
|
||||
allModeration: Nombre d'événements en cours de modération
|
||||
regional: Statistiques par région
|
||||
city: Statistiques par ville
|
||||
regional: Par région
|
||||
city: Par ville
|
||||
city_conditions: Seules les villes où plus de trois événements ont été organisés sont mentionnées.
|
||||
dates: Statistiques par date
|
||||
dates: Par date
|
||||
web: Statistiques Web
|
||||
webalizer: Des statistiques Web générées par Webalizer [sont disponibles](http://agendadulibre.org/stats/). Elles sont protégées par le login *stats*, mot de passe *Cuntipshaf6* pour éviter le *spam de referers*
|
||||
tags:
|
||||
@ -244,12 +243,18 @@ Exemple: `%{daylimit}`"
|
||||
users:
|
||||
sign_in:
|
||||
title: Identification
|
||||
lugs:
|
||||
index:
|
||||
title: Groupes d'Utilisateurs de Logiciels Libres
|
||||
show:
|
||||
title: Groupe d'Utilisateurs de Logiciels Libres
|
||||
|
||||
devise:
|
||||
sessions:
|
||||
new:
|
||||
title: Identification
|
||||
sign_in: Identifier
|
||||
|
||||
event_mailer:
|
||||
create:
|
||||
subject: "[Agenda du Libre] Votre événement: '%{subject}' est en attente de modération"
|
||||
|
@ -1,8 +1,4 @@
|
||||
Rails.application.routes.draw do
|
||||
get 'maps/index'
|
||||
|
||||
get 'map/index'
|
||||
|
||||
get 'application/infos'
|
||||
get 'application/contact'
|
||||
get 'application/rules'
|
||||
@ -21,6 +17,7 @@ Rails.application.routes.draw do
|
||||
end
|
||||
resources :tags, only: [ :index, :show ]
|
||||
resources :maps, only: [:index]
|
||||
resources :lugs, only: [:index, :show]
|
||||
|
||||
# Manage former php pages
|
||||
get 'showevent.php', to: redirect { |params, request| "events/#{request.params[:id]}" }
|
||||
|
Loading…
Reference in New Issue
Block a user