about summary refs log tree commit diff stats
path: root/app/views/quotes/_quote.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/quotes/_quote.html.haml')
-rw-r--r--app/views/quotes/_quote.html.haml16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/views/quotes/_quote.html.haml b/app/views/quotes/_quote.html.haml new file mode 100644 index 0000000..2a9fb37 --- /dev/null +++ b/app/views/quotes/_quote.html.haml
@@ -0,0 +1,16 @@
1%article.quote{ :id => "quote-#{quote.id}" }
2 %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"
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
5 %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
7 %datetime= quote.published_date
8 %blockquote.quote-body= raw quote_format(h(quote.content))
9 - if !quote.new_record? and quote.has_extra?
10 .quote-footer
11 - if quote.has_notes?
12 .quote-notes= auto_link(quote.notes, :link => :urls)
13 - if quote.has_tags?
14 %ul.quote-tags
15 - quote.tags.each do |tag|
16 %li= link_to tag.name, tag_quotes_path(tag.name)