From b9ef26837cd03702734ea7486a26b2b8bf5dd8f1 Mon Sep 17 00:00:00 2001 From: Holger Just Date: Thu, 21 Oct 2010 21:37:04 +0200 Subject: [PATCH] Partly revert r4214. link_to_if_authorized does not support strings anymore. --- app/views/news/index.rhtml | 2 +- app/views/news/show.rhtml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/news/index.rhtml b/app/views/news/index.rhtml index c2a227fe0..dbde7bdf8 100644 --- a/app/views/news/index.rhtml +++ b/app/views/news/index.rhtml @@ -1,6 +1,6 @@
<%= link_to_if_authorized(l(:label_news_new), - new_project_news_path(@project), + {:controller => 'news', :action => 'new', :project_id => @project}, :class => 'icon icon-add', :onclick => 'Element.show("add-news"); Form.Element.focus("news_title"); return false;') if @project %>
diff --git a/app/views/news/show.rhtml b/app/views/news/show.rhtml index 119436d5d..873afc896 100644 --- a/app/views/news/show.rhtml +++ b/app/views/news/show.rhtml @@ -1,10 +1,10 @@
<%= link_to_if_authorized l(:button_edit), - edit_news_path(@news), + {:controller => 'news', :action => 'edit', :id => @news}, :class => 'icon icon-edit', :accesskey => accesskey(:edit), :onclick => 'Element.show("edit-news"); return false;' %> -<%= link_to_if_authorized l(:button_delete), news_path(@news), :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %> +<%= link_to_if_authorized l(:button_delete), {:controller => 'news', :action => 'destroy', :id => @news}, :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %>

<%= avatar(@news.author, :size => "24") %><%=h @news.title %>