Redmine 3.4.4
This commit is contained in:
commit
64924a6376
2112 changed files with 259028 additions and 0 deletions
7
app/views/issues/_action_menu.html.erb
Normal file
7
app/views/issues/_action_menu.html.erb
Normal file
|
@ -0,0 +1,7 @@
|
|||
<div class="contextual">
|
||||
<%= link_to l(:button_edit), edit_issue_path(@issue), :onclick => 'showAndScrollTo("update", "issue_notes"); return false;', :class => 'icon icon-edit', :accesskey => accesskey(:edit) if @issue.editable? %>
|
||||
<%= link_to l(:button_log_time), new_issue_time_entry_path(@issue), :class => 'icon icon-time-add' if User.current.allowed_to?(:log_time, @project) %>
|
||||
<%= watcher_link(@issue, User.current) %>
|
||||
<%= link_to l(:button_copy), project_copy_issue_path(@project, @issue), :class => 'icon icon-copy' if User.current.allowed_to?(:copy_issues, @project) && Issue.allowed_target_projects.any? %>
|
||||
<%= link_to l(:button_delete), issue_path(@issue), :data => {:confirm => issues_destroy_confirmation_message(@issue)}, :method => :delete, :class => 'icon icon-del' if @issue.deletable? %>
|
||||
</div>
|
83
app/views/issues/_attributes.html.erb
Normal file
83
app/views/issues/_attributes.html.erb
Normal file
|
@ -0,0 +1,83 @@
|
|||
<%= labelled_fields_for :issue, @issue do |f| %>
|
||||
|
||||
<div class="splitcontent">
|
||||
<div class="splitcontentleft">
|
||||
<% if @issue.safe_attribute?('status_id') && @allowed_statuses.present? %>
|
||||
<p><%= f.select :status_id, (@allowed_statuses.collect {|p| [p.name, p.id]}), {:required => true},
|
||||
:onchange => "updateIssueFrom('#{escape_javascript update_issue_form_path(@project, @issue)}', this)" %></p>
|
||||
<%= hidden_field_tag 'was_default_status', @issue.status_id, :id => nil if @issue.status == @issue.default_status %>
|
||||
<% else %>
|
||||
<p><label><%= l(:field_status) %></label> <%= @issue.status %></p>
|
||||
<% end %>
|
||||
|
||||
<% if @issue.safe_attribute? 'priority_id' %>
|
||||
<p><%= f.select :priority_id, (@priorities.collect {|p| [p.name, p.id]}), {:required => true} %></p>
|
||||
<% end %>
|
||||
|
||||
<% if @issue.safe_attribute? 'assigned_to_id' %>
|
||||
<p><%= f.select :assigned_to_id, principals_options_for_select(@issue.assignable_users, @issue.assigned_to), :include_blank => true, :required => @issue.required_attribute?('assigned_to_id') %></p>
|
||||
<% end %>
|
||||
|
||||
<% if @issue.safe_attribute?('category_id') && @issue.project.issue_categories.any? %>
|
||||
<p><%= f.select :category_id, (@issue.project.issue_categories.collect {|c| [c.name, c.id]}), :include_blank => true, :required => @issue.required_attribute?('category_id') %>
|
||||
<%= link_to(l(:label_issue_category_new),
|
||||
new_project_issue_category_path(@issue.project),
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:label_issue_category_new),
|
||||
:tabindex => 200,
|
||||
:class => 'icon-only icon-add'
|
||||
) if User.current.allowed_to?(:manage_categories, @issue.project) %></p>
|
||||
<% end %>
|
||||
|
||||
<% if @issue.safe_attribute?('fixed_version_id') && @issue.assignable_versions.any? %>
|
||||
<p><%= f.select :fixed_version_id, version_options_for_select(@issue.assignable_versions, @issue.fixed_version), :include_blank => true, :required => @issue.required_attribute?('fixed_version_id') %>
|
||||
<%= link_to(l(:label_version_new),
|
||||
new_project_version_path(@issue.project),
|
||||
:remote => true,
|
||||
:method => 'get',
|
||||
:title => l(:label_version_new),
|
||||
:tabindex => 200,
|
||||
:class => 'icon-only icon-add'
|
||||
) if User.current.allowed_to?(:manage_versions, @issue.project) %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="splitcontentright">
|
||||
<% if @issue.safe_attribute? 'parent_issue_id' %>
|
||||
<p id="parent_issue"><%= f.text_field :parent_issue_id, :size => 10, :required => @issue.required_attribute?('parent_issue_id') %></p>
|
||||
<%= javascript_tag "observeAutocompleteField('issue_parent_issue_id', '#{escape_javascript auto_complete_issues_path(:project_id => @issue.project, :scope => Setting.cross_project_subtasks, :status => @issue.closed? ? 'c' : 'o', :issue_id => @issue.id)}')" %>
|
||||
<% end %>
|
||||
|
||||
<% if @issue.safe_attribute? 'start_date' %>
|
||||
<p id="start_date_area">
|
||||
<%= f.date_field(:start_date, :size => 10, :required => @issue.required_attribute?('start_date')) %>
|
||||
<%= calendar_for('issue_start_date') %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% if @issue.safe_attribute? 'due_date' %>
|
||||
<p id="due_date_area">
|
||||
<%= f.date_field(:due_date, :size => 10, :required => @issue.required_attribute?('due_date')) %>
|
||||
<%= calendar_for('issue_due_date') %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% if @issue.safe_attribute? 'estimated_hours' %>
|
||||
<p><%= f.hours_field :estimated_hours, :size => 3, :required => @issue.required_attribute?('estimated_hours') %> <%= l(:field_hours) %></p>
|
||||
<% end %>
|
||||
|
||||
<% if @issue.safe_attribute?('done_ratio') && Issue.use_field_for_done_ratio? %>
|
||||
<p><%= f.select :done_ratio, ((0..10).to_a.collect {|r| ["#{r*10} %", r*10] }), :required => @issue.required_attribute?('done_ratio') %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% if @issue.safe_attribute? 'custom_field_values' %>
|
||||
<%= render :partial => 'issues/form_custom_fields' %>
|
||||
<% end %>
|
||||
|
||||
<% end %>
|
||||
|
||||
<% include_calendar_headers_tags %>
|
20
app/views/issues/_changesets.html.erb
Normal file
20
app/views/issues/_changesets.html.erb
Normal file
|
@ -0,0 +1,20 @@
|
|||
<% changesets.each do |changeset| %>
|
||||
<div class="changeset">
|
||||
<p><%= link_to_revision(changeset, changeset.repository,
|
||||
:text => "#{l(:label_revision)} #{changeset.format_identifier}") %>
|
||||
<% if changeset.filechanges.any? && User.current.allowed_to?(:browse_repository, changeset.project) %>
|
||||
(<%= link_to(l(:label_diff),
|
||||
:controller => 'repositories',
|
||||
:action => 'diff',
|
||||
:id => changeset.project,
|
||||
:repository_id => changeset.repository.identifier_param,
|
||||
:path => "",
|
||||
:rev => changeset.identifier) %>)
|
||||
<% end %>
|
||||
<br />
|
||||
<span class="author"><%= authoring(changeset.committed_on, changeset.author) %></span></p>
|
||||
<div class="wiki changeset-comments">
|
||||
<%= format_changeset_comments changeset %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
30
app/views/issues/_conflict.html.erb
Normal file
30
app/views/issues/_conflict.html.erb
Normal file
|
@ -0,0 +1,30 @@
|
|||
<div class="conflict">
|
||||
<%= l(:notice_issue_update_conflict) %>
|
||||
<% if @conflict_journals.present? %>
|
||||
<div class="conflict-details">
|
||||
<% @conflict_journals.sort_by(&:id).each do |journal| %>
|
||||
<div class="conflict-journal">
|
||||
<p><%= authoring journal.created_on, journal.user, :label => :label_updated_time_by %></p>
|
||||
<% if journal.details.any? %>
|
||||
<ul class="details">
|
||||
<% details_to_strings(journal.details).each do |string| %>
|
||||
<li><%= string %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
<div class="wiki">
|
||||
<%= textilizable(journal, :notes) unless journal.notes.blank? %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<p>
|
||||
<label><%= radio_button_tag 'conflict_resolution', 'overwrite' %> <%= l(:text_issue_conflict_resolution_overwrite) %></label><br />
|
||||
<% if @issue.notes.present? %>
|
||||
<label><%= radio_button_tag 'conflict_resolution', 'add_notes' %> <%= l(:text_issue_conflict_resolution_add_notes) %></label><br />
|
||||
<% end %>
|
||||
<label><%= radio_button_tag 'conflict_resolution', 'cancel' %> <%= l(:text_issue_conflict_resolution_cancel, :link => link_to_issue(@issue, :subject => false)).html_safe %></label>
|
||||
</p>
|
||||
<p><%= submit_tag l(:button_submit) %></p>
|
80
app/views/issues/_edit.html.erb
Normal file
80
app/views/issues/_edit.html.erb
Normal file
|
@ -0,0 +1,80 @@
|
|||
<%= labelled_form_for @issue, :html => {:id => 'issue-form', :multipart => true} do |f| %>
|
||||
<%= error_messages_for 'issue', 'time_entry' %>
|
||||
<%= render :partial => 'conflict' if @conflict %>
|
||||
<div class="box">
|
||||
<% if @issue.attributes_editable? %>
|
||||
<fieldset class="tabular"><legend><%= l(:label_change_properties) %></legend>
|
||||
<div id="all_attributes">
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
</div>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
<% if User.current.allowed_to?(:log_time, @project) %>
|
||||
<fieldset class="tabular"><legend><%= l(:button_log_time) %></legend>
|
||||
<%= labelled_fields_for :time_entry, @time_entry do |time_entry| %>
|
||||
<div class="splitcontent">
|
||||
<div class="splitcontentleft">
|
||||
<p><%= time_entry.hours_field :hours, :size => 6, :label => :label_spent_time %> <%= l(:field_hours) %></p>
|
||||
</div>
|
||||
<div class="splitcontentright">
|
||||
<p><%= time_entry.select :activity_id, activity_collection_for_select_options %></p>
|
||||
</div>
|
||||
</div>
|
||||
<p><%= time_entry.text_field :comments, :size => 60 %></p>
|
||||
<% @time_entry.custom_field_values.each do |value| %>
|
||||
<p><%= custom_field_tag_with_label :time_entry, value %></p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
<% if @issue.notes_addable? %>
|
||||
<fieldset><legend><%= l(:field_notes) %></legend>
|
||||
<%= f.text_area :notes, :cols => 60, :rows => 10, :class => 'wiki-edit', :no_label => true %>
|
||||
<%= wikitoolbar_for 'issue_notes' %>
|
||||
|
||||
<% 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 %>
|
||||
|
||||
<%= call_hook(:view_issues_edit_notes_bottom, { :issue => @issue, :notes => @notes, :form => f }) %>
|
||||
</fieldset>
|
||||
|
||||
<fieldset><legend><%= l(:label_attachment_plural) %></legend>
|
||||
<% 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">
|
||||
<%= text_field_tag '', attachment.filename, :class => "icon icon-attachment filename", :disabled => true %>
|
||||
<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>
|
||||
</fieldset>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= f.hidden_field :lock_version %>
|
||||
<%= hidden_field_tag 'last_journal_id', params[:last_journal_id] || @issue.last_journal_id %>
|
||||
<%= submit_tag l(:button_submit) %>
|
||||
<%= preview_link preview_edit_issue_path(:project_id => @project, :id => @issue), 'issue-form' %>
|
||||
| <%= link_to l(:button_cancel), issue_path(id: @issue.id), :onclick => params[:action] == 'show' ? "$('#update').hide(); return false;" : '' %>
|
||||
|
||||
<%= 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 %>
|
||||
<% end %>
|
||||
|
||||
<div id="preview" class="wiki"></div>
|
57
app/views/issues/_form.html.erb
Normal file
57
app/views/issues/_form.html.erb
Normal file
|
@ -0,0 +1,57 @@
|
|||
<%= labelled_fields_for :issue, @issue do |f| %>
|
||||
<%= call_hook(:view_issues_form_details_top, { :issue => @issue, :form => f }) %>
|
||||
<%= hidden_field_tag 'form_update_triggered_by', '' %>
|
||||
<%= hidden_field_tag 'back_url', params[:back_url], :id => nil if params[:back_url].present? %>
|
||||
|
||||
<% if @issue.safe_attribute? 'is_private' %>
|
||||
<p id="issue_is_private_wrap">
|
||||
<%= f.check_box :is_private, :no_label => true %><label class="inline" for="issue_is_private" id="issue_is_private_label"><%= l(:field_is_private) %></label>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% if (@issue.safe_attribute?('project_id') || @issue.project_id_changed?) && (!@issue.new_record? || @project.nil? || @issue.copy?) %>
|
||||
<p><%= f.select :project_id, project_tree_options_for_select(@issue.allowed_target_projects, :selected => @issue.project), {:required => true},
|
||||
:onchange => "updateIssueFrom('#{escape_javascript update_issue_form_path(@project, @issue)}', this)" %></p>
|
||||
<% end %>
|
||||
|
||||
<% if @issue.safe_attribute?('tracker_id') || (@issue.persisted? && @issue.tracker_id_changed?) %>
|
||||
<p><%= f.select :tracker_id, trackers_options_for_select(@issue), {:required => true},
|
||||
:onchange => "updateIssueFrom('#{escape_javascript update_issue_form_path(@project, @issue)}', this)" %></p>
|
||||
<% end %>
|
||||
|
||||
<% if @issue.safe_attribute? 'subject' %>
|
||||
<p><%= f.text_field :subject, :size => 80, :maxlength => 255, :required => true %></p>
|
||||
<% end %>
|
||||
|
||||
<% if @issue.safe_attribute? 'description' %>
|
||||
<p>
|
||||
<%= f.label_for_field :description, :required => @issue.required_attribute?('description') %>
|
||||
<%= link_to_function content_tag(:span, l(:button_edit), :class => 'icon icon-edit'), '$(this).hide(); $("#issue_description_and_toolbar").show()' unless @issue.new_record? %>
|
||||
<%= content_tag 'span', :id => "issue_description_and_toolbar", :style => (@issue.new_record? ? nil : 'display:none') do %>
|
||||
<%= f.text_area :description,
|
||||
:cols => 60,
|
||||
:rows => [[10, @issue.description.to_s.length / 50].max, 20].min,
|
||||
:accesskey => accesskey(:edit),
|
||||
:class => 'wiki-edit',
|
||||
:no_label => true %>
|
||||
<% end %>
|
||||
</p>
|
||||
<%= wikitoolbar_for 'issue_description' %>
|
||||
<% end %>
|
||||
|
||||
<div id="attributes" class="attributes">
|
||||
<%= render :partial => 'issues/attributes' %>
|
||||
</div>
|
||||
|
||||
<%= call_hook(:view_issues_form_details_bottom, { :issue => @issue, :form => f }) %>
|
||||
<% end %>
|
||||
|
||||
<% heads_for_wiki_formatter %>
|
||||
|
||||
<%= javascript_tag do %>
|
||||
$(document).ready(function(){
|
||||
$("#issue_tracker_id, #issue_status_id").each(function(){
|
||||
$(this).val($(this).find("option[selected=selected]").val());
|
||||
});
|
||||
});
|
||||
<% end %>
|
23
app/views/issues/_form_custom_fields.html.erb
Normal file
23
app/views/issues/_form_custom_fields.html.erb
Normal file
|
@ -0,0 +1,23 @@
|
|||
<% custom_field_values = @issue.editable_custom_field_values %>
|
||||
<% custom_field_values_full_width = custom_field_values.select { |value| value.custom_field.full_width_layout? } %>
|
||||
<% custom_field_values -= custom_field_values_full_width %>
|
||||
|
||||
<% if custom_field_values.present? %>
|
||||
<div class="splitcontent">
|
||||
<div class="splitcontentleft">
|
||||
<% i = 0 %>
|
||||
<% split_on = (custom_field_values.size / 2.0).ceil - 1 %>
|
||||
<% custom_field_values.each do |value| %>
|
||||
<p><%= custom_field_tag_with_label :issue, value, :required => @issue.required_attribute?(value.custom_field_id) %></p>
|
||||
<% if i == split_on -%>
|
||||
</div><div class="splitcontentright">
|
||||
<% end -%>
|
||||
<% i += 1 -%>
|
||||
<% end -%>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% custom_field_values_full_width.each do |value| %>
|
||||
<p><%= custom_field_tag_with_label :issue, value, :required => @issue.required_attribute?(value.custom_field_id) %></p>
|
||||
<% end %>
|
30
app/views/issues/_history.html.erb
Normal file
30
app/views/issues/_history.html.erb
Normal file
|
@ -0,0 +1,30 @@
|
|||
<% reply_links = issue.notes_addable? -%>
|
||||
<% for journal in journals %>
|
||||
<div id="change-<%= journal.id %>" class="<%= journal.css_classes %>">
|
||||
<div id="note-<%= journal.indice %>">
|
||||
<h4><a href="#note-<%= journal.indice %>" class="journal-link">#<%= journal.indice %></a>
|
||||
<%= avatar(journal.user, :size => "24") %>
|
||||
<%= authoring journal.created_on, journal.user, :label => :label_updated_time_by %>
|
||||
<%= render_private_notes_indicator(journal) %></h4>
|
||||
|
||||
<% if journal.details.any? %>
|
||||
<ul class="details">
|
||||
<% details_to_strings(journal.visible_details).each do |string| %>
|
||||
<li><%= string %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% if Setting.thumbnails_enabled? && (thumbnail_attachments = journal_thumbnail_attachments(journal)).any? %>
|
||||
<div class="thumbnails">
|
||||
<% thumbnail_attachments.each do |attachment| %>
|
||||
<div><%= thumbnail_tag(attachment) %></div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= render_notes(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %>
|
||||
</div>
|
||||
</div>
|
||||
<%= call_hook(:view_issues_history_journal_bottom, { :journal => journal }) %>
|
||||
<% end %>
|
||||
|
||||
<% heads_for_wiki_formatter if User.current.allowed_to?(:edit_issue_notes, issue.project) || User.current.allowed_to?(:edit_own_issue_notes, issue.project) %>
|
54
app/views/issues/_list.html.erb
Normal file
54
app/views/issues/_list.html.erb
Normal file
|
@ -0,0 +1,54 @@
|
|||
<% query_options = nil unless defined?(query_options) %>
|
||||
<% query_options ||= {} %>
|
||||
|
||||
<%= form_tag({}, :data => {:cm_url => issues_context_menu_path}) do -%>
|
||||
<%= hidden_field_tag 'back_url', url_for(:params => request.query_parameters), :id => nil %>
|
||||
<div class="autoscroll">
|
||||
<table class="list issues odd-even <%= query.css_classes %>">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="checkbox hide-when-print">
|
||||
<%= check_box_tag 'check_all', '', false, :class => 'toggle-selection',
|
||||
:title => "#{l(:button_check_all)}/#{l(:button_uncheck_all)}" %>
|
||||
</th>
|
||||
<% query.inline_columns.each do |column| %>
|
||||
<%= column_header(query, column, query_options) %>
|
||||
<% end %>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<% grouped_issue_list(issues, query) do |issue, level, group_name, group_count, group_totals| -%>
|
||||
<% if group_name %>
|
||||
<% reset_cycle %>
|
||||
<tr class="group open">
|
||||
<td colspan="<%= query.inline_columns.size + 1 %>">
|
||||
<span class="expander" onclick="toggleRowGroup(this);"> </span>
|
||||
<span class="name"><%= group_name %></span> <span class="count"><%= group_count %></span> <span class="totals"><%= group_totals %></span>
|
||||
<%= link_to_function("#{l(:button_collapse_all)}/#{l(:button_expand_all)}",
|
||||
"toggleAllRowGroups(this)", :class => 'toggle-all') %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<tr id="issue-<%= issue.id %>" class="hascontextmenu <%= cycle('odd', 'even') %> <%= issue.css_classes %> <%= level > 0 ? "idnt idnt-#{level}" : nil %>">
|
||||
<td class="checkbox hide-when-print"><%= check_box_tag("ids[]", issue.id, false, :id => nil) %></td>
|
||||
<% query.inline_columns.each do |column| %>
|
||||
<%= content_tag('td', column_content(column, issue), :class => column.css_classes) %>
|
||||
<% end %>
|
||||
</tr>
|
||||
<% query.block_columns.each do |column|
|
||||
if (text = column_content(column, issue)) && text.present? -%>
|
||||
<tr class="<%= current_cycle %>">
|
||||
<td colspan="<%= query.inline_columns.size + 1 %>" class="<%= column.css_classes %>">
|
||||
<% if query.block_columns.count > 1 %>
|
||||
<span><%= column.caption %></span>
|
||||
<% end %>
|
||||
<%= text %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<% end -%>
|
22
app/views/issues/_relations.html.erb
Normal file
22
app/views/issues/_relations.html.erb
Normal file
|
@ -0,0 +1,22 @@
|
|||
<div class="contextual">
|
||||
<% if User.current.allowed_to?(:manage_issue_relations, @project) %>
|
||||
<%= toggle_link l(:button_add), 'new-relation-form', {:focus => 'relation_issue_to_id'} %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<p><strong><%=l(:label_related_issues)%></strong></p>
|
||||
|
||||
<% if @relations.present? %>
|
||||
<%= form_tag({}, :data => {:cm_url => issues_context_menu_path}) do %>
|
||||
<%= render_issue_relations(@issue, @relations) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= form_for @relation, {
|
||||
:as => :relation, :remote => true,
|
||||
:url => issue_relations_path(@issue),
|
||||
:method => :post,
|
||||
:html => {:id => 'new-relation-form', :style => 'display: none;'}
|
||||
} do |f| %>
|
||||
<%= render :partial => 'issue_relations/form', :locals => {:f => f}%>
|
||||
<% end %>
|
18
app/views/issues/_sidebar.html.erb
Normal file
18
app/views/issues/_sidebar.html.erb
Normal file
|
@ -0,0 +1,18 @@
|
|||
<h3><%= l(:label_issue_plural) %></h3>
|
||||
|
||||
<ul>
|
||||
<li><%= link_to l(:label_issue_view_all), _project_issues_path(@project, :set_filter => 1) %></li>
|
||||
<% if @project %>
|
||||
<li><%= link_to l(:field_summary), project_issues_report_path(@project) %></li>
|
||||
<% end %>
|
||||
|
||||
<% if User.current.allowed_to?(:import_issues, @project, :global => true) %>
|
||||
<li><%= link_to l(:button_import), new_issues_import_path %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<%= call_hook(:view_issues_sidebar_issues_bottom) %>
|
||||
<%= call_hook(:view_issues_sidebar_planning_bottom) %>
|
||||
|
||||
<%= render_sidebar_queries(IssueQuery, @project) %>
|
||||
<%= call_hook(:view_issues_sidebar_queries_bottom) %>
|
15
app/views/issues/_watchers_form.html.erb
Normal file
15
app/views/issues/_watchers_form.html.erb
Normal file
|
@ -0,0 +1,15 @@
|
|||
<% if @issue.safe_attribute? 'watcher_user_ids' -%>
|
||||
<%= hidden_field_tag 'issue[watcher_user_ids][]', '' %>
|
||||
<p id="watchers_form"><label><%= l(:label_issue_watchers) %></label>
|
||||
<span id="watchers_inputs">
|
||||
<%= watchers_checkboxes(@issue, users_for_new_issue_watchers(@issue)) %>
|
||||
</span>
|
||||
<span class="search_for_watchers">
|
||||
<%= link_to l(:label_search_for_watchers),
|
||||
{:controller => 'watchers', :action => 'new', :project_id => @issue.project},
|
||||
:class => 'icon icon-add-bullet',
|
||||
:remote => true,
|
||||
:method => 'get' %>
|
||||
</span>
|
||||
</p>
|
||||
<% end %>
|
235
app/views/issues/bulk_edit.html.erb
Normal file
235
app/views/issues/bulk_edit.html.erb
Normal file
|
@ -0,0 +1,235 @@
|
|||
<h2><%= @copy ? l(:button_copy) : l(:label_bulk_edit_selected_issues) %></h2>
|
||||
|
||||
<% if @saved_issues && @unsaved_issues.present? %>
|
||||
<div id="errorExplanation">
|
||||
<span>
|
||||
<%= l(:notice_failed_to_save_issues,
|
||||
:count => @unsaved_issues.size,
|
||||
:total => @saved_issues.size,
|
||||
:ids => @unsaved_issues.map {|i| "##{i.id}"}.join(', ')) %>
|
||||
</span>
|
||||
<ul>
|
||||
<% bulk_edit_error_messages(@unsaved_issues).each do |message| %>
|
||||
<li><%= message %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<ul id="bulk-selection">
|
||||
<% @issues.each do |issue| %>
|
||||
<%= content_tag 'li', link_to_issue(issue) %>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
<%= form_tag(bulk_update_issues_path, :id => 'bulk_edit_form') do %>
|
||||
<%= @issues.collect {|i| hidden_field_tag('ids[]', i.id, :id => nil)}.join("\n").html_safe %>
|
||||
<div class="box tabular">
|
||||
<fieldset class="attributes">
|
||||
<legend><%= l(:label_change_properties) %></legend>
|
||||
|
||||
<div class="splitcontentleft">
|
||||
<% if @allowed_projects.present? %>
|
||||
<p>
|
||||
<label for="issue_project_id"><%= l(:field_project) %></label>
|
||||
<%= select_tag('issue[project_id]',
|
||||
project_tree_options_for_select(@allowed_projects,
|
||||
:include_blank => ((!@copy || (@projects & @allowed_projects == @projects)) ? l(:label_no_change_option) : false),
|
||||
:selected => @target_project),
|
||||
:onchange => "updateBulkEditFrom('#{escape_javascript url_for(:action => 'bulk_edit', :format => 'js')}')") %>
|
||||
</p>
|
||||
<% end %>
|
||||
<p>
|
||||
<label for="issue_tracker_id"><%= l(:field_tracker) %></label>
|
||||
<%= select_tag('issue[tracker_id]',
|
||||
content_tag('option', l(:label_no_change_option), :value => '') +
|
||||
options_from_collection_for_select(@trackers, :id, :name, @issue_params[:tracker_id]),
|
||||
:onchange => "updateBulkEditFrom('#{escape_javascript url_for(:action => 'bulk_edit', :format => 'js')}')") %>
|
||||
</p>
|
||||
<% if @available_statuses.any? %>
|
||||
<p>
|
||||
<label for='issue_status_id'><%= l(:field_status) %></label>
|
||||
<%= select_tag('issue[status_id]',
|
||||
content_tag('option', l(:label_no_change_option), :value => '') +
|
||||
options_from_collection_for_select(@available_statuses, :id, :name, @issue_params[:status_id]),
|
||||
:onchange => "updateBulkEditFrom('#{escape_javascript url_for(:action => 'bulk_edit', :format => 'js')}')") %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% if @safe_attributes.include?('priority_id') -%>
|
||||
<p>
|
||||
<label for='issue_priority_id'><%= l(:field_priority) %></label>
|
||||
<%= select_tag('issue[priority_id]',
|
||||
content_tag('option', l(:label_no_change_option), :value => '') +
|
||||
options_from_collection_for_select(IssuePriority.active, :id, :name, @issue_params[:priority_id])) %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% if @safe_attributes.include?('assigned_to_id') -%>
|
||||
<p>
|
||||
<label for='issue_assigned_to_id'><%= l(:field_assigned_to) %></label>
|
||||
<%= select_tag('issue[assigned_to_id]',
|
||||
content_tag('option', l(:label_no_change_option), :value => '') +
|
||||
content_tag('option', l(:label_nobody), :value => 'none', :selected => (@issue_params[:assigned_to_id] == 'none')) +
|
||||
principals_options_for_select(@assignables, @issue_params[:assigned_to_id])) %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% if @safe_attributes.include?('category_id') -%>
|
||||
<p>
|
||||
<label for='issue_category_id'><%= l(:field_category) %></label>
|
||||
<%= select_tag('issue[category_id]', content_tag('option', l(:label_no_change_option), :value => '') +
|
||||
content_tag('option', l(:label_none), :value => 'none', :selected => (@issue_params[:category_id] == 'none')) +
|
||||
options_from_collection_for_select(@categories, :id, :name, @issue_params[:category_id])) %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% if @safe_attributes.include?('fixed_version_id') -%>
|
||||
<p>
|
||||
<label for='issue_fixed_version_id'><%= l(:field_fixed_version) %></label>
|
||||
<%= select_tag('issue[fixed_version_id]', content_tag('option', l(:label_no_change_option), :value => '') +
|
||||
content_tag('option', l(:label_none), :value => 'none', :selected => (@issue_params[:fixed_version_id] == 'none')) +
|
||||
version_options_for_select(@versions.sort, @issue_params[:fixed_version_id])) %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% @custom_fields.each do |custom_field| %>
|
||||
<p>
|
||||
<label><%= custom_field.name %></label>
|
||||
<%= custom_field_tag_for_bulk_edit('issue', custom_field, @issues, @issue_params[:custom_field_values][custom_field.id.to_s]) %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% if @copy && Setting.link_copied_issue == 'ask' %>
|
||||
<p>
|
||||
<label for='link_copy'><%= l(:label_link_copied_issue) %></label>
|
||||
<%= hidden_field_tag 'link_copy', '0' %>
|
||||
<%= check_box_tag 'link_copy', '1', params[:link_copy] != 0 %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% if @copy && (@attachments_present || @subtasks_present || @watchers_present) %>
|
||||
<p>
|
||||
<label><%= l(:button_copy) %></label>
|
||||
<% if @attachments_present %>
|
||||
<label class="block">
|
||||
<%= hidden_field_tag 'copy_attachments', '0' %>
|
||||
<%= check_box_tag 'copy_attachments', '1', params[:copy_attachments] != '0' %>
|
||||
<%= l(:label_attachment_plural) %>
|
||||
</label>
|
||||
<% end %>
|
||||
<% if @subtasks_present %>
|
||||
<label class="block">
|
||||
<%= hidden_field_tag 'copy_subtasks', '0' %>
|
||||
<%= check_box_tag 'copy_subtasks', '1', params[:copy_subtasks] != '0' %>
|
||||
<%= l(:label_subtask_plural) %>
|
||||
</label>
|
||||
<% end %>
|
||||
<% if @watchers_present %>
|
||||
<label class="block">
|
||||
<%= hidden_field_tag 'copy_watchers', '0' %>
|
||||
<%= check_box_tag 'copy_watchers', '1', params[:copy_watchers] != '0' %>
|
||||
<%= l(:label_issue_watchers) %>
|
||||
</label>
|
||||
<% end %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<%= call_hook(:view_issues_bulk_edit_details_bottom, { :issues => @issues }) %>
|
||||
</div>
|
||||
|
||||
<div class="splitcontentright">
|
||||
<% if @safe_attributes.include?('is_private') %>
|
||||
<p>
|
||||
<label for='issue_is_private'><%= l(:field_is_private) %></label>
|
||||
<%= select_tag('issue[is_private]', content_tag('option', l(:label_no_change_option), :value => '') +
|
||||
content_tag('option', l(:general_text_Yes), :value => '1', :selected => (@issue_params[:is_private] == '1')) +
|
||||
content_tag('option', l(:general_text_No), :value => '0', :selected => (@issue_params[:is_private] == '0'))) %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% if @safe_attributes.include?('parent_issue_id') && @project %>
|
||||
<p>
|
||||
<label for='issue_parent_issue_id'><%= l(:field_parent_issue) %></label>
|
||||
<%= text_field_tag 'issue[parent_issue_id]', '', :size => 10, :value => @issue_params[:parent_issue_id] %>
|
||||
<label class="inline"><%= check_box_tag 'issue[parent_issue_id]', 'none', (@issue_params[:parent_issue_id] == 'none'), :id => nil, :data => {:disables => '#issue_parent_issue_id'} %><%= l(:button_clear) %></label>
|
||||
</p>
|
||||
<%= javascript_tag "observeAutocompleteField('issue_parent_issue_id', '#{escape_javascript auto_complete_issues_path(:project_id => @project, :scope => Setting.cross_project_subtasks)}')" %>
|
||||
<% end %>
|
||||
|
||||
<% if @safe_attributes.include?('start_date') %>
|
||||
<p>
|
||||
<label for='issue_start_date'><%= l(:field_start_date) %></label>
|
||||
<%= date_field_tag 'issue[start_date]', '', :value => @issue_params[:start_date], :size => 10 %><%= calendar_for('issue_start_date') %>
|
||||
<label class="inline"><%= check_box_tag 'issue[start_date]', 'none', (@issue_params[:start_date] == 'none'), :id => nil, :data => {:disables => '#issue_start_date'} %><%= l(:button_clear) %></label>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% if @safe_attributes.include?('due_date') %>
|
||||
<p>
|
||||
<label for='issue_due_date'><%= l(:field_due_date) %></label>
|
||||
<%= date_field_tag 'issue[due_date]', '', :value => @issue_params[:due_date], :size => 10 %><%= calendar_for('issue_due_date') %>
|
||||
<label class="inline"><%= check_box_tag 'issue[due_date]', 'none', (@issue_params[:due_date] == 'none'), :id => nil, :data => {:disables => '#issue_due_date'} %><%= l(:button_clear) %></label>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% if @safe_attributes.include?('estimated_hours') %>
|
||||
<p>
|
||||
<label for='issue_estimated_hours'><%= l(:field_estimated_hours) %></label>
|
||||
<%= text_field_tag 'issue[estimated_hours]', '', :value => @issue_params[:estimated_hours], :size => 10 %>
|
||||
<label class="inline"><%= check_box_tag 'issue[estimated_hours]', 'none', (@issue_params[:estimated_hours] == 'none'), :id => nil, :data => {:disables => '#issue_estimated_hours'} %><%= l(:button_clear) %></label>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<% if @safe_attributes.include?('done_ratio') && Issue.use_field_for_done_ratio? %>
|
||||
<p>
|
||||
<label for='issue_done_ratio'><%= l(:field_done_ratio) %></label>
|
||||
<%= select_tag 'issue[done_ratio]', options_for_select([[l(:label_no_change_option), '']] + (0..10).to_a.collect {|r| ["#{r*10} %", r*10] }, @issue_params[:done_ratio]) %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend><%= l(:field_notes) %></legend>
|
||||
<%= text_area_tag 'notes', @notes, :cols => 60, :rows => 10, :class => 'wiki-edit' %>
|
||||
<%= wikitoolbar_for 'notes' %>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
||||
<% if @values_by_custom_field.present? %>
|
||||
<div class="flash warning">
|
||||
<%= l(:warning_fields_cleared_on_bulk_edit) %>:<br />
|
||||
<%= safe_join(@values_by_custom_field.map {|field, ids| content_tag "span", "#{field.name} (#{ids.size})"}, ', ') %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
<% if @copy %>
|
||||
<%= hidden_field_tag 'copy', '1' %>
|
||||
<%= submit_tag l(:button_copy) %>
|
||||
<%= submit_tag l(:button_copy_and_follow), :name => 'follow' %>
|
||||
<% elsif @target_project %>
|
||||
<%= submit_tag l(:button_move) %>
|
||||
<%= submit_tag l(:button_move_and_follow), :name => 'follow' %>
|
||||
<% else %>
|
||||
<%= submit_tag l(:button_submit) %>
|
||||
<% end %>
|
||||
</p>
|
||||
|
||||
<% end %>
|
||||
|
||||
<%= javascript_tag do %>
|
||||
$(window).load(function(){
|
||||
$(document).on('change', 'input[data-disables]', function(){
|
||||
if ($(this).prop('checked')){
|
||||
$($(this).data('disables')).attr('disabled', true).val('');
|
||||
} else {
|
||||
$($(this).data('disables')).attr('disabled', false);
|
||||
}
|
||||
});
|
||||
});
|
||||
$(document).ready(function(){
|
||||
$('input[data-disables]').trigger('change');
|
||||
});
|
||||
<% end %>
|
1
app/views/issues/bulk_edit.js.erb
Normal file
1
app/views/issues/bulk_edit.js.erb
Normal file
|
@ -0,0 +1 @@
|
|||
$('#content').html('<%= escape_javascript(render :template => 'issues/bulk_edit', :formats => [:html]) %>');
|
18
app/views/issues/destroy.html.erb
Normal file
18
app/views/issues/destroy.html.erb
Normal file
|
@ -0,0 +1,18 @@
|
|||
<h2><%= l(:label_confirmation) %></h2>
|
||||
|
||||
<%= form_tag({}, :method => :delete) do %>
|
||||
<%= @issues.collect {|i| hidden_field_tag('ids[]', i.id, :id => nil)}.join("\n").html_safe %>
|
||||
<div class="box">
|
||||
<p><strong><%= l(:text_destroy_time_entries_question, :hours => number_with_precision(@hours, :precision => 2)) %></strong></p>
|
||||
<p>
|
||||
<label><%= radio_button_tag 'todo', 'destroy', true %> <%= l(:text_destroy_time_entries) %></label><br />
|
||||
<label><%= radio_button_tag 'todo', 'nullify', false %> <%= l(:text_assign_time_entries_to_project) %></label><br />
|
||||
<% if @project %>
|
||||
<label><%= radio_button_tag 'todo', 'reassign', false, :onchange => 'if (this.checked) { $("#reassign_to_id").focus(); }' %> <%= l(:text_reassign_time_entries) %></label>
|
||||
<%= text_field_tag 'reassign_to_id', params[:reassign_to_id], :size => 6, :onfocus => '$("#todo_reassign").attr("checked", true);' %>
|
||||
<%= javascript_tag "observeAutocompleteField('reassign_to_id', '#{escape_javascript auto_complete_issues_path(:project_id => @project)}')" %>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
<%= submit_tag l(:button_apply) %>
|
||||
<% end %>
|
6
app/views/issues/edit.html.erb
Normal file
6
app/views/issues/edit.html.erb
Normal file
|
@ -0,0 +1,6 @@
|
|||
<h2><%= "#{@issue.tracker_was} ##{@issue.id}" %></h2>
|
||||
|
||||
<%= render :partial => 'edit' %>
|
||||
<% content_for :header_tags do %>
|
||||
<%= robot_exclusion_tag %>
|
||||
<% end %>
|
7
app/views/issues/edit.js.erb
Normal file
7
app/views/issues/edit.js.erb
Normal file
|
@ -0,0 +1,7 @@
|
|||
replaceIssueFormWith('<%= escape_javascript(render :partial => 'form') %>');
|
||||
|
||||
<% if User.current.allowed_to?(:log_time, @issue.project) %>
|
||||
$('#log_time').show();
|
||||
<% else %>
|
||||
$('#log_time').hide();
|
||||
<% end %>
|
42
app/views/issues/index.api.rsb
Normal file
42
app/views/issues/index.api.rsb
Normal file
|
@ -0,0 +1,42 @@
|
|||
api.array :issues, api_meta(:total_count => @issue_count, :offset => @offset, :limit => @limit) do
|
||||
@issues.each do |issue|
|
||||
api.issue do
|
||||
api.id issue.id
|
||||
api.project(:id => issue.project_id, :name => issue.project.name) unless issue.project.nil?
|
||||
api.tracker(:id => issue.tracker_id, :name => issue.tracker.name) unless issue.tracker.nil?
|
||||
api.status(:id => issue.status_id, :name => issue.status.name) unless issue.status.nil?
|
||||
api.priority(:id => issue.priority_id, :name => issue.priority.name) unless issue.priority.nil?
|
||||
api.author(:id => issue.author_id, :name => issue.author.name) unless issue.author.nil?
|
||||
api.assigned_to(:id => issue.assigned_to_id, :name => issue.assigned_to.name) unless issue.assigned_to.nil?
|
||||
api.category(:id => issue.category_id, :name => issue.category.name) unless issue.category.nil?
|
||||
api.fixed_version(:id => issue.fixed_version_id, :name => issue.fixed_version.name) unless issue.fixed_version.nil?
|
||||
api.parent(:id => issue.parent_id) unless issue.parent.nil?
|
||||
|
||||
api.subject issue.subject
|
||||
api.description issue.description
|
||||
api.start_date issue.start_date
|
||||
api.due_date issue.due_date
|
||||
api.done_ratio issue.done_ratio
|
||||
api.is_private issue.is_private
|
||||
api.estimated_hours issue.estimated_hours
|
||||
|
||||
render_api_custom_values issue.visible_custom_field_values, api
|
||||
|
||||
api.created_on issue.created_on
|
||||
api.updated_on issue.updated_on
|
||||
api.closed_on issue.closed_on
|
||||
|
||||
api.array :attachments do
|
||||
issue.attachments.each do |attachment|
|
||||
render_api_attachment(attachment, api)
|
||||
end
|
||||
end if include_in_api_response?('attachments')
|
||||
|
||||
api.array :relations do
|
||||
issue.relations.each do |relation|
|
||||
api.relation(:id => relation.id, :issue_id => relation.issue_from_id, :issue_to_id => relation.issue_to_id, :relation_type => relation.relation_type, :delay => relation.delay)
|
||||
end
|
||||
end if include_in_api_response?('relations')
|
||||
end
|
||||
end
|
||||
end
|
72
app/views/issues/index.html.erb
Normal file
72
app/views/issues/index.html.erb
Normal file
|
@ -0,0 +1,72 @@
|
|||
<div class="contextual">
|
||||
<% if User.current.allowed_to?(:add_issues, @project, :global => true) && (@project.nil? || Issue.allowed_target_trackers(@project).any?) %>
|
||||
<%= link_to l(:label_issue_new), _new_project_issue_path(@project), :class => 'icon icon-add new-issue' %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<h2><%= @query.new_record? ? l(:label_issue_plural) : @query.name %></h2>
|
||||
<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
|
||||
|
||||
<%= form_tag(_project_issues_path(@project), :method => :get, :id => 'query_form') do %>
|
||||
<%= render :partial => 'queries/query_form' %>
|
||||
<% end %>
|
||||
|
||||
<% if @query.valid? %>
|
||||
<% if @issues.empty? %>
|
||||
<p class="nodata"><%= l(:label_no_data) %></p>
|
||||
<% else %>
|
||||
<%= render_query_totals(@query) %>
|
||||
<%= render :partial => 'issues/list', :locals => {:issues => @issues, :query => @query} %>
|
||||
<span class="pagination"><%= pagination_links_full @issue_pages, @issue_count %></span>
|
||||
<% end %>
|
||||
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to_with_query_parameters 'Atom', :key => User.current.rss_key %>
|
||||
<%= f.link_to_with_query_parameters 'CSV', {}, :onclick => "showModal('csv-export-options', '350px'); return false;" %>
|
||||
<%= f.link_to_with_query_parameters 'PDF' %>
|
||||
<% end %>
|
||||
|
||||
<div id="csv-export-options" style="display:none;">
|
||||
<h3 class="title"><%= l(:label_export_options, :export_format => 'CSV') %></h3>
|
||||
<%= form_tag(_project_issues_path(@project, :format => 'csv'), :method => :get, :id => 'csv-export-form') do %>
|
||||
<%= query_as_hidden_field_tags(@query) %>
|
||||
<p>
|
||||
<label><%= radio_button_tag 'c[]', '', true %> <%= l(:description_selected_columns) %></label><br />
|
||||
<label><%= radio_button_tag 'c[]', 'all_inline' %> <%= l(:description_all_columns) %></label>
|
||||
</p>
|
||||
<p>
|
||||
<label><%= check_box_tag 'c[]', 'description', @query.has_column?(:description) %> <%= l(:field_description) %></label>
|
||||
<label><%= check_box_tag 'c[]', 'last_notes', @query.has_column?(:last_notes) %> <%= l(:label_last_notes) %></label>
|
||||
</p>
|
||||
<% if @issue_count > Setting.issues_export_limit.to_i %>
|
||||
<p class="icon icon-warning">
|
||||
<%= l(:setting_issues_export_limit) %>: <%= Setting.issues_export_limit.to_i %>
|
||||
</p>
|
||||
<% end %>
|
||||
<p class="buttons">
|
||||
<%= submit_tag l(:button_export), :name => nil, :onclick => "hideModal(this);" %>
|
||||
<%= submit_tag l(:button_cancel), :name => nil, :onclick => "hideModal(this);", :type => 'button' %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<% end %>
|
||||
<%= call_hook(:view_issues_index_bottom, { :issues => @issues, :project => @project, :query => @query }) %>
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'issues/sidebar' %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:atom,
|
||||
{:query_id => @query, :format => 'atom',
|
||||
:page => nil, :key => User.current.rss_key},
|
||||
:title => l(:label_issue_plural)) %>
|
||||
<%= auto_discovery_link_tag(:atom,
|
||||
{:controller => 'journals', :action => 'index',
|
||||
:query_id => @query, :format => 'atom',
|
||||
:page => nil, :key => User.current.rss_key},
|
||||
:title => l(:label_changes_details)) %>
|
||||
<% end %>
|
||||
|
||||
<%= context_menu %>
|
1
app/views/issues/index.pdf.erb
Normal file
1
app/views/issues/index.pdf.erb
Normal file
|
@ -0,0 +1 @@
|
|||
<%= raw issues_to_pdf(@issues, @project, @query) %>
|
49
app/views/issues/new.html.erb
Normal file
49
app/views/issues/new.html.erb
Normal file
|
@ -0,0 +1,49 @@
|
|||
<%= title l(:label_issue_new) %>
|
||||
|
||||
<%= call_hook(:view_issues_new_top, {:issue => @issue}) %>
|
||||
|
||||
<%= labelled_form_for @issue, :url => _project_issues_path(@project),
|
||||
:html => {:id => 'issue-form', :multipart => true} do |f| %>
|
||||
<%= error_messages_for 'issue' %>
|
||||
<%= hidden_field_tag 'copy_from', params[:copy_from] if params[:copy_from] %>
|
||||
<div class="box tabular">
|
||||
<div id="all_attributes">
|
||||
<%= render :partial => 'issues/form', :locals => {:f => f} %>
|
||||
</div>
|
||||
|
||||
<% if @copy_from && Setting.link_copied_issue == 'ask' %>
|
||||
<p>
|
||||
<label for="link_copy"><%= l(:label_link_copied_issue) %></label>
|
||||
<%= check_box_tag 'link_copy', '1', @link_copy %>
|
||||
</p>
|
||||
<% end %>
|
||||
<% if @copy_from && @copy_from.attachments.any? %>
|
||||
<p>
|
||||
<label for="copy_attachments"><%= l(:label_copy_attachments) %></label>
|
||||
<%= check_box_tag 'copy_attachments', '1', @copy_attachments %>
|
||||
</p>
|
||||
<% end %>
|
||||
<% if @copy_from && !@copy_from.leaf? %>
|
||||
<p>
|
||||
<label for="copy_subtasks"><%= l(:label_copy_subtasks) %></label>
|
||||
<%= check_box_tag 'copy_subtasks', '1', @copy_subtasks %>
|
||||
</p>
|
||||
<% end %>
|
||||
|
||||
<p id="attachments_form"><label><%= l(:label_attachment_plural) %></label><%= render :partial => 'attachments/form', :locals => {:container => @issue} %></p>
|
||||
|
||||
<div id="watchers_form_container">
|
||||
<%= render :partial => 'issues/watchers_form' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<%= submit_tag l(:button_create_and_continue), :name => 'continue' %>
|
||||
<%= preview_link preview_new_issue_path(:project_id => @issue.project), 'issue-form' %>
|
||||
<% end %>
|
||||
|
||||
<div id="preview" class="wiki"></div>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= robot_exclusion_tag %>
|
||||
<% end %>
|
4
app/views/issues/new.js.erb
Normal file
4
app/views/issues/new.js.erb
Normal file
|
@ -0,0 +1,4 @@
|
|||
replaceIssueFormWith('<%= escape_javascript(render :partial => 'form') %>');
|
||||
<% if params[:form_update_triggered_by] == "issue_project_id" %>
|
||||
$("#watchers_form_container").html('<%= escape_javascript(render :partial => 'issues/watchers_form') %>');
|
||||
<% end %>
|
80
app/views/issues/show.api.rsb
Normal file
80
app/views/issues/show.api.rsb
Normal file
|
@ -0,0 +1,80 @@
|
|||
api.issue do
|
||||
api.id @issue.id
|
||||
api.project(:id => @issue.project_id, :name => @issue.project.name) unless @issue.project.nil?
|
||||
api.tracker(:id => @issue.tracker_id, :name => @issue.tracker.name) unless @issue.tracker.nil?
|
||||
api.status(:id => @issue.status_id, :name => @issue.status.name) unless @issue.status.nil?
|
||||
api.priority(:id => @issue.priority_id, :name => @issue.priority.name) unless @issue.priority.nil?
|
||||
api.author(:id => @issue.author_id, :name => @issue.author.name) unless @issue.author.nil?
|
||||
api.assigned_to(:id => @issue.assigned_to_id, :name => @issue.assigned_to.name) unless @issue.assigned_to.nil?
|
||||
api.category(:id => @issue.category_id, :name => @issue.category.name) unless @issue.category.nil?
|
||||
api.fixed_version(:id => @issue.fixed_version_id, :name => @issue.fixed_version.name) unless @issue.fixed_version.nil?
|
||||
api.parent(:id => @issue.parent_id) unless @issue.parent.nil?
|
||||
|
||||
api.subject @issue.subject
|
||||
api.description @issue.description
|
||||
api.start_date @issue.start_date
|
||||
api.due_date @issue.due_date
|
||||
api.done_ratio @issue.done_ratio
|
||||
api.is_private @issue.is_private
|
||||
api.estimated_hours @issue.estimated_hours
|
||||
api.total_estimated_hours @issue.total_estimated_hours
|
||||
if User.current.allowed_to?(:view_time_entries, @project)
|
||||
api.spent_hours(@issue.spent_hours)
|
||||
api.total_spent_hours(@issue.total_spent_hours)
|
||||
end
|
||||
|
||||
render_api_custom_values @issue.visible_custom_field_values, api
|
||||
|
||||
api.created_on @issue.created_on
|
||||
api.updated_on @issue.updated_on
|
||||
api.closed_on @issue.closed_on
|
||||
|
||||
render_api_issue_children(@issue, api) if include_in_api_response?('children')
|
||||
|
||||
api.array :attachments do
|
||||
@issue.attachments.each do |attachment|
|
||||
render_api_attachment(attachment, api)
|
||||
end
|
||||
end if include_in_api_response?('attachments')
|
||||
|
||||
api.array :relations do
|
||||
@relations.each do |relation|
|
||||
api.relation(:id => relation.id, :issue_id => relation.issue_from_id, :issue_to_id => relation.issue_to_id, :relation_type => relation.relation_type, :delay => relation.delay)
|
||||
end
|
||||
end if include_in_api_response?('relations') && @relations.present?
|
||||
|
||||
api.array :changesets do
|
||||
@changesets.each do |changeset|
|
||||
api.changeset :revision => changeset.revision do
|
||||
api.user(:id => changeset.user_id, :name => changeset.user.name) unless changeset.user.nil?
|
||||
api.comments changeset.comments
|
||||
api.committed_on changeset.committed_on
|
||||
end
|
||||
end
|
||||
end if include_in_api_response?('changesets')
|
||||
|
||||
api.array :journals do
|
||||
@journals.each do |journal|
|
||||
api.journal :id => journal.id do
|
||||
api.user(:id => journal.user_id, :name => journal.user.name) unless journal.user.nil?
|
||||
api.notes journal.notes
|
||||
api.created_on journal.created_on
|
||||
api.private_notes journal.private_notes
|
||||
api.array :details do
|
||||
journal.visible_details.each do |detail|
|
||||
api.detail :property => detail.property, :name => detail.prop_key do
|
||||
api.old_value detail.old_value
|
||||
api.new_value detail.value
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end if include_in_api_response?('journals')
|
||||
|
||||
api.array :watchers do
|
||||
@issue.watcher_users.each do |user|
|
||||
api.user :id => user.id, :name => user.name
|
||||
end
|
||||
end if include_in_api_response?('watchers') && User.current.allowed_to?(:view_issue_watchers, @issue.project)
|
||||
end
|
169
app/views/issues/show.html.erb
Normal file
169
app/views/issues/show.html.erb
Normal file
|
@ -0,0 +1,169 @@
|
|||
<%= render :partial => 'action_menu' %>
|
||||
|
||||
<h2><%= issue_heading(@issue) %></h2>
|
||||
|
||||
<div class="<%= @issue.css_classes %> details">
|
||||
<% if @prev_issue_id || @next_issue_id %>
|
||||
<div class="next-prev-links contextual">
|
||||
<%= link_to_if @prev_issue_id,
|
||||
"\xc2\xab #{l(:label_previous)}",
|
||||
(@prev_issue_id ? issue_path(@prev_issue_id) : nil),
|
||||
:title => "##{@prev_issue_id}",
|
||||
:accesskey => accesskey(:previous) %> |
|
||||
<% if @issue_position && @issue_count %>
|
||||
<span class="position">
|
||||
<%= link_to_if @query_path,
|
||||
l(:label_item_position, :position => @issue_position, :count => @issue_count),
|
||||
@query_path %>
|
||||
</span> |
|
||||
<% end %>
|
||||
<%= link_to_if @next_issue_id,
|
||||
"#{l(:label_next)} \xc2\xbb",
|
||||
(@next_issue_id ? issue_path(@next_issue_id) : nil),
|
||||
:title => "##{@next_issue_id}",
|
||||
:accesskey => accesskey(:next) %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<div class="gravatar-with-child">
|
||||
<%= avatar(@issue.author, :size => "50", :title => l(:field_author)) %>
|
||||
<%= avatar(@issue.assigned_to, :size => "22", :class => "gravatar gravatar-child", :title => l(:field_assigned_to)) if @issue.assigned_to %>
|
||||
</div>
|
||||
|
||||
<div class="subject">
|
||||
<%= render_issue_subject_with_tree(@issue) %>
|
||||
</div>
|
||||
<p class="author">
|
||||
<%= authoring @issue.created_on, @issue.author %>.
|
||||
<% if @issue.created_on != @issue.updated_on %>
|
||||
<%= l(:label_updated_time, time_tag(@issue.updated_on)).html_safe %>.
|
||||
<% end %>
|
||||
</p>
|
||||
|
||||
<div class="attributes">
|
||||
<%= issue_fields_rows do |rows|
|
||||
rows.left l(:field_status), @issue.status.name, :class => 'status'
|
||||
rows.left l(:field_priority), @issue.priority.name, :class => 'priority'
|
||||
|
||||
unless @issue.disabled_core_fields.include?('assigned_to_id')
|
||||
rows.left l(:field_assigned_to), (@issue.assigned_to ? link_to_user(@issue.assigned_to) : "-"), :class => 'assigned-to'
|
||||
end
|
||||
unless @issue.disabled_core_fields.include?('category_id') || (@issue.category.nil? && @issue.project.issue_categories.none?)
|
||||
rows.left l(:field_category), (@issue.category ? @issue.category.name : "-"), :class => 'category'
|
||||
end
|
||||
unless @issue.disabled_core_fields.include?('fixed_version_id') || (@issue.fixed_version.nil? && @issue.assignable_versions.none?)
|
||||
rows.left l(:field_fixed_version), (@issue.fixed_version ? link_to_version(@issue.fixed_version) : "-"), :class => 'fixed-version'
|
||||
end
|
||||
|
||||
unless @issue.disabled_core_fields.include?('start_date')
|
||||
rows.right l(:field_start_date), format_date(@issue.start_date), :class => 'start-date'
|
||||
end
|
||||
unless @issue.disabled_core_fields.include?('due_date')
|
||||
rows.right l(:field_due_date), format_date(@issue.due_date), :class => 'due-date'
|
||||
end
|
||||
unless @issue.disabled_core_fields.include?('done_ratio')
|
||||
rows.right l(:field_done_ratio), progress_bar(@issue.done_ratio, :legend => "#{@issue.done_ratio}%"), :class => 'progress'
|
||||
end
|
||||
unless @issue.disabled_core_fields.include?('estimated_hours')
|
||||
rows.right l(:field_estimated_hours), issue_estimated_hours_details(@issue), :class => 'estimated-hours'
|
||||
end
|
||||
if User.current.allowed_to?(:view_time_entries, @project) && @issue.total_spent_hours > 0
|
||||
rows.right l(:label_spent_time), issue_spent_hours_details(@issue), :class => 'spent-time'
|
||||
end
|
||||
end %>
|
||||
<%= render_half_width_custom_fields_rows(@issue) %>
|
||||
<%= call_hook(:view_issues_show_details_bottom, :issue => @issue) %>
|
||||
</div>
|
||||
|
||||
<% if @issue.description? || @issue.attachments.any? -%>
|
||||
<hr />
|
||||
<% if @issue.description? %>
|
||||
<div class="description">
|
||||
<div class="contextual">
|
||||
<%= link_to l(:button_quote), quoted_issue_path(@issue), :remote => true, :method => 'post', :class => 'icon icon-comment' if @issue.notes_addable? %>
|
||||
</div>
|
||||
|
||||
<p><strong><%=l(:field_description)%></strong></p>
|
||||
<div class="wiki">
|
||||
<%= textilizable @issue, :description, :attachments => @issue.attachments %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
<%= link_to_attachments @issue, :thumbnails => true %>
|
||||
<% end -%>
|
||||
|
||||
<%= render_full_width_custom_fields_rows(@issue) %>
|
||||
|
||||
<%= call_hook(:view_issues_show_description_bottom, :issue => @issue) %>
|
||||
|
||||
<% if !@issue.leaf? || User.current.allowed_to?(:manage_subtasks, @project) %>
|
||||
<hr />
|
||||
<div id="issue_tree">
|
||||
<div class="contextual">
|
||||
<%= link_to_new_subtask(@issue) if User.current.allowed_to?(:manage_subtasks, @project) %>
|
||||
</div>
|
||||
<p><strong><%=l(:label_subtask_plural)%></strong></p>
|
||||
<%= form_tag({}, :data => {:cm_url => issues_context_menu_path}) do %>
|
||||
<%= render_descendants_tree(@issue) unless @issue.leaf? %>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if @relations.present? || User.current.allowed_to?(:manage_issue_relations, @project) %>
|
||||
<hr />
|
||||
<div id="relations">
|
||||
<%= render :partial => 'relations' %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
</div>
|
||||
|
||||
<% if @changesets.present? %>
|
||||
<div id="issue-changesets">
|
||||
<h3><%=l(:label_associated_revisions)%></h3>
|
||||
<%= render :partial => 'changesets', :locals => { :changesets => @changesets} %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% if @journals.present? %>
|
||||
<div id="history">
|
||||
<h3><%=l(:label_history)%></h3>
|
||||
<%= render :partial => 'history', :locals => { :issue => @issue, :journals => @journals } %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
<div style="clear: both;"></div>
|
||||
<%= render :partial => 'action_menu' %>
|
||||
|
||||
<div style="clear: both;"></div>
|
||||
<% if @issue.editable? %>
|
||||
<div id="update" style="display:none;">
|
||||
<h3><%= l(:button_edit) %></h3>
|
||||
<%= render :partial => 'edit' %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% other_formats_links do |f| %>
|
||||
<%= f.link_to 'Atom', :url => {:key => User.current.rss_key} %>
|
||||
<%= f.link_to 'PDF' %>
|
||||
<% end %>
|
||||
|
||||
<% html_title "#{@issue.tracker.name} ##{@issue.id}: #{@issue.subject}" %>
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<%= render :partial => 'issues/sidebar' %>
|
||||
|
||||
<% if User.current.allowed_to?(:add_issue_watchers, @project) ||
|
||||
(@issue.watchers.present? && User.current.allowed_to?(:view_issue_watchers, @project)) %>
|
||||
<div id="watchers">
|
||||
<%= render :partial => 'watchers/watchers', :locals => {:watched => @issue} %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :header_tags do %>
|
||||
<%= auto_discovery_link_tag(:atom, {:format => 'atom', :key => User.current.rss_key}, :title => "#{@issue.project} - #{@issue.tracker} ##{@issue.id}: #{@issue.subject}") %>
|
||||
<% end %>
|
||||
|
||||
<%= context_menu %>
|
1
app/views/issues/show.pdf.erb
Normal file
1
app/views/issues/show.pdf.erb
Normal file
|
@ -0,0 +1 @@
|
|||
<%= raw issue_to_pdf(@issue, :journals => @journals) %>
|
Loading…
Add table
Add a link
Reference in a new issue