Revision 1298:4f746d8966dd app/views/documents

View differences:

app/views/documents/index.html.erb
1 1
<div class="contextual">
2 2
<%= link_to l(:label_document_new), new_project_document_path(@project), :class => 'icon icon-add',
3
      :onclick => 'showAndScrollTo("add-document", "document_title"); return false;' if User.current.allowed_to?(:manage_documents, @project) %>
3
      :onclick => 'showAndScrollTo("add-document", "document_title"); return false;' if User.current.allowed_to?(:add_documents, @project) %>
4 4
</div>
5 5

  
6 6
<div id="add-document" style="display:none;">
app/views/documents/show.html.erb
1 1
<div class="contextual">
2
<% if User.current.allowed_to?(:manage_documents, @project) %>
2
<% if User.current.allowed_to?(:edit_documents, @project) %>
3 3
<%= link_to l(:button_edit), edit_document_path(@document), :class => 'icon icon-edit', :accesskey => accesskey(:edit) %>
4
<% end %>
5
<% if User.current.allowed_to?(:delete_documents, @project) %>
4 6
<%= delete_link document_path(@document) %>
5 7
<% end %>
6 8
</div>
......
10 12
<p><em><%=h @document.category.name %><br />
11 13
<%= format_date @document.created_on %></em></p>
12 14
<div class="wiki">
13
<%= textilizable @document.description, :attachments => @document.attachments %>
15
<%= textilizable @document, :description, :attachments => @document.attachments %>
14 16
</div>
15 17

  
16 18
<h3><%= l(:label_attachment_plural) %></h3>

Also available in: Unified diff