Vote #64555
完了News comment form has no box
50%
説明
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 @@
<%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %>
-<% 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' %> +<%= toggle_link l(:label_comment_add), "add_comment_box", :focus => "comment_comments" %>
+<%= submit_tag l(:button_add) %>
<% end %> <% end %>journals
Is there any reason why the <div class="box"> should not be inside the form?
--------------------------------------------------------------------------------
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.
<pre>
### 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 %>
</pre>
--------------------------------------------------------------------------------
Applied in r2353.
--------------------------------------------------------------------------------