From: Jean-Philippe Lang Date: Wed, 25 Feb 2015 13:54:34 +0000 (+0000) Subject: Use named routes. X-Git-Tag: 3.1.0~229 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dbe05a000ab0072529d95eddd89e33cbd5fa97ec;p=redmine.git Use named routes. git-svn-id: http://svn.redmine.org/redmine/trunk@14044 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/views/admin/projects.html.erb b/app/views/admin/projects.html.erb index 0de7040a4..0437f9e28 100644 --- a/app/views/admin/projects.html.erb +++ b/app/views/admin/projects.html.erb @@ -1,5 +1,5 @@
-<%= link_to l(:label_project_new), {:controller => 'projects', :action => 'new'}, :class => 'icon icon-add' %> +<%= link_to l(:label_project_new), new_project_path, :class => 'icon icon-add' %>
<%= title l(:label_project_plural) %> @@ -11,7 +11,7 @@ <%= text_field_tag 'name', params[:name], :size => 30 %> <%= submit_tag l(:button_apply), :class => "small", :name => nil %> -<%= link_to l(:button_clear), {:controller => 'admin', :action => 'projects'}, :class => 'icon icon-reload' %> +<%= link_to l(:button_clear), admin_projects_path, :class => 'icon icon-reload' %> <% end %>   @@ -31,9 +31,9 @@ <%= checked_image project.is_public? %> <%= format_date(project.created_on) %> - <%= link_to(l(:button_archive), { :controller => 'projects', :action => 'archive', :id => project, :status => params[:status] }, :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-lock') unless project.archived? %> - <%= link_to(l(:button_unarchive), { :controller => 'projects', :action => 'unarchive', :id => project, :status => params[:status] }, :method => :post, :class => 'icon icon-unlock') if project.archived? && (project.parent.nil? || !project.parent.archived?) %> - <%= link_to(l(:button_copy), { :controller => 'projects', :action => 'copy', :id => project }, :class => 'icon icon-copy') %> + <%= link_to(l(:button_archive), archive_project_path(project, :status => params[:status]), :data => {:confirm => l(:text_are_you_sure)}, :method => :post, :class => 'icon icon-lock') unless project.archived? %> + <%= link_to(l(:button_unarchive), unarchive_project_path(project, :status => params[:status]), :method => :post, :class => 'icon icon-unlock') if project.archived? && (project.parent.nil? || !project.parent.archived?) %> + <%= link_to(l(:button_copy), copy_project_path(project), :class => 'icon icon-copy') %> <%= link_to(l(:button_delete), project_path(project), :method => :delete, :class => 'icon icon-del') %>