Commit 120e39ba authored by Jean-Philippe Lang's avatar Jean-Philippe Lang

news and documents views modified

git-svn-id: http://redmine.rubyforge.org/svn/trunk@61 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 98d4bdb7
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
<ul> <ul>
<% for attachment in @attachments %> <% for attachment in @attachments %>
<li> <li>
<% if authorize_for('documents', 'destroy') %> <% if authorize_for('documents', 'destroy_attachment') %>
<div style="float:right;padding:6px;"> <div style="float:right;padding:6px;">
<%= start_form_tag({ :controller => 'documents', :action => 'destroy', :id => @document } ) %> <%= start_form_tag({ :controller => 'documents', :action => 'destroy_attachment', :id => @document, :attachment_id => attachment } ) %>
<%= submit_tag l(:button_delete), :class => 'button-small' %> <%= submit_tag l(:button_delete), :class => 'button-small' %>
<%= end_form_tag %> <%= end_form_tag %>
</div> </div>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="box"> <div class="box">
<p><%= f.text_field :title, :required => true, :size => 60 %></p> <p><%= f.text_field :title, :required => true, :size => 60 %></p>
<p><%= f.text_area :summary, :cols => 60, :rows => 2 %></p> <p><%= f.text_area :summary, :cols => 60, :rows => 2 %></p>
<p><%= f.text_area :description, :required => true, :cols => 60, :rows => 10 %></p> <p><%= f.text_area :description, :required => true, :cols => 60, :rows => 15 %></p>
</div> </div>
<% unless $RDM_TEXTILE_DISABLED %> <% unless $RDM_TEXTILE_DISABLED %>
......
<h2><%= @news.title %></h2> <h2><%= @news.title %></h2>
<p> <p><em><%= @news.summary %><br />
<b><%=l(:field_summary)%></b>: <%= @news.summary %><br /> <%= @news.author.display_name %>, <%= format_time(@news.created_on) %></em></p>
<b><%=l(:field_author)%></b>: <%= @news.author.display_name %><br /> <br />
<b><%=l(:field_created_on)%></b>: <%= format_time(@news.created_on) %>
</p>
<%= textilizable auto_link @news.description %> <%= textilizable auto_link @news.description %>
<% if authorize_for('news', 'edit') %> <div style="float:right;">
<%= start_form_tag ({:controller => 'news', :action => 'edit', :id => @news}, :method => 'get' ) %>
<%= submit_tag l(:button_edit) %>
<%= end_form_tag %>
<% end %>
<% if authorize_for('news', 'destroy') %> <% if authorize_for('news', 'destroy') %>
<%= start_form_tag ({:controller => 'news', :action => 'destroy', :id => @news}) %> <%= start_form_tag ({:controller => 'news', :action => 'destroy', :id => @news}) %>
<%= submit_tag l(:button_delete) %> <%= submit_tag l(:button_delete) %>
<%= end_form_tag %> <%= end_form_tag %>
<% end %> <% end %>
</div>
<%= link_to_if_authorized l(:button_edit), :controller => 'news', :action => 'edit', :id => @news %>
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<b><%= link_to d.title, :controller => 'documents', :action => 'show', :id => d %></b> <b><%= link_to d.title, :controller => 'documents', :action => 'show', :id => d %></b>
<br /> <br />
<%= truncate d.description, 250 %><br /> <%= truncate d.description, 250 %><br />
<em><%= format_time(d.created_on) %></em> <em><%= format_time(d.created_on) %></em><br />&nbsp;
</li> </li>
<% end %> <% end %>
......
...@@ -2,13 +2,15 @@ ...@@ -2,13 +2,15 @@
<% if @news.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %> <% if @news.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %>
<ul>
<% for news in @news %> <% for news in @news %>
<p> <li><%= link_to news.title, :controller => 'news', :action => 'show', :id => news %><br />
<b><%= news.title %></b> <small>(<%= link_to_user news.author %> <%= format_time(news.created_on) %>)</small><br /> <% unless news.summary.empty? %><%= news.summary %><br /><% end %>
<% unless news.summary.empty? %><%= news.summary %><br /><% end %> <em><%= news.author.name %>, <%= format_time(news.created_on) %></em><br />&nbsp;
<small>[<%= link_to l(:label_read), :controller => 'news', :action => 'show', :id => news %>]</small> </li>
</p>
<% end %> <% end %>
</ul>
<%= pagination_links_full @news_pages %> <%= pagination_links_full @news_pages %>
<p> <p>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment