cirandas.net

ref: master

app/views/tasks/_task.html.erb


<%= render :partial => 'task_icon', :locals => {:task => task} %>
<%= show_time(task.created_at) %>
<%= render :partial => 'task_title', :locals => {:task => task} %> <% if !@view_only && profile.organization? && @responsible_candidates.present? %>
<%= _('Assign to:') %> <% change_responsible_url = url_for :action => :change_responsible, :controller => :tasks %> <%= select_tag "tasks[#{task.id}][responsible]", options_from_collection_for_select(@responsible_candidates, :id, :name, task.responsible.present? ? task.responsible.id : nil), :include_blank => true, :onchange => "change_task_responsible(this);", 'data-old-responsible' => task.responsible.present? ? task.responsible.id : nil, 'data-task' => task.id, 'data-url' => change_responsible_url %>
<% end %> <% if @view_only && task.responsible.present? %>
<%= _('Assigned to:') %> <%= task.responsible.name %>
<% end %>
<% unless @view_only %> <%= labelled_radio_button(_("Accept"), "tasks[#{task.id}][decision]", 'finish', task.default_decision == 'accept', :id => "decision-finish-#{task.id}", :class => 'task_accept_radio', :disabled => task.accept_disabled?, :task_id => "#{task.id}") + labelled_radio_button(_("Reject"), "tasks[#{task.id}][decision]", 'cancel', task.default_decision == 'reject', :id => "decision-cancel-#{task.id}", :class => 'task_reject_radio', :disabled => task.reject_disabled?, :task_id => "#{task.id}") + labelled_radio_button(_("Skip"), "tasks[#{task.id}][decision]", 'skip', task.default_decision == 'skip', :id => "decision-skip-#{task.id}", :class => 'task_skip_radio', :disabled => task.skip_disabled?, :task_id => "#{task.id}") %> <% end %>
<%= task_information(task, params) %>
<%= fields_for "tasks[#{task.id}][task]", task do |f| %> <% if task.custom_fields_moderate %> <% end %> <% if task.accept_details %> <% end %> <% if task.reject_details %> <% end %> <% end %> <% if task.footer %> <% end %>