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
This commit is contained in:
Jean-Philippe Lang
2007-06-23 13:49:29 +00:00
parent 5332c4362c
commit 1c44600c62
17 changed files with 112 additions and 74 deletions
+5 -9
View File
@@ -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 %>