end\r
end
end\r
+ \r
+ def add_note\r
+ unless params[:history][:notes].empty?\r
+ @history = @issue.histories.build(params[:history])\r
+ @history.author_id = self.logged_in_user.id if self.logged_in_user\r
+ @history.status = @issue.status\r
+ if @history.save\r
+ flash[:notice] = l(:notice_successful_update)\r
+ redirect_to :action => 'show', :id => @issue\r
+ return\r
+ end\r
+ end\r
+ show\r
+ render :action => 'show'\r
+ end\r
\r
def change_status\r
@history = @issue.histories.build(params[:history]) \r
<%= end_form_tag %>\r
\r
<% end %>\r
-\r
</div>\r
\r
+<% if authorize_for('issues', 'add_note') %>\r
+ <div class="box">\r
+ <h3><%= l(:label_add_note) %></h3>\r
+ <%= start_form_tag ({:controller => 'issues', :action => 'add_note', :id => @issue}, :class => "tabular" ) %>\r
+ <p><label for="history_notes"><%=l(:field_notes)%></label>\r
+ <%= text_area 'history', 'notes', :cols => 60, :rows => 10 %></p>\r
+ <%= submit_tag l(:button_add) %>\r
+ <%= end_form_tag %>\r
+ </div>\r
+<% end %>\r
\r
<div class="splitcontentleft">\r
<div class="box">\r
<td><b><%= history.status.name %></b></td>\r
</tr>\r
<% if history.notes? %>\r
- <tr><td colspan=3><div class="notes"><%= history.notes %></td></tr>\r
+ <tr><td colspan=3><%= simple_format auto_link history.notes %></td></tr>\r
<% end %>\r
<% end %>
</table>\r
--- /dev/null
+class IssueAddNote < ActiveRecord::Migration
+ def self.up
+ Permission.create :controller => "issues", :action => "add_note", :description => "label_add_note", :sort => 1057, :mail_option => 1, :mail_enabled => 0
+ end
+
+ def self.down
+ Permission.find(:first, :conditions => ["controller=? and action=?", 'issues', 'add_note']).destroy
+ end
+end
label_previous: Zurück\r
label_used_by: Benutzt von\r
#label_details: Details...\r
+#label_add_note: Add a note\r
\r
button_login: Einloggen\r
button_submit: Einreichen\r
label_previous: Previous\r
label_used_by: Used by\r
label_details: Details...\r
+label_add_note: Add a note\r
\r
button_login: Login\r
button_submit: Submit\r
label_previous: Precedente\r
label_used_by: Utilizado por\r
#label_details: Details...\r
+#label_add_note: Add a note\r
\r
button_login: Conexión\r
button_submit: Someter\r
label_previous: Précédent\r
label_used_by: Utilisé par\r
label_details: Détails...\r
+label_add_note: Ajouter une note\r
\r
button_login: Connexion\r
button_submit: Soumettre\r