プロジェクト

全般

プロフィール

Vote #64555

完了

News comment form has no box

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
UI_10
対象バージョン:
開始日:
2009/01/31
期日:
進捗率:

50%

予定工数:
0.10時間
category_id:
10
version_id:
6
issue_org_id:
2632
author_id:
2928
assigned_to_id:
0
comments:
3
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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 @@
 
<% if authorize_for 'news', 'add_comment' %> -

<%= 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.
--------------------------------------------------------------------------------

Admin Redmine さんが約4年前に更新

  • カテゴリUI_10 にセット
  • 対象バージョン0.9.0_6 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0