@@ -21,9 +21,9 | |||||
21 | <ul> |
|
21 | <ul> | |
22 | <% for attachment in @attachments %> |
|
22 | <% for attachment in @attachments %> | |
23 | <li> |
|
23 | <li> | |
24 | <% if authorize_for('documents', 'destroy') %> |
|
24 | <% if authorize_for('documents', 'destroy_attachment') %> | |
25 | <div style="float:right;padding:6px;"> |
|
25 | <div style="float:right;padding:6px;"> | |
26 | <%= start_form_tag({ :controller => 'documents', :action => 'destroy', :id => @document } ) %> |
|
26 | <%= start_form_tag({ :controller => 'documents', :action => 'destroy_attachment', :id => @document, :attachment_id => attachment } ) %> | |
27 | <%= submit_tag l(:button_delete), :class => 'button-small' %> |
|
27 | <%= submit_tag l(:button_delete), :class => 'button-small' %> | |
28 | <%= end_form_tag %> |
|
28 | <%= end_form_tag %> | |
29 | </div> |
|
29 | </div> |
@@ -2,7 +2,7 | |||||
2 | <div class="box"> |
|
2 | <div class="box"> | |
3 | <p><%= f.text_field :title, :required => true, :size => 60 %></p> |
|
3 | <p><%= f.text_field :title, :required => true, :size => 60 %></p> | |
4 | <p><%= f.text_area :summary, :cols => 60, :rows => 2 %></p> |
|
4 | <p><%= f.text_area :summary, :cols => 60, :rows => 2 %></p> | |
5 |
<p><%= f.text_area :description, :required => true, :cols => 60, :rows => 1 |
|
5 | <p><%= f.text_area :description, :required => true, :cols => 60, :rows => 15 %></p> | |
6 | </div> |
|
6 | </div> | |
7 |
|
7 | |||
8 | <% unless $RDM_TEXTILE_DISABLED %> |
|
8 | <% unless $RDM_TEXTILE_DISABLED %> |
@@ -1,21 +1,16 | |||||
1 | <h2><%= @news.title %></h2> |
|
1 | <h2><%= @news.title %></h2> | |
2 |
|
2 | |||
3 | <p> |
|
3 | <p><em><%= @news.summary %><br /> | |
4 | <b><%=l(:field_summary)%></b>: <%= @news.summary %><br /> |
|
4 | <%= @news.author.display_name %>, <%= format_time(@news.created_on) %></em></p> | |
5 | <b><%=l(:field_author)%></b>: <%= @news.author.display_name %><br /> |
|
5 | <br /> | |
6 | <b><%=l(:field_created_on)%></b>: <%= format_time(@news.created_on) %> |
|
|||
7 | </p> |
|
|||
8 |
|
||||
9 | <%= textilizable auto_link @news.description %> |
|
6 | <%= textilizable auto_link @news.description %> | |
10 |
|
7 | |||
11 | <% if authorize_for('news', 'edit') %> |
|
8 | <div style="float:right;"> | |
12 | <%= start_form_tag ({:controller => 'news', :action => 'edit', :id => @news}, :method => 'get' ) %> |
|
|||
13 | <%= submit_tag l(:button_edit) %> |
|
|||
14 | <%= end_form_tag %> |
|
|||
15 | <% end %> |
|
|||
16 |
|
||||
17 | <% if authorize_for('news', 'destroy') %> |
|
9 | <% if authorize_for('news', 'destroy') %> | |
18 | <%= start_form_tag ({:controller => 'news', :action => 'destroy', :id => @news}) %> |
|
10 | <%= start_form_tag ({:controller => 'news', :action => 'destroy', :id => @news}) %> | |
19 | <%= submit_tag l(:button_delete) %> |
|
11 | <%= submit_tag l(:button_delete) %> | |
20 | <%= end_form_tag %> |
|
12 | <%= end_form_tag %> | |
21 | <% end %> |
|
13 | <% end %> | |
|
14 | </div> | |||
|
15 | ||||
|
16 | <%= link_to_if_authorized l(:button_edit), :controller => 'news', :action => 'edit', :id => @news %> |
@@ -11,7 +11,7 | |||||
11 | <b><%= link_to d.title, :controller => 'documents', :action => 'show', :id => d %></b> |
|
11 | <b><%= link_to d.title, :controller => 'documents', :action => 'show', :id => d %></b> | |
12 | <br /> |
|
12 | <br /> | |
13 | <%= truncate d.description, 250 %><br /> |
|
13 | <%= truncate d.description, 250 %><br /> | |
14 | <em><%= format_time(d.created_on) %></em> |
|
14 | <em><%= format_time(d.created_on) %></em><br /> | |
15 | </li> |
|
15 | </li> | |
16 |
|
16 | |||
17 | <% end %> |
|
17 | <% end %> |
@@ -2,13 +2,15 | |||||
2 |
|
2 | |||
3 | <% if @news.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %> |
|
3 | <% if @news.empty? %><p><i><%= l(:label_no_data) %></i></p><% end %> | |
4 |
|
4 | |||
|
5 | <ul> | |||
5 | <% for news in @news %> |
|
6 | <% for news in @news %> | |
6 | <p> |
|
7 | <li><%= link_to news.title, :controller => 'news', :action => 'show', :id => news %><br /> | |
7 | <b><%= news.title %></b> <small>(<%= link_to_user news.author %> <%= format_time(news.created_on) %>)</small><br /> |
|
8 | <% unless news.summary.empty? %><%= news.summary %><br /><% end %> | |
8 | <% unless news.summary.empty? %><%= news.summary %><br /><% end %> |
|
9 | <em><%= news.author.name %>, <%= format_time(news.created_on) %></em><br /> | |
9 | <small>[<%= link_to l(:label_read), :controller => 'news', :action => 'show', :id => news %>]</small> |
|
10 | </li> | |
10 | </p> |
|
|||
11 | <% end %> |
|
11 | <% end %> | |
|
12 | </ul> | |||
|
13 | ||||
12 |
|
14 | |||
13 | <%= pagination_links_full @news_pages %> |
|
15 | <%= pagination_links_full @news_pages %> | |
14 | <p> |
|
16 | <p> |
General Comments 0
You need to be logged in to leave comments.
Login now