@@ -0,0 +1,19 @@
|
||||
<% if !@issue.blank? && @issue.checklists.any? && User.current.allowed_to?(:view_checklists, @project) %>
|
||||
<hr />
|
||||
<div id="checklist">
|
||||
<div class="contextual">
|
||||
<%= link_to l("label_checklist_hide_closed"), '#', id: 'switch_link' %>
|
||||
</div>
|
||||
<p><strong><%=l(:label_checklist_plural)%></strong></p>
|
||||
|
||||
<ul id="checklist_items">
|
||||
<% @issue.checklists.each do |checklist_item| %>
|
||||
<%= render :partial => 'checklists/checklist_item', :object => checklist_item %>
|
||||
<% end %>
|
||||
</ul>
|
||||
</div>
|
||||
<%= javascript_tag do %>
|
||||
new Redmine.ChecklistToggle('<%= l("label_checklist_show_closed") %>', '<%= l("label_checklist_hide_closed") %>');
|
||||
$("#checklist_items").checklist();
|
||||
<% end %>
|
||||
<% end %>
|
||||
@@ -0,0 +1,26 @@
|
||||
<span class="checklist-item <%= new_or_show(f) %> <%= 'checklist-section' if f.object.is_section %> existing" id="<%= f.object.id %>">
|
||||
<% unless f.object.is_section %>
|
||||
<span class="checklist-show-only checklist-checkbox"><%= f.check_box :is_done %></span>
|
||||
<% end %>
|
||||
|
||||
<span class="checklist-show checklist-subject <%= done_css(f) %>">
|
||||
<%= f.object.subject.to_s.strip.gsub('<', '<').gsub('>', '>').html_safe %>
|
||||
</span>
|
||||
|
||||
<span class="checklist-edit checklist-new checklist-edit-box">
|
||||
<%= text_field_tag nil, f.object.subject, class: 'edit-box' %>
|
||||
<%= f.hidden_field :subject, class: 'checklist-subject-hidden' %>
|
||||
</span>
|
||||
|
||||
<span class="checklist-edit-only checklist-edit-save-button"><%= submit_tag l(:button_save), type: 'button', class: 'item item-save small' %> </span>
|
||||
<span class="checklist-edit-only checklist-edit-reset-button"><% concat l(:button_cancel) %> </span>
|
||||
<span class="checklist-show-only checklist-remove"><%= link_to_remove_checklist_fields "", f, class: 'icon icon-del' %></span>
|
||||
|
||||
<%= f.hidden_field :position, class: 'checklist-item-position' %>
|
||||
<%= f.hidden_field :is_section, class: 'checklist-item-is_section' %>
|
||||
<%= f.hidden_field :id, class: 'checklist-item-id' %>
|
||||
|
||||
<span class="icon icon-add checklist-new-only save-new-by-button"></span>
|
||||
|
||||
<br>
|
||||
</span>
|
||||
@@ -0,0 +1,23 @@
|
||||
<% if User.current.allowed_to?(:edit_checklists, @project, :global => true) %>
|
||||
<div class="tabular">
|
||||
<p id="checklist_form">
|
||||
<label><%=l(:label_checklist_plural)%></label>
|
||||
<% @issue.checklists.build if @issue.checklists.blank? || @issue.checklists.last.subject.present? %>
|
||||
<%= fields_for @issue do |f| -%>
|
||||
<span id="checklist_form_items" data-checklist-fields='<%= checklist_fields(f, :checklists) %>'>
|
||||
<%= f.fields_for :checklists do |builder| %>
|
||||
<%= render :partial => 'checklist_fields', :locals => {:f => builder, :checklist => @checklist} %>
|
||||
<% end %>
|
||||
</span>
|
||||
<% end %>
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<%= javascript_tag do %>
|
||||
<% unless User.current.allowed_to?(:done_checklists, @project) %>
|
||||
$("#checklist_items input").attr("disabled", true);
|
||||
<% end %>
|
||||
|
||||
$("span#checklist_form_items").checklist();
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user