summaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2024-06-04 20:04:45 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2024-06-04 20:04:45 +0000
commit38a8adb2a20c9c6ae57b0633037290c64a34b624 (patch)
tree3e3a7ca75019c0c8846dc2ac820e8b819ce30aad /app/views
parentc19176a5c48e33e6bcfe280736092154deb58181 (diff)
downloadredmine-38a8adb2a20c9c6ae57b0633037290c64a34b624.tar.gz
redmine-38a8adb2a20c9c6ae57b0633037290c64a34b624.zip
Adds description field to custom queries (#9309).
Patch by Go MAEDA (@maeda). git-svn-id: https://svn.redmine.org/redmine/trunk@22855 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin/projects.html.erb1
-rw-r--r--app/views/calendars/show.html.erb1
-rw-r--r--app/views/gantts/show.html.erb1
-rw-r--r--app/views/issues/index.html.erb1
-rw-r--r--app/views/projects/index.html.erb1
-rw-r--r--app/views/queries/_form.html.erb2
-rw-r--r--app/views/timelog/index.html.erb1
-rw-r--r--app/views/users/index.html.erb1
8 files changed, 9 insertions, 0 deletions
diff --git a/app/views/admin/projects.html.erb b/app/views/admin/projects.html.erb
index e6805453a..c0e2a713e 100644
--- a/app/views/admin/projects.html.erb
+++ b/app/views/admin/projects.html.erb
@@ -3,6 +3,7 @@
</div>
<h2><%= @query.new_record? ? l(:label_project_plural) : @query.name %></h2>
+<%= @query.persisted? && @query.description.present? ? content_tag('p', @query.description, class: 'subtitle') : '' %>
<%= form_tag(admin_projects_path(@project, nil), :method => :get, :id => 'query_form') do %>
<%= hidden_field_tag 'admin_projects', '1' %>
diff --git a/app/views/calendars/show.html.erb b/app/views/calendars/show.html.erb
index d3d00a427..dfef117de 100644
--- a/app/views/calendars/show.html.erb
+++ b/app/views/calendars/show.html.erb
@@ -1,4 +1,5 @@
<h2><%= @query.new_record? ? l(:label_calendar) : @query.name %></h2>
+<%= @query.persisted? && @query.description.present? ? content_tag('p', @query.description, class: 'subtitle') : '' %>
<%= form_tag({:controller => 'calendars', :action => 'show', :project_id => @project},
:method => :get, :id => 'query_form') do %>
diff --git a/app/views/gantts/show.html.erb b/app/views/gantts/show.html.erb
index 43e430311..ceca3d1a7 100644
--- a/app/views/gantts/show.html.erb
+++ b/app/views/gantts/show.html.erb
@@ -3,6 +3,7 @@
</div>
<h2><%= @query.new_record? ? l(:label_gantt) : @query.name %></h2>
+<%= @query.persisted? && @query.description.present? ? content_tag('p', @query.description, class: 'subtitle') : '' %>
<%= form_tag({:controller => 'gantts', :action => 'show',
:project_id => @project, :month => params[:month],
diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb
index 997a64e55..1ab5198a1 100644
--- a/app/views/issues/index.html.erb
+++ b/app/views/issues/index.html.erb
@@ -19,6 +19,7 @@
<h2><%= @query.new_record? ? l(:label_issue_plural) : @query.name %></h2>
<% html_title(@query.new_record? ? l(:label_issue_plural) : @query.name) %>
+<%= @query.persisted? && @query.description.present? ? content_tag('p', @query.description, class: 'subtitle') : '' %>
<%= form_tag(_project_issues_path(@project), :method => :get, :id => 'query_form') do %>
<%= render :partial => 'queries/query_form' %>
diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb
index 3bd665640..d18cf6e47 100644
--- a/app/views/projects/index.html.erb
+++ b/app/views/projects/index.html.erb
@@ -5,6 +5,7 @@
</div>
<h2><%= @query.new_record? ? l(:label_project_plural) : @query.name %></h2>
+<%= @query.persisted? && @query.description.present? ? content_tag('p', @query.description, class: 'subtitle') : '' %>
<%= form_tag(projects_path(@project, nil), :method => :get, :id => 'query_form') do %>
<%= render :partial => 'queries/query_form' %>
diff --git a/app/views/queries/_form.html.erb b/app/views/queries/_form.html.erb
index 5f4fa3490..27391e8ef 100644
--- a/app/views/queries/_form.html.erb
+++ b/app/views/queries/_form.html.erb
@@ -8,6 +8,8 @@
<p><label for="query_name"><%=l(:field_name)%></label>
<%= text_field 'query', 'name', :size => 80 %></p>
+<p><label for="query_description"><%=l(:field_description)%></label>
+<%= text_field 'query', 'description', :size => 80 %></p>
<% if User.current.admin? ||
User.current.allowed_to?(:manage_public_queries, @query.project) %>
diff --git a/app/views/timelog/index.html.erb b/app/views/timelog/index.html.erb
index a045e4743..ec7580b9a 100644
--- a/app/views/timelog/index.html.erb
+++ b/app/views/timelog/index.html.erb
@@ -14,6 +14,7 @@
</div>
<h2><%= @query.new_record? ? l(:label_spent_time) : @query.name %></h2>
+<%= @query.persisted? && @query.description.present? ? content_tag('p', @query.description, class: 'subtitle') : '' %>
<%= form_tag(_time_entries_path(@project, nil), :method => :get, :id => 'query_form') do %>
<%= render :partial => 'date_range' %>
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb
index d609bfd78..9071dba19 100644
--- a/app/views/users/index.html.erb
+++ b/app/views/users/index.html.erb
@@ -8,6 +8,7 @@
</div>
<h2><%= @query.new_record? ? l(:label_user_plural) : @query.name %></h2>
+<%= @query.persisted? && @query.description.present? ? content_tag('p', @query.description, class: 'subtitle') : '' %>
<%= form_tag(users_path, method: :get, id: 'query_form') do %>
<%= render partial: 'queries/query_form' %>