You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

_edit.rhtml 2.4KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <% labelled_tabular_form_for :issue, @issue,
  2. :url => {:action => 'edit', :id => @issue},
  3. :html => {:id => 'issue-form',
  4. :class => nil,
  5. :multipart => true} do |f| %>
  6. <%= error_messages_for 'issue' %>
  7. <div class="box">
  8. <% if @edit_allowed || !@allowed_statuses.empty? %>
  9. <fieldset class="tabular"><legend><%= l(:label_change_properties) %>
  10. <% if !@issue.new_record? && !@issue.errors.any? && @edit_allowed %>
  11. <small>(<%= link_to l(:label_more), {}, :onclick => 'Effect.toggle("issue_descr_fields", "appear", {duration:0.3}); return false;' %>)</small>
  12. <% end %>
  13. </legend>
  14. <%= render :partial => (@edit_allowed ? 'form' : 'form_update'), :locals => {:f => f} %>
  15. </fieldset>
  16. <% end %>
  17. <% if authorize_for('timelog', 'edit') %>
  18. <fieldset class="tabular"><legend><%= l(:button_log_time) %></legend>
  19. <% fields_for :time_entry, @time_entry, { :builder => TabularFormBuilder, :lang => current_language} do |time_entry| %>
  20. <div class="splitcontentleft">
  21. <p><%= time_entry.text_field :hours, :size => 6, :label => :label_spent_time %> <%= l(:field_hours) %></p>
  22. </div>
  23. <div class="splitcontentright">
  24. <p><%= time_entry.select :activity_id, (@activities.collect {|p| [p.name, p.id]}) %></p>
  25. </div>
  26. <p><%= time_entry.text_field :comments, :size => 60 %></p>
  27. <% end %>
  28. </fieldset>
  29. <% end %>
  30. <fieldset><legend><%= l(:field_notes) %></legend>
  31. <%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
  32. <%= wikitoolbar_for 'notes' %>
  33. <p><%=l(:label_attachment_plural)%><br /><%= render :partial => 'attachments/form' %></p>
  34. </fieldset>
  35. </div>
  36. <%= f.hidden_field :lock_version %>
  37. <%= submit_tag l(:button_submit) %>
  38. <%= link_to_remote l(:label_preview),
  39. { :url => { :controller => 'issues', :action => 'preview', :project_id => @project, :id => @issue },
  40. :method => 'post',
  41. :update => 'preview',
  42. :with => 'Form.serialize("issue-form")',
  43. :complete => "Element.scrollTo('preview')"
  44. }, :accesskey => accesskey(:preview) %>
  45. <% end %>
  46. <div id="preview" class="wiki"></div>