about summary refs log tree commit diff stats
path: root/app/views/quotes/_quote.html.haml
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-10-21 00:25:50 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-10-21 00:25:50 -0400
commit96813a5e508a54257ef03be613a704f1f71af53d (patch)
treea50f5c8dc27304a3ca27366b6268a72804727e16 /app/views/quotes/_quote.html.haml
parent2a7a19c93ee0e0d77e4e388d43f36a721c7ab715 (diff)
downloadthoughts-96813a5e508a54257ef03be613a704f1f71af53d.tar.gz
thoughts-96813a5e508a54257ef03be613a704f1f71af53d.tar.bz2
thoughts-96813a5e508a54257ef03be613a704f1f71af53d.zip
Added quotes database
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)