diff --git a/app/controllers/regions_controller.rb b/app/controllers/regions_controller.rb index 9c205de3..80ac36aa 100644 --- a/app/controllers/regions_controller.rb +++ b/app/controllers/regions_controller.rb @@ -1,8 +1,4 @@ class RegionsController < InheritedResources::Base - def icallist - @regions = Region.all - end - def stats @region_events = Event.joins(:related_region).group(:name).count(:name) diff --git a/app/views/events/index.html.haml b/app/views/events/index.html.haml index f14b526b..720f74a4 100644 --- a/app/views/events/index.html.haml +++ b/app/views/events/index.html.haml @@ -46,8 +46,11 @@ = event.title .formats + %em.fa.fa-rss =raw t '.calendar_in', - rss: link_to('rss', events_url(:rss, + rss: link_to('RSS', events_url(:rss, tag: params[:tag], region: params[:region])), + webcal: link_to('webcal', events_url(:rss, + tag: params[:tag], protocol: 'webcal', format: :ics, tag: params[:tag], region: params[:region])), ical: link_to('iCal', events_url(:rss, tag: params[:tag], format: :ics, tag: params[:tag], region: params[:region])) diff --git a/app/views/events/new.html.haml b/app/views/events/new.html.haml index cddabdea..3b4bc50c 100644 --- a/app/views/events/new.html.haml +++ b/app/views/events/new.html.haml @@ -1,4 +1,6 @@ -%h2=t '.title' +%h2 + %em.fa.fa-pencil + =title t '.title' - if @event && params[:visu] %hr/ diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 4e854531..89e34ed1 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -50,14 +50,29 @@ %footer.bottom %nav - = link_to t('.propose'), new_event_path - = link_to t('.rss'), regions_url - = link_to t('.ical'), icallist_regions_url - = link_to t('.map'), maps_url - = link_to t('.tags'), tags_url - = link_to t('.infos'), application_infos_url - = link_to t('.stats'), stats_regions_url - = link_to t('.contact'), application_contact_url - = link_to t('.moderation'), moderations_url + = link_to new_event_path do + %em.fa.fa-pencil + =t '.propose' + = link_to regions_url do + %em.fa.fa-rss + =t '.feeds' + = link_to maps_url do + %em.fa.fa-map-marker + =t '.map' + = link_to tags_url do + %em.fa.fa-tags + =t '.tags' + = link_to application_infos_url do + %em.fa.fa-info + =t '.infos' + = link_to stats_regions_url do + %em.fa.fa-bar-chart-o + =t '.stats' + = link_to application_contact_url do + %em.fa.fa-envelope-o + =t '.contact' + = link_to moderations_url do + %em.fa.fa-filter + =t '.moderation' %em#loading.fa.fa-spin.fa-circle-o-notch diff --git a/app/views/maps/index.html.haml b/app/views/maps/index.html.haml index c4383a24..259d63a5 100644 --- a/app/views/maps/index.html.haml +++ b/app/views/maps/index.html.haml @@ -1,4 +1,6 @@ -%h2=t '.title' +%h2 + %em.fa.fa-map-marker + =title t '.title' #map diff --git a/app/views/moderations/index.html.haml b/app/views/moderations/index.html.haml index 3bf2a951..5760d328 100644 --- a/app/views/moderations/index.html.haml +++ b/app/views/moderations/index.html.haml @@ -1,4 +1,6 @@ -%h2=t '.title' +%h2 + %em.fa.fa-filter + = title t '.title' :markdown #### #{t '.rules'} diff --git a/app/views/regions/icallist.html.haml b/app/views/regions/icallist.html.haml deleted file mode 100644 index 9af3cb5d..00000000 --- a/app/views/regions/icallist.html.haml +++ /dev/null @@ -1,17 +0,0 @@ -%h2=t '.title' - -:markdown - #{t '.presentation'} - -%table.list - %tr - %td=t :all, scope: 'activerecord.attributes.region.name_values' - %td= link_to :webcal, events_path(protocol: :webcal, format: :ics, region: :all, only_path: false) - - - @regions.each do |region| - %tr - %td= region.name - %td= link_to :webcal, events_path(protocol: :webcal, format: :ics, region: region.id, only_path: false) - -:markdown - #{t '.help'} diff --git a/app/views/regions/index.html.haml b/app/views/regions/index.html.haml index f935159a..a7bca52a 100644 --- a/app/views/regions/index.html.haml +++ b/app/views/regions/index.html.haml @@ -1,25 +1,24 @@ -%h2=t '.title' +%h2 + %em.fa.fa-rss + = title t '.title' -%p Chaque flux RSS liste les évènements pour les 30 prochains jours en cours dans une région donnée. En vous abonnant à un flux régional, vous recevrez des informations sur les évènements de votre région à portée locale, mais également les évènements à portée nationale comme les RMLL. +%p=t '.quick' %table.list - %tr - %td=t :all, scope: 'activerecord.attributes.region.name_values' - %td= link_to :rss, events_path(format: :rss, region: :all) - - - @regions.each do |region| + %thead %tr - %td= region.name - %td= link_to :rss, events_path(format: :rss, region: region.id) + %th=t :all, scope: 'activerecord.attributes.region.name_values' + %th= link_to 'RSS', events_path(format: :rss, region: :all) + %th= link_to :webcal, events_path(protocol: :webcal, format: :ics, region: :all, only_path: false) + %th= link_to :iCal, events_path(format: :ics, region: :all, only_path: false) + + %tbody + - @regions.each do |region| + %tr + %td= region.name + %td= link_to 'RSS', events_path(format: :rss, region: region.id) + %td= link_to :webcal, events_path(protocol: :webcal, format: :ics, region: region.id, only_path: false) + %td= link_to :iCal, events_path(format: :ics, region: region.id, only_path: false) :markdown - Quelques fonctionnalités intéressantes des flux RSS : - - * Vous pouvez limiter les évènements d'un flux RSS à un certain tag, en - passant le paramètre `tag`. Cela permet par exemple de récupérer un flux RSS - des évènements organisés uniquement par votre association, à partir du moment - où vous pensez à marquer tous vos évènements avec un tag précis. - Exemple: `http://www.agendadulibre.org/rss.php?tag=toulibre`. - * Vous pouvez modifier la limite aux 30 prochains jours des flux RSS en - utilisant le paramètre `daylimit`. - Exemple: `http://www.agendadulibre.org/rss.php?region=6&daylimit=42` + #{t '.help', tag: events_path(format: :rss, tag: 'toulibre', only_path: false), daylimit: events_path(format: :ics, daylimit: '42', only_path: false)} diff --git a/app/views/tags/index.html.haml b/app/views/tags/index.html.haml index 34c93938..efdbf085 100644 --- a/app/views/tags/index.html.haml +++ b/app/views/tags/index.html.haml @@ -1,4 +1,6 @@ -%h2=t '.title' +%h2 + %em.fa.fa-tags + = title t '.title' - @tags.each do |tag| %span.tag(class="size_#{Math.log2(tag[1]).to_i}") diff --git a/config/locales/fr.yml b/config/locales/fr.yml index f1becd06..a006b39f 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -104,8 +104,7 @@ fr: belgique: Belgique suisse: Suisse propose: Proposer un événement - rss: Flux RSS - ical: Calendriers iCal + feeds: Flux RSS/iCal map: Carte tags: Tags infos: Informations @@ -114,7 +113,7 @@ fr: moderation: Modération events: index: - calendar_in: Ce calendrier en %{rss}, %{ical} + calendar_in: Ce calendrier en %{rss}, %{webcal} ou %{ical} all_regions: Toutes les régions show: lug-list: Groupes d'utilisateurs de la région @@ -152,31 +151,14 @@ fr: ok: Votre événément a bien été annulé regions: index: - title: Liste des flux RSS - icallist: - title: Liste des calendriers iCal - presentation: Chaque calendrier iCal liste les événements pour les 30 jours à venir dans une région donnée. En vous inscrivant au calendrier de votre région, vous verrez apparaître les événements de votre région à portée locale, ainsi que tous les événements à portée nationale, comme les RMLL. Le lien *webcal* permet d'ajouter un calendrier dans votre logiciel favori, tandis que le lien *google* permet d'ajouter un calendrier à votre agenda Google. - help: "Ce calendrier a été testé avec succès avec: + title: Liste des flux + quick: Chaque flux liste les évènements pour les 30 prochains jours en cours dans une région donnée. En vous abonnant à un flux régional, vous recevrez des informations sur les évènements de votre région à portée locale, mais également les évènements à portée nationale comme les RMLL. + help: "Quelques fonctionnalités intéressantes:\n \n -\n* [Mozilla Sunbird](http://www.mozilla.org/projects/calendar/sunbird.html), l'application Calendrier indépendante de Mozilla.
-\nPour ajouter l'Agenda du Libre, allez dans *File* puis *Subscribe to Remote Calendars*. Indiquer qu'il s'agit d'un calendrier distant en sélectionnant *Remote*. À l'étape suivante, sélectionnez *WebDAV*, et indiquer l'URL du calendrier que vous trouverez ci-dessous. À l'étape qui suit, donner un nom à ce calendrier, puis validez. -\n* L'[extension Calendar](http://www.mozilla.org/projects/calendar/download.html) pour Mozilla Firefox.
-\nPour ajouter l'Agenda du Libre, allez dans *Fichier* puis *S'abonner à un calendrier distant*. Dans la fenêtre qui s'ouvre, entrez un nom pour le calendrier, ainsi que l'URL de celui-ci, disponible dans la liste ci-dessus. -\n* [KOrganizer](http://korganizer.kde.org/), le calendrier de KDE -\n* [Evolution](http://www.gnome.org/projects/evolution/) (versions 2.0.4 et 2.2.x). -\n* vCalendar, [un plugin](http://claws.sylpheed.org/plugins.php) pour [Sylpheed Claws](http://claws.sylpheed.org/). Chargez le module par le menu Configuration/Modules, puis avec un clic droit sur le dossier vCalender, choisissez \"S'inscrire à un Webcal\". -\n* [GNU Emacs](http://www.gnu.org/software/emacs/emacs.html), à l'aide de l'extension [icalendar.el](http://de.geocities.com/ulf_jasper/lisp/icalendar.el.txt) -\n -\nLes applications suivantes peuvent sans doute fonctionner: -\n -\n* Une [extension Calendar](http://www.mozilla.org/projects/calendar/download.html) pour Thunderbird. -\n -\nN'hésitez pas à [nous faire part](devel AT agendadulibre.org) de vos succès et de vos échecs avec d'autres logiciels. -\n -\nQuelques fonctionnalités additionnelles des calendriers iCal: -\n -\n* Vous pouvez limiter les événements d'un calendrier iCal à un certain tag, en passant le paramètre `tag`. Cela permet par exemple de récupérer un calendrier iCal des événements organisés uniquement par votre association, à partir du moment où vous pensez à marquer tous vos événements avec un tag précis.
-Exemple: `http://www.agendadulibre.org/ical.php?tag=toulibre`." +* Vous pouvez limiter les évènements à un certain tag, en passant le paramètre `tag`. Cela permet par exemple de récupérer un flux des évènements organisés uniquement par votre association, à partir du moment où vous pensez à marquer tous vos évènements avec un tag précis. \n +Exemple: `%{tag}`\n +* Vous pouvez modifier la limite aux 30 prochains jours des flux en utilisant le paramètre `daylimit`. \n +Exemple: `%{daylimit}`" stats: title: Statistiques general: Statistiques générales diff --git a/config/routes.rb b/config/routes.rb index 61a911b8..e4f62bbe 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -17,7 +17,6 @@ Rails.application.routes.draw do put :accept, on: :member end resources :regions, only: [ :index ] do - get 'icallist', on: :collection get 'stats', on: :collection end resources :tags, only: [ :index, :show ]