summaryrefslogtreecommitdiffstats
path: root/app/views/news
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2007-09-22 17:52:43 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2007-09-22 17:52:43 +0000
commit2b779644682bfb2c47e1bf1e30e65a4384e2bf26 (patch)
tree3a39caf9eb11814c6d6b6965eeb31b89049d65aa /app/views/news
parentfe7c0d648444bcd4d7e5803f480b1ede62e14553 (diff)
downloadredmine-2b779644682bfb2c47e1bf1e30e65a4384e2bf26.tar.gz
redmine-2b779644682bfb2c47e1bf1e30e65a4384e2bf26.zip
The news list now shows the full news contents.
News add/edit forms are now accessible with no additional request. git-svn-id: http://redmine.rubyforge.org/svn/trunk@750 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/news')
-rw-r--r--app/views/news/_form.rhtml2
-rw-r--r--app/views/news/show.rhtml13
2 files changed, 13 insertions, 2 deletions
diff --git a/app/views/news/_form.rhtml b/app/views/news/_form.rhtml
index 1ea3c6aa7..0cfe7a6d3 100644
--- a/app/views/news/_form.rhtml
+++ b/app/views/news/_form.rhtml
@@ -1,5 +1,5 @@
<%= error_messages_for 'news' %>
-<div class="box">
+<div class="box tabular">
<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>
diff --git a/app/views/news/show.rhtml b/app/views/news/show.rhtml
index 5f92801f4..21316212e 100644
--- a/app/views/news/show.rhtml
+++ b/app/views/news/show.rhtml
@@ -1,10 +1,21 @@
<div class="contextual">
-<%= link_to_if_authorized l(:button_edit), {:controller => 'news', :action => 'edit', :id => @news}, :class => 'icon icon-edit' %>
+<%= link_to_if_authorized l(:button_edit),
+ {:controller => 'news', :action => 'edit', :id => @news},
+ :class => 'icon icon-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' %>
</div>
<h2><%=h @news.title %></h2>
+<div id="edit-news" style="display:none;">
+<% labelled_tabular_form_for :news, @news, :url => { :action => "edit", :id => @news } do |f| %>
+<%= render :partial => 'form', :locals => { :f => f } %>
+<%= submit_tag l(:button_save) %>
+<%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("edit-news")' %>
+<% end %>
+</div>
+
<p><em><% unless @news.summary.empty? %><%=h @news.summary %><br /><% end %>
<span class="author"><%= authoring @news.created_on, @news.author %></span></em></p>
<%= textilizable(@news.description) %>