Added a 'New issue' link in the main menu (accesskey 7).

The drop-down lists to add an issue on the project overview and the issue list are removed.

git-svn-id: http://redmine.rubyforge.org/svn/trunk@1081 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2008-01-20 13:07:19 +00:00
parent 44ac1a0deb
commit 16e9ffce0d
9 changed files with 45 additions and 28 deletions
+2
View File
@@ -17,6 +17,8 @@
class IssuesController < ApplicationController
layout 'base'
menu_item :new_issue, :only => :new
before_filter :find_issue, :except => [:index, :changes, :preview, :new, :update_form]
before_filter :find_project, :only => [:new, :update_form]
before_filter :authorize, :except => [:index, :changes, :preview, :update_form]
+1 -7
View File
@@ -162,15 +162,9 @@ module ApplicationHelper
@html_title += args
end
end
ACCESSKEYS = {:edit => 'e',
:preview => 'r',
:quick_search => 'f',
:search => '4',
}.freeze unless const_defined?(:ACCESSKEYS)
def accesskey(s)
ACCESSKEYS[s]
Redmine::AccessKeys.key_for s
end
# Formats text according to system settings.
-8
View File
@@ -188,12 +188,4 @@ module ProjectsHelper
gc.draw(imgl)
imgl
end if Object.const_defined?(:Magick)
def new_issue_selector
trackers = @project.trackers
# can't use form tag inside helper
content_tag('form',
select_tag('tracker_id', '<option></option>' + options_from_collection_for_select(trackers, 'id', 'name'), :onchange => "if (this.value != '') {this.form.submit()}"),
:action => url_for(:controller => 'issues', :action => 'new', :project_id => @project), :method => 'get')
end
end
-5
View File
@@ -1,8 +1,3 @@
<% if authorize_for('issues', 'new') && @project.trackers.any? %>
<h3><%= l(:label_issue_new) %></h3>
<%= l(:label_tracker) %>: <%= new_issue_selector %>
<% end %>
<h3><%= l(:label_issue_plural) %></h3>
<%= link_to l(:label_issue_view_all), { :controller => 'issues', :action => 'index', :project_id => @project, :set_filter => 1 } %><br />
<%= link_to l(:field_summary), :controller => 'reports', :action => 'issue_report', :id => @project %><br />
-5
View File
@@ -56,11 +56,6 @@
</div>
<% content_for :sidebar do %>
<% if authorize_for('issues', 'new') && @project.trackers.any? %>
<h3><%= l(:label_issue_new) %></h3>
<%= l(:label_tracker) %>: <%= new_issue_selector %>
<% end %>
<% planning_links = []
planning_links << link_to_if_authorized(l(:label_calendar), :action => 'calendar', :id => @project)
planning_links << link_to_if_authorized(l(:label_gantt), :action => 'gantt', :id => @project)