Redmine 3.4.4
This commit is contained in:
commit
64924a6376
2112 changed files with 259028 additions and 0 deletions
6
app/views/documents/_document.html.erb
Normal file
6
app/views/documents/_document.html.erb
Normal file
|
@ -0,0 +1,6 @@
|
|||
<h4><%= link_to document.title, document_path(document) %></h4>
|
||||
<p><em><%= format_time(document.updated_on) %></em></p>
|
||||
|
||||
<div class="wiki">
|
||||
<%= textilizable(truncate_lines(document.description), :object => document) %>
|
||||
</div>
|
19
app/views/documents/_form.html.erb
Normal file
19
app/views/documents/_form.html.erb
Normal file
|
@ -0,0 +1,19 @@
|
|||
<%= error_messages_for @document %>
|
||||
|
||||
<div class="box tabular">
|
||||
<p><%= f.select :category_id, DocumentCategory.active.collect {|c| [c.name, c.id]} %></p>
|
||||
<p><%= f.text_field :title, :required => true, :size => 60 %></p>
|
||||
<p><%= f.text_area :description, :cols => 60, :rows => 15, :class => 'wiki-edit' %></p>
|
||||
|
||||
<% @document.custom_field_values.each do |value| %>
|
||||
<p><%= custom_field_tag_with_label :document, value %></p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= wikitoolbar_for 'document_description' %>
|
||||
|
||||
<% if @document.new_record? %>
|
||||
<div class="box tabular">
|
||||
<p><label><%=l(:label_attachment_plural)%></label><%= render :partial => 'attachments/form', :locals => {:container => @document} %></p>
|
||||
</div>
|
||||
<% end %>
|
8
app/views/documents/edit.html.erb
Normal file
8
app/views/documents/edit.html.erb
Normal file
|
@ -0,0 +1,8 @@
|
|||
<h2><%=l(:label_document)%></h2>
|
||||
|
||||
<%= labelled_form_for @document, :html => {:multipart => true} do |f| %>
|
||||
<%= render :partial => 'form', :locals => {:f => f} %>
|
||||
<p><%= submit_tag l(:button_save) %></p>
|
||||
<% end %>
|
||||
|
||||
|
40
app/views/documents/index.html.erb
Normal file
40
app/views/documents/index.html.erb
Normal file
|
@ -0,0 +1,40 @@
|
|||
<div class="contextual">
|
||||
<%= link_to l(:label_document_new), new_project_document_path(@project), :class => 'icon icon-add',
|
||||
:onclick => 'showAndScrollTo("add-document", "document_title"); return false;' if User.current.allowed_to?(:add_documents, @project) %>
|
||||
</div>
|
||||
|
||||
<div id="add-document" style="display:none;">
|
||||
<h2><%=l(:label_document_new)%></h2>
|
||||
<%= 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 => '$("#add-document").hide(); return false;' %>
|
||||
</p>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<h2><%=l(:label_document_plural)%></h2>
|
||||
|
||||
<% if @grouped.empty? %><p class="nodata"><%= l(:label_no_data) %></p><% end %>
|
||||
|
||||
<% @grouped.keys.sort.each do |group| %>
|
||||
<h3><%= group %></h3>
|
||||
<%= render :partial => 'documents/document', :collection => @grouped[group] %>
|
||||
<% end %>
|
||||
|
||||
<% content_for :sidebar do %>
|
||||
<h3><%= l(:label_sort_by, '') %></h3>
|
||||
<ul>
|
||||
<li><%= link_to(l(:field_category), {:sort_by => 'category'},
|
||||
:class => (@sort_by == 'category' ? 'selected' :nil)) %></li>
|
||||
<li><%= link_to(l(:label_date), {:sort_by => 'date'},
|
||||
:class => (@sort_by == 'date' ? 'selected' :nil)) %></li>
|
||||
<li><%= link_to(l(:field_title), {:sort_by => 'title'},
|
||||
:class => (@sort_by == 'title' ? 'selected' :nil)) %></li>
|
||||
<li><%= link_to(l(:field_author), {:sort_by => 'author'},
|
||||
:class => (@sort_by == 'author' ? 'selected' :nil)) %></li>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
<% html_title(l(:label_document_plural)) -%>
|
6
app/views/documents/new.html.erb
Normal file
6
app/views/documents/new.html.erb
Normal file
|
@ -0,0 +1,6 @@
|
|||
<h2><%=l(:label_document_new)%></h2>
|
||||
|
||||
<%= 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) %></p>
|
||||
<% end %>
|
41
app/views/documents/show.html.erb
Normal file
41
app/views/documents/show.html.erb
Normal file
|
@ -0,0 +1,41 @@
|
|||
<div class="contextual">
|
||||
<% if User.current.allowed_to?(:edit_documents, @project) %>
|
||||
<%= link_to l(:button_edit), edit_document_path(@document), :class => 'icon icon-edit', :accesskey => accesskey(:edit) %>
|
||||
<% end %>
|
||||
<% if User.current.allowed_to?(:delete_documents, @project) %>
|
||||
<%= delete_link document_path(@document) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<h2><%= @document.title %></h2>
|
||||
|
||||
<p><em><%= @document.category.name %><br />
|
||||
<%= format_date @document.created_on %></em></p>
|
||||
|
||||
<% if @document.custom_field_values.any? %>
|
||||
<ul>
|
||||
<% render_custom_field_values(@document) do |custom_field, formatted| %>
|
||||
<li><span class="label"><%= custom_field.name %>:</span> <%= formatted %></li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% end %>
|
||||
|
||||
<div class="wiki">
|
||||
<%= textilizable @document, :description, :attachments => @document.attachments %>
|
||||
</div>
|
||||
|
||||
<h3><%= l(:label_attachment_plural) %></h3>
|
||||
<%= link_to_attachments @document, :thumbnails => true %>
|
||||
|
||||
<% if authorize_for('documents', 'add_attachment') %>
|
||||
<p><%= link_to l(:label_attachment_new), {}, :onclick => "$('#add_attachment_form').show(); return false;",
|
||||
:id => 'attach_files_link' %></p>
|
||||
<%= form_tag({ :controller => 'documents', :action => 'add_attachment', :id => @document }, :multipart => true, :id => "add_attachment_form", :style => "display:none;") do %>
|
||||
<div class="box">
|
||||
<p><%= render :partial => 'attachments/form' %></p>
|
||||
</div>
|
||||
<%= submit_tag l(:button_add) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<% html_title @document.title -%>
|
Loading…
Add table
Add a link
Reference in a new issue