100 lines
3.4 KiB
Plaintext
100 lines
3.4 KiB
Plaintext
- title = t '.title', week: @week.cweek, year: (@week + 4.days).year
|
|
|
|
- description = capture_haml do
|
|
= t '.week', count: @events.count, count_by_country: count_by_country(@events)
|
|
|
|
- second_part = capture_haml do
|
|
- @events.sort_by(&:start_time).each do |event|
|
|
= to_title event
|
|
\-----
|
|
= renumber_footnotes event.id, to_markdown(event.description)
|
|
\
|
|
* #{[event.place_name, event.full_address].compact.join ', '}
|
|
- if event.url.present?
|
|
* #{event.url}
|
|
* #{event.tags.collect { |tag| "[#{tag}](#{tag_url tag.name})" }.join ', '}
|
|
\
|
|
|
|
%h1= title
|
|
|
|
%description
|
|
:markdown
|
|
#{description}
|
|
|
|
%hr
|
|
|
|
.second-part
|
|
: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[cc_licensed]' value='1')
|
|
%input(type='hidden' name='news[section_id]' value='9')
|
|
%input(type='hidden' name='tags' value='agenda_du_libre')
|
|
%input(type='hidden' name='commit' value='Prévisualiser')
|
|
|
|
.field.title
|
|
%label(for='title') Titre
|
|
%input#title{ type: 'text', name: 'news[title]', value: title }
|
|
|
|
.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='https://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='https://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(future: false,
|
|
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='https://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="https://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édente')
|
|
- pre = 'https://linuxfr.org/news/agenda-du-libre-pour-la-semaine-'
|
|
- pre += "#{(@week - 1.week).cweek}-de-l-annee-#{(@week - 1.week).year}"
|
|
%input{ type: 'hidden', name: 'news[links_attributes][5][url]', value: pre }
|
|
%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
|