+<% 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-grey">
+ <div class="row border-bottom border-secondary-subtle">
<h2 class="col"><%= t(".discussion") %></h2>
<% if current_user %>
<div class="col-auto">
<% if @entry.subscribers.exists?(current_user.id) %>
- <%= link_to t("javascripts.changesets.show.unsubscribe"), diary_entry_unsubscribe_path(@entry.user, @entry), :method => :post, :class => "btn btn-sm btn-primary" %>
+ <%= link_to t(".unsubscribe"), diary_entry_unsubscribe_path(@entry.user, @entry), :method => :post, :class => "btn btn-sm btn-primary" %>
<% else %>
- <%= link_to t("javascripts.changesets.show.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 %>
<% if current_user %>
<h3 id="newcomment"><%= t ".leave_a_comment" %></h3>
- <%= bootstrap_form_for @entry.comments.new, :url => { :action => "comment" } do |f| %>
+ <%= bootstrap_form_for @entry.comments.new, :url => comment_diary_entry_path(@entry.user, @entry) do |f| %>
<%= f.richtext_field :body, :cols => 80, :rows => 20, :hide_label => true %>
<%= f.primary %>
<% end %>