comments: adjust link to howto:comment.

Replace the giant banner about reading the comment guidelines with a
smaller link to howto:comment beneath the comment text box.
This commit is contained in:
evazion
2020-03-24 18:32:30 -05:00
parent 18e11f77be
commit 50b0b79891
5 changed files with 8 additions and 11 deletions

View File

@@ -227,6 +227,7 @@ module ApplicationHelper
options[:value] ||= instance_variable_get("@#{object}").try(name) options[:value] ||= instance_variable_get("@#{object}").try(name)
options[:preview_id] ||= "dtext-preview" options[:preview_id] ||= "dtext-preview"
options[:classes] ||= "" options[:classes] ||= ""
options[:hint] ||= ""
options[:type] ||= "text" options[:type] ||= "text"
render "dtext/form", options render "dtext/form", options

View File

@@ -4,7 +4,7 @@
<% if comment.new_record? %> <% if comment.new_record? %>
<%= f.hidden_field :post_id %> <%= f.hidden_field :post_id %>
<% end %> <% end %>
<%= dtext_field "comment", "body", :classes => "autocomplete-mentions", :value => comment.body, :input_id => "comment_body_for_#{comment.id}", :preview_id => "dtext-preview-for-#{comment.id}" %> <%= dtext_field "comment", "body", classes: "autocomplete-mentions", value: comment.body, input_id: "comment_body_for_#{comment.id}", preview_id: "dtext-preview-for-#{comment.id}", hint: link_to_wiki("Comment rules", "howto:comment").html_safe %>
<%= f.button :submit, "Submit" %> <%= f.button :submit, "Submit" %>
<%= dtext_preview_button "comment", "body", :input_id => "comment_body_for_#{comment.id}", :preview_id => "dtext-preview-for-#{comment.id}" %> <%= dtext_preview_button "comment", "body", :input_id => "comment_body_for_#{comment.id}", :preview_id => "dtext-preview-for-#{comment.id}" %>
<% if comment.new_record? %> <% if comment.new_record? %>

View File

@@ -1,10 +1,4 @@
<div id="p-index-by-post"> <div id="p-index-by-post">
<% if !CurrentUser.user.is_builder? %>
<div style="margin-bottom: 1em;">
<h2>Before commenting, read the <%= link_to_wiki "how to comment guide", "howto:comment" %>.</h2>
</div>
<% end %>
<% if @posts.blank? %> <% if @posts.blank? %>
<%= render "post_sets/blank" %> <%= render "post_sets/blank" %>
<% end %> <% end %>

View File

@@ -10,5 +10,10 @@
<% end %> <% end %>
<div id="<%= preview_id %>" class="dtext-preview prose"></div> <div id="<%= preview_id %>" class="dtext-preview prose"></div>
</div> </div>
<span class="hint"><%= link_to "Formatting help", dtext_help_path, remote: true, method: :get %>.</span> <span class="hint">
<%= link_to "Formatting help", dtext_help_path, remote: true, method: :get %>.
<% if hint.present? %>
<%= hint %>.
<% end %>
</span>
</div> </div>

View File

@@ -120,9 +120,6 @@
<% end %> <% end %>
<section id="comments"> <section id="comments">
<% if !CurrentUser.user.is_builder? %>
<h2>Before commenting, read the <%= link_to_wiki "how to comment guide", "howto:comment" %>.</h2>
<% end %>
<%= render "comments/partials/index/list", comments: @comments, post: @post, page: :post %> <%= render "comments/partials/index/list", comments: @comments, post: @post, page: :post %>
</section> </section>