@@ -1,119 +1,120 | |||||
1 | <div class="contextual"> |
|
1 | <div class="contextual"> | |
2 | <%= show_and_goto_link(l(:button_update), 'update', :class => 'icon icon-edit', :accesskey => accesskey(:edit)) if authorize_for('issues', 'edit') %> |
|
2 | <%= show_and_goto_link(l(:button_update), 'update', :class => 'icon icon-edit', :accesskey => accesskey(:edit)) if authorize_for('issues', 'edit') %> | |
3 | <%= link_to_if_authorized l(:button_log_time), {:controller => 'timelog', :action => 'edit', :issue_id => @issue}, :class => 'icon icon-time' %> |
|
3 | <%= link_to_if_authorized l(:button_log_time), {:controller => 'timelog', :action => 'edit', :issue_id => @issue}, :class => 'icon icon-time' %> | |
4 | <%= watcher_tag(@issue, User.current) %> |
|
4 | <%= watcher_tag(@issue, User.current) %> | |
5 | <%= link_to_if_authorized l(:button_copy), {:controller => 'issues', :action => 'new', :project_id => @project, :copy_from => @issue }, :class => 'icon icon-copy' %> |
|
5 | <%= link_to_if_authorized l(:button_copy), {:controller => 'issues', :action => 'new', :project_id => @project, :copy_from => @issue }, :class => 'icon icon-copy' %> | |
6 | <%= link_to_if_authorized l(:button_move), {:controller => 'issues', :action => 'move', :id => @issue }, :class => 'icon icon-move' %> |
|
6 | <%= link_to_if_authorized l(:button_move), {:controller => 'issues', :action => 'move', :id => @issue }, :class => 'icon icon-move' %> | |
7 | <%= link_to_if_authorized l(:button_delete), {:controller => 'issues', :action => 'destroy', :id => @issue}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %> |
|
7 | <%= link_to_if_authorized l(:button_delete), {:controller => 'issues', :action => 'destroy', :id => @issue}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %> | |
8 | </div> |
|
8 | </div> | |
9 |
|
9 | |||
10 | <h2><%= @issue.tracker.name %> #<%= @issue.id %></h2> |
|
10 | <h2><%= @issue.tracker.name %> #<%= @issue.id %></h2> | |
11 |
|
11 | |||
12 | <div class="issue <%= "status-#{@issue.status.position} priority-#{@issue.priority.position}" %>"> |
|
12 | <div class="issue <%= "status-#{@issue.status.position} priority-#{@issue.priority.position}" %>"> | |
13 | <h3><%=h @issue.subject %></h3> |
|
13 | <h3><%=h @issue.subject %></h3> | |
14 | <p class="author"> |
|
14 | <p class="author"> | |
15 | <%= authoring @issue.created_on, @issue.author %>. |
|
15 | <%= authoring @issue.created_on, @issue.author %>. | |
16 | <%= l(:label_updated_time, distance_of_time_in_words(Time.now, @issue.updated_on)) + '.' if @issue.created_on != @issue.updated_on %> |
|
16 | <%= l(:label_updated_time, distance_of_time_in_words(Time.now, @issue.updated_on)) + '.' if @issue.created_on != @issue.updated_on %> | |
17 | </p> |
|
17 | </p> | |
18 |
|
18 | |||
19 | <table width="100%"> |
|
19 | <table width="100%"> | |
20 | <tr> |
|
20 | <tr> | |
21 | <td style="width:15%"><b><%=l(:field_status)%> :</b></td><td style="width:35%"><%= @issue.status.name %></td> |
|
21 | <td style="width:15%"><b><%=l(:field_status)%> :</b></td><td style="width:35%"><%= @issue.status.name %></td> | |
22 | <td style="width:15%"><b><%=l(:field_start_date)%> :</b></td><td style="width:35%"><%= format_date(@issue.start_date) %></td> |
|
22 | <td style="width:15%"><b><%=l(:field_start_date)%> :</b></td><td style="width:35%"><%= format_date(@issue.start_date) %></td> | |
23 | </tr> |
|
23 | </tr> | |
24 | <tr> |
|
24 | <tr> | |
25 | <td><b><%=l(:field_priority)%> :</b></td><td><%= @issue.priority.name %></td> |
|
25 | <td><b><%=l(:field_priority)%> :</b></td><td><%= @issue.priority.name %></td> | |
26 | <td><b><%=l(:field_due_date)%> :</b></td><td><%= format_date(@issue.due_date) %></td> |
|
26 | <td><b><%=l(:field_due_date)%> :</b></td><td><%= format_date(@issue.due_date) %></td> | |
27 | </tr> |
|
27 | </tr> | |
28 | <tr> |
|
28 | <tr> | |
29 | <td><b><%=l(:field_assigned_to)%> :</b></td><td><%= @issue.assigned_to ? link_to_user(@issue.assigned_to) : "-" %></td> |
|
29 | <td><b><%=l(:field_assigned_to)%> :</b></td><td><%= @issue.assigned_to ? link_to_user(@issue.assigned_to) : "-" %></td> | |
30 | <td><b><%=l(:field_done_ratio)%> :</b></td><td><%= progress_bar @issue.done_ratio, :width => '80px', :legend => "#{@issue.done_ratio}%" %></td> |
|
30 | <td><b><%=l(:field_done_ratio)%> :</b></td><td><%= progress_bar @issue.done_ratio, :width => '80px', :legend => "#{@issue.done_ratio}%" %></td> | |
31 | </tr> |
|
31 | </tr> | |
32 | <tr> |
|
32 | <tr> | |
33 | <td><b><%=l(:field_category)%> :</b></td><td><%=h @issue.category ? @issue.category.name : "-" %></td> |
|
33 | <td><b><%=l(:field_category)%> :</b></td><td><%=h @issue.category ? @issue.category.name : "-" %></td> | |
34 | <% if User.current.allowed_to?(:view_time_entries, @project) %> |
|
34 | <% if User.current.allowed_to?(:view_time_entries, @project) %> | |
35 | <td><b><%=l(:label_spent_time)%> :</b></td> |
|
35 | <td><b><%=l(:label_spent_time)%> :</b></td> | |
36 | <td><%= @issue.spent_hours > 0 ? (link_to lwr(:label_f_hour, @issue.spent_hours), {:controller => 'timelog', :action => 'details', :project_id => @project, :issue_id => @issue}, :class => 'icon icon-time') : "-" %></td> |
|
36 | <td><%= @issue.spent_hours > 0 ? (link_to lwr(:label_f_hour, @issue.spent_hours), {:controller => 'timelog', :action => 'details', :project_id => @project, :issue_id => @issue}, :class => 'icon icon-time') : "-" %></td> | |
37 | <% end %> |
|
37 | <% end %> | |
38 | </tr> |
|
38 | </tr> | |
39 | <tr> |
|
39 | <tr> | |
40 | <td><b><%=l(:field_fixed_version)%> :</b></td><td><%= @issue.fixed_version ? link_to_version(@issue.fixed_version) : "-" %></td> |
|
40 | <td><b><%=l(:field_fixed_version)%> :</b></td><td><%= @issue.fixed_version ? link_to_version(@issue.fixed_version) : "-" %></td> | |
41 | <% if @issue.estimated_hours %> |
|
41 | <% if @issue.estimated_hours %> | |
42 | <td><b><%=l(:field_estimated_hours)%> :</b></td><td><%= lwr(:label_f_hour, @issue.estimated_hours) %></td> |
|
42 | <td><b><%=l(:field_estimated_hours)%> :</b></td><td><%= lwr(:label_f_hour, @issue.estimated_hours) %></td> | |
43 | <% end %> |
|
43 | <% end %> | |
44 | </tr> |
|
44 | </tr> | |
45 | <tr> |
|
45 | <tr> | |
46 | <% n = 0 |
|
46 | <% n = 0 | |
47 | for custom_value in @custom_values %> |
|
47 | for custom_value in @custom_values %> | |
48 | <td valign="top"><b><%= custom_value.custom_field.name %> :</b></td><td valign="top"><%= simple_format(h(show_value(custom_value))) %></td> |
|
48 | <td valign="top"><b><%= custom_value.custom_field.name %> :</b></td><td valign="top"><%= simple_format(h(show_value(custom_value))) %></td> | |
49 | <% n = n + 1 |
|
49 | <% n = n + 1 | |
50 | if (n > 1) |
|
50 | if (n > 1) | |
51 | n = 0 %> |
|
51 | n = 0 %> | |
52 | </tr><tr> |
|
52 | </tr><tr> | |
53 | <%end |
|
53 | <%end | |
54 | end %> |
|
54 | end %> | |
55 | </tr> |
|
55 | </tr> | |
56 | </table> |
|
56 | </table> | |
57 | <hr /> |
|
57 | <hr /> | |
58 |
|
58 | |||
59 | <div class="contextual"> |
|
59 | <div class="contextual"> | |
60 | <%= link_to_remote(image_tag('comment.png'), |
|
60 | <%= link_to_remote(image_tag('comment.png'), | |
61 | { :url => {:controller => 'issues', :action => 'reply', :id => @issue} }, |
|
61 | { :url => {:controller => 'issues', :action => 'reply', :id => @issue} }, | |
62 | :title => l(:button_reply)) if authorize_for('issues', 'edit') %> |
|
62 | :title => l(:button_reply)) if authorize_for('issues', 'edit') %> | |
63 | </div> |
|
63 | </div> | |
64 |
|
64 | |||
65 | <p><strong><%=l(:field_description)%></strong></p> |
|
65 | <p><strong><%=l(:field_description)%></strong></p> | |
66 | <div class="wiki"> |
|
66 | <div class="wiki"> | |
67 | <%= textilizable @issue, :description, :attachments => @issue.attachments %> |
|
67 | <%= textilizable @issue, :description, :attachments => @issue.attachments %> | |
68 | </div> |
|
68 | </div> | |
69 |
|
69 | |||
70 | <% if @issue.attachments.any? %> |
|
70 | <% if @issue.attachments.any? %> | |
71 | <%= link_to_attachments @issue.attachments, :delete_url => (authorize_for('issues', 'destroy_attachment') ? {:controller => 'issues', :action => 'destroy_attachment', :id => @issue} : nil) %> |
|
71 | <%= link_to_attachments @issue.attachments, :delete_url => (authorize_for('issues', 'destroy_attachment') ? {:controller => 'issues', :action => 'destroy_attachment', :id => @issue} : nil) %> | |
72 | <% end %> |
|
72 | <% end %> | |
73 |
|
73 | |||
74 | <% if authorize_for('issue_relations', 'new') || @issue.relations.any? %> |
|
74 | <% if authorize_for('issue_relations', 'new') || @issue.relations.any? %> | |
75 | <hr /> |
|
75 | <hr /> | |
76 | <div id="relations"> |
|
76 | <div id="relations"> | |
77 | <%= render :partial => 'relations' %> |
|
77 | <%= render :partial => 'relations' %> | |
78 | </div> |
|
78 | </div> | |
79 | <% end %> |
|
79 | <% end %> | |
80 |
|
80 | |||
81 | </div> |
|
81 | </div> | |
82 |
|
82 | |||
83 | <% if @issue.changesets.any? && User.current.allowed_to?(:view_changesets, @project) %> |
|
83 | <% if @issue.changesets.any? && User.current.allowed_to?(:view_changesets, @project) %> | |
84 | <div id="issue-changesets"> |
|
84 | <div id="issue-changesets"> | |
85 | <h3><%=l(:label_associated_revisions)%></h3> |
|
85 | <h3><%=l(:label_associated_revisions)%></h3> | |
86 | <%= render :partial => 'changesets', :locals => { :changesets => @issue.changesets} %> |
|
86 | <%= render :partial => 'changesets', :locals => { :changesets => @issue.changesets} %> | |
87 | </div> |
|
87 | </div> | |
88 | <% end %> |
|
88 | <% end %> | |
89 |
|
89 | |||
90 | <% if @journals.any? %> |
|
90 | <% if @journals.any? %> | |
91 | <div id="history"> |
|
91 | <div id="history"> | |
92 | <h3><%=l(:label_history)%></h3> |
|
92 | <h3><%=l(:label_history)%></h3> | |
93 | <%= render :partial => 'history', :locals => { :journals => @journals } %> |
|
93 | <%= render :partial => 'history', :locals => { :journals => @journals } %> | |
94 | </div> |
|
94 | </div> | |
95 | <% end %> |
|
95 | <% end %> | |
96 | <div style="clear: both;"></div> |
|
96 | <div style="clear: both;"></div> | |
97 |
|
97 | |||
98 | <% if authorize_for('issues', 'edit') %> |
|
98 | <% if authorize_for('issues', 'edit') %> | |
99 | <div id="update" style="display:none;"> |
|
99 | <div id="update" style="display:none;"> | |
100 | <h3><%= l(:button_update) %></h3> |
|
100 | <h3><%= l(:button_update) %></h3> | |
101 | <%= render :partial => 'edit' %> |
|
101 | <%= render :partial => 'edit' %> | |
102 | </div> |
|
102 | </div> | |
103 | <% end %> |
|
103 | <% end %> | |
104 |
|
104 | |||
105 | <p class="other-formats"> |
|
105 | <p class="other-formats"> | |
106 | <%= l(:label_export_to) %> |
|
106 | <%= l(:label_export_to) %> | |
107 | <span><%= link_to 'Atom', {:format => 'atom', :key => User.current.rss_key}, :class => 'feed' %></span> |
|
107 | <span><%= link_to 'Atom', {:format => 'atom', :key => User.current.rss_key}, :class => 'feed' %></span> | |
108 | <span><%= link_to 'PDF', {:format => 'pdf'}, :class => 'pdf' %></span> |
|
108 | <span><%= link_to 'PDF', {:format => 'pdf'}, :class => 'pdf' %></span> | |
109 | </p> |
|
109 | </p> | |
110 |
|
110 | |||
111 | <% html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %> |
|
111 | <% html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %> | |
112 |
|
112 | |||
113 | <% content_for :sidebar do %> |
|
113 | <% content_for :sidebar do %> | |
114 | <%= render :partial => 'issues/sidebar' %> |
|
114 | <%= render :partial => 'issues/sidebar' %> | |
115 | <% end %> |
|
115 | <% end %> | |
116 |
|
116 | |||
117 | <% content_for :header_tags do %> |
|
117 | <% content_for :header_tags do %> | |
118 | <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@issue.project} - #{@issue.tracker} ##{@issue.id}: #{@issue.subject}") %> |
|
118 | <%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@issue.project} - #{@issue.tracker} ##{@issue.id}: #{@issue.subject}") %> | |
|
119 | <%= stylesheet_link_tag 'scm' %> | |||
119 | <% end %> |
|
120 | <% end %> |
@@ -1,52 +1,56 | |||||
1 | <%= breadcrumb link_to(l(:label_board_plural), {:controller => 'boards', :action => 'index', :project_id => @project}), |
|
1 | <%= breadcrumb link_to(l(:label_board_plural), {:controller => 'boards', :action => 'index', :project_id => @project}), | |
2 | link_to(h(@board.name), {:controller => 'boards', :action => 'show', :project_id => @project, :id => @board}) %> |
|
2 | link_to(h(@board.name), {:controller => 'boards', :action => 'show', :project_id => @project, :id => @board}) %> | |
3 |
|
3 | |||
4 | <div class="contextual"> |
|
4 | <div class="contextual"> | |
5 | <%= link_to_if_authorized l(:button_edit), {:action => 'edit', :id => @topic}, :class => 'icon icon-edit' %> |
|
5 | <%= link_to_if_authorized l(:button_edit), {:action => 'edit', :id => @topic}, :class => 'icon icon-edit' %> | |
6 | <%= link_to_if_authorized l(:button_delete), {:action => 'destroy', :id => @topic}, :method => :post, :confirm => l(:text_are_you_sure), :class => 'icon icon-del' %> |
|
6 | <%= link_to_if_authorized l(:button_delete), {:action => 'destroy', :id => @topic}, :method => :post, :confirm => l(:text_are_you_sure), :class => 'icon icon-del' %> | |
7 | </div> |
|
7 | </div> | |
8 |
|
8 | |||
9 | <h2><%=h @topic.subject %></h2> |
|
9 | <h2><%=h @topic.subject %></h2> | |
10 |
|
10 | |||
11 | <div class="message"> |
|
11 | <div class="message"> | |
12 | <p><span class="author"><%= authoring @topic.created_on, @topic.author %></span></p> |
|
12 | <p><span class="author"><%= authoring @topic.created_on, @topic.author %></span></p> | |
13 | <div class="wiki"> |
|
13 | <div class="wiki"> | |
14 | <%= textilizable(@topic.content, :attachments => @topic.attachments) %> |
|
14 | <%= textilizable(@topic.content, :attachments => @topic.attachments) %> | |
15 | </div> |
|
15 | </div> | |
16 | <%= link_to_attachments @topic.attachments, :no_author => true %> |
|
16 | <%= link_to_attachments @topic.attachments, :no_author => true %> | |
17 | </div> |
|
17 | </div> | |
18 | <br /> |
|
18 | <br /> | |
19 |
|
19 | |||
20 | <% unless @replies.empty? %> |
|
20 | <% unless @replies.empty? %> | |
21 | <h3 class="icon22 icon22-comment"><%= l(:label_reply_plural) %></h3> |
|
21 | <h3 class="icon22 icon22-comment"><%= l(:label_reply_plural) %></h3> | |
22 | <% @replies.each do |message| %> |
|
22 | <% @replies.each do |message| %> | |
23 | <a name="<%= "message-#{message.id}" %>"></a> |
|
23 | <a name="<%= "message-#{message.id}" %>"></a> | |
24 | <div class="contextual"> |
|
24 | <div class="contextual"> | |
25 | <%= link_to_if_authorized image_tag('edit.png'), {:action => 'edit', :id => message}, :title => l(:button_edit) %> |
|
25 | <%= link_to_if_authorized image_tag('edit.png'), {:action => 'edit', :id => message}, :title => l(:button_edit) %> | |
26 | <%= link_to_if_authorized image_tag('delete.png'), {:action => 'destroy', :id => message}, :method => :post, :confirm => l(:text_are_you_sure), :title => l(:button_delete) %> |
|
26 | <%= link_to_if_authorized image_tag('delete.png'), {:action => 'destroy', :id => message}, :method => :post, :confirm => l(:text_are_you_sure), :title => l(:button_delete) %> | |
27 | </div> |
|
27 | </div> | |
28 | <div class="message reply"> |
|
28 | <div class="message reply"> | |
29 | <h4><%=h message.subject %> - <%= authoring message.created_on, message.author %></h4> |
|
29 | <h4><%=h message.subject %> - <%= authoring message.created_on, message.author %></h4> | |
30 | <div class="wiki"><%= textilizable message, :content, :attachments => message.attachments %></div> |
|
30 | <div class="wiki"><%= textilizable message, :content, :attachments => message.attachments %></div> | |
31 | <%= link_to_attachments message.attachments, :no_author => true %> |
|
31 | <%= link_to_attachments message.attachments, :no_author => true %> | |
32 | </div> |
|
32 | </div> | |
33 | <% end %> |
|
33 | <% end %> | |
34 | <% end %> |
|
34 | <% end %> | |
35 |
|
35 | |||
36 | <% if !@topic.locked? && authorize_for('messages', 'reply') %> |
|
36 | <% if !@topic.locked? && authorize_for('messages', 'reply') %> | |
37 | <p><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></p> |
|
37 | <p><%= toggle_link l(:button_reply), "reply", :focus => 'message_content' %></p> | |
38 | <div id="reply" style="display:none;"> |
|
38 | <div id="reply" style="display:none;"> | |
39 | <% form_for :reply, @reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %> |
|
39 | <% form_for :reply, @reply, :url => {:action => 'reply', :id => @topic}, :html => {:multipart => true, :id => 'message-form'} do |f| %> | |
40 | <%= render :partial => 'form', :locals => {:f => f, :replying => true} %> |
|
40 | <%= render :partial => 'form', :locals => {:f => f, :replying => true} %> | |
41 | <%= submit_tag l(:button_submit) %> |
|
41 | <%= submit_tag l(:button_submit) %> | |
42 | <%= link_to_remote l(:label_preview), |
|
42 | <%= link_to_remote l(:label_preview), | |
43 | { :url => { :controller => 'messages', :action => 'preview', :board_id => @board }, |
|
43 | { :url => { :controller => 'messages', :action => 'preview', :board_id => @board }, | |
44 | :method => 'post', |
|
44 | :method => 'post', | |
45 | :update => 'preview', |
|
45 | :update => 'preview', | |
46 | :with => "Form.serialize('message-form')", |
|
46 | :with => "Form.serialize('message-form')", | |
47 | :complete => "Element.scrollTo('preview')" |
|
47 | :complete => "Element.scrollTo('preview')" | |
48 | }, :accesskey => accesskey(:preview) %> |
|
48 | }, :accesskey => accesskey(:preview) %> | |
49 | <% end %> |
|
49 | <% end %> | |
50 | <div id="preview" class="wiki"></div> |
|
50 | <div id="preview" class="wiki"></div> | |
51 | </div> |
|
51 | </div> | |
52 | <% end %> |
|
52 | <% end %> | |
|
53 | ||||
|
54 | <% content_for :header_tags do %> | |||
|
55 | <%= stylesheet_link_tag 'scm' %> | |||
|
56 | <% end %> |
@@ -1,57 +1,61 | |||||
1 | <div class="contextual"> |
|
1 | <div class="contextual"> | |
2 | <%= link_to_if_authorized l(:button_edit), |
|
2 | <%= link_to_if_authorized l(:button_edit), | |
3 | {:controller => 'news', :action => 'edit', :id => @news}, |
|
3 | {:controller => 'news', :action => 'edit', :id => @news}, | |
4 | :class => 'icon icon-edit', |
|
4 | :class => 'icon icon-edit', | |
5 | :accesskey => accesskey(:edit), |
|
5 | :accesskey => accesskey(:edit), | |
6 | :onclick => 'Element.show("edit-news"); return false;' %> |
|
6 | :onclick => 'Element.show("edit-news"); return false;' %> | |
7 | <%= link_to_if_authorized l(:button_delete), {:controller => 'news', :action => 'destroy', :id => @news}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %> |
|
7 | <%= link_to_if_authorized l(:button_delete), {:controller => 'news', :action => 'destroy', :id => @news}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %> | |
8 | </div> |
|
8 | </div> | |
9 |
|
9 | |||
10 | <h2><%=h @news.title %></h2> |
|
10 | <h2><%=h @news.title %></h2> | |
11 |
|
11 | |||
12 | <div id="edit-news" style="display:none;"> |
|
12 | <div id="edit-news" style="display:none;"> | |
13 | <% labelled_tabular_form_for :news, @news, :url => { :action => "edit", :id => @news }, |
|
13 | <% labelled_tabular_form_for :news, @news, :url => { :action => "edit", :id => @news }, | |
14 | :html => { :id => 'news-form' } do |f| %> |
|
14 | :html => { :id => 'news-form' } do |f| %> | |
15 | <%= render :partial => 'form', :locals => { :f => f } %> |
|
15 | <%= render :partial => 'form', :locals => { :f => f } %> | |
16 | <%= submit_tag l(:button_save) %> |
|
16 | <%= submit_tag l(:button_save) %> | |
17 | <%= link_to_remote l(:label_preview), |
|
17 | <%= link_to_remote l(:label_preview), | |
18 | { :url => { :controller => 'news', :action => 'preview' }, |
|
18 | { :url => { :controller => 'news', :action => 'preview' }, | |
19 | :method => 'post', |
|
19 | :method => 'post', | |
20 | :update => 'preview', |
|
20 | :update => 'preview', | |
21 | :with => "Form.serialize('news-form')" |
|
21 | :with => "Form.serialize('news-form')" | |
22 | }, :accesskey => accesskey(:preview) %> | |
|
22 | }, :accesskey => accesskey(:preview) %> | | |
23 | <%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("edit-news")' %> |
|
23 | <%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("edit-news")' %> | |
24 | <% end %> |
|
24 | <% end %> | |
25 | <div id="preview" class="wiki"></div> |
|
25 | <div id="preview" class="wiki"></div> | |
26 | </div> |
|
26 | </div> | |
27 |
|
27 | |||
28 | <p><em><% unless @news.summary.blank? %><%=h @news.summary %><br /><% end %> |
|
28 | <p><em><% unless @news.summary.blank? %><%=h @news.summary %><br /><% end %> | |
29 | <span class="author"><%= authoring @news.created_on, @news.author %></span></em></p> |
|
29 | <span class="author"><%= authoring @news.created_on, @news.author %></span></em></p> | |
30 | <div class="wiki"> |
|
30 | <div class="wiki"> | |
31 | <%= textilizable(@news.description) %> |
|
31 | <%= textilizable(@news.description) %> | |
32 | </div> |
|
32 | </div> | |
33 | <br /> |
|
33 | <br /> | |
34 |
|
34 | |||
35 | <div id="comments" style="margin-bottom:16px;"> |
|
35 | <div id="comments" style="margin-bottom:16px;"> | |
36 | <h3 class="icon22 icon22-comment"><%= l(:label_comment_plural) %></h3> |
|
36 | <h3 class="icon22 icon22-comment"><%= l(:label_comment_plural) %></h3> | |
37 | <% @comments.each do |comment| %> |
|
37 | <% @comments.each do |comment| %> | |
38 | <% next if comment.new_record? %> |
|
38 | <% next if comment.new_record? %> | |
39 | <div class="contextual"> |
|
39 | <div class="contextual"> | |
40 | <%= link_to_if_authorized image_tag('delete.png'), {:controller => 'news', :action => 'destroy_comment', :id => @news, :comment_id => comment}, |
|
40 | <%= link_to_if_authorized image_tag('delete.png'), {:controller => 'news', :action => 'destroy_comment', :id => @news, :comment_id => comment}, | |
41 | :confirm => l(:text_are_you_sure), :method => :post, :title => l(:button_delete) %> |
|
41 | :confirm => l(:text_are_you_sure), :method => :post, :title => l(:button_delete) %> | |
42 | </div> |
|
42 | </div> | |
43 | <h4><%= authoring comment.created_on, comment.author %></h4> |
|
43 | <h4><%= authoring comment.created_on, comment.author %></h4> | |
44 | <%= textilizable(comment.comments) %> |
|
44 | <%= textilizable(comment.comments) %> | |
45 | <% end if @comments.any? %> |
|
45 | <% end if @comments.any? %> | |
46 | </div> |
|
46 | </div> | |
47 |
|
47 | |||
48 | <% if authorize_for 'news', 'add_comment' %> |
|
48 | <% if authorize_for 'news', 'add_comment' %> | |
49 | <p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></p> |
|
49 | <p><%= toggle_link l(:label_comment_add), "add_comment_form", :focus => "comment_comments" %></p> | |
50 | <% form_tag({:action => 'add_comment', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %> |
|
50 | <% form_tag({:action => 'add_comment', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %> | |
51 | <%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit' %> |
|
51 | <%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit' %> | |
52 | <%= wikitoolbar_for 'comment_comments' %> |
|
52 | <%= wikitoolbar_for 'comment_comments' %> | |
53 | <p><%= submit_tag l(:button_add) %></p> |
|
53 | <p><%= submit_tag l(:button_add) %></p> | |
54 | <% end %> |
|
54 | <% end %> | |
55 | <% end %> |
|
55 | <% end %> | |
56 |
|
56 | |||
57 | <% html_title @news.title -%> |
|
57 | <% html_title @news.title -%> | |
|
58 | ||||
|
59 | <% content_for :header_tags do %> | |||
|
60 | <%= stylesheet_link_tag 'scm' %> | |||
|
61 | <% end %> |
General Comments 0
You need to be logged in to leave comments.
Login now