diff options
Diffstat (limited to 'app/views/quotes')
-rw-r--r-- | app/views/quotes/_quote.html.haml | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/app/views/quotes/_quote.html.haml b/app/views/quotes/_quote.html.haml index db6ab8b..acbab10 100644 --- a/app/views/quotes/_quote.html.haml +++ b/app/views/quotes/_quote.html.haml | |||
@@ -1,15 +1,17 @@ | |||
1 | %article.quote{ :id => "quote-#{quote.id}" } | 1 | %article.quote.h-entry{ :id => "quote-#{quote.id}" } |
2 | %data.p-name{ value: "\##{quote.id}" } | ||
3 | %data.u-url{ value: url_for(quote) } | ||
2 | %header.quote-header{ :id => "quote-header-#{quote.id}" } | 4 | %header.quote-header{ :id => "quote-header-#{quote.id}" } |
3 | = link_to_unless (quote.new_record? or current_page?(quote)), "\##{quote.id}", quote, :class => "quote-link" | 5 | = link_to_unless (quote.new_record? or current_page?(quote)), "\##{quote.id}", quote, :class => "quote-link" |
4 | %span.vote-link{ :id => "quote-upvote-link-#{quote.id}" }= link_to_unless (quote.new_record? or quote.already_upvoted?(request.remote_ip)), "Up", upvote_quote_path(quote.id), :remote => true, :rel => "nofollow", :class => "quote-upvote-link", method: :post | 6 | %span.vote-link{ :id => "quote-upvote-link-#{quote.id}" }= link_to_unless (quote.new_record? or quote.already_upvoted?(request.remote_ip)), "Up", upvote_quote_path(quote.id), :remote => true, :rel => "nofollow", :class => "quote-upvote-link", method: :post |
5 | %span.quote-rating{ :id => "quote-rating-#{quote.id}" }= "+#{quote.upvotes}/-#{quote.downvotes}" | 7 | %span.quote-rating{ :id => "quote-rating-#{quote.id}" }= "+#{quote.upvotes}/-#{quote.downvotes}" |
6 | %span.vote-link{ :id => "quote-downvote-link-#{quote.id}" }= link_to_unless (quote.new_record? or quote.already_downvoted?(request.remote_ip)), "Down", downvote_quote_path(quote.id), :remote => true, :rel => "nofollow", :class => "quote-downvote-link", method: :post | 8 | %span.vote-link{ :id => "quote-downvote-link-#{quote.id}" }= link_to_unless (quote.new_record? or quote.already_downvoted?(request.remote_ip)), "Down", downvote_quote_path(quote.id), :remote => true, :rel => "nofollow", :class => "quote-downvote-link", method: :post |
7 | %datetime= quote.published_date | 9 | %time.dt-published{ datetime: quote.created_at.strftime("%Y-%m-%dT%H:%M:%SZ%z") }= quote.published_date |
8 | - if user_signed_in? and !quote.new_record? | 10 | - if user_signed_in? and !quote.new_record? |
9 | = link_to "Edit", edit_admin_quote_path(quote), :class => "quote-edit-link" | 11 | = link_to "Edit", edit_admin_quote_path(quote), :class => "quote-edit-link" |
10 | - if quote.audio.attached? | 12 | - if quote.audio.attached? |
11 | .audioplayer= audio_tag(rails_blob_url(quote.audio), controls: true) | 13 | .audioplayer= audio_tag(rails_blob_url(quote.audio), controls: true) |
12 | %blockquote.quote-body= raw quote_format(h(quote.content)) | 14 | %blockquote.quote-body.e-content= raw quote_format(h(quote.content)) |
13 | - if !quote.new_record? and quote.has_extra? | 15 | - if !quote.new_record? and quote.has_extra? |
14 | .quote-footer | 16 | .quote-footer |
15 | - if quote.has_notes? | 17 | - if quote.has_notes? |