diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-01-29 22:39:06 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-01-29 22:39:06 +0000 |
commit | 24138187eb130b15d5b2b9f7bd6f701b2be6c00a (patch) | |
tree | 472ca1d96d538420fc537b743c5ac3b925723044 /app/views/news | |
parent | 992aebf6dfe9ca92d43e1022102f5c888631a6f4 (diff) | |
download | redmine-24138187eb130b15d5b2b9f7bd6f701b2be6c00a.tar.gz redmine-24138187eb130b15d5b2b9f7bd6f701b2be6c00a.zip |
Allows attachments on news (#1972).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8728 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/news')
-rw-r--r-- | app/views/news/_form.html.erb | 3 | ||||
-rw-r--r-- | app/views/news/edit.html.erb | 2 | ||||
-rw-r--r-- | app/views/news/index.html.erb | 2 | ||||
-rw-r--r-- | app/views/news/new.html.erb | 2 | ||||
-rw-r--r-- | app/views/news/show.html.erb | 5 |
5 files changed, 8 insertions, 6 deletions
diff --git a/app/views/news/_form.html.erb b/app/views/news/_form.html.erb index a3eb87e36..0d181a330 100644 --- a/app/views/news/_form.html.erb +++ b/app/views/news/_form.html.erb @@ -3,6 +3,7 @@ <p><%= f.text_field :title, :required => true, :size => 60 %></p> <p><%= f.text_area :summary, :cols => 60, :rows => 2 %></p> <p><%= f.text_area :description, :required => true, :cols => 60, :rows => 15, :class => 'wiki-edit' %></p> +<p id="attachments_form"><%= label_tag('attachments[1][file]', l(:label_attachment_plural))%><%= render :partial => 'attachments/form' %></p> </div> - + <%= wikitoolbar_for 'news_description' %> diff --git a/app/views/news/edit.html.erb b/app/views/news/edit.html.erb index 182f22fbe..f00a024c1 100644 --- a/app/views/news/edit.html.erb +++ b/app/views/news/edit.html.erb @@ -1,6 +1,6 @@ <h2><%=l(:label_news)%></h2> -<% labelled_form_for @news, :html => { :id => 'news-form', :method => :put } do |f| %> +<% 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), diff --git a/app/views/news/index.html.erb b/app/views/news/index.html.erb index 4d13d3a32..d0370c03f 100644 --- a/app/views/news/index.html.erb +++ b/app/views/news/index.html.erb @@ -8,7 +8,7 @@ <div id="add-news" style="display:none;"> <h2><%=l(:label_news_new)%></h2> <% labelled_form_for @news, :url => project_news_index_path(@project), - :html => { :id => 'news-form' } do |f| %> + :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), diff --git a/app/views/news/new.html.erb b/app/views/news/new.html.erb index e0092878e..1c55215b7 100644 --- a/app/views/news/new.html.erb +++ b/app/views/news/new.html.erb @@ -1,7 +1,7 @@ <h2><%=l(:label_news_new)%></h2> <% labelled_form_for @news, :url => project_news_index_path(@project), - :html => { :id => 'news-form' } do |f| %> + :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), diff --git a/app/views/news/show.html.erb b/app/views/news/show.html.erb index 2ffed80e0..72c18d9a6 100644 --- a/app/views/news/show.html.erb +++ b/app/views/news/show.html.erb @@ -17,7 +17,7 @@ <% if authorize_for('news', 'edit') %> <div id="edit-news" style="display:none;"> <% labelled_form_for :news, @news, :url => news_path(@news), - :html => { :id => 'news-form', :method => :put } do |f| %> + :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), @@ -35,8 +35,9 @@ <p><% unless @news.summary.blank? %><em><%=h @news.summary %></em><br /><% end %> <span class="author"><%= authoring @news.created_on, @news.author %></span></p> <div class="wiki"> -<%= textilizable(@news.description) %> +<%= textilizable(@news, :description) %> </div> +<%= link_to_attachments @news %> <br /> <div id="comments" style="margin-bottom:16px;"> |