Skip to content

Commit

Permalink
UX-fix: improve notifications emails - show map link for even when ev…
Browse files Browse the repository at this point in the history
…ents == 1
  • Loading branch information
lksv committed May 4, 2016
1 parent 78da840 commit 0412407
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion app/views/user_mailer/new_events.html.haml
Expand Up @@ -37,7 +37,15 @@
Dokument:
= link_to document.title, polymorphic_url(document)

- if events.size > 1
- if events.size == 1
Přímý odkaz do mapy:
- event = events.first
= show_event(event)
= surround '[', ']' do
= link_to 'dokument',
polymorphic_url(document, anchor: "addressBlock-#{event.address_block.id}"),
data: {:'no-turbolink' => 'true' }
- else # e.g. there are more events from this document in notification area
- max_doc_ref = 10
- if doc_events.size > max_doc_ref
%div= "Adresa je v textu odkazována celkem #{doc_events.size} krát."
Expand Down

0 comments on commit 0412407

Please sign in to comment.