summaryrefslogtreecommitdiffstats
path: root/app/views/news
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2018-09-26 07:27:30 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2018-09-26 07:27:30 +0000
commitb9fa262165601a3b348d22ca1d8da53bda99e55b (patch)
tree21bd632e051addfee01ab7a568b01f5b6428051a /app/views/news
parentc171797673f549e434dd6b94f7262fd31a77b533 (diff)
downloadredmine-b9fa262165601a3b348d22ca1d8da53bda99e55b.tar.gz
redmine-b9fa262165601a3b348d22ca1d8da53bda99e55b.zip
Adds preview option to the wiki toolbar (#27758).
Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@17521 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/news')
-rw-r--r--app/views/news/_form.html.erb2
-rw-r--r--app/views/news/edit.html.erb2
-rw-r--r--app/views/news/index.html.erb2
-rw-r--r--app/views/news/new.html.erb2
-rw-r--r--app/views/news/show.html.erb4
5 files changed, 2 insertions, 10 deletions
diff --git a/app/views/news/_form.html.erb b/app/views/news/_form.html.erb
index 3f48d21de..dbf21df48 100644
--- a/app/views/news/_form.html.erb
+++ b/app/views/news/_form.html.erb
@@ -7,4 +7,4 @@
<p id="attachments_form"><label><%= l(:label_attachment_plural) %></label><%= render :partial => 'attachments/form', :locals => {:container => @news} %></p>
</div>
-<%= wikitoolbar_for 'news_description' %>
+<%= wikitoolbar_for 'news_description', preview_news_path(:project_id => @project, :id => @news) %> \ No newline at end of file
diff --git a/app/views/news/edit.html.erb b/app/views/news/edit.html.erb
index 4e4cf2e2b..50b897324 100644
--- a/app/views/news/edit.html.erb
+++ b/app/views/news/edit.html.erb
@@ -3,9 +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) %>
-<%= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form' %>
<% end %>
-<div id="preview" class="wiki"></div>
<% content_for :header_tags do %>
<%= stylesheet_link_tag 'scm' %>
diff --git a/app/views/news/index.html.erb b/app/views/news/index.html.erb
index 2ff5a1c8c..cd51aa950 100644
--- a/app/views/news/index.html.erb
+++ b/app/views/news/index.html.erb
@@ -12,10 +12,8 @@
:html => { :id => 'news-form', :multipart => true } do |f| %>
<%= render :partial => 'news/form', :locals => { :f => f } %>
<%= submit_tag l(:button_create) %>
-<%= preview_link preview_news_path(:project_id => @project), 'news-form' %> |
<%= link_to l(:button_cancel), "#", :onclick => '$("#add-news").hide()' %>
<% end if @project %>
-<div id="preview" class="wiki"></div>
</div>
<h2><%=l(:label_news_plural)%></h2>
diff --git a/app/views/news/new.html.erb b/app/views/news/new.html.erb
index f96dd5c52..cf57140b8 100644
--- a/app/views/news/new.html.erb
+++ b/app/views/news/new.html.erb
@@ -4,6 +4,4 @@
:html => { :id => 'news-form', :multipart => true } do |f| %>
<%= render :partial => 'news/form', :locals => { :f => f } %>
<%= submit_tag l(:button_create) %>
- <%= 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 72c94a9c7..d8d098cce 100644
--- a/app/views/news/show.html.erb
+++ b/app/views/news/show.html.erb
@@ -16,10 +16,8 @@
:html => { :id => 'news-form', :multipart => true, :method => :put } do |f| %>
<%= render :partial => 'form', :locals => { :f => f } %>
<%= submit_tag l(:button_save) %>
-<%= preview_link preview_news_path(:project_id => @project, :id => @news), 'news-form' %> |
<%= link_to l(:button_cancel), "#", :onclick => '$("#edit-news").hide(); return false;' %>
<% end %>
-<div id="preview" class="wiki"></div>
</div>
<% end %>
@@ -56,7 +54,7 @@
<%= form_tag({:controller => 'comments', :action => 'create', :id => @news}, :id => "add_comment_form", :style => "display:none;") do %>
<div class="box">
<%= text_area 'comment', 'comments', :cols => 80, :rows => 15, :class => 'wiki-edit' %>
- <%= wikitoolbar_for 'comment_comments' %>
+ <%= wikitoolbar_for 'comment_comments', preview_news_path(:project_id => @project, :id => @news) %>
</div>
<p><%= submit_tag l(:button_add) %></p>
<% end %>