summaryrefslogtreecommitdiffstats
path: root/app/views/issues
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-09-11 17:03:26 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-09-11 17:03:26 +0000
commit586f4e3831e31aef7d2a0e837c1c9fb6fc5c52ce (patch)
tree0f46ca47ee28d06f272e476242aab69487e2fbf9 /app/views/issues
parent2986afc05ed5154b059e1408f32436a97e54f272 (diff)
downloadredmine-586f4e3831e31aef7d2a0e837c1c9fb6fc5c52ce.tar.gz
redmine-586f4e3831e31aef7d2a0e837c1c9fb6fc5c52ce.zip
Adds support for free ticket filtering and custom queries on Calendar.
ProjectsController#calendar moved to IssuesController. git-svn-id: http://redmine.rubyforge.org/svn/trunk@1798 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/issues')
-rw-r--r--app/views/issues/_sidebar.rhtml2
-rw-r--r--app/views/issues/calendar.rhtml55
-rw-r--r--app/views/issues/gantt.rhtml1
3 files changed, 56 insertions, 2 deletions
diff --git a/app/views/issues/_sidebar.rhtml b/app/views/issues/_sidebar.rhtml
index bf9894939..db9351666 100644
--- a/app/views/issues/_sidebar.rhtml
+++ b/app/views/issues/_sidebar.rhtml
@@ -5,7 +5,7 @@
<%= link_to l(:label_change_log), :controller => 'projects', :action => 'changelog', :id => @project %>
<% planning_links = []
- planning_links << link_to_if_authorized(l(:label_calendar), :controller => 'projects', :action => 'calendar', :id => @project)
+ planning_links << link_to_if_authorized(l(:label_calendar), :action => 'calendar', :project_id => @project)
planning_links << link_to_if_authorized(l(:label_gantt), :action => 'gantt', :project_id => @project)
planning_links.compact!
unless planning_links.empty? %>
diff --git a/app/views/issues/calendar.rhtml b/app/views/issues/calendar.rhtml
new file mode 100644
index 000000000..089482927
--- /dev/null
+++ b/app/views/issues/calendar.rhtml
@@ -0,0 +1,55 @@
+<% form_tag({}, :id => 'query_form') do %>
+<% if @query.new_record? %>
+ <h2><%= l(:label_calendar) %></h2>
+ <fieldset id="filters"><legend><%= l(:label_filter_plural) %></legend>
+ <%= render :partial => 'queries/filters', :locals => {:query => @query} %>
+ </fieldset>
+<% else %>
+ <h2><%=h @query.name %></h2>
+ <% html_title @query.name %>
+<% end %>
+
+<fieldset id="date-range"><legend><%= l(:label_date_range) %></legend>
+ <%= select_month(@month, :prefix => "month", :discard_type => true) %>
+ <%= select_year(@year, :prefix => "year", :discard_type => true) %>
+</fieldset>
+
+<p style="float:right; margin:0px;">
+<%= link_to_remote ('&#171; ' + (@month==1 ? "#{month_name(12)} #{@year-1}" : "#{month_name(@month-1)}")),
+ {:update => "content", :url => { :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1) }},
+ {:href => url_for(:action => 'calendar', :year => (@month==1 ? @year-1 : @year), :month =>(@month==1 ? 12 : @month-1))}
+ %> |
+<%= link_to_remote ((@month==12 ? "#{month_name(1)} #{@year+1}" : "#{month_name(@month+1)}") + ' &#187;'),
+ {:update => "content", :url => { :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1) }},
+ {:href => url_for(:action => 'calendar', :year => (@month==12 ? @year+1 : @year), :month =>(@month==12 ? 1 : @month+1))}
+ %>
+</p>
+
+<p class="buttons">
+<%= link_to_remote l(:button_apply),
+ { :url => { :set_filter => (@query.new_record? ? 1 : nil) },
+ :update => "content",
+ :with => "Form.serialize('query_form')"
+ }, :class => 'icon icon-checked' %>
+
+<%= link_to_remote l(:button_clear),
+ { :url => { :set_filter => (@query.new_record? ? 1 : nil) },
+ :update => "content",
+ }, :class => 'icon icon-reload' if @query.new_record? %>
+</p>
+<% end %>
+
+<%= error_messages_for 'query' %>
+<% if @query.valid? %>
+<%= render :partial => 'common/calendar', :locals => {:calendar => @calendar} %>
+
+<%= image_tag 'arrow_from.png' %>&nbsp;&nbsp;<%= l(:text_tip_task_begin_day) %><br />
+<%= image_tag 'arrow_to.png' %>&nbsp;&nbsp;<%= l(:text_tip_task_end_day) %><br />
+<%= image_tag 'arrow_bw.png' %>&nbsp;&nbsp;<%= l(:text_tip_task_begin_end_day) %><br />
+<% end %>
+
+<% content_for :sidebar do %>
+ <%= render :partial => 'issues/sidebar' %>
+<% end %>
+
+<% html_title(l(:label_calendar)) -%>
diff --git a/app/views/issues/gantt.rhtml b/app/views/issues/gantt.rhtml
index 7da657711..b9af1f961 100644
--- a/app/views/issues/gantt.rhtml
+++ b/app/views/issues/gantt.rhtml
@@ -6,7 +6,6 @@
</fieldset>
<% else %>
<h2><%=h @query.name %></h2>
- <div id="query_form"></div>
<% html_title @query.name %>
<% end %>