From 20f2479b33bc548c4736cdc1ceffde6e3af3a31d Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 21 Oct 2023 22:52:41 -0400 Subject: Added quote editing --- app/views/quotes/_quote.html.haml | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/views/quotes/_quote.html.haml') diff --git a/app/views/quotes/_quote.html.haml b/app/views/quotes/_quote.html.haml index 2a9fb37..46b0266 100644 --- a/app/views/quotes/_quote.html.haml +++ b/app/views/quotes/_quote.html.haml @@ -5,6 +5,8 @@ %span.quote-rating{ :id => "quote-rating-#{quote.id}" }= "+#{quote.upvotes}/-#{quote.downvotes}" %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 %datetime= quote.published_date + - if user_signed_in? and !quote.new_record? + = link_to "Edit", edit_admin_quote_path(quote), :class => "quote-edit-link" %blockquote.quote-body= raw quote_format(h(quote.content)) - if !quote.new_record? and quote.has_extra? .quote-footer -- cgit 1.4.1