ol.breadcrumb.alert-warning li = link_to "Configuration", process_templates_path li = link_to "Template: #{@process_template.title}", process_template_path(@process_template) li.active = "Operation Template: #{@operation_template.title}" = render partial: "application/flash", locals: {notice: notice} .row .col-md-10 .panel .panel-heading h1.panel-title = "Operation: #{@operation_template.title}" .panel-body = form_for [@process_template, @operation_template], url: process_template_operation_template_path, html: {class: "form-horizontal clearfix"} do |f| = render partial: @operation_template.form, locals: {f: f} .form-group = f.label :dependencies, class: "control-label col-sm-2" .col-sm-10 - if @operation_template.other_operations.blank? .checkbox label | There is no other operations in this process template. - @operation_template.other_operations.each_with_index do |depends_on, index| - matched_dependency = @operation_template.dependencies.detect { |d| d['id'] == depends_on.id } .panel.panel-warning .panel-heading .checkbox label = check_box_tag "operation_template[dependencies][#{index}][id]", depends_on.id, matched_dependency.present? strong = depends_on.title .panel-body - depends_on.get_status_values.each do |status| - status_matched = matched_dependency && matched_dependency['statuses'].include?(status[0]) .checkbox-inline label = check_box "operation_template[dependencies][#{index}]", "statuses", {multiple: true, checked: status_matched}, status[0].to_s, nil = status[1] .btn-toolbar.pull-right = link_to 'Back', process_template_operation_templates_path(@process_template), class: "btn btn-default" = f.submit value: 'Save', class: "btn btn-success"