Patch #2632

News comment form has no box

Added by Brad Beattie almost 9 years ago. Updated over 5 years ago.

Status:ClosedStart date:2009-01-31
Priority:NormalDue date:
Assignee:-% Done:

50%

Category:UIEstimated time:0.10 hour
Target version:0.9.0

Description

The following patch boxes the news comment, as every other instance of commenting (e.g. on an existing ticket or in a forum) was boxed. Visual consistency and all that jazz. :)

### Eclipse Workspace Patch 1.0
#P Redmine
Index: app/views/news/show.rhtml
===================================================================
--- app/views/news/show.rhtml    (revision 2338)
+++ app/views/news/show.rhtml    (working copy)
@@ -46,10 +46,12 @@
 </div>

 <% if authorize_for 'news', 'add_comment' %>
-<p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></p>
-<% form_tag({:action => 'add_comment', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
-<%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit' %>
-<%= wikitoolbar_for 'comment_comments' %>
+<p><%= toggle_link l(:label_comment_add), "add_comment_box", :focus => "comment_comments" %></p>
+<div id="add_comment_box" class="box" style="display: none">
+    <% form_tag({:action => 'add_comment', :id => @news}, :id => "add_comment_form") do %>
+    <%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit' %>
+    <%= wikitoolbar_for 'comment_comments' %>
+</div>
 <p><%= submit_tag l(:button_add) %></p>
 <% end %>
 <% end %>

Associated revisions

Revision 2353
Added by Jean-Philippe Lang almost 9 years ago

Adds a 'box' div around news comment form (#2632).

History

#1 Updated by Jean-Philippe Lang almost 9 years ago

Is there any reason why the <div class="box"> should not be inside the form?

#2 Updated by Brad Beattie almost 9 years ago

Jean-Philippe Lang wrote:

Is there any reason why the <div class="box"> should not be inside the form?

Nope. Inside works just as well and is, as I gather you're implying, is a simpler change. :)

I considered adding class:box to the form itself, but that'd require making it .box display:block as well. Worth thinking about for long-term cleanliness of the XHTML/CSS, but in the short term, this works.

### Eclipse Workspace Patch 1.0
#P Redmine
Index: app/views/news/show.rhtml
===================================================================
--- app/views/news/show.rhtml    (revision 2338)
+++ app/views/news/show.rhtml    (working copy)
@@ -48,8 +48,10 @@
 <% if authorize_for 'news', 'add_comment' %>
 <p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></p>
 <% form_tag({:action => 'add_comment', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
-<%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit' %>
-<%= wikitoolbar_for 'comment_comments' %>
+<div class="box">
+    <%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit' %>
+    <%= wikitoolbar_for 'comment_comments' %>
+</div>
 <p><%= submit_tag l(:button_add) %></p>
 <% end %>
 <% end %>

#3 Updated by Jean-Philippe Lang almost 9 years ago

  • Status changed from New to Closed
  • Target version set to 0.9.0

Applied in r2353.

Also available in: Atom PDF