Nuevo plugin Redmine Checklist 3.1.10 light
This commit is contained in:
parent
294bc87e76
commit
ef5521e0a2
65 changed files with 3544 additions and 0 deletions
|
@ -0,0 +1,8 @@
|
|||
<li id="checklist_item_<%= checklist_item.id %>" <%= "class=is-done-checklist-item" if checklist_item.is_done %> >
|
||||
<%= check_box_tag 'checklist_item', "", checklist_item.is_done,
|
||||
:disabled => !User.current.allowed_to?(:done_checklists, checklist_item.issue.project) && !User.current.allowed_to?(:edit_checklists, checklist_item.issue.project),
|
||||
:data_url => url_for( {:controller => "checklists", :action => "done", :id => checklist_item.id} ), :class => 'checklist-checkbox'
|
||||
%>
|
||||
<%= textilizable(checklist_item, :subject).gsub(/<\/?(p|h\d+|li|ul)>/, '').strip.html_safe %>
|
||||
|
||||
</li>
|
|
@ -0,0 +1,4 @@
|
|||
$("#checklist_item_<%= @checklist_item.id %>").toggleClass('is-done-checklist-item');
|
||||
$('#checklist_form .checklist-item#<%= @checklist_item.id %> input[type=checkbox]').trigger('click');
|
||||
$('.issue .attributes table.progress').parent().html('<%= j(progress_bar(@checklist_item.issue.done_ratio, :width => '80px', :legend => "#{@checklist_item.issue.done_ratio}%")) %>');
|
||||
$('#issue_done_ratio').val('<%= @checklist_item.issue.done_ratio %>');
|
|
@ -0,0 +1,14 @@
|
|||
api.array :checklists, api_meta(:total_count => @checklists.size) do
|
||||
@checklists.each do |checklist|
|
||||
api.checklist do
|
||||
api.id checklist.id
|
||||
api.issue_id checklist.issue_id
|
||||
api.subject checklist.subject
|
||||
api.is_done checklist.is_done
|
||||
api.position checklist.position
|
||||
|
||||
api.created_at checklist.created_at
|
||||
api.updated_at checklist.updated_at
|
||||
end
|
||||
end
|
||||
end
|
10
plugins/redmine_checklists/app/views/checklists/show.api.rsb
Normal file
10
plugins/redmine_checklists/app/views/checklists/show.api.rsb
Normal file
|
@ -0,0 +1,10 @@
|
|||
api.checklist do
|
||||
api.id @checklist_item.id
|
||||
api.issue_id @checklist_item.issue_id
|
||||
api.subject @checklist_item.subject
|
||||
api.is_done @checklist_item.is_done
|
||||
api.position @checklist_item.position
|
||||
|
||||
api.created_at @checklist_item.created_at
|
||||
api.updated_at @checklist_item.updated_at
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue