##// END OF EJS Templates
Fixed version field on issue view page now links to the corresponding version in the roadmap....
Jean-Philippe Lang -
r559:2dbb3978184e
parent child
Show More
@@ -1,159 +1,161
1 # redMine - project management software
1 # redMine - project management software
2 # Copyright (C) 2006-2007 Jean-Philippe Lang
2 # Copyright (C) 2006-2007 Jean-Philippe Lang
3 #
3 #
4 # This program is free software; you can redistribute it and/or
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
7 # of the License, or (at your option) any later version.
8 #
8 #
9 # This program is distributed in the hope that it will be useful,
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
12 # GNU General Public License for more details.
13 #
13 #
14 # You should have received a copy of the GNU General Public License
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software
15 # along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
17
18 class IssuesController < ApplicationController
18 class IssuesController < ApplicationController
19 layout 'base', :except => :export_pdf
19 layout 'base', :except => :export_pdf
20 before_filter :find_project, :authorize
20 before_filter :find_project, :authorize
21
21
22 cache_sweeper :issue_sweeper, :only => [ :edit, :change_status, :destroy ]
22 cache_sweeper :issue_sweeper, :only => [ :edit, :change_status, :destroy ]
23
23
24 helper :projects
25 include ProjectsHelper
24 helper :custom_fields
26 helper :custom_fields
25 include CustomFieldsHelper
27 include CustomFieldsHelper
26 helper :ifpdf
28 helper :ifpdf
27 include IfpdfHelper
29 include IfpdfHelper
28 helper :issue_relations
30 helper :issue_relations
29 include IssueRelationsHelper
31 include IssueRelationsHelper
30 helper :watchers
32 helper :watchers
31 include WatchersHelper
33 include WatchersHelper
32 helper :attachments
34 helper :attachments
33 include AttachmentsHelper
35 include AttachmentsHelper
34
36
35 def show
37 def show
36 @status_options = @issue.status.find_new_statuses_allowed_to(logged_in_user.role_for_project(@project), @issue.tracker) if logged_in_user
38 @status_options = @issue.status.find_new_statuses_allowed_to(logged_in_user.role_for_project(@project), @issue.tracker) if logged_in_user
37 @custom_values = @issue.custom_values.find(:all, :include => :custom_field)
39 @custom_values = @issue.custom_values.find(:all, :include => :custom_field)
38 @journals_count = @issue.journals.count
40 @journals_count = @issue.journals.count
39 @journals = @issue.journals.find(:all, :include => [:user, :details], :limit => 15, :order => "#{Journal.table_name}.created_on desc")
41 @journals = @issue.journals.find(:all, :include => [:user, :details], :limit => 15, :order => "#{Journal.table_name}.created_on desc")
40 end
42 end
41
43
42 def history
44 def history
43 @journals = @issue.journals.find(:all, :include => [:user, :details], :order => "#{Journal.table_name}.created_on desc")
45 @journals = @issue.journals.find(:all, :include => [:user, :details], :order => "#{Journal.table_name}.created_on desc")
44 @journals_count = @journals.length
46 @journals_count = @journals.length
45 end
47 end
46
48
47 def export_pdf
49 def export_pdf
48 @custom_values = @issue.custom_values.find(:all, :include => :custom_field)
50 @custom_values = @issue.custom_values.find(:all, :include => :custom_field)
49 @options_for_rfpdf ||= {}
51 @options_for_rfpdf ||= {}
50 @options_for_rfpdf[:file_name] = "#{@project.name}_#{@issue.id}.pdf"
52 @options_for_rfpdf[:file_name] = "#{@project.name}_#{@issue.id}.pdf"
51 end
53 end
52
54
53 def edit
55 def edit
54 @priorities = Enumeration::get_values('IPRI')
56 @priorities = Enumeration::get_values('IPRI')
55 if request.get?
57 if request.get?
56 @custom_values = @project.custom_fields_for_issues(@issue.tracker).collect { |x| @issue.custom_values.find_by_custom_field_id(x.id) || CustomValue.new(:custom_field => x, :customized => @issue) }
58 @custom_values = @project.custom_fields_for_issues(@issue.tracker).collect { |x| @issue.custom_values.find_by_custom_field_id(x.id) || CustomValue.new(:custom_field => x, :customized => @issue) }
57 else
59 else
58 begin
60 begin
59 @issue.init_journal(self.logged_in_user)
61 @issue.init_journal(self.logged_in_user)
60 # Retrieve custom fields and values
62 # Retrieve custom fields and values
61 @custom_values = @project.custom_fields_for_issues(@issue.tracker).collect { |x| CustomValue.new(:custom_field => x, :customized => @issue, :value => params["custom_fields"][x.id.to_s]) }
63 @custom_values = @project.custom_fields_for_issues(@issue.tracker).collect { |x| CustomValue.new(:custom_field => x, :customized => @issue, :value => params["custom_fields"][x.id.to_s]) }
62 @issue.custom_values = @custom_values
64 @issue.custom_values = @custom_values
63 @issue.attributes = params[:issue]
65 @issue.attributes = params[:issue]
64 if @issue.save
66 if @issue.save
65 flash[:notice] = l(:notice_successful_update)
67 flash[:notice] = l(:notice_successful_update)
66 redirect_to :action => 'show', :id => @issue
68 redirect_to :action => 'show', :id => @issue
67 end
69 end
68 rescue ActiveRecord::StaleObjectError
70 rescue ActiveRecord::StaleObjectError
69 # Optimistic locking exception
71 # Optimistic locking exception
70 flash[:notice] = l(:notice_locking_conflict)
72 flash[:notice] = l(:notice_locking_conflict)
71 end
73 end
72 end
74 end
73 end
75 end
74
76
75 def add_note
77 def add_note
76 unless params[:notes].empty?
78 unless params[:notes].empty?
77 journal = @issue.init_journal(self.logged_in_user, params[:notes])
79 journal = @issue.init_journal(self.logged_in_user, params[:notes])
78 if @issue.save
80 if @issue.save
79 flash[:notice] = l(:notice_successful_update)
81 flash[:notice] = l(:notice_successful_update)
80 Mailer.deliver_issue_edit(journal) if Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled?
82 Mailer.deliver_issue_edit(journal) if Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled?
81 redirect_to :action => 'show', :id => @issue
83 redirect_to :action => 'show', :id => @issue
82 return
84 return
83 end
85 end
84 end
86 end
85 show
87 show
86 render :action => 'show'
88 render :action => 'show'
87 end
89 end
88
90
89 def change_status
91 def change_status
90 @status_options = @issue.status.find_new_statuses_allowed_to(logged_in_user.role_for_project(@project), @issue.tracker) if logged_in_user
92 @status_options = @issue.status.find_new_statuses_allowed_to(logged_in_user.role_for_project(@project), @issue.tracker) if logged_in_user
91 @new_status = IssueStatus.find(params[:new_status_id])
93 @new_status = IssueStatus.find(params[:new_status_id])
92 if params[:confirm]
94 if params[:confirm]
93 begin
95 begin
94 journal = @issue.init_journal(self.logged_in_user, params[:notes])
96 journal = @issue.init_journal(self.logged_in_user, params[:notes])
95 @issue.status = @new_status
97 @issue.status = @new_status
96 if @issue.update_attributes(params[:issue])
98 if @issue.update_attributes(params[:issue])
97 # Save attachments
99 # Save attachments
98 params[:attachments].each { |file|
100 params[:attachments].each { |file|
99 next unless file.size > 0
101 next unless file.size > 0
100 a = Attachment.create(:container => @issue, :file => file, :author => logged_in_user)
102 a = Attachment.create(:container => @issue, :file => file, :author => logged_in_user)
101 journal.details << JournalDetail.new(:property => 'attachment',
103 journal.details << JournalDetail.new(:property => 'attachment',
102 :prop_key => a.id,
104 :prop_key => a.id,
103 :value => a.filename) unless a.new_record?
105 :value => a.filename) unless a.new_record?
104 } if params[:attachments] and params[:attachments].is_a? Array
106 } if params[:attachments] and params[:attachments].is_a? Array
105
107
106 flash[:notice] = l(:notice_successful_update)
108 flash[:notice] = l(:notice_successful_update)
107 Mailer.deliver_issue_edit(journal) if Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled?
109 Mailer.deliver_issue_edit(journal) if Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled?
108 redirect_to :action => 'show', :id => @issue
110 redirect_to :action => 'show', :id => @issue
109 end
111 end
110 rescue ActiveRecord::StaleObjectError
112 rescue ActiveRecord::StaleObjectError
111 # Optimistic locking exception
113 # Optimistic locking exception
112 flash[:notice] = l(:notice_locking_conflict)
114 flash[:notice] = l(:notice_locking_conflict)
113 end
115 end
114 end
116 end
115 @assignable_to = @project.members.find(:all, :include => :user).collect{ |m| m.user }
117 @assignable_to = @project.members.find(:all, :include => :user).collect{ |m| m.user }
116 end
118 end
117
119
118 def destroy
120 def destroy
119 @issue.destroy
121 @issue.destroy
120 redirect_to :controller => 'projects', :action => 'list_issues', :id => @project
122 redirect_to :controller => 'projects', :action => 'list_issues', :id => @project
121 end
123 end
122
124
123 def add_attachment
125 def add_attachment
124 # Save the attachments
126 # Save the attachments
125 @attachments = []
127 @attachments = []
126 journal = @issue.init_journal(self.logged_in_user)
128 journal = @issue.init_journal(self.logged_in_user)
127 params[:attachments].each { |file|
129 params[:attachments].each { |file|
128 next unless file.size > 0
130 next unless file.size > 0
129 a = Attachment.create(:container => @issue, :file => file, :author => logged_in_user)
131 a = Attachment.create(:container => @issue, :file => file, :author => logged_in_user)
130 @attachments << a unless a.new_record?
132 @attachments << a unless a.new_record?
131 journal.details << JournalDetail.new(:property => 'attachment',
133 journal.details << JournalDetail.new(:property => 'attachment',
132 :prop_key => a.id,
134 :prop_key => a.id,
133 :value => a.filename) unless a.new_record?
135 :value => a.filename) unless a.new_record?
134 } if params[:attachments] and params[:attachments].is_a? Array
136 } if params[:attachments] and params[:attachments].is_a? Array
135 journal.save if journal.details.any?
137 journal.save if journal.details.any?
136 Mailer.deliver_attachments_add(@attachments) if !@attachments.empty? and Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled?
138 Mailer.deliver_attachments_add(@attachments) if !@attachments.empty? and Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled?
137 redirect_to :action => 'show', :id => @issue
139 redirect_to :action => 'show', :id => @issue
138 end
140 end
139
141
140 def destroy_attachment
142 def destroy_attachment
141 a = @issue.attachments.find(params[:attachment_id])
143 a = @issue.attachments.find(params[:attachment_id])
142 a.destroy
144 a.destroy
143 journal = @issue.init_journal(self.logged_in_user)
145 journal = @issue.init_journal(self.logged_in_user)
144 journal.details << JournalDetail.new(:property => 'attachment',
146 journal.details << JournalDetail.new(:property => 'attachment',
145 :prop_key => a.id,
147 :prop_key => a.id,
146 :old_value => a.filename)
148 :old_value => a.filename)
147 journal.save
149 journal.save
148 redirect_to :action => 'show', :id => @issue
150 redirect_to :action => 'show', :id => @issue
149 end
151 end
150
152
151 private
153 private
152 def find_project
154 def find_project
153 @issue = Issue.find(params[:id], :include => [:project, :tracker, :status, :author, :priority, :category])
155 @issue = Issue.find(params[:id], :include => [:project, :tracker, :status, :author, :priority, :category])
154 @project = @issue.project
156 @project = @issue.project
155 @html_title = "#{@project.name} - #{@issue.tracker.name} ##{@issue.id}"
157 @html_title = "#{@project.name} - #{@issue.tracker.name} ##{@issue.id}"
156 rescue ActiveRecord::RecordNotFound
158 rescue ActiveRecord::RecordNotFound
157 render_404
159 render_404
158 end
160 end
159 end
161 end
@@ -1,115 +1,115
1 <div class="contextual">
1 <div class="contextual">
2 <%= l(:label_export_to) %><%= link_to 'PDF', {:action => 'export_pdf', :id => @issue}, :class => 'icon icon-pdf' %>
2 <%= l(:label_export_to) %><%= link_to 'PDF', {:action => 'export_pdf', :id => @issue}, :class => 'icon icon-pdf' %>
3 </div>
3 </div>
4
4
5 <h2><%= @issue.tracker.name %> #<%= @issue.id %> - <%=h @issue.subject %></h2>
5 <h2><%= @issue.tracker.name %> #<%= @issue.id %> - <%=h @issue.subject %></h2>
6
6
7 <div class="box">
7 <div class="box">
8 <table width="100%">
8 <table width="100%">
9 <tr>
9 <tr>
10 <td style="width:15%"><b><%=l(:field_status)%> :</b></td><td style="width:35%"><%= @issue.status.name %></td>
10 <td style="width:15%"><b><%=l(:field_status)%> :</b></td><td style="width:35%"><%= @issue.status.name %></td>
11 <td style="width:15%"><b><%=l(:field_priority)%> :</b></td><td style="width:35%"><%= @issue.priority.name %></td>
11 <td style="width:15%"><b><%=l(:field_priority)%> :</b></td><td style="width:35%"><%= @issue.priority.name %></td>
12 </tr>
12 </tr>
13 <tr>
13 <tr>
14 <td><b><%=l(:field_assigned_to)%> :</b></td><td><%= @issue.assigned_to ? link_to_user(@issue.assigned_to) : "-" %></td>
14 <td><b><%=l(:field_assigned_to)%> :</b></td><td><%= @issue.assigned_to ? link_to_user(@issue.assigned_to) : "-" %></td>
15 <td><b><%=l(:field_category)%> :</b></td><td><%=h @issue.category ? @issue.category.name : "-" %></td>
15 <td><b><%=l(:field_category)%> :</b></td><td><%=h @issue.category ? @issue.category.name : "-" %></td>
16 </tr>
16 </tr>
17 <tr>
17 <tr>
18 <td><b><%=l(:field_author)%> :</b></td><td><%= link_to_user @issue.author %></td>
18 <td><b><%=l(:field_author)%> :</b></td><td><%= link_to_user @issue.author %></td>
19 <td><b><%=l(:field_start_date)%> :</b></td><td><%= format_date(@issue.start_date) %></td>
19 <td><b><%=l(:field_start_date)%> :</b></td><td><%= format_date(@issue.start_date) %></td>
20 </tr>
20 </tr>
21 <tr>
21 <tr>
22 <td><b><%=l(:field_created_on)%> :</b></td><td><%= format_date(@issue.created_on) %></td>
22 <td><b><%=l(:field_created_on)%> :</b></td><td><%= format_date(@issue.created_on) %></td>
23 <td><b><%=l(:field_due_date)%> :</b></td><td><%= format_date(@issue.due_date) %></td>
23 <td><b><%=l(:field_due_date)%> :</b></td><td><%= format_date(@issue.due_date) %></td>
24 </tr>
24 </tr>
25 <tr>
25 <tr>
26 <td><b><%=l(:field_updated_on)%> :</b></td><td><%= format_date(@issue.updated_on) %></td>
26 <td><b><%=l(:field_updated_on)%> :</b></td><td><%= format_date(@issue.updated_on) %></td>
27 <td><b><%=l(:field_done_ratio)%> :</b></td><td><%= @issue.done_ratio %> %</td>
27 <td><b><%=l(:field_done_ratio)%> :</b></td><td><%= @issue.done_ratio %> %</td>
28 </tr>
28 </tr>
29 <tr>
29 <tr>
30 <td><b><%=l(:field_fixed_version)%> :</b></td><td><%= @issue.fixed_version ? @issue.fixed_version.name : "-" %></td>
30 <td><b><%=l(:field_fixed_version)%> :</b></td><td><%= @issue.fixed_version ? link_to_version(@issue.fixed_version) : "-" %></td>
31 <td><b><%=l(:label_spent_time)%> :</b></td>
31 <td><b><%=l(:label_spent_time)%> :</b></td>
32 <td><%= @issue.spent_hours > 0 ? (link_to lwr(:label_f_hour, @issue.spent_hours), {:controller => 'timelog', :action => 'details', :issue_id => @issue}, :class => 'icon icon-time') : "-" %></td>
32 <td><%= @issue.spent_hours > 0 ? (link_to lwr(:label_f_hour, @issue.spent_hours), {:controller => 'timelog', :action => 'details', :issue_id => @issue}, :class => 'icon icon-time') : "-" %></td>
33 </tr>
33 </tr>
34 <tr>
34 <tr>
35 <% n = 0
35 <% n = 0
36 for custom_value in @custom_values %>
36 for custom_value in @custom_values %>
37 <td><b><%= custom_value.custom_field.name %> :</b></td><td><%= h(show_value(custom_value)) %></td>
37 <td><b><%= custom_value.custom_field.name %> :</b></td><td><%= h(show_value(custom_value)) %></td>
38 <% n = n + 1
38 <% n = n + 1
39 if (n > 1)
39 if (n > 1)
40 n = 0 %>
40 n = 0 %>
41 </tr><tr>
41 </tr><tr>
42 <%end
42 <%end
43 end %>
43 end %>
44 </tr>
44 </tr>
45 </table>
45 </table>
46 <hr />
46 <hr />
47
47
48 <% if @issue.changesets.any? %>
48 <% if @issue.changesets.any? %>
49 <div style="float:right;">
49 <div style="float:right;">
50 <em><%= l(:label_revision_plural) %>: <%= @issue.changesets.collect{|changeset| link_to(changeset.revision, :controller => 'repositories', :action => 'revision', :id => @project, :rev => changeset.revision)}.join(", ") %></em>
50 <em><%= l(:label_revision_plural) %>: <%= @issue.changesets.collect{|changeset| link_to(changeset.revision, :controller => 'repositories', :action => 'revision', :id => @project, :rev => changeset.revision)}.join(", ") %></em>
51 </div>
51 </div>
52 <% end %>
52 <% end %>
53
53
54 <b><%=l(:field_description)%> :</b><br /><br />
54 <b><%=l(:field_description)%> :</b><br /><br />
55 <%= textilizable @issue.description, :attachments => @issue.attachments %>
55 <%= textilizable @issue.description, :attachments => @issue.attachments %>
56 <br />
56 <br />
57
57
58 <div class="contextual">
58 <div class="contextual">
59 <%= link_to_if_authorized l(:button_edit), {:controller => 'issues', :action => 'edit', :id => @issue}, :class => 'icon icon-edit' %>
59 <%= link_to_if_authorized l(:button_edit), {:controller => 'issues', :action => 'edit', :id => @issue}, :class => 'icon icon-edit' %>
60 <%= link_to_if_authorized l(:button_log_time), {:controller => 'timelog', :action => 'edit', :issue_id => @issue}, :class => 'icon icon-time' %>
60 <%= link_to_if_authorized l(:button_log_time), {:controller => 'timelog', :action => 'edit', :issue_id => @issue}, :class => 'icon icon-time' %>
61 <%= watcher_tag(@issue, @logged_in_user) %>
61 <%= watcher_tag(@issue, @logged_in_user) %>
62 <%= link_to_if_authorized l(:button_move), {:controller => 'projects', :action => 'move_issues', :id => @project, "issue_ids[]" => @issue.id }, :class => 'icon icon-move' %>
62 <%= link_to_if_authorized l(:button_move), {:controller => 'projects', :action => 'move_issues', :id => @project, "issue_ids[]" => @issue.id }, :class => 'icon icon-move' %>
63 <%= 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' %>
63 <%= 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' %>
64 </div>
64 </div>
65
65
66 <% if authorize_for('issues', 'change_status') and @status_options and !@status_options.empty? %>
66 <% if authorize_for('issues', 'change_status') and @status_options and !@status_options.empty? %>
67 <% form_tag({:controller => 'issues', :action => 'change_status', :id => @issue}) do %>
67 <% form_tag({:controller => 'issues', :action => 'change_status', :id => @issue}) do %>
68 <%=l(:label_change_status)%> :
68 <%=l(:label_change_status)%> :
69 <select name="new_status_id">
69 <select name="new_status_id">
70 <%= options_from_collection_for_select @status_options, "id", "name" %>
70 <%= options_from_collection_for_select @status_options, "id", "name" %>
71 </select>
71 </select>
72 <%= submit_tag l(:button_change) %>
72 <%= submit_tag l(:button_change) %>
73 <% end %>
73 <% end %>
74 <% end %>
74 <% end %>
75 &nbsp;
75 &nbsp;
76 </div>
76 </div>
77
77
78 <% if authorize_for('issue_relations', 'new') || @issue.relations.any? %>
78 <% if authorize_for('issue_relations', 'new') || @issue.relations.any? %>
79 <div id="relations" class="box">
79 <div id="relations" class="box">
80 <%= render :partial => 'relations' %>
80 <%= render :partial => 'relations' %>
81 </div>
81 </div>
82 <% end %>
82 <% end %>
83
83
84 <div id="history" class="box">
84 <div id="history" class="box">
85 <h3><%=l(:label_history)%>
85 <h3><%=l(:label_history)%>
86 <% if @journals_count > @journals.length %>(<%= l(:label_last_changes, @journals.length) %>)<% end %></h3>
86 <% if @journals_count > @journals.length %>(<%= l(:label_last_changes, @journals.length) %>)<% end %></h3>
87 <%= render :partial => 'history', :locals => { :journals => @journals } %>
87 <%= render :partial => 'history', :locals => { :journals => @journals } %>
88 <% if @journals_count > @journals.length %>
88 <% if @journals_count > @journals.length %>
89 <p><center><small><%= link_to l(:label_change_view_all), :action => 'history', :id => @issue %></small></center></p>
89 <p><center><small><%= link_to l(:label_change_view_all), :action => 'history', :id => @issue %></small></center></p>
90 <% end %>
90 <% end %>
91 </div>
91 </div>
92
92
93 <div class="box">
93 <div class="box">
94 <h3><%=l(:label_attachment_plural)%></h3>
94 <h3><%=l(:label_attachment_plural)%></h3>
95 <%= link_to_attachments @issue.attachments, :delete_url => (authorize_for('issues', 'destroy_attachment') ? {:controller => 'issues', :action => 'destroy_attachment', :id => @issue} : nil) %>
95 <%= link_to_attachments @issue.attachments, :delete_url => (authorize_for('issues', 'destroy_attachment') ? {:controller => 'issues', :action => 'destroy_attachment', :id => @issue} : nil) %>
96
96
97 <% if authorize_for('issues', 'add_attachment') %>
97 <% if authorize_for('issues', 'add_attachment') %>
98 <p><%= toggle_link l(:label_attachment_new), "add_attachment_form" %></p>
98 <p><%= toggle_link l(:label_attachment_new), "add_attachment_form" %></p>
99 <% form_tag({ :controller => 'issues', :action => 'add_attachment', :id => @issue }, :multipart => true, :class => "tabular", :id => "add_attachment_form", :style => "display:none;") do %>
99 <% form_tag({ :controller => 'issues', :action => 'add_attachment', :id => @issue }, :multipart => true, :class => "tabular", :id => "add_attachment_form", :style => "display:none;") do %>
100 <%= render :partial => 'attachments/form' %>
100 <%= render :partial => 'attachments/form' %>
101 <%= submit_tag l(:button_add) %>
101 <%= submit_tag l(:button_add) %>
102 <% end %>
102 <% end %>
103 <% end %>
103 <% end %>
104 </div>
104 </div>
105
105
106 <% if authorize_for('issues', 'add_note') %>
106 <% if authorize_for('issues', 'add_note') %>
107 <div class="box">
107 <div class="box">
108 <h3><%= l(:label_add_note) %></h3>
108 <h3><%= l(:label_add_note) %></h3>
109 <% form_tag({:controller => 'issues', :action => 'add_note', :id => @issue}, :class => "tabular" ) do %>
109 <% form_tag({:controller => 'issues', :action => 'add_note', :id => @issue}, :class => "tabular" ) do %>
110 <p><label for="notes"><%=l(:field_notes)%></label>
110 <p><label for="notes"><%=l(:field_notes)%></label>
111 <%= text_area_tag 'notes', '', :cols => 60, :rows => 10, :class => 'wiki-edit' %></p>
111 <%= text_area_tag 'notes', '', :cols => 60, :rows => 10, :class => 'wiki-edit' %></p>
112 <%= submit_tag l(:button_add) %>
112 <%= submit_tag l(:button_add) %>
113 <% end %>
113 <% end %>
114 </div>
114 </div>
115 <% end %>
115 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now