summaryrefslogtreecommitdiffstats
path: root/app/views/issues/_edit.rhtml
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-02-09 16:11:18 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-02-09 16:11:18 +0000
commit43a6f312edde2399c9c986ed61b1e9b0e1066db6 (patch)
tree35c765cab413a9099ef45aa5c1ca830c3d736d26 /app/views/issues/_edit.rhtml
parent6d109258c909f71edc3a4b43843c296acf66aad0 (diff)
downloadredmine-43a6f312edde2399c9c986ed61b1e9b0e1066db6.tar.gz
redmine-43a6f312edde2399c9c986ed61b1e9b0e1066db6.zip
Merged IssuesController #edit and #update into a single actions.
Users with 'edit issues' permission can now update any property including custom fields when adding a note or changing the status (#519, #581, #587). git-svn-id: http://redmine.rubyforge.org/svn/trunk@1129 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/issues/_edit.rhtml')
-rw-r--r--app/views/issues/_edit.rhtml39
1 files changed, 39 insertions, 0 deletions
diff --git a/app/views/issues/_edit.rhtml b/app/views/issues/_edit.rhtml
new file mode 100644
index 000000000..0f843e855
--- /dev/null
+++ b/app/views/issues/_edit.rhtml
@@ -0,0 +1,39 @@
+<% labelled_tabular_form_for :issue, @issue,
+ :url => {:action => 'edit', :id => @issue},
+ :html => {:id => 'issue-form',
+ :multipart => true} do |f| %>
+ <%= error_messages_for 'issue' %>
+ <div class="box">
+ <% if @edit_allowed || !@allowed_statuses.empty? %>
+ <fieldset>
+ <legend><%= l(:label_change_properties) %>
+ <% if !@issue.new_record? && !@issue.errors.any? && @edit_allowed %>
+ <small>(<%= link_to l(:label_more), {}, :onclick => 'Effect.toggle("issue_descr_fields", "appear", {duration:0.3}); return false;' %>)</small>
+ <% end %>
+ </legend>
+ <%= render :partial => (@edit_allowed ? 'form' : 'form_update'), :locals => {:f => f} %>
+ </fieldset>
+ <% end %>
+
+ <fieldset><legend><%= l(:field_notes) %></legend>
+ <%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
+ <%= wikitoolbar_for 'notes' %>
+
+ <p id="attachments_p"><label><%=l(:label_attachment_new)%>
+ <%= image_to_function 'add.png', 'addFileField();return false;' %></label>
+ <%= file_field_tag 'attachments[]', :size => 30 %> <em>(<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)</em></p>
+ </fieldset>
+ </div>
+
+ <%= f.hidden_field :lock_version %>
+ <%= submit_tag l(:button_submit) %>
+ <%= link_to_remote l(:label_preview),
+ { :url => { :controller => 'issues', :action => 'preview', :id => @issue },
+ :method => 'post',
+ :update => 'preview',
+ :with => 'Form.serialize("issue-form")',
+ :complete => "location.hash='preview'"
+ }, :accesskey => accesskey(:preview) %>
+<% end %>
+
+<div id="preview" class="wiki"></div>