From b7d8913459ae1692fb1750ff7c14ea42ee230598 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 23 Dec 2012 16:10:07 +0000 Subject: [PATCH] Code cleanup, use named routes. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11078 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/views/roles/index.html.erb | 2 +- app/views/trackers/fields.html.erb | 2 +- app/views/trackers/index.html.erb | 14 +++++++++++--- app/views/users/index.html.erb | 2 +- 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/app/views/roles/index.html.erb b/app/views/roles/index.html.erb index 5326c5638..4240d096b 100644 --- a/app/views/roles/index.html.erb +++ b/app/views/roles/index.html.erb @@ -1,6 +1,6 @@
<%= link_to l(:label_role_new), new_role_path, :class => 'icon icon-add' %> -<%= link_to l(:label_permissions_report), {:action => 'permissions'}, :class => 'icon icon-summary' %> +<%= link_to l(:label_permissions_report), permissions_roles_path, :class => 'icon icon-summary' %>

<%=l(:label_role_plural)%>

diff --git a/app/views/trackers/fields.html.erb b/app/views/trackers/fields.html.erb index a4872112f..ef8959147 100644 --- a/app/views/trackers/fields.html.erb +++ b/app/views/trackers/fields.html.erb @@ -1,7 +1,7 @@

<%= link_to l(:label_tracker_plural), trackers_path %> » <%= l(:field_summary) %>

<% if @trackers.any? %> - <%= form_tag({}) do %> + <%= form_tag fields_trackers_path do %>
diff --git a/app/views/trackers/index.html.erb b/app/views/trackers/index.html.erb index b3840dba7..469ff7945 100644 --- a/app/views/trackers/index.html.erb +++ b/app/views/trackers/index.html.erb @@ -1,6 +1,6 @@
<%= link_to l(:label_tracker_new), new_tracker_path, :class => 'icon icon-add' %> -<%= link_to l(:field_summary), {:action => 'fields'}, :class => 'icon icon-summary' %> +<%= link_to l(:field_summary), fields_trackers_path, :class => 'icon icon-summary' %>

<%=l(:label_tracker_plural)%>

@@ -16,8 +16,16 @@ <% for tracker in @trackers %> "> - - + + diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index 4f77a6493..85dc27f67 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -4,7 +4,7 @@

<%=l(:label_user_plural)%>

-<%= form_tag({}, :method => :get) do %> +<%= form_tag(users_path, :method => :get) do %>
<%= l(:label_filter_plural) %> <%= select_tag 'status', users_status_options_for_select(@status), :class => "small", :onchange => "this.form.submit(); return false;" %>
<%= link_to h(tracker.name), edit_tracker_path(tracker) %><% unless tracker.workflow_rules.count > 0 %><%= l(:text_tracker_no_workflow) %> (<%= link_to l(:button_edit), {:controller => 'workflows', :action => 'edit', :tracker_id => tracker} %>)<% end %><%= reorder_links('tracker', {:action => 'update', :id => tracker}, :put) %> + <% unless tracker.workflow_rules.count > 0 %> + + <%= l(:text_tracker_no_workflow) %> (<%= link_to l(:button_edit), workflows_edit_path(:tracker_id => tracker) %>) + + <% end %> + + <%= reorder_links('tracker', {:action => 'update', :id => tracker}, :put) %> + <%= delete_link tracker_path(tracker) %>