]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/diary_entries/show.html.erb
Merge remote-tracking branch 'upstream/pull/5410'
[rails.git] / app / views / diary_entries / show.html.erb
index cfed1c46d401ff469015c6c9357bd7e1ac81b58e..14b1576f0fdc9f6339f169fedddef1622e3bc44b 100644 (file)
@@ -1,3 +1,7 @@
+<% content_for :head do %>
+  <%= javascript_include_tag "social_share_button" %>
+<% end %>
+
 <% content_for :heading do %>
   <div class="row">
     <div class="col-sm-auto">
 <% end %>
 
 <%= render @entry %>
+<%= render_social_share_buttons({
+                                  :title => @entry.title,
+                                  :url => diary_entry_url(@entry.user, @entry)
+                                }) %>
 
 <div id="comments" class="comments mb-3 overflow-hidden">
   <div class="row border-bottom border-secondary-subtle">
@@ -21,7 +29,7 @@
         <% if @entry.subscribers.exists?(current_user.id) %>
           <%= link_to t(".unsubscribe"), diary_entry_unsubscribe_path(@entry.user, @entry), :method => :post, :class => "btn btn-sm btn-primary" %>
         <% else %>
-          <%= link_to t(".subscribe"), diary_entry_subscribe_path(@entry.user, @entry.id), :method => :post, :class => "btn btn-sm btn-primary" %>
+          <%= link_to t(".subscribe"), diary_entry_subscribe_path(@entry.user, @entry), :method => :post, :class => "btn btn-sm btn-primary" %>
         <% end %>
       </div>
     <% end %>