Resourcified documents.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8010 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
1a28bd8e7e
commit
c3c2a4afe0
10 files changed
+59
-63
No files matched your search
@@ -1,19 +1,16 @@
|
||||
<div class="contextual">
|
||||
<%= link_to_if_authorized l(:label_document_new),
|
||||
{:controller => 'documents', :action => 'new', :project_id => @project},
|
||||
:class => 'icon icon-add',
|
||||
:onclick => 'Element.show("add-document"); Form.Element.focus("document_title"); return false;' %>
|
||||
<%= link_to l(:label_document_new), new_project_document_path(@project), :class => 'icon icon-add',
|
||||
:onclick => 'Element.show("add-document"); Form.Element.focus("document_title"); return false;' if User.current.allowed_to?(:manage_documents, @project) %>
|
||||
</div>
|
||||
|
||||
<div id="add-document" style="display:none;">
|
||||
<h2><%=l(:label_document_new)%></h2>
|
||||
<% form_tag({:controller => 'documents', :action => 'new', :project_id => @project}, :class => "tabular", :multipart => true) do %>
|
||||
<%= render :partial => 'documents/form' %>
|
||||
<div class="box">
|
||||
<p><label><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form' %></p>
|
||||
</div>
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-document")' %>
|
||||
<% labelled_form_for @document, :url => project_documents_path(@project), :html => {:multipart => true} do |f| %>
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
<p>
|
||||
<%= submit_tag l(:button_create) %>
|
||||
<%= link_to l(:button_cancel), "#", :onclick => 'Element.hide("add-document")' %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in new issue
Block a user