agenda-libre-ruby/app/views/tags/show.html.haml

66 lines
2.0 KiB
Plaintext

%h2
=t '.title'
«
%em= params[:id]
»
%nav
= link_to tags_path, class: :back do
%em.fa.fa-arrow-left
= Event.human_attribute_name(:tag).pluralize
\/
= link_to events_path tag: params[:id] do
%em.fa.fa-calendar
Agenda
\/
= link_to events_path format: :rss, tag: params[:id] do
%em.fa.fa-rss
RSS
\/
= link_to events_path format: :ics, tag: params[:id] do
%em.fa.fa-th-list
iCal
\/
= link_to maps_path tag: params[:id] do
%em.fa.fa-map-marker
OpenStreetMap
\/
= link_to maps_path format: :json, tag: params[:id] do
%em.fa.fa-dot-circle-o
GeoJSON
- if @events_future.any? || @events_past.any?
%fieldset
%legend
%em.fa.fa-calendar
= Event.model_name.human.pluralize
- if @events_future.any?
%h3=raw t 'future', count: @events_future.count
%ul.fa-ul
- @events_future.order('start_time asc').each do |event|
%li
= link_to event do
- if event.locality?
%em.locality.fa-li.fa.fa-globe(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_1'}")
- else
%em.locality.fa-li.fa.fa-shield(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_0'}")
%em.city= event.city
= event.title
.date= display_date event
- if @events_past.any?
%h3=raw t 'past', count: @events_past.count
%ul.fa-ul
- @events_past.order('start_time desc').each do |event|
%li
= link_to event do
- if event.locality?
%em.locality.fa-li.fa.fa-globe(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_1'}")
- else
%em.locality.fa-li.fa.fa-shield(title="#{Event.human_attribute_name :locality} #{t 'attributes.locality_0'}")
%em.city= event.city
= event.title
.date= display_date event
#map.events(data-url="#{maps_path format: :json, tag: params[:id]}")