@@ -10,6 +10,20 | |||
|
10 | 10 | <%= text_field 'document', 'title', :size => 60 %></p> |
|
11 | 11 | |
|
12 | 12 | <p><label for="document_description"><%=l(:field_description)%></label> |
|
13 | <%= text_area 'document', 'description', :cols => 60, :rows => 5 %></p> | |
|
13 | <%= text_area 'document', 'description', :cols => 60, :rows => 15 %></p> | |
|
14 | 14 | <!--[eoform:document]--> |
|
15 | 15 | </div> |
|
16 | ||
|
17 | <% unless $RDM_TEXTILE_DISABLED %> | |
|
18 | <%= javascript_include_tag 'jstoolbar' %> | |
|
19 | <script type="text/javascript"> | |
|
20 | //<![CDATA[ | |
|
21 | if (document.getElementById) { | |
|
22 | if (document.getElementById('document_description')) { | |
|
23 | var commentTb = new jsToolBar(document.getElementById('document_description')); | |
|
24 | commentTb.draw(); | |
|
25 | } | |
|
26 | } | |
|
27 | //]]> | |
|
28 | </script> | |
|
29 | <% end %> No newline at end of file |
@@ -1,47 +1,48 | |||
|
1 | 1 | <h2><%= @document.title %></h2> |
|
2 | 2 | |
|
3 | <strong><%=l(:field_description)%>:</strong> <%= @document.description %><br /> | |
|
4 | <strong><%=l(:field_category)%>:</strong> <%= @document.category.name %><br /> | |
|
5 | <br /> | |
|
3 | <p><em><%= @document.category.name %><br /> | |
|
4 | <%= format_date @document.created_on %></em></p> | |
|
5 | <%= textilizable @document.description %> | |
|
6 | 6 | |
|
7 | <% if authorize_for('documents', 'edit') %> | |
|
8 | <%= start_form_tag({ :controller => 'documents', :action => 'edit', :id => @document }, :method => 'get' ) %> | |
|
9 | <%= submit_tag l(:button_edit) %> | |
|
10 | <%= end_form_tag %> | |
|
11 | <% end %> | |
|
12 | 7 | |
|
8 | <table width="100%"> | |
|
9 | <tr><td><%= link_to_if_authorized l(:button_edit), :controller => 'documents', :action => 'edit', :id => @document %></td> | |
|
10 | <td align="right"> | |
|
13 | 11 | <% if authorize_for('documents', 'destroy') %> |
|
14 | 12 | <%= start_form_tag({ :controller => 'documents', :action => 'destroy', :id => @document } ) %> |
|
15 | 13 | <%= submit_tag l(:button_delete) %> |
|
16 | 14 |
<%= end_form_tag %> |
|
17 | 15 | <% end %> |
|
16 | </td></tr> | |
|
17 | </table> | |
|
18 | <br /> | |
|
18 | 19 | |
|
19 | <br /><br /> | |
|
20 | ||
|
21 | <table class="reportTableContent"> | |
|
20 | <h3><%= l(:label_attachment_plural) %></h3> | |
|
21 | <ul> | |
|
22 | 22 | <% for attachment in @attachments %> |
|
23 | <tr class="<%= cycle("odd", "even") %>"> | |
|
24 | <td><%= format_date(attachment.created_on) %></td> | |
|
25 | <td><%= link_to attachment.filename, :action => 'download', :id => @document, :attachment_id => attachment %></td> | |
|
26 | <td align="center"><%= attachment.author.display_name %></td> | |
|
27 | <td><%= human_size(attachment.filesize) %><br /><%= lwr(:label_download, attachment.downloads) %></td> | |
|
28 | ||
|
29 | <% if authorize_for('documents', 'destroy_attachment') %> | |
|
30 | <td align="center"> | |
|
31 | <%= start_form_tag :action => 'destroy_attachment', :id => @document, :attachment_id => attachment %> | |
|
32 | <%= submit_tag l(:button_delete), :class => "button-small" %> | |
|
23 | <li> | |
|
24 | <% if authorize_for('documents', 'destroy') %> | |
|
25 | <div style="float:right;padding:6px;"> | |
|
26 | <%= start_form_tag({ :controller => 'documents', :action => 'destroy', :id => @document } ) %> | |
|
27 | <%= submit_tag l(:button_delete), :class => 'button-small' %> | |
|
33 | 28 | <%= end_form_tag %> |
|
34 | </tr> | |
|
29 | </div> | |
|
35 | 30 | <% end %> |
|
36 | 31 | |
|
32 | <%= link_to attachment.filename, :action => 'download', :id => @document, :attachment_id => attachment %> | |
|
33 | (<%= human_size attachment.filesize %>)<br /> | |
|
34 | <em><%= attachment.author.display_name %>, <%= format_date(attachment.created_on) %></em><br /> | |
|
35 | <%= lwr(:label_download, attachment.downloads) %> | |
|
36 | </li> | |
|
37 | 37 | <% end %> |
|
38 |
</ |
|
|
38 | </ul> | |
|
39 | 39 | <br /> |
|
40 | 40 | |
|
41 | ||
|
41 | 42 | <% if authorize_for('documents', 'add_attachment') %> |
|
42 | 43 | <%= start_form_tag ({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true) %> |
|
43 | <%=l(:label_attachment_new)%><br /><%= file_field 'attachment', 'file' %> | |
|
44 | <label><%=l(:label_attachment_new)%></label> | |
|
45 | <%= file_field 'attachment', 'file' %> | |
|
44 | 46 | <%= submit_tag l(:button_add) %> |
|
45 | 47 | <%= end_form_tag %> |
|
46 | 48 | <% end %> |
|
47 |
@@ -10,8 +10,8 | |||
|
10 | 10 | <li> |
|
11 | 11 | <b><%= link_to d.title, :controller => 'documents', :action => 'show', :id => d %></b> |
|
12 | 12 | <br /> |
|
13 |
<%= |
|
|
14 |
<%= format_time(d.created_on) %> |
|
|
13 | <%= truncate d.description, 250 %><br /> | |
|
14 | <em><%= format_time(d.created_on) %></em> | |
|
15 | 15 | </li> |
|
16 | 16 | |
|
17 | 17 | <% end %> |
General Comments 0
You need to be logged in to leave comments.
Login now