.cpd-statement-activities .row .col-8 .col-2.score %strong= cpd_credits_label .col-2.carry-forward %strong Carry Forward - effective_cpd_categories.each do |category| - statement_activities = cpd_statement.cpd_statement_activities.select { |a| a.cpd_category_id == category.id } - next if statement_activities.blank? - rule = cpd_statement.cpd_cycle.rule_for(category) .statement-activity-category %h3 #{category} %small = cpd_score(cpd_statement.score_per_category[category.id]) - if rule.max_credits_per_cycle.present? = '/' = rule.max_credits_per_cycle .progress.my-2 - valuenow = cpd_statement.score_per_category[category.id] - valuemax = (rule.max_credits_per_cycle || 1) - width = ((valuenow * 100.0) / valuemax) .progress-bar{role: 'progressbar', style: "width: #{width}%", 'aria-valuenow': valuenow, 'aria-valuemin': 0, 'aria-valuemax': valuemax} - statement_activities.each do |statement_activity| .statement-activity.mb-3 .statement-activity-content.row .col-8 = link_to('#', 'data-cpd-edit-activity': true) do = icon('plus-circle', class: 'small-1') = statement_activity.cpd_activity - if statement_activity.is_carry_over? %br %small carried forward from #{statement_activity.original_cycle} .col-2.score - if statement_activity.reduced_messages.present? %span{title: statement_activity.reduced_messages.values.join("\n\n")}= "#{cpd_score(statement_activity.score)} *" - else = cpd_score(statement_activity.score) .col-2.carry-forward = cpd_score(statement_activity.carry_forward) .statement-activity-form.row{style: 'display: none;'} .col .border.px-3 = yield(statement_activity) %hr .row .col-8 %h4 Total #{cpd_credits_label} .col-2.score %h4= cpd_score(cpd_statement.score) .col-2.carry-forward %h4= cpd_score(cpd_statement.carry_forward)