Index: app/helpers/issues_helper.rb =================================================================== --- app/helpers/issues_helper.rb (revision 16545) +++ app/helpers/issues_helper.rb (working copy) @@ -188,6 +188,11 @@ end def trackers_options_for_select(issue) + trackers = trackers_for_select(issue) + trackers.collect {|t| [t.name, t.id]} + end + + def trackers_for_select(issue) trackers = issue.allowed_target_trackers if issue.new_record? && issue.parent_issue_id.present? trackers = trackers.reject do |tracker| @@ -194,7 +199,7 @@ issue.tracker_id != tracker.id && tracker.disabled_core_fields.include?('parent_issue_id') end end - trackers.collect {|t| [t.name, t.id]} + trackers end class IssueFieldsRows Index: app/models/tracker.rb =================================================================== --- app/models/tracker.rb (revision 16545) +++ app/models/tracker.rb (working copy) @@ -76,7 +76,8 @@ 'core_fields', 'position', 'custom_field_ids', - 'project_ids' + 'project_ids', + 'description' def to_s; name end Index: app/views/issues/_form.html.erb =================================================================== --- app/views/issues/_form.html.erb (revision 16545) +++ app/views/issues/_form.html.erb (working copy) @@ -15,10 +15,16 @@ <% end %> <% if @issue.safe_attribute? 'tracker_id' %> -

<%= f.select :tracker_id, trackers_options_for_select(@issue), {:required => true}, - :onchange => "updateIssueFrom('#{escape_javascript update_issue_form_path(@project, @issue)}', this)" %>

+

+ <%= f.select :tracker_id, trackers_options_for_select(@issue), {:required => true}, + :onchange => "updateIssueFrom('#{escape_javascript update_issue_form_path(@project, @issue)}', this)" %> + + <%=h l(:label_description_for_trackers, default: 'Descriptions for trackers') %> + +

<% end %> +<%= render partial: 'issues/tracker_description', locals: { trackers: trackers_for_select(@issue) } %> <% if @issue.safe_attribute? 'subject' %>

<%= f.text_field :subject, :size => 80, :maxlength => 255, :required => true %>

<% end %> Index: app/views/issues/_tracker_description.html.erb =================================================================== --- app/views/issues/_tracker_description.html.erb (nonexistent) +++ app/views/issues/_tracker_description.html.erb (working copy) @@ -0,0 +1,52 @@ + + + + + + Index: app/views/projects/_form.html.erb =================================================================== --- app/views/projects/_form.html.erb (revision 16545) +++ app/views/projects/_form.html.erb (working copy) @@ -53,8 +53,14 @@
<%=l(:label_tracker_plural)%> <% @trackers.each do |tracker| %> <% end %> <%= hidden_field_tag 'project[tracker_ids][]', '' %> Index: app/views/projects/show.html.erb =================================================================== --- app/views/projects/show.html.erb (revision 16545) +++ app/views/projects/show.html.erb (working copy) @@ -51,7 +51,13 @@ <% @trackers.each do |tracker| %> - <%= 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 ) %> +
+

<%= tracker.name %>

+ <%= tracker.description %> +
+
<%= link_to @open_issues_by_tracker[tracker].to_i, project_issues_path(@project, :set_filter => 1, :tracker_id => tracker.id) %> Index: app/views/trackers/_form.html.erb =================================================================== --- app/views/trackers/_form.html.erb (revision 16545) +++ app/views/trackers/_form.html.erb (working copy) @@ -10,6 +10,7 @@ :required => true %>

<%= f.check_box :is_in_roadmap %>

+

<%= f.text_area :description, :rows => 4 %>

<% Tracker::CORE_FIELDS.each do |field| %> Index: app/views/trackers/index.api.rsb =================================================================== --- app/views/trackers/index.api.rsb (revision 16545) +++ app/views/trackers/index.api.rsb (working copy) @@ -4,6 +4,7 @@ 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 Index: app/views/trackers/index.html.erb =================================================================== --- app/views/trackers/index.html.erb (revision 16545) +++ app/views/trackers/index.html.erb (working copy) @@ -14,7 +14,15 @@ <% for tracker in @trackers %> - <%= link_to tracker.name, edit_tracker_path(tracker) %> + +

+ <%= link_to tracker.name, edit_tracker_path(tracker) %> +
+

<%= tracker.name %>

+ <%= tracker.description %> +
+
+ <% unless tracker.workflow_rules.exists? %> Index: db/migrate/20170503103500_add_trackers_description.rb =================================================================== --- db/migrate/20170503103500_add_trackers_description.rb (nonexistent) +++ db/migrate/20170503103500_add_trackers_description.rb (working copy) @@ -0,0 +1,9 @@ +class AddTrackersDescription < ActiveRecord::Migration + def self.up + add_column :trackers, :description, :string + end + + def self.down + remove_column :trackers, :description + end +end Index: public/stylesheets/application.css =================================================================== --- public/stylesheets/application.css (revision 16545) +++ public/stylesheets/application.css (working copy) @@ -1462,3 +1462,60 @@ height:1px; overflow:hidden; } + +/*--- Tooltip: Use to display template description -----*/ +.tooltip_wrapper { + color: #555; + display: inline-block; +} + +/* Hide tooltip body */ +.tooltip_wrapper .tooltip_body { + display: none; +} + +.tooltip_body .tooltip_title { + color: #979797; + font-weight: bold; + font-style: italic; + border-bottom: 1px solid #e4e4e4; + padding: 3px 0 3px 0; + margin-bottom: 4px; +} + +/* Mouse over action */ +.tooltip_wrapper:hover { + position: relative; + color: #333; +} + +/* tooltip body */ +.tooltip_wrapper:hover .tooltip_body { + text-align: left; + display: block; + position: absolute; + left: 60px; + top: 120%; + font-size: 90%; + background-color: #ffffff; + width: 260px; + padding: 8px 10px 12px; + border: 1px solid #CCCCCC; + z-index: 20000; +} + +#trackers_description_dialog h4 { + color: #979797; + font-weight: bold; + border-bottom: solid 1px #c0c0c0; +} + +#trackers_description_dialog h4.selected { + color: inherit; + font-style: italic; +} + +#trackers_description_dialog td { + padding: 8px 8px; 8px 4px; +} +