Added flag and slightly reorganised the moderation page

This commit is contained in:
echarp 2019-12-25 16:46:50 +01:00
parent 2f07502d6f
commit ec4e96d9bb
11 changed files with 44 additions and 24 deletions

View File

@ -1,10 +1,13 @@
h2.warning
color: red
body.moderations h3
text-align: center
.moderations, .notes
table.list
min-width: 90%
margin-top: 15px
margin-top: 25px
margin-bottom: 25px
td
padding-top: 0.5em
padding-bottom: 0.5em

View File

@ -69,9 +69,6 @@ html.iframe main > ul.regions
.flag-icon-ca-qc
background-image: image-url(regions/CA-QC)
body.stats h3
text-align: center
table.list.dates
th, td
padding: 0 0.6em

View File

@ -1,3 +1,6 @@
body.stats h3
text-align: center
table.list.dates
width: 100%
thead th

View File

@ -19,6 +19,10 @@ class Region < ApplicationRecord
name
end
def flag
region.try(:flag) || code.try(:downcase)
end
# Attempt to get a corresponding timezone, used for ical
def tzid
country = TZInfo::Country.get region.try(:code) || code

View File

@ -3,24 +3,33 @@
= title t '.title'
:markdown
#### #{t '.rules'}
### #{t '.rules'}
- if @orgas.present?
%table.list
%thead
%tr
%th= Orga.human_attribute_name :name
%th(colspan='5')
%h3
%em.fa.fa-users
= Orga.model_name.human.pluralize @orgas.count
%tr
%th= Orga.human_attribute_name :city
%th= Orga.human_attribute_name :region
%th(colspan='2')= Orga.human_attribute_name :name
%th= Orga.human_attribute_name :submission_time
%th= t '.actions'
%tbody
- @orgas.each do |orga|
%tr
%td{ title: orga.region }
= flag_icon orga.region.flag
= orga.city || orga.region
%td.kind
- if orga.kind
%em.fa{ class: "fa-#{orga.kind.icon}",
title: Kind.human_attribute_name("name_#{orga.kind.name}") }
%td= orga.name
%td= orga.city
%td= orga.region
%td= time_ago_in_words orga.submission_time
%th.actions
= link_to edit_orga_path orga do
@ -39,23 +48,28 @@
%table.list
%thead
%tr
%th(colspan='5')
%h3
%em.fa.fa-calendar
= Event.model_name.human.pluralize @events.count
%tr
%th= Event.human_attribute_name :city
%th= Event.human_attribute_name :title
%th
= Event.human_attribute_name :start_time
\-
= Event.human_attribute_name :end_time
%th= Event.human_attribute_name :city
%th= Event.human_attribute_name :region
%th= Event.human_attribute_name :submission_time
%th= t '.actions'
%tbody
- @events.each do |event|
%tr
%td{ title: event.region }
= flag_icon event.region.flag
= event.city
%td= event.title
%td= display_date event
%td= event.city
%td= event.region.name
%td= time_ago_in_words event.submission_time
%th.actions
= link_to edit_moderation_path event do
@ -80,8 +94,7 @@
- event.notes.each do |note|
%tr
%td.empty/
%td.note(colspan="5")
%td.note(colspan='6')
= note.contents
%em.author
= t '.posted_by',
@ -92,7 +105,7 @@
= link_to edit_user_registration_path do
%em.fa.fa-lock
= t('change_my_password', scope: 'devise.passwords.edit')
\|
\-
= link_to destroy_user_session_path, method: :delete do
%em.fa.fa-sign-out-alt
= t 'logout'

View File

@ -2,7 +2,7 @@
- if filter_region.url.present?
= link_to filter_region.url do
- if filter_region.code.present?
= flag_icon filter_region.code.downcase
= flag_icon filter_region.flag
= t filter_region.code, scope: :countries, default: filter_region.name
%small
%em.fa.fa-external-link-alt
@ -10,7 +10,7 @@
- else
= link_to region: params[:region] == filter_region.id.to_s ? '' : filter_region do
- if filter_region.code.present?
= flag_icon filter_region.code.downcase
= flag_icon filter_region.flag
= t filter_region.code, scope: :countries, default: filter_region.name
- else

View File

@ -182,7 +182,7 @@ Veranstaltung zu ändern, um sie vollständiger, lesbarer oder attraktiver zu ge
link: Diese Veranstaltung findet statt im Rahmen des
moderations:
index:
title: Veranstaltungen zu bestätigen
title: Zu bestätigen
rules: Moderatoren, bitte [Moderation Empfehlungen](/pages/rules)
Lesen und Berücksichtigen.
actions: Aktionen

View File

@ -174,7 +174,7 @@ it more readable or agreable."
link: This event is part of
moderations:
index:
title: Events to moderate
title: To moderate
rules: Moderators, thanks for reading and taking notice of [moderation
recommandations](/pages/rules).
actions: Actions

View File

@ -190,7 +190,7 @@ procédure à l'aide d'un [script](/adl-submit.py)"
link: Cet événement s'inscrit dans le cadre de
moderations:
index:
title: Événements à modérer
title: À modérer
rules: Modérateurs, merci de lire et de tenir compte des [recommandations
de modération](/pages/rules).
actions: Actions

View File

@ -185,7 +185,7 @@ te maken."
link: Dit evenement past in het kader van
moderations:
index:
title: Evaluatie van de evenementen
title: Evaluatie
rules: Moderators opgelet, aub. na het lezen rekening houden met
[aanbevelingen van moderatie](/pages/rules)
actions: Acties

View File

@ -167,7 +167,7 @@ completa, deixando o texto mais legível e agradável.
other: "%{count} eventos"
moderations:
index:
title: Eventos para moderar
title: Para moderar
rules: Moderadores, obrigado por ler e tomar conhecimento das [recomendações
de moderação](/pages/rules).
actions: Ações