2012-04-25 17:17:49 +00:00
|
|
|
<%= labelled_form_for @issue, :html => {:id => 'issue-form', :multipart => true} do |f| %>
|
2010-04-11 17:00:13 +00:00
|
|
|
<%= error_messages_for 'issue', 'time_entry' %>
|
2012-02-05 23:49:19 +00:00
|
|
|
<%= render :partial => 'conflict' if @conflict %>
|
2008-02-09 16:11:18 +00:00
|
|
|
<div class="box">
|
2015-02-13 19:30:15 +00:00
|
|
|
<% if @issue.attributes_editable? %>
|
2011-12-06 20:15:22 +00:00
|
|
|
<fieldset class="tabular"><legend><%= l(:label_change_properties) %></legend>
|
2012-02-05 23:49:19 +00:00
|
|
|
<div id="all_attributes">
|
2011-12-15 10:41:49 +00:00
|
|
|
<%= render :partial => 'form', :locals => {:f => f} %>
|
2012-02-05 23:49:19 +00:00
|
|
|
</div>
|
2008-02-09 16:11:18 +00:00
|
|
|
</fieldset>
|
|
|
|
|
<% end %>
|
2025-03-30 07:48:53 +00:00
|
|
|
<% if @issue.time_loggable? %>
|
2022-03-22 07:03:19 +00:00
|
|
|
<fieldset class="tabular" id="log_time"><legend><%= l(:button_log_time) %></legend>
|
2012-04-25 17:17:49 +00:00
|
|
|
<%= labelled_fields_for :time_entry, @time_entry do |time_entry| %>
|
2015-11-08 10:41:09 +00:00
|
|
|
<div class="splitcontent">
|
2008-02-21 17:50:33 +00:00
|
|
|
<div class="splitcontentleft">
|
2016-11-18 14:17:11 +00:00
|
|
|
<p><%= time_entry.hours_field :hours, :size => 6, :label => :label_spent_time %> <%= l(:field_hours) %></p>
|
2008-02-21 17:50:33 +00:00
|
|
|
</div>
|
|
|
|
|
<div class="splitcontentright">
|
2008-06-29 12:01:20 +00:00
|
|
|
<p><%= time_entry.select :activity_id, activity_collection_for_select_options %></p>
|
2008-02-21 17:50:33 +00:00
|
|
|
</div>
|
2015-11-08 10:41:09 +00:00
|
|
|
</div>
|
2008-05-13 17:51:55 +00:00
|
|
|
<p><%= time_entry.text_field :comments, :size => 60 %></p>
|
2021-03-15 23:32:52 +00:00
|
|
|
<% @time_entry.editable_custom_field_values.each do |value| %>
|
2011-09-15 09:28:33 +00:00
|
|
|
<p><%= custom_field_tag_with_label :time_entry, value %></p>
|
2008-07-22 18:52:00 +00:00
|
|
|
<% end %>
|
2008-02-21 17:50:33 +00:00
|
|
|
<% end %>
|
|
|
|
|
</fieldset>
|
|
|
|
|
<% end %>
|
2016-06-05 13:45:10 +00:00
|
|
|
<% if @issue.notes_addable? %>
|
2022-03-22 07:03:19 +00:00
|
|
|
<fieldset id="add_notes"><legend><%= l(:field_notes) %></legend>
|
2025-10-06 22:45:02 +00:00
|
|
|
<%= f.textarea :notes, :cols => 60, :rows => 10, :class => 'wiki-edit',
|
2019-09-09 21:49:48 +00:00
|
|
|
:data => {
|
2020-10-25 00:01:14 +00:00
|
|
|
:auto_complete => true
|
2025-09-21 16:42:07 +00:00
|
|
|
}.merge(list_autofill_data_attributes),
|
2019-09-09 21:49:48 +00:00
|
|
|
:no_label => true %>
|
2018-09-26 07:27:30 +00:00
|
|
|
<%= wikitoolbar_for 'issue_notes', preview_issue_path(:project_id => @project, :issue_id => @issue) %>
|
2016-11-19 08:53:02 +00:00
|
|
|
|
2016-06-05 13:45:10 +00:00
|
|
|
<% if @issue.safe_attribute? 'private_notes' %>
|
|
|
|
|
<%= f.check_box :private_notes, :no_label => true %> <label for="issue_private_notes"><%= l(:field_private_notes) %></label>
|
|
|
|
|
<% end %>
|
2016-11-19 08:53:02 +00:00
|
|
|
|
2016-06-05 13:45:10 +00:00
|
|
|
<%= call_hook(:view_issues_edit_notes_bottom, { :issue => @issue, :notes => @notes, :form => f }) %>
|
|
|
|
|
</fieldset>
|
2023-11-12 21:40:02 +00:00
|
|
|
<% end %>
|
|
|
|
|
<% if !@issue.attributes_editable? && User.current.allowed_to?(:add_issue_watchers, @issue.project) %>
|
|
|
|
|
<%= update_data_sources_for_auto_complete({users: watchers_autocomplete_for_mention_path(project_id: @issue.project, q: '', object_type: 'issue',
|
|
|
|
|
object_id: @issue.id)}) %>
|
2023-03-02 04:32:34 +00:00
|
|
|
<% end %>
|
|
|
|
|
<% if @issue.attachments_addable? %>
|
2022-03-22 07:03:19 +00:00
|
|
|
<fieldset id="add_attachments"><legend><%= l(:label_attachment_plural) %></legend>
|
2016-07-13 20:04:14 +00:00
|
|
|
<% if @issue.attachments.any? && @issue.safe_attribute?('deleted_attachment_ids') %>
|
|
|
|
|
<div class="contextual"><%= link_to l(:label_edit_attachments), '#', :onclick => "$('#existing-attachments').toggle(); return false;" %></div>
|
|
|
|
|
<div id="existing-attachments" style="<%= @issue.deleted_attachment_ids.blank? ? 'display:none;' : '' %>">
|
|
|
|
|
<% @issue.attachments.each do |attachment| %>
|
|
|
|
|
<span class="existing-attachment">
|
2024-09-08 17:23:06 +00:00
|
|
|
<%= sprite_icon('attachment', size: 12) %>
|
2016-11-19 08:53:02 +00:00
|
|
|
<%= text_field_tag '', attachment.filename, :class => "icon icon-attachment filename", :disabled => true %>
|
2016-07-13 20:04:14 +00:00
|
|
|
<label>
|
|
|
|
|
<%= check_box_tag 'issue[deleted_attachment_ids][]',
|
|
|
|
|
attachment.id,
|
|
|
|
|
@issue.deleted_attachment_ids.include?(attachment.id),
|
|
|
|
|
:id => nil, :class => "deleted_attachment" %> <%= l(:button_delete) %>
|
|
|
|
|
</label>
|
|
|
|
|
</span>
|
|
|
|
|
<% end %>
|
|
|
|
|
<hr />
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<div id="new-attachments" style="display:inline-block;">
|
|
|
|
|
<%= render :partial => 'attachments/form', :locals => {:container => @issue} %>
|
|
|
|
|
</div>
|
2016-06-05 13:45:10 +00:00
|
|
|
</fieldset>
|
2012-10-03 21:36:19 +00:00
|
|
|
<% end %>
|
2008-02-09 16:11:18 +00:00
|
|
|
</div>
|
2011-09-15 09:28:10 +00:00
|
|
|
|
2008-02-09 16:11:18 +00:00
|
|
|
<%= f.hidden_field :lock_version %>
|
2012-02-04 17:36:15 +00:00
|
|
|
<%= hidden_field_tag 'last_journal_id', params[:last_journal_id] || @issue.last_journal_id %>
|
2008-02-09 16:11:18 +00:00
|
|
|
<%= submit_tag l(:button_submit) %>
|
2019-11-22 03:02:32 +00:00
|
|
|
<%= link_to(
|
|
|
|
|
l(:button_cancel), issue_path(id: @issue.id),
|
|
|
|
|
:onclick => params[:action] == 'show' ? "$('#update').hide(); return false;" : ''
|
|
|
|
|
) %>
|
2016-03-19 09:00:36 +00:00
|
|
|
<%= hidden_field_tag 'prev_issue_id', @prev_issue_id if @prev_issue_id %>
|
|
|
|
|
<%= hidden_field_tag 'next_issue_id', @next_issue_id if @next_issue_id %>
|
|
|
|
|
<%= hidden_field_tag 'issue_position', @issue_position if @issue_position %>
|
|
|
|
|
<%= hidden_field_tag 'issue_count', @issue_count if @issue_count %>
|
2008-02-09 16:11:18 +00:00
|
|
|
<% end %>
|