diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-07-18 17:47:19 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-07-18 17:47:19 +0000 |
commit | ff68fff80ed1cc9f95587581be9eb641d7a776e5 (patch) | |
tree | 8401052d01792a36dbe5486379e084a574a33c48 /app/views/news | |
parent | bb2af97dcf4ba9372ce78ba8163cc3dc2794a7bb (diff) | |
download | redmine-ff68fff80ed1cc9f95587581be9eb641d7a776e5.tar.gz redmine-ff68fff80ed1cc9f95587581be9eb641d7a776e5.zip |
Adds a helper for preview links.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10031 e93f8b46-1217-0410-a6f0-8f06a7374b81
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> |