##// END OF EJS Templates
Removed IssuesController#history, all changes are now displayed on issues/show (not only the last 15)....
Jean-Philippe Lang -
r610:6862b9790904
parent child
Show More
@@ -1,169 +1,163
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
24 helper :projects
25 include ProjectsHelper
25 include ProjectsHelper
26 helper :custom_fields
26 helper :custom_fields
27 include CustomFieldsHelper
27 include CustomFieldsHelper
28 helper :ifpdf
28 helper :ifpdf
29 include IfpdfHelper
29 include IfpdfHelper
30 helper :issue_relations
30 helper :issue_relations
31 include IssueRelationsHelper
31 include IssueRelationsHelper
32 helper :watchers
32 helper :watchers
33 include WatchersHelper
33 include WatchersHelper
34 helper :attachments
34 helper :attachments
35 include AttachmentsHelper
35 include AttachmentsHelper
36
36
37 def show
37 def show
38 @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
39 @custom_values = @issue.custom_values.find(:all, :include => :custom_field)
39 @custom_values = @issue.custom_values.find(:all, :include => :custom_field)
40 @journals_count = @issue.journals.count
41 @journals = @issue.journals.find(:all, :include => [:user, :details], :limit => 15, :order => "#{Journal.table_name}.created_on desc")
42 end
43
44 def history
45 @journals = @issue.journals.find(:all, :include => [:user, :details], :order => "#{Journal.table_name}.created_on desc")
40 @journals = @issue.journals.find(:all, :include => [:user, :details], :order => "#{Journal.table_name}.created_on desc")
46 @journals_count = @journals.length
47 end
41 end
48
42
49 def export_pdf
43 def export_pdf
50 @custom_values = @issue.custom_values.find(:all, :include => :custom_field)
44 @custom_values = @issue.custom_values.find(:all, :include => :custom_field)
51 @options_for_rfpdf ||= {}
45 @options_for_rfpdf ||= {}
52 @options_for_rfpdf[:file_name] = "#{@project.name}_#{@issue.id}.pdf"
46 @options_for_rfpdf[:file_name] = "#{@project.name}_#{@issue.id}.pdf"
53 end
47 end
54
48
55 def edit
49 def edit
56 @priorities = Enumeration::get_values('IPRI')
50 @priorities = Enumeration::get_values('IPRI')
57 if request.get?
51 if request.get?
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) }
52 @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) }
59 else
53 else
60 begin
54 begin
61 @issue.init_journal(self.logged_in_user)
55 @issue.init_journal(self.logged_in_user)
62 # Retrieve custom fields and values
56 # Retrieve custom fields and values
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]) }
57 @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]) }
64 @issue.custom_values = @custom_values
58 @issue.custom_values = @custom_values
65 @issue.attributes = params[:issue]
59 @issue.attributes = params[:issue]
66 if @issue.save
60 if @issue.save
67 flash[:notice] = l(:notice_successful_update)
61 flash[:notice] = l(:notice_successful_update)
68 redirect_to :action => 'show', :id => @issue
62 redirect_to :action => 'show', :id => @issue
69 end
63 end
70 rescue ActiveRecord::StaleObjectError
64 rescue ActiveRecord::StaleObjectError
71 # Optimistic locking exception
65 # Optimistic locking exception
72 flash[:error] = l(:notice_locking_conflict)
66 flash[:error] = l(:notice_locking_conflict)
73 end
67 end
74 end
68 end
75 end
69 end
76
70
77 def add_note
71 def add_note
78 unless params[:notes].empty?
72 unless params[:notes].empty?
79 journal = @issue.init_journal(self.logged_in_user, params[:notes])
73 journal = @issue.init_journal(self.logged_in_user, params[:notes])
80 if @issue.save
74 if @issue.save
81 flash[:notice] = l(:notice_successful_update)
75 flash[:notice] = l(:notice_successful_update)
82 Mailer.deliver_issue_edit(journal) if Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled?
76 Mailer.deliver_issue_edit(journal) if Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled?
83 redirect_to :action => 'show', :id => @issue
77 redirect_to :action => 'show', :id => @issue
84 return
78 return
85 end
79 end
86 end
80 end
87 show
81 show
88 render :action => 'show'
82 render :action => 'show'
89 end
83 end
90
84
91 def change_status
85 def change_status
92 @status_options = @issue.status.find_new_statuses_allowed_to(logged_in_user.role_for_project(@project), @issue.tracker) if logged_in_user
86 @status_options = @issue.status.find_new_statuses_allowed_to(logged_in_user.role_for_project(@project), @issue.tracker) if logged_in_user
93 @new_status = IssueStatus.find(params[:new_status_id])
87 @new_status = IssueStatus.find(params[:new_status_id])
94 if params[:confirm]
88 if params[:confirm]
95 begin
89 begin
96 journal = @issue.init_journal(self.logged_in_user, params[:notes])
90 journal = @issue.init_journal(self.logged_in_user, params[:notes])
97 @issue.status = @new_status
91 @issue.status = @new_status
98 if @issue.update_attributes(params[:issue])
92 if @issue.update_attributes(params[:issue])
99 # Save attachments
93 # Save attachments
100 params[:attachments].each { |file|
94 params[:attachments].each { |file|
101 next unless file.size > 0
95 next unless file.size > 0
102 a = Attachment.create(:container => @issue, :file => file, :author => logged_in_user)
96 a = Attachment.create(:container => @issue, :file => file, :author => logged_in_user)
103 journal.details << JournalDetail.new(:property => 'attachment',
97 journal.details << JournalDetail.new(:property => 'attachment',
104 :prop_key => a.id,
98 :prop_key => a.id,
105 :value => a.filename) unless a.new_record?
99 :value => a.filename) unless a.new_record?
106 } if params[:attachments] and params[:attachments].is_a? Array
100 } if params[:attachments] and params[:attachments].is_a? Array
107
101
108 # Log time
102 # Log time
109 if logged_in_user.authorized_to(@project, "timelog/edit")
103 if logged_in_user.authorized_to(@project, "timelog/edit")
110 @time_entry ||= TimeEntry.new(:project => @project, :issue => @issue, :user => logged_in_user, :spent_on => Date.today)
104 @time_entry ||= TimeEntry.new(:project => @project, :issue => @issue, :user => logged_in_user, :spent_on => Date.today)
111 @time_entry.attributes = params[:time_entry]
105 @time_entry.attributes = params[:time_entry]
112 @time_entry.save
106 @time_entry.save
113 end
107 end
114
108
115 flash[:notice] = l(:notice_successful_update)
109 flash[:notice] = l(:notice_successful_update)
116 Mailer.deliver_issue_edit(journal) if Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled?
110 Mailer.deliver_issue_edit(journal) if Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled?
117 redirect_to :action => 'show', :id => @issue
111 redirect_to :action => 'show', :id => @issue
118 end
112 end
119 rescue ActiveRecord::StaleObjectError
113 rescue ActiveRecord::StaleObjectError
120 # Optimistic locking exception
114 # Optimistic locking exception
121 flash[:error] = l(:notice_locking_conflict)
115 flash[:error] = l(:notice_locking_conflict)
122 end
116 end
123 end
117 end
124 @assignable_to = @project.members.find(:all, :include => :user).collect{ |m| m.user }
118 @assignable_to = @project.members.find(:all, :include => :user).collect{ |m| m.user }
125 @activities = Enumeration::get_values('ACTI')
119 @activities = Enumeration::get_values('ACTI')
126 end
120 end
127
121
128 def destroy
122 def destroy
129 @issue.destroy
123 @issue.destroy
130 redirect_to :controller => 'projects', :action => 'list_issues', :id => @project
124 redirect_to :controller => 'projects', :action => 'list_issues', :id => @project
131 end
125 end
132
126
133 def add_attachment
127 def add_attachment
134 # Save the attachments
128 # Save the attachments
135 @attachments = []
129 @attachments = []
136 journal = @issue.init_journal(self.logged_in_user)
130 journal = @issue.init_journal(self.logged_in_user)
137 params[:attachments].each { |file|
131 params[:attachments].each { |file|
138 next unless file.size > 0
132 next unless file.size > 0
139 a = Attachment.create(:container => @issue, :file => file, :author => logged_in_user)
133 a = Attachment.create(:container => @issue, :file => file, :author => logged_in_user)
140 @attachments << a unless a.new_record?
134 @attachments << a unless a.new_record?
141 journal.details << JournalDetail.new(:property => 'attachment',
135 journal.details << JournalDetail.new(:property => 'attachment',
142 :prop_key => a.id,
136 :prop_key => a.id,
143 :value => a.filename) unless a.new_record?
137 :value => a.filename) unless a.new_record?
144 } if params[:attachments] and params[:attachments].is_a? Array
138 } if params[:attachments] and params[:attachments].is_a? Array
145 journal.save if journal.details.any?
139 journal.save if journal.details.any?
146 Mailer.deliver_attachments_add(@attachments) if !@attachments.empty? and Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled?
140 Mailer.deliver_attachments_add(@attachments) if !@attachments.empty? and Permission.find_by_controller_and_action(params[:controller], params[:action]).mail_enabled?
147 redirect_to :action => 'show', :id => @issue
141 redirect_to :action => 'show', :id => @issue
148 end
142 end
149
143
150 def destroy_attachment
144 def destroy_attachment
151 a = @issue.attachments.find(params[:attachment_id])
145 a = @issue.attachments.find(params[:attachment_id])
152 a.destroy
146 a.destroy
153 journal = @issue.init_journal(self.logged_in_user)
147 journal = @issue.init_journal(self.logged_in_user)
154 journal.details << JournalDetail.new(:property => 'attachment',
148 journal.details << JournalDetail.new(:property => 'attachment',
155 :prop_key => a.id,
149 :prop_key => a.id,
156 :old_value => a.filename)
150 :old_value => a.filename)
157 journal.save
151 journal.save
158 redirect_to :action => 'show', :id => @issue
152 redirect_to :action => 'show', :id => @issue
159 end
153 end
160
154
161 private
155 private
162 def find_project
156 def find_project
163 @issue = Issue.find(params[:id], :include => [:project, :tracker, :status, :author, :priority, :category])
157 @issue = Issue.find(params[:id], :include => [:project, :tracker, :status, :author, :priority, :category])
164 @project = @issue.project
158 @project = @issue.project
165 @html_title = "#{@project.name} - #{@issue.tracker.name} ##{@issue.id}"
159 @html_title = "#{@project.name} - #{@issue.tracker.name} ##{@issue.id}"
166 rescue ActiveRecord::RecordNotFound
160 rescue ActiveRecord::RecordNotFound
167 render_404
161 render_404
168 end
162 end
169 end
163 end
@@ -1,11 +1,13
1 <% note_id = journals.length %>
1 <% for journal in journals %>
2 <% for journal in journals %>
2 <h4><%= format_time(journal.created_on) %> - <%= journal.user.name %></h4>
3 <h4><div style="float:right;"><%= link_to "##{note_id}", :anchor => "note-#{note_id}" %></div>
4 <%= content_tag('a', '', :name => "note-#{note_id}")%>
5 <%= format_time(journal.created_on) %> - <%= journal.user.name %></h4>
3 <ul>
6 <ul>
4 <% for detail in journal.details %>
7 <% for detail in journal.details %>
5 <li><%= show_detail(detail) %></li>
8 <li><%= show_detail(detail) %></li>
6 <% end %>
9 <% end %>
7 </ul>
10 </ul>
8 <% if journal.notes? %>
11 <%= textilizable(journal.notes) unless journal.notes.blank? %>
9 <%= textilizable(journal.notes) %>
12 <% note_id -= 1 %>
10 <% end %>
11 <% end %>
13 <% end %>
@@ -1,118 +1,114
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 ? link_to_version(@issue.fixed_version) : "-" %></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 valign="top"><b><%= custom_value.custom_field.name %> :</b></td><td valign="top"><%= simple_format(h(show_value(custom_value))) %></td>
37 <td valign="top"><b><%= custom_value.custom_field.name %> :</b></td><td valign="top"><%= simple_format(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 <% if @journals_count > 0 %>
84 <% if @journals.any? %>
85 <div id="history" class="box">
85 <div id="history" class="box">
86 <h3><%=l(:label_history)%>
86 <h3><%=l(:label_history)%></h3>
87 <% if @journals_count > @journals.length %>(<%= l(:label_last_changes, @journals.length) %>)<% end %></h3>
88 <%= render :partial => 'history', :locals => { :journals => @journals } %>
87 <%= render :partial => 'history', :locals => { :journals => @journals } %>
89 <% if @journals_count > @journals.length %>
90 <p><center><small><%= link_to l(:label_change_view_all), :action => 'history', :id => @issue %></small></center></p>
91 <% end %>
92 </div>
88 </div>
93 <% end %>
89 <% end %>
94
90
95 <div class="box">
91 <div class="box">
96 <h3><%=l(:label_attachment_plural)%></h3>
92 <h3><%=l(:label_attachment_plural)%></h3>
97 <%= link_to_attachments @issue.attachments, :delete_url => (authorize_for('issues', 'destroy_attachment') ? {:controller => 'issues', :action => 'destroy_attachment', :id => @issue} : nil) %>
93 <%= link_to_attachments @issue.attachments, :delete_url => (authorize_for('issues', 'destroy_attachment') ? {:controller => 'issues', :action => 'destroy_attachment', :id => @issue} : nil) %>
98
94
99 <% if authorize_for('issues', 'add_attachment') %>
95 <% if authorize_for('issues', 'add_attachment') %>
100 <p><%= toggle_link l(:label_attachment_new), "add_attachment_form" %></p>
96 <p><%= toggle_link l(:label_attachment_new), "add_attachment_form" %></p>
101 <% form_tag({ :controller => 'issues', :action => 'add_attachment', :id => @issue }, :multipart => true, :class => "tabular", :id => "add_attachment_form", :style => "display:none;") do %>
97 <% form_tag({ :controller => 'issues', :action => 'add_attachment', :id => @issue }, :multipart => true, :class => "tabular", :id => "add_attachment_form", :style => "display:none;") do %>
102 <%= render :partial => 'attachments/form' %>
98 <%= render :partial => 'attachments/form' %>
103 <%= submit_tag l(:button_add) %>
99 <%= submit_tag l(:button_add) %>
104 <% end %>
100 <% end %>
105 <% end %>
101 <% end %>
106 </div>
102 </div>
107
103
108 <% if authorize_for('issues', 'add_note') %>
104 <% if authorize_for('issues', 'add_note') %>
109 <div class="box">
105 <div class="box">
110 <h3><%= l(:label_add_note) %></h3>
106 <h3><%= l(:label_add_note) %></h3>
111 <% form_tag({:controller => 'issues', :action => 'add_note', :id => @issue}, :class => "tabular" ) do %>
107 <% form_tag({:controller => 'issues', :action => 'add_note', :id => @issue}, :class => "tabular" ) do %>
112 <p><label for="notes"><%=l(:field_notes)%></label>
108 <p><label for="notes"><%=l(:field_notes)%></label>
113 <%= text_area_tag 'notes', '', :cols => 60, :rows => 10, :class => 'wiki-edit' %></p>
109 <%= text_area_tag 'notes', '', :cols => 60, :rows => 10, :class => 'wiki-edit' %></p>
114 <%= wikitoolbar_for 'notes' %>
110 <%= wikitoolbar_for 'notes' %>
115 <%= submit_tag l(:button_add) %>
111 <%= submit_tag l(:button_add) %>
116 <% end %>
112 <% end %>
117 </div>
113 </div>
118 <% end %>
114 <% end %>
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now