diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/issue_categories/destroy.html.erb | 2 | ||||
-rw-r--r-- | app/views/issue_categories/edit.html.erb | 2 | ||||
-rw-r--r-- | app/views/issue_categories/new.html.erb | 2 | ||||
-rw-r--r-- | app/views/issues/_attributes.html.erb | 2 | ||||
-rw-r--r-- | app/views/projects/settings/_issue_categories.html.erb | 8 |
5 files changed, 9 insertions, 7 deletions
diff --git a/app/views/issue_categories/destroy.html.erb b/app/views/issue_categories/destroy.html.erb index fb169c868..882a75e4a 100644 --- a/app/views/issue_categories/destroy.html.erb +++ b/app/views/issue_categories/destroy.html.erb @@ -1,6 +1,6 @@ <h2><%=l(:label_issue_category)%>: <%=h @category.name %></h2> -<% form_tag({}) do %> +<% form_tag(issue_category_path(@category), :method => :delete) do %> <div class="box"> <p><strong><%= l(:text_issue_category_destroy_question, @issue_count) %></strong></p> <p><label><%= radio_button_tag 'todo', 'nullify', true %> <%= l(:text_issue_category_destroy_assignments) %></label><br /> diff --git a/app/views/issue_categories/edit.html.erb b/app/views/issue_categories/edit.html.erb index bc627797b..1e1a8fe7d 100644 --- a/app/views/issue_categories/edit.html.erb +++ b/app/views/issue_categories/edit.html.erb @@ -1,6 +1,6 @@ <h2><%=l(:label_issue_category)%></h2> -<% labelled_tabular_form_for :category, @category, :url => { :action => 'edit', :id => @category } do |f| %> +<% labelled_tabular_form_for :category, @category, :url => issue_category_path(@category), :html => {:method => :put} do |f| %> <%= render :partial => 'issue_categories/form', :locals => { :f => f } %> <%= submit_tag l(:button_save) %> <% end %> diff --git a/app/views/issue_categories/new.html.erb b/app/views/issue_categories/new.html.erb index ac7936a41..ccd88c5cd 100644 --- a/app/views/issue_categories/new.html.erb +++ b/app/views/issue_categories/new.html.erb @@ -1,6 +1,6 @@ <h2><%=l(:label_issue_category_new)%></h2> -<% labelled_tabular_form_for :category, @category, :url => { :action => 'new' } do |f| %> +<% labelled_tabular_form_for :category, @category, :url => project_issue_categories_path(@project) do |f| %> <%= render :partial => 'issue_categories/form', :locals => { :f => f } %> <%= submit_tag l(:button_create) %> <% end %> diff --git a/app/views/issues/_attributes.html.erb b/app/views/issues/_attributes.html.erb index 02aba7c79..d9d851c49 100644 --- a/app/views/issues/_attributes.html.erb +++ b/app/views/issues/_attributes.html.erb @@ -14,7 +14,7 @@ <%= prompt_to_remote(image_tag('add.png', :style => 'vertical-align: middle;'), l(:label_issue_category_new), 'category[name]', - {:controller => 'issue_categories', :action => 'new', :project_id => @project}, + {:controller => 'issue_categories', :action => 'create', :project_id => @project}, :title => l(:label_issue_category_new), :tabindex => 199) if authorize_for('issue_categories', 'new') %></p> <% end %> diff --git a/app/views/projects/settings/_issue_categories.html.erb b/app/views/projects/settings/_issue_categories.html.erb index 4c9df908f..297d31a72 100644 --- a/app/views/projects/settings/_issue_categories.html.erb +++ b/app/views/projects/settings/_issue_categories.html.erb @@ -12,8 +12,10 @@ <td><%=h(category.name) %></td> <td><%=h(category.assigned_to.name) if category.assigned_to %></td> <td class="buttons"> - <%= link_to_if_authorized l(:button_edit), { :controller => 'issue_categories', :action => 'edit', :id => category }, :class => 'icon icon-edit' %> - <%= link_to_if_authorized l(:button_delete), {:controller => 'issue_categories', :action => 'destroy', :id => category}, :method => :post, :class => 'icon icon-del' %> + <% if User.current.allowed_to?(:manage_categories, @project) %> + <%= link_to l(:button_edit), edit_issue_category_path(category), :class => 'icon icon-edit' %> + <%= link_to l(:button_delete), issue_category_path(category), :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %> + <% end %> </td> </tr> <% end %> @@ -24,4 +26,4 @@ <p class="nodata"><%= l(:label_no_data) %></p> <% end %> -<p><%= link_to_if_authorized l(:label_issue_category_new), :controller => 'issue_categories', :action => 'new', :project_id => @project %></p> +<p><%= link_to l(:label_issue_category_new), new_project_issue_category_path(@project) if User.current.allowed_to?(:manage_categories, @project) %></p> |