diff app/views/news/.svn/text-base/show.rhtml.svn-base @ 37:94944d00e43c

* Update to SVN trunk rev 4411
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Fri, 19 Nov 2010 13:24:41 +0000
parents 40f7cfd4df19
children af80e5618e9b
line wrap: on
line diff
--- a/app/views/news/.svn/text-base/show.rhtml.svn-base	Fri Sep 24 14:06:04 2010 +0100
+++ b/app/views/news/.svn/text-base/show.rhtml.svn-base	Fri Nov 19 13:24:41 2010 +0000
@@ -1,23 +1,23 @@
 <div class="contextual">
 <%= link_to_if_authorized l(:button_edit), 
-                          {:controller => 'news', :action => 'edit', :id => @news},
+                          edit_news_path(@news),
                           :class => 'icon icon-edit',
                           :accesskey => accesskey(:edit),
                           :onclick => 'Element.show("edit-news"); return false;' %>
-<%= link_to_if_authorized l(:button_delete), {:controller => 'news', :action => 'destroy', :id => @news}, :confirm => l(:text_are_you_sure), :method => :post, :class => 'icon icon-del' %>
+<%= link_to_if_authorized l(:button_delete), news_path(@news), :confirm => l(:text_are_you_sure), :method => :delete, :class => 'icon icon-del' %>
 </div>
 
 <h2><%= avatar(@news.author, :size => "24") %><%=h @news.title %></h2>
 
 <% if authorize_for('news', 'edit') %>
 <div id="edit-news" style="display:none;">
-<% labelled_tabular_form_for :news, @news, :url => { :action => "update", :id => @news },
+<% labelled_tabular_form_for :news, @news, :url => news_path(@news),
                                            :html => { :id => 'news-form', :method => :put } do |f| %>
 <%= render :partial => 'form', :locals => { :f => f } %>
 <%= submit_tag l(:button_save) %>
 <%= link_to_remote l(:label_preview), 
-                   { :url => { :controller => 'news', :action => 'preview', :project_id => @project },
-                     :method => 'post',
+                   { :url => preview_news_path(:project_id => @project),
+                     :method => 'get',
                      :update => 'preview',
                      :with => "Form.serialize('news-form')"
                    }, :accesskey => accesskey(:preview) %> |