diff options
Diffstat (limited to 'app/views/news')
-rw-r--r-- | app/views/news/edit.html.erb | 7 | ||||
-rw-r--r-- | app/views/news/index.html.erb | 7 | ||||
-rw-r--r-- | app/views/news/new.html.erb | 7 | ||||
-rw-r--r-- | app/views/news/show.html.erb | 7 |
4 files changed, 4 insertions, 24 deletions
diff --git a/app/views/news/edit.html.erb b/app/views/news/edit.html.erb index 5dd43c3ce..499451bb7 100644 --- a/app/views/news/edit.html.erb +++ b/app/views/news/edit.html.erb @@ -3,12 +3,7 @@ <%= labelled_form_for @news, :html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %> <%= render :partial => 'form', :locals => { :f => f } %> <%= submit_tag l(:button_save) %> -<%= link_to_remote l(:label_preview), - { :url => preview_news_path(:project_id => @project), - :method => 'get', - :update => 'preview', - :with => "Form.serialize('news-form')" - }, :accesskey => accesskey(:preview) %> +<%= preview_link preview_news_path(:project_id => @project), 'news-form' %> <% end %> <div id="preview" class="wiki"></div> diff --git a/app/views/news/index.html.erb b/app/views/news/index.html.erb index b354adcb8..e62cce498 100644 --- a/app/views/news/index.html.erb +++ b/app/views/news/index.html.erb @@ -11,12 +11,7 @@ :html => { :id => 'news-form', :multipart => true } do |f| %> <%= render :partial => 'news/form', :locals => { :f => f } %> <%= submit_tag l(:button_create) %> -<%= link_to_remote l(:label_preview), - { :url => preview_news_path(:project_id => @project), - :method => 'get', - :update => 'preview', - :with => "Form.serialize('news-form')" - }, :accesskey => accesskey(:preview) %> | +<%= preview_link preview_news_path(:project_id => @project), 'news-form' %> | <%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-news")' %> <% end if @project %> <div id="preview" class="wiki"></div> diff --git a/app/views/news/new.html.erb b/app/views/news/new.html.erb index 95a902432..f96dd5c52 100644 --- a/app/views/news/new.html.erb +++ b/app/views/news/new.html.erb @@ -4,11 +4,6 @@ :html => { :id => 'news-form', :multipart => true } do |f| %> <%= render :partial => 'news/form', :locals => { :f => f } %> <%= submit_tag l(:button_create) %> - <%= link_to_remote l(:label_preview), - { :url => preview_news_path(:project_id => @project), - :method => 'get', - :update => 'preview', - :with => "Form.serialize('news-form')" - }, :accesskey => accesskey(:preview) %> + <%= preview_link preview_news_path(:project_id => @project), 'news-form' %> <% end %> <div id="preview" class="wiki"></div> diff --git a/app/views/news/show.html.erb b/app/views/news/show.html.erb index fba61835d..51a896e12 100644 --- a/app/views/news/show.html.erb +++ b/app/views/news/show.html.erb @@ -16,12 +16,7 @@ :html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %> <%= render :partial => 'form', :locals => { :f => f } %> <%= submit_tag l(:button_save) %> -<%= link_to_remote l(:label_preview), - { :url => preview_news_path(:project_id => @project), - :method => 'get', - :update => 'preview', - :with => "Form.serialize('news-form')" - }, :accesskey => accesskey(:preview) %> | +<%= preview_link preview_news_path(:project_id => @project), 'news-form' %> | <%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("edit-news"); return false;' %> <% end %> <div id="preview" class="wiki"></div> |