diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2019-03-15 10:38:56 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2019-03-15 10:38:56 +0000 |
commit | 84f322b2af0e2a781a1fcc3ae4dd1e6845b22b66 (patch) | |
tree | 87a00a7afb6748ecc62d02e61b5b9bdba73269a3 /app/views | |
parent | 3b59c6dfb200bc5d5434cdc1f5a71478747297d9 (diff) | |
download | redmine-84f322b2af0e2a781a1fcc3ae4dd1e6845b22b66.tar.gz redmine-84f322b2af0e2a781a1fcc3ae4dd1e6845b22b66.zip |
Add a description for trackers (#442).
Patch by Marius BALTEANU.
git-svn-id: http://svn.redmine.org/redmine/trunk@17970 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/issues/_form.html.erb | 9 | ||||
-rw-r--r-- | app/views/issues/_trackers_description.html.erb | 13 | ||||
-rw-r--r-- | app/views/projects/settings/_issues.html.erb | 2 | ||||
-rw-r--r-- | app/views/projects/show.html.erb | 2 | ||||
-rw-r--r-- | app/views/trackers/_form.html.erb | 1 | ||||
-rw-r--r-- | app/views/trackers/index.api.rsb | 1 | ||||
-rw-r--r-- | app/views/trackers/index.html.erb | 2 |
7 files changed, 26 insertions, 4 deletions
diff --git a/app/views/issues/_form.html.erb b/app/views/issues/_form.html.erb index c99927d8a..5bc98ebbd 100644 --- a/app/views/issues/_form.html.erb +++ b/app/views/issues/_form.html.erb @@ -16,8 +16,13 @@ <% 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> +<p> + <%= f.select :tracker_id, trackers_options_for_select(@issue), {:required => true}, + :onchange => "updateIssueFrom('#{escape_javascript update_issue_form_path(@project, @issue)}', this)", + :title => @issue.tracker.description %> + <%= content_tag 'a', l(:label_open_trackers_description), :class => 'icon-only icon-help', :title => l(:label_open_trackers_description), :onclick => "showModal('trackers_description', '500px'); return false;", :href => '#' if trackers_for_select(@issue).any? {|t| t.description.present? } %> +</p> + <%= render partial: 'issues/trackers_description', locals: {trackers: trackers_for_select(@issue)} %> <% end %> <% if @issue.safe_attribute? 'subject' %> diff --git a/app/views/issues/_trackers_description.html.erb b/app/views/issues/_trackers_description.html.erb new file mode 100644 index 000000000..63c361983 --- /dev/null +++ b/app/views/issues/_trackers_description.html.erb @@ -0,0 +1,13 @@ +<% if trackers.any? {|t| t.description.present? } %> + <div class="modal" id="trackers_description"> + <h3 class="title"><%= l(:label_trackers_description) %></h3> + <dl> + <% trackers.each do |tracker| %> + <% if tracker.description.present? %> + <dt><%= tracker.name %></dt> + <dd><%= tracker.description %></dd> + <% end %> + <% end %> + </dl> + </div> +<% end %> diff --git a/app/views/projects/settings/_issues.html.erb b/app/views/projects/settings/_issues.html.erb index dc5265d8e..13c3ebc34 100644 --- a/app/views/projects/settings/_issues.html.erb +++ b/app/views/projects/settings/_issues.html.erb @@ -6,7 +6,7 @@ <% @trackers.each do |tracker| %> <label class="floating"> <%= check_box_tag 'project[tracker_ids][]', tracker.id, @project.trackers.to_a.include?(tracker), :id => nil %> - <%= tracker %> + <%= tracker_name_tag tracker %> </label> <% end %> <%= hidden_field_tag 'project[tracker_ids][]', '' %> diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb index 14fd0817f..9c2d47524 100644 --- a/app/views/projects/show.html.erb +++ b/app/views/projects/show.html.erb @@ -52,7 +52,7 @@ <% @trackers.each do |tracker| %> <tr> <td class="name"> - <%= link_to tracker.name, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id) %> + <%= link_to tracker.name, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id), :title => tracker.description %> </td> <td> <%= link_to @open_issues_by_tracker[tracker].to_i, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id) %> diff --git a/app/views/trackers/_form.html.erb b/app/views/trackers/_form.html.erb index 9697adb07..27e086e56 100644 --- a/app/views/trackers/_form.html.erb +++ b/app/views/trackers/_form.html.erb @@ -11,6 +11,7 @@ :required => true %> </p> <p><%= f.check_box :is_in_roadmap %></p> +<p><%= f.text_area :description, :rows => 4 %></p> <p> <label><%= l(:field_core_fields) %></label> <% Tracker::CORE_FIELDS.each do |field| %> diff --git a/app/views/trackers/index.api.rsb b/app/views/trackers/index.api.rsb index de8579124..59affd7ae 100644 --- a/app/views/trackers/index.api.rsb +++ b/app/views/trackers/index.api.rsb @@ -4,6 +4,7 @@ api.array :trackers do api.id tracker.id api.name tracker.name api.default_status(:id => tracker.default_status.id, :name => tracker.default_status.name) unless tracker.default_status.nil? + api.description tracker.description end end end diff --git a/app/views/trackers/index.html.erb b/app/views/trackers/index.html.erb index 633edbcdb..20d09754d 100644 --- a/app/views/trackers/index.html.erb +++ b/app/views/trackers/index.html.erb @@ -9,6 +9,7 @@ <thead><tr> <th><%=l(:label_tracker)%></th> <th><%=l(:field_default_status)%></th> + <th><%=l(:field_description)%></th> <th></th> <th></th> </tr></thead> @@ -17,6 +18,7 @@ <tr> <td class="name"><%= link_to tracker.name, edit_tracker_path(tracker) %></td> <td><%= tracker.default_status.name %></td> + <td class="description"><%= tracker.description %></td> <td> <% unless tracker.workflow_rules.exists? %> <span class="icon icon-warning"> |