news and documents views modified
git-svn-id: http://redmine.rubyforge.org/svn/trunk@61 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
98d4bdb7df
commit
120e39ba80
|
@ -21,9 +21,9 @@
|
|||
<ul>
|
||||
<% for attachment in @attachments %>
|
||||
<li>
|
||||
<% if authorize_for('documents', 'destroy') %>
|
||||
<% if authorize_for('documents', 'destroy_attachment') %>
|
||||
<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' %>
|
||||
<%= end_form_tag %>
|
||||
</div>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div class="box">
|
||||
<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 => 10 %></p>
|
||||
<p><%= f.text_area :description, :required => true, :cols => 60, :rows => 15 %></p>
|
||||
</div>
|
||||
|
||||
<% unless $RDM_TEXTILE_DISABLED %>
|
||||
|
|
|
@ -1,21 +1,16 @@
|
|||
<h2><%= @news.title %></h2>
|
||||
|
||||
<p>
|
||||
<b><%=l(:field_summary)%></b>: <%= @news.summary %><br />
|
||||
<b><%=l(:field_author)%></b>: <%= @news.author.display_name %><br />
|
||||
<b><%=l(:field_created_on)%></b>: <%= format_time(@news.created_on) %>
|
||||
</p>
|
||||
|
||||
<p><em><%= @news.summary %><br />
|
||||
<%= @news.author.display_name %>, <%= format_time(@news.created_on) %></em></p>
|
||||
<br />
|
||||
<%= textilizable auto_link @news.description %>
|
||||
|
||||
<% if authorize_for('news', 'edit') %>
|
||||
<%= start_form_tag ({:controller => 'news', :action => 'edit', :id => @news}, :method => 'get' ) %>
|
||||
<%= submit_tag l(:button_edit) %>
|
||||
<%= end_form_tag %>
|
||||
<% end %>
|
||||
|
||||
<div style="float:right;">
|
||||
<% if authorize_for('news', 'destroy') %>
|
||||
<%= start_form_tag ({:controller => 'news', :action => 'destroy', :id => @news}) %>
|
||||
<%= submit_tag l(:button_delete) %>
|
||||
<%= end_form_tag %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= link_to_if_authorized l(:button_edit), :controller => 'news', :action => 'edit', :id => @news %>
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<b><%= link_to d.title, :controller => 'documents', :action => 'show', :id => d %></b>
|
||||
<br />
|
||||
<%= truncate d.description, 250 %><br />
|
||||
<em><%= format_time(d.created_on) %></em>
|
||||
<em><%= format_time(d.created_on) %></em><br />
|
||||
</li>
|
||||
|
||||
<% end %>
|
||||
|
|
|
@ -2,13 +2,15 @@
|
|||
|
||||
<% if @news.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %>
|
||||
|
||||
<ul>
|
||||
<% for news in @news %>
|
||||
<p>
|
||||
<b><%= news.title %></b> <small>(<%= link_to_user news.author %> <%= format_time(news.created_on) %>)</small><br />
|
||||
<li><%= link_to news.title, :controller => 'news', :action => 'show', :id => news %><br />
|
||||
<% unless news.summary.empty? %><%= news.summary %><br /><% end %>
|
||||
<small>[<%= link_to l(:label_read), :controller => 'news', :action => 'show', :id => news %>]</small>
|
||||
</p>
|
||||
<em><%= news.author.name %>, <%= format_time(news.created_on) %></em><br />
|
||||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
|
||||
|
||||
<%= pagination_links_full @news_pages %>
|
||||
<p>
|
||||
|
|
Loading…
Reference in New Issue