A calendar management project, for events and activities related to communities fighting for freedoms.
This can be related to software, art, data, hardware, content, commons, internet.
https://www.agendadulibre.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
agenda-libre-ruby/app/views/digests/markdown.html.haml

122 lines
4.0 KiB

- title = "Agenda du Libre pour la semaine #{@week.cweek} de l'année #{@week.year}"
- description = capture_haml do
- @events.group_by { |evt| evt.start_time.to_date }.sort.each do |day, evts|
= l(day, format: :long).capitalize
\-----
- evts.each do |event|
* [[#{event.city}] #{event.title}](#{event_url event})
\
- second_part = capture_haml do
= title
\=====
- @events.sort_by { |e| e.start_time }.each do |event|
- @event = event
[#{event.city}] [#{event.title}](#{event_url event})
\-----
%p= display_date
%p= event.full_address
> #{strip_tags(@event.description).remove(/\n.*/)}
\
* #{link_to @event.url, @event.url}
* #{@event.tags.split.collect { |tag| "[#{tag}](#{tag_url tag})" }.join ', '}
\
%h1= title
:markdown
#{description}
%hr
:markdown
* [April](http://april.org)
* [Agenda du Libre](http://www.agendadulibre.org)
* [Carte des événements](#{maps_url period:
{ year: @week.year, week: @week.cweek }})
* [Proposer un événement](http://www.agendadulibre.org/events/new)
* [Annuaire des organisations](http://www.agendadulibre.org/orgas)
* [Agenda pour la semaine précédante]
(http://linuxfr.org/news/agenda-pour-la-semaine-#{(@week - 1.week).cweek}-de-l-annee-#{(@week - 1.week).year}")
%hr
:markdown
#{second_part}
%hr
%form(action='https://linuxfr.org/news' method='post' accept-charset='UTF-8')
%input(type='hidden' name='utf8' value='✓')
%input(type='hidden' name='news[section_id]' value='9')
%input(type='hidden' name='commit' value='Prévisualiser')
.field.title
%label(for='title') Titre
%input#title(type='text' name='news[title]' value=title)
.field.authenticity_token
%label(for='token') Jeton
%input#token(type='text' name='authenticity_token')
.field.description
%label(for='description') Contenu
%textarea#description(name='news[wiki_body]')= description
.field.links
%input(type='hidden' name='news[links_attributes][0][title]'
value='April')
%input(type='hidden' name='news[links_attributes][0][url]'
value='http://april.org')
%input(type='hidden' name='news[links_attributes][0][lang]'
value='fr')
%input(type='hidden' name='news[links_attributes][1][title]'
value='Agenda du Libre')
%input(type='hidden' name='news[links_attributes][1][url]'
value='http://www.agendadulibre.org')
%input(type='hidden' name='news[links_attributes][1][lang]'
value='fr')
%input(type='hidden' name='news[links_attributes][2][title]'
value='Carte des événements')
%input(type='hidden' name='news[links_attributes][2][url]'
value="#{maps_url period: { year: @week.year, week: @week.cweek }}")
%input(type='hidden' name='news[links_attributes][2][lang]'
value='fr')
%input(type='hidden' name='news[links_attributes][3][title]'
value='Proposer un événement')
%input(type='hidden' name='news[links_attributes][3][url]'
value='http://www.agendadulibre.org/events/new')
%input(type='hidden' name='news[links_attributes][3][lang]'
value='fr' size='2')
%input(type='hidden' name='news[links_attributes][4][title]'
value='Annuaire des organisations')
%input(type='hidden' name='news[links_attributes][4][url]'
value="http://www.agendadulibre.org/orgas")
%input(type='hidden' name='news[links_attributes][4][lang]'
value='fr' size='2')
%input(type='hidden' name='news[links_attributes][5][title]'
value='Agenda de la semaine précédante')
%input(type='hidden' name='news[links_attributes][5][url]'
value="https://linuxfr.org/news/agenda-pour-la-semaine-#{(@week - 1.week).cweek}-de-l-annee-#{(@week - 1.week).year}")
%input(type='hidden' name='news[links_attributes][5][lang]'
value='fr' size='2')
.field.description
%label(for='second_part') Seconde partie
%textarea#second_part(name='news[wiki_second_part]')= second_part
.actions
%button
%em.fa.fa-check
Prévisualiser