summaryrefslogtreecommitdiffstats
path: root/app/views/projects
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-06-23 13:49:29 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-06-23 13:49:29 +0000
commit1c44600c62dc1063583d9e2015ab815d9dd22fa5 (patch)
treedee0938476cc4525b60679905896b7af7a6bd4a7 /app/views/projects
parent5332c4362cdf7c98a281d88409a07b24767dc2d2 (diff)
downloadredmine-1c44600c62dc1063583d9e2015ab815d9dd22fa5.tar.gz
redmine-1c44600c62dc1063583d9e2015ab815d9dd22fa5.zip
Added per user custom queries.
Any logged in user can now save queries (they are not visible to the other users). Only users with explicit permission can manage queries that are visible to anyone. The queries list is removed from the "Reports" view. It can now be accessed from the issues list. git-svn-id: http://redmine.rubyforge.org/svn/trunk@566 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/projects')
-rw-r--r--app/views/projects/add_query.rhtml6
-rw-r--r--app/views/projects/list_issues.rhtml14
-rw-r--r--app/views/projects/show.rhtml3
3 files changed, 5 insertions, 18 deletions
diff --git a/app/views/projects/add_query.rhtml b/app/views/projects/add_query.rhtml
deleted file mode 100644
index 1de027a44..000000000
--- a/app/views/projects/add_query.rhtml
+++ /dev/null
@@ -1,6 +0,0 @@
-<h2><%= l(:label_query_new) %></h2>
-
-<% form_tag({:action => 'add_query', :id => @project}) do %>
- <%= render :partial => 'queries/form', :locals => {:query => @query} %>
- <%= submit_tag l(:button_create) %>
-<% end %> \ No newline at end of file
diff --git a/app/views/projects/list_issues.rhtml b/app/views/projects/list_issues.rhtml
index 44ed90019..1cacf0055 100644
--- a/app/views/projects/list_issues.rhtml
+++ b/app/views/projects/list_issues.rhtml
@@ -1,6 +1,6 @@
<% if @query.new_record? %>
<div class="contextual">
- <%= render :partial => 'issues/add_shortcut', :locals => {:trackers => @trackers } %>
+ <%= link_to l(:label_query_plural), :controller => 'queries', :project_id => @project %>
</div>
<h2><%=l(:label_issue_plural)%></h2>
@@ -19,9 +19,9 @@
:update => "content",
}, :class => 'icon icon-reload' %>
- <% if authorize_for('projects', 'add_query') %>
+ <% if loggedin? %>
<%= link_to_remote l(:button_save),
- { :url => { :controller => 'projects', :action => "add_query", :id => @project },
+ { :url => { :controller => 'queries', :action => 'new', :project_id => @project },
:method => 'get',
:update => "content",
:with => "Form.serialize('query_form')"
@@ -31,12 +31,8 @@
<br />
<% else %>
<div class="contextual">
- <%= render :partial => 'issues/add_shortcut', :locals => {:trackers => @trackers } %>
- <%= link_to l(:button_clear), {:controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1}, :class => 'icon icon-reload' %>
- <% if authorize_for('projects', 'add_query') %>
- <%= link_to l(:button_edit), {:controller => 'queries', :action => 'edit', :id => @query}, :class => 'icon icon-edit' %>
- <%= link_to l(:button_delete), {:controller => 'queries', :action => 'destroy', :id => @query}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
- <% end %>
+ <%= link_to l(:label_query_plural), {:controller => 'queries', :project_id => @project} %> |
+ <%= link_to l(:label_issue_view_all), {:controller => 'projects', :action => 'list_issues', :id => @project, :set_filter => 1} %>
</div>
<h2><%= @query.name %></h2>
<% end %>
diff --git a/app/views/projects/show.rhtml b/app/views/projects/show.rhtml
index 92668ad71..354568f97 100644
--- a/app/views/projects/show.rhtml
+++ b/app/views/projects/show.rhtml
@@ -20,9 +20,6 @@
</ul>
<div class="box">
- <div class="contextual">
- <%= render :partial => 'issues/add_shortcut', :locals => {:trackers => @trackers } %>
- </div>
<h3 class="icon22 icon22-tracker"><%=l(:label_issue_tracking)%></h3>
<ul>
<% for tracker in @trackers %>