agenda-libre-ruby/app/views/moderations/index.html.haml

56 lines
1.8 KiB
Plaintext

%h2=t '.title'
%strong<
Modérateurs, merci de lire et de tenir compte des
= link_to 'recommandations de modération', 'http://agendadulibre.org/moderation-howto.php'
\.
%table.list
%thead
%tr
%th= Event.human_attribute_name :title
%th=t '.date'
%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= event.title
%td
- if event.same_day?
Le #{l event.start_time.to_date, format: :long},
de #{l event.start_time, format: :hours} à #{l event.end_time, format: :hours}
- else
Du
=l event.start_time, format: :at
au
#{l event.end_time, format: :at}
%td= event.city
%td= event.region.name
%td= time_ago_in_words event.submission_time.to_date
%th.actions
= link_to t('edit'), edit_moderation_path(event), class: 'fa-pencil'
\-
= link_to t('validate'), edit_moderation_path(event), class: 'fa-thumbs-up'
\-
= link_to t('refuse'), edit_moderation_path(event), class: 'fa-thumbs-down'
%br/
= link_to t('.askInfos'), edit_moderation_path(event), class: 'fa-bullhorn'
%br/
= link_to t('.createNote'), new_moderation_note_path(event), class: 'fa-files-o'
- event.notes.each do |note|
%tr
%td.empty/
%td.note(colspan="5")
=raw note.contents
%em.author
=t '.posted_by',
author: "#{note.author.firstname} #{note.author.lastname}",
date: l(note.date, format: :at) rescue nil
.logout= link_to t('logout'), destroy_user_session_path, method: :delete