diff options
author | Go MAEDA <maeda@farend.jp> | 2021-04-15 00:32:44 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2021-04-15 00:32:44 +0000 |
commit | e65980dc0995ee94f399f2d7e0d1b56b8ac6af57 (patch) | |
tree | df4625522b8260fed339d7da6c108c88cc4c241c /app/views/layouts | |
parent | f2b17f77943959ea2a415f239ff50e2758c49859 (diff) | |
download | redmine-e65980dc0995ee94f399f2d7e0d1b56b8ac6af57.tar.gz redmine-e65980dc0995ee94f399f2d7e0d1b56b8ac6af57.zip |
Use named routes in base layout and account sidebar (#35075).
Patch by Jan Schulz-Hofen.
git-svn-id: http://svn.redmine.org/redmine/trunk@20944 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/layouts')
-rw-r--r-- | app/views/layouts/base.html.erb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/views/layouts/base.html.erb b/app/views/layouts/base.html.erb index 45337ce7e..43e7459e7 100644 --- a/app/views/layouts/base.html.erb +++ b/app/views/layouts/base.html.erb @@ -26,7 +26,7 @@ <% if User.current.logged? || !Setting.login_required? %> <div class="flyout-menu__search"> - <%= form_tag({:controller => 'search', :action => 'index', :id => @project}, :method => :get ) do %> + <%= form_tag(search_path(id: @project), :method => :get ) do %> <%= hidden_field_tag(controller.default_search_scope, 1, :id => nil) if controller.default_search_scope %> <%= label_tag 'flyout-search', '⚲'.html_safe, :class => 'search-magnifier search-magnifier--flyout' %> <%= text_field_tag 'q', @question, :id => 'flyout-search', :class => 'small js-search-input', :placeholder => l(:label_search) %> @@ -74,11 +74,11 @@ <% if User.current.logged? || !Setting.login_required? %> <div id="quick-search"> - <%= form_tag({:controller => 'search', :action => 'index', :id => @project}, :method => :get ) do %> + <%= form_tag(search_path(id: @project), :method => :get ) do %> <%= hidden_field_tag 'scope', default_search_project_scope, :id => nil %> <%= hidden_field_tag(controller.default_search_scope, 1, :id => nil) if controller.default_search_scope %> <label for='q'> - <%= link_to l(:label_search), {:controller => 'search', :action => 'index', :id => @project, :scope => default_search_project_scope}, :accesskey => accesskey(:search) %>: + <%= link_to l(:label_search), search_path(id: @project, :scope => default_search_project_scope), :accesskey => accesskey(:search) %>: </label> <%= text_field_tag 'q', @question, :size => 20, :class => 'small', :accesskey => accesskey(:quick_search), :data => { |