2008-02-09 19:11:18 +03:00
|
|
|
<% labelled_tabular_form_for :issue, @issue,
|
2010-02-24 20:21:41 +03:00
|
|
|
:url => {:action => 'update', :id => @issue},
|
2008-02-09 19:11:18 +03:00
|
|
|
:html => {:id => 'issue-form',
|
2008-02-29 22:46:58 +03:00
|
|
|
:class => nil,
|
2010-02-24 20:21:41 +03:00
|
|
|
:method => :put,
|
2008-02-09 19:11:18 +03:00
|
|
|
:multipart => true} do |f| %>
|
2010-04-11 21:00:13 +04:00
|
|
|
<%= error_messages_for 'issue', 'time_entry' %>
|
2008-02-09 19:11:18 +03:00
|
|
|
<div class="box">
|
|
|
|
<% if @edit_allowed || !@allowed_statuses.empty? %>
|
2008-02-29 22:46:58 +03:00
|
|
|
<fieldset class="tabular"><legend><%= l(:label_change_properties) %>
|
2008-02-09 19:11:18 +03:00
|
|
|
<% 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 %>
|
2008-02-21 20:50:33 +03:00
|
|
|
<% if authorize_for('timelog', 'edit') %>
|
2008-02-29 22:46:58 +03:00
|
|
|
<fieldset class="tabular"><legend><%= l(:button_log_time) %></legend>
|
2008-02-21 20:50:33 +03:00
|
|
|
<% fields_for :time_entry, @time_entry, { :builder => TabularFormBuilder, :lang => current_language} do |time_entry| %>
|
|
|
|
<div class="splitcontentleft">
|
|
|
|
<p><%= time_entry.text_field :hours, :size => 6, :label => :label_spent_time %> <%= l(:field_hours) %></p>
|
|
|
|
</div>
|
|
|
|
<div class="splitcontentright">
|
2008-06-29 16:01:20 +04:00
|
|
|
<p><%= time_entry.select :activity_id, activity_collection_for_select_options %></p>
|
2008-02-21 20:50:33 +03:00
|
|
|
</div>
|
2008-05-13 21:51:55 +04:00
|
|
|
<p><%= time_entry.text_field :comments, :size => 60 %></p>
|
2008-07-22 22:52:00 +04:00
|
|
|
<% @time_entry.custom_field_values.each do |value| %>
|
|
|
|
<p><%= custom_field_tag_with_label :time_entry, value %></p>
|
|
|
|
<% end %>
|
2008-02-21 20:50:33 +03:00
|
|
|
<% end %>
|
|
|
|
</fieldset>
|
|
|
|
<% end %>
|
2011-05-30 22:52:25 +04:00
|
|
|
|
2008-02-09 19:11:18 +03:00
|
|
|
<fieldset><legend><%= l(:field_notes) %></legend>
|
|
|
|
<%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
|
|
|
|
<%= wikitoolbar_for 'notes' %>
|
2008-12-04 02:18:12 +03:00
|
|
|
<%= call_hook(:view_issues_edit_notes_bottom, { :issue => @issue, :notes => @notes, :form => f }) %>
|
2011-02-09 23:33:14 +03:00
|
|
|
</fieldset>
|
2011-05-30 22:52:25 +04:00
|
|
|
|
2011-02-09 23:33:14 +03:00
|
|
|
<fieldset id="attachments" class="collapsible collapsed borders"><legend onclick="toggleFieldset(this);"><%=l(:label_attachment_plural)%></legend>
|
|
|
|
<div style="display: none;">
|
|
|
|
<%= render :partial => 'attachments/form' %>
|
|
|
|
</div>
|
2008-02-09 19:11:18 +03:00
|
|
|
</fieldset>
|
2011-03-30 21:40:00 +04:00
|
|
|
|
|
|
|
<%= send_notification_option %>
|
2008-02-09 19:11:18 +03:00
|
|
|
</div>
|
2011-05-30 22:52:25 +04:00
|
|
|
|
2008-02-09 19:11:18 +03:00
|
|
|
<%= f.hidden_field :lock_version %>
|
|
|
|
<%= submit_tag l(:button_submit) %>
|
2011-05-30 22:52:25 +04:00
|
|
|
<%= link_to_remote l(:label_preview),
|
2010-08-18 19:01:35 +04:00
|
|
|
{ :url => preview_issue_path(:project_id => @project, :id => @issue),
|
2008-02-09 19:11:18 +03:00
|
|
|
:method => 'post',
|
|
|
|
:update => 'preview',
|
|
|
|
:with => 'Form.serialize("issue-form")',
|
2008-02-11 23:45:46 +03:00
|
|
|
:complete => "Element.scrollTo('preview')"
|
2008-02-09 19:11:18 +03:00
|
|
|
}, :accesskey => accesskey(:preview) %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<div id="preview" class="wiki"></div>
|