.modal-content.no-shadow #info.col-xs-12.col-sm-12.bg-white.my-tasks-onboard section .col-xs-12.no-padding.col-sm-4.bg-sbar = render 'onboard_sidebar' .col-xs-12.no-padding.col-sm-8 h4.text-center.pt15 My Tasks .vspace10 .row .col-sm-12.mytasks = simple_form_for @user, as: :user, turboboost: true, :url => profile_path(params[:id]), validate: true do |f| = f.fields_for :user_categories, f.object.user_categories.includes(:category) do |uc| .col-sm-12 class="#{'hide' if uc.index != 0} task-#{uc.index}" .fs12.lightgrey.text-center.bold.pb10 | Task span.darkgrey = " #{uc.index + 1}/#{@user.categories.count} #{uc.object.category.name}" .space-10 .panel-group.accordion id="accordion-#{uc.index}" - current_user.courses.includes(:subject).group_by(&:subject_id).each_with_index do |(subject_id, courses), index| .panel.panel-info .panel-heading = link_to "#accordion-#{uc.index}-subject-#{index}", data: {parent: "#accordion-#{uc.index}", toggle: 'collapse'}, class: "#{'collapsed' if index != 0}" do h4.panel-title i.fa.fa-angle-down i.fa.fa-angle-right = courses.first.subject.name.titleize |   span.pull-right = "#{courses.size}" .panel-collapse.collapse id="accordion-#{uc.index}-subject-#{index}" class="#{'in' if index == 0}" .panel-body ul - courses.each do |course| li.li_course i.fa.fa-times-circle.remove.pull-right = course.name = uc.fields_for :user_category_courses, uc.object.find_or_build_user_category_course_for(course) do |ucc| = ucc.input :course_id, as: :hidden = ucc.input :_destroy, as: :hidden, input_html: {value: 0} .vspace10 .text-center - if @user.categories.count == uc.index + 1 button.blue-arrow.btn-link span | Next - else = link_to 'javascript:void(0)', class: 'next-task blue-arrow btn-link', data: {target: uc.index + 1} do span | Next .clearfix