diff --git a/app/assets/stylesheets/maps.sass b/app/assets/stylesheets/maps.sass index 22b0fd07c7fd6f802c272bde05eeb3a3fb16f5ae..509eb250976a13b9637b54f37ee08b49cbd4285f 100644 --- a/app/assets/stylesheets/maps.sass +++ b/app/assets/stylesheets/maps.sass @@ -4,7 +4,7 @@ * /* Popup are better displayed with this: */ max-width: initial - ul.feeds li + ul li a display: inline-block .awesome-marker diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index e5b3d8d80c27a3eb68fba30c4ccd6d70e9821156..34769bc62b89e247d865a740c5818381e520635b 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -1,7 +1,6 @@ # Manage event and organisation tags class TagsController < InheritedResources::Base has_scope :region, :locality, :daylimit - has_scope :period, type: :hash, using: %i[year week] has_scope :tag, as: :id def index @@ -22,6 +21,7 @@ class TagsController < InheritedResources::Base def show @events_future = apply_scopes Event.moderated.future @events_past = apply_scopes Event.moderated.past + @orgas = apply_scopes Orga.moderated.active respond_to do |format| format.html diff --git a/app/views/maps/_events.html.haml b/app/views/maps/_events.html.haml index de45e1ec0a3d265219e0476b2f8e7a555a388a56..8380b272eba1e361bbe8c025aa84c2d52360c707 100644 --- a/app/views/maps/_events.html.haml +++ b/app/views/maps/_events.html.haml @@ -1,6 +1,6 @@ = render '/regions/filter' -%ul.list.feeds#map +%ul.list.events#map %li = link_to maps_path format: :json do .awesome-marker.awesome-marker-icon-blue diff --git a/app/views/maps/_tag.html.haml b/app/views/maps/_tag.html.haml new file mode 100644 index 0000000000000000000000000000000000000000..294e6614125db356eb0b1a284412b84611e505b2 --- /dev/null +++ b/app/views/maps/_tag.html.haml @@ -0,0 +1,20 @@ +%ul.list#map + %li + = link_to maps_path tag: params[:id], format: :json do + .awesome-marker.awesome-marker-icon-blue + %i.icon-white.fa.fa-calendar + - if params[:future] == 'false' + = Event.model_name.human + - else + = t '.future' + + - cs = %w[blue red darkred orange green darkgreen purple darkpuple cadetblue] + - idx = 1 + - Kind.all.each do |kind| + %li + = link_to map_path kind.name, tag: params[:id], format: :json do + .awesome-marker{ class: "awesome-marker-icon-#{cs[idx % cs.length]}" } + %i.icon-white.fa{ class: "fa-#{kind.icon}" } + = Kind.human_attribute_name "name_#{kind.name}" + - idx += 1 + diff --git a/app/views/tags/_aside.html.haml b/app/views/tags/_aside.html.haml new file mode 100644 index 0000000000000000000000000000000000000000..4aba9a1a9429f4a5b23329d25cbe5e091818adbd --- /dev/null +++ b/app/views/tags/_aside.html.haml @@ -0,0 +1,46 @@ +%aside + - if @orgas.present? + %h2 + = link_to orgas_path do + %em.fa.fa-users + = Orga.model_name.human.pluralize + %ul.fa-ul + - @orgas.each do |orga| + %li + = link_to orga do + - if orga.kind + %em.fa.fa-li{ class: "fa-#{orga.kind.icon}", + title: Kind.human_attribute_name("name_#{orga.kind.name}") } + = orga.name + = render partial: '/orgas/favicon', locals: { orga: orga } + + %h2 + %em.fa.fa-link + = t '.links' + + %ul.fa-ul + %li + = link_to tags_path, class: :back do + %em.fa.fa-li.fa-arrow-left + = Event.human_attribute_name :tags + %li + = link_to events_path tag: params[:id] do + %em.fa.fa-li.fa-calendar + Agenda + %li + = link_to events_path format: :rss, tag: params[:id] do + %em.fa.fa-li.fa-rss + RSS + %li + = link_to events_path format: :ics, tag: params[:id] do + %em.fa.fa-li.fa-th-list + iCal + %li + = link_to maps_path tag: params[:id] do + %em.fa.fa-li.fa-map-marker + OpenStreetMap + %li + = link_to maps_path format: :json, tag: params[:id] do + %em.fa.fa-li.fa-dot-circle + GeoJSON + diff --git a/app/views/tags/show.html.haml b/app/views/tags/show.html.haml index a267c6526eda63fced5cfb16b4e6eacec10e050e..b012309629e44a2af6a415474c38b7e71e1b4f89 100644 --- a/app/views/tags/show.html.haml +++ b/app/views/tags/show.html.haml @@ -1,5 +1,3 @@ -= render partial: '/tags/context', locals: { tags: params[:id] } - %h2 %em.fa.fa-tag = title params[:id] @@ -7,36 +5,10 @@ %em.fa.fa-forward = t '.count', count: @events_future.count -%aside - %h2 - %em.fa.fa-link - = t '.links' +- unless params[:iframe] + = render '/maps/tag' - %ul.fa-ul - %li - = link_to tags_path, class: :back do - %em.fa.fa-li.fa-arrow-left - = Event.human_attribute_name :tags - %li - = link_to events_path tag: params[:id] do - %em.fa.fa-li.fa-calendar - Agenda - %li - = link_to events_path format: :rss, tag: params[:id] do - %em.fa.fa-li.fa-rss - RSS - %li - = link_to events_path format: :ics, tag: params[:id] do - %em.fa.fa-li.fa-th-list - iCal - %li - = link_to maps_path tag: params[:id] do - %em.fa.fa-li.fa-map-marker - OpenStreetMap - %li - = link_to maps_path format: :json, tag: params[:id] do - %em.fa.fa-li.fa-dot-circle - GeoJSON += render 'aside' - @events_future.order('start_time asc').each do |event| %article.event{ class: event.tag_list } diff --git a/config/locales/views/de.yml b/config/locales/views/de.yml index c42e21be342b00b66c02725694c0777d6771f37e..baf68662673a113848e39e0f3344c4e7d6744a51 100644 --- a/config/locales/views/de.yml +++ b/config/locales/views/de.yml @@ -263,6 +263,8 @@ erneut zu übermitteln." title: Karte der Veranstaltungen und Organisationen events: future: Kommende Veranstaltung + tag: + future: Kommende Veranstaltung users: sign_in: title: Identifizierung diff --git a/config/locales/views/en.yml b/config/locales/views/en.yml index fb1a889266a5c8722366f86326e594843da48cd6..6042e051fa62d3b09289514ae0884d8635b1230a 100644 --- a/config/locales/views/en.yml +++ b/config/locales/views/en.yml @@ -251,6 +251,8 @@ description." title: Events and organisations map events: future: Coming event + tag: + future: Future users: sign_in: title: Authentication diff --git a/config/locales/views/fr.yml b/config/locales/views/fr.yml index 10cbd34a35ff2de52e5a25faf804690b169c7091..42b06165df0dbe295127df3a6bcaf3da42c3c74d 100644 --- a/config/locales/views/fr.yml +++ b/config/locales/views/fr.yml @@ -270,6 +270,8 @@ description plus complète." title: Carte des événements et organisations events: future: Événement à venir + tag: + future: Événement à venir users: sign_in: title: Identification diff --git a/config/locales/views/nl.yml b/config/locales/views/nl.yml index b812120e7100f9b28008f6e8a3e8fc4ae7b02672..37408b092c8bd96d5d081c6f060801f749873086 100644 --- a/config/locales/views/nl.yml +++ b/config/locales/views/nl.yml @@ -265,6 +265,8 @@ vollediger beschrijving." title: Evenementen en organisaties kaart events: future: Aankomende evenement + tag: + future: Aankomende evenement users: sign_in: title: Identificatie diff --git a/config/locales/views/pt-BR.yml b/config/locales/views/pt-BR.yml index 3d635e3646f0d8dfd0807f2f2dc159c74c145b3f..0c327c7858857afe65cf738a2ff9714aafd3302d 100644 --- a/config/locales/views/pt-BR.yml +++ b/config/locales/views/pt-BR.yml @@ -244,6 +244,8 @@ descrição mais completa." title: Mapa de eventos e organizações events: future: Evento Futuro + tag: + future: Evento Futuro users: sign_in: title: Autenticação