effective_cpd 1.2.3 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +8 -0
- data/app/controllers/admin/cpd_audits_controller.rb +4 -4
- data/app/controllers/admin/cpd_statement_activities_controller.rb +3 -5
- data/app/controllers/admin/cpd_statements_controller.rb +0 -2
- data/app/controllers/effective/cpd_audits_controller.rb +1 -1
- data/app/datatables/admin/effective_cpd_audit_reviews_datatable.rb +6 -6
- data/app/datatables/admin/effective_cpd_audits_datatable.rb +10 -10
- data/app/datatables/admin/effective_cpd_bulk_audits_datatable.rb +3 -4
- data/app/datatables/admin/effective_cpd_rules_datatable.rb +4 -4
- data/app/datatables/admin/effective_cpd_special_rules_datatable.rb +2 -2
- data/app/datatables/admin/effective_cpd_statement_activities_datatable.rb +3 -3
- data/app/datatables/admin/effective_cpd_statements_datatable.rb +1 -1
- data/app/datatables/effective_cpd_available_audit_reviews_datatable.rb +2 -2
- data/app/datatables/effective_cpd_available_audits_datatable.rb +1 -1
- data/app/datatables/effective_cpd_available_cycles_datatable.rb +1 -1
- data/app/datatables/effective_cpd_completed_audit_reviews_datatable.rb +3 -3
- data/app/datatables/effective_cpd_completed_audits_datatable.rb +2 -2
- data/app/datatables/effective_cpd_completed_statements_datatable.rb +3 -3
- data/app/helpers/effective_cpd_audits_helper.rb +1 -2
- data/app/helpers/effective_cpd_helper.rb +58 -6
- data/app/models/concerns/effective_cpd_audit.rb +27 -19
- data/app/models/concerns/effective_cpd_audit_level.rb +1 -1
- data/app/models/concerns/effective_cpd_audit_review.rb +1 -1
- data/app/models/concerns/effective_cpd_bulk_audit.rb +1 -1
- data/app/models/concerns/effective_cpd_statement.rb +1 -1
- data/app/models/effective/cpd_activity.rb +1 -1
- data/app/models/effective/cpd_audit_level_question.rb +1 -1
- data/app/models/effective/cpd_audit_level_question_option.rb +1 -1
- data/app/models/effective/cpd_audit_level_section.rb +1 -1
- data/app/models/effective/cpd_audit_response.rb +1 -1
- data/app/models/effective/cpd_audit_review_item.rb +1 -1
- data/app/models/effective/cpd_category.rb +1 -1
- data/app/models/effective/cpd_cycle.rb +1 -1
- data/app/models/effective/cpd_special_rule.rb +1 -1
- data/app/models/effective/cpd_statement_activity.rb +1 -1
- data/app/views/admin/cpd_activities/_form.html.haml +1 -1
- data/app/views/admin/cpd_audit_level_questions/_form.html.haml +1 -1
- data/app/views/admin/cpd_audit_levels/_form.html.haml +4 -4
- data/app/views/admin/cpd_audit_levels/_form_content_audit.html.haml +1 -1
- data/app/views/admin/cpd_audit_levels/_form_content_audit_review.html.haml +1 -1
- data/app/views/admin/cpd_audit_levels/_form_cpd_audit_level.html.haml +25 -18
- data/app/views/admin/cpd_audit_levels/_form_cpd_audit_level_section.html.haml +1 -1
- data/app/views/admin/cpd_audit_reviews/_form.html.haml +2 -2
- data/app/views/admin/cpd_audits/_audit_reviewer_fields.html.haml +1 -1
- data/app/views/admin/cpd_audits/_auditee_fields.html.haml +2 -2
- data/app/views/admin/cpd_audits/_form_chat.html.haml +2 -2
- data/app/views/admin/cpd_audits/_form_close.html.haml +2 -2
- data/app/views/admin/cpd_audits/_form_complete.html.haml +4 -4
- data/app/views/admin/cpd_audits/_form_conflict.html.haml +5 -5
- data/app/views/admin/cpd_audits/_form_cpd_audit.html.haml +6 -6
- data/app/views/admin/cpd_audits/_form_deadlines.html.haml +2 -2
- data/app/views/admin/cpd_audits/_form_exemption.html.haml +2 -2
- data/app/views/admin/cpd_audits/_form_extension.html.haml +2 -2
- data/app/views/admin/cpd_audits/_form_files.html.haml +1 -1
- data/app/views/admin/cpd_audits/_form_missing_info.html.haml +1 -1
- data/app/views/admin/cpd_audits/_form_new.html.haml +10 -12
- data/app/views/admin/cpd_audits/_form_process.html.haml +1 -1
- data/app/views/admin/cpd_audits/_status.html.haml +7 -10
- data/app/views/admin/cpd_bulk_audits/_form_cpd_bulk_audit.html.haml +6 -6
- data/app/views/admin/cpd_categories/_form.html.haml +2 -2
- data/app/views/admin/cpd_cycles/_form_cpd_cycle.html.haml +5 -5
- data/app/views/admin/cpd_special_rules/_form.html.haml +2 -2
- data/app/views/admin/cpd_statements/_cpd_statement.html.haml +2 -2
- data/app/views/admin/users/_form_cpd.html.haml +2 -2
- data/app/views/admin/users/_form_cpd_audits.html.haml +4 -4
- data/app/views/effective/cpd/_dashboard.html.haml +10 -10
- data/app/views/effective/cpd_audit_reviews/_cpd_audit_level_section.html.haml +1 -1
- data/app/views/effective/cpd_audit_reviews/_summary.html.haml +3 -3
- data/app/views/effective/cpd_audit_reviews/conflict.html.haml +1 -1
- data/app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml +1 -1
- data/app/views/effective/cpd_audit_reviews/cpd_statement.html.haml +1 -1
- data/app/views/effective/cpd_audit_reviews/feedback.html.haml +3 -3
- data/app/views/effective/cpd_audit_reviews/files.html.haml +2 -2
- data/app/views/effective/cpd_audit_reviews/instructions.html.haml +1 -1
- data/app/views/effective/cpd_audit_reviews/questionnaire.html.haml +1 -1
- data/app/views/effective/cpd_audit_reviews/recommendation.html.haml +3 -3
- data/app/views/effective/cpd_audit_reviews/start.html.haml +4 -4
- data/app/views/effective/cpd_audit_reviews/statements.html.haml +6 -6
- data/app/views/effective/cpd_audit_reviews/submit.html.haml +1 -1
- data/app/views/effective/cpd_audit_reviews/submitted.html.haml +3 -3
- data/app/views/effective/cpd_audit_reviews/waiting.html.haml +1 -1
- data/app/views/effective/cpd_audits/_missing_info.html.haml +3 -3
- data/app/views/effective/cpd_audits/_summary.html.haml +2 -2
- data/app/views/effective/cpd_audits/conflict.html.haml +2 -2
- data/app/views/effective/cpd_audits/start.html.haml +2 -2
- data/app/views/effective/cpd_audits/submit.html.haml +3 -3
- data/app/views/effective/cpd_audits/submitted.haml +4 -4
- data/app/views/effective/cpd_audits/waiting.html.haml +1 -1
- data/app/views/effective/cpd_statements/_activities_new.html.haml +1 -1
- data/app/views/effective/cpd_statements/_activities_table.html.haml +2 -2
- data/app/views/effective/cpd_statements/_summary.html.haml +1 -1
- data/app/views/effective/cpd_statements/agreements.html.haml +1 -1
- data/app/views/effective/cpd_statements/submit.html.haml +1 -1
- data/config/effective_cpd.rb +0 -5
- data/config/locales/effective_cpd.en.yml +28 -0
- data/config/routes.rb +1 -1
- data/lib/effective_cpd/version.rb +1 -1
- data/lib/effective_cpd.rb +1 -1
- data/lib/generators/effective_cpd/install_generator.rb +4 -0
- data/lib/tasks/effective_cpd_tasks.rake +23 -1
- metadata +3 -2
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
- if inline_datatable?
|
|
3
3
|
= f.hidden_field :cpd_cycle_id
|
|
4
4
|
- else
|
|
5
|
-
= f.select :cpd_cycle_id, Effective::CpdCycle.sorted.all, label: cpd_cycle_label
|
|
5
|
+
= f.select :cpd_cycle_id, Effective::CpdCycle.sorted.all, label: cpd_cycle_label
|
|
6
6
|
|
|
7
7
|
= f.select :category, Effective::CpdSpecialRule::CATEGORIES
|
|
8
8
|
|
|
9
9
|
= f.show_if :category, 'cumulative max credits' do
|
|
10
|
-
= f.number_field :max_credits_per_cycle, label: "Cumulative max
|
|
10
|
+
= f.number_field :max_credits_per_cycle, label: "Cumulative max #{cpd_credits_label} per #{cpd_cycle_label}",
|
|
11
11
|
hint: "The cumulative max #{cpd_credits_label} per #{cpd_cycle_label} that can be earned between the following categories."
|
|
12
12
|
|
|
13
13
|
- cpd_category_rules = cpd_special_rule.cpd_cycle.cpd_rules.select(&:category?)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
= tabs do
|
|
2
|
-
= tab
|
|
2
|
+
= tab(cpd_statement) do
|
|
3
3
|
= render('effective/cpd_statements/cpd_statement', cpd_statement: cpd_statement)
|
|
4
4
|
|
|
5
5
|
- if cpd_statement.persisted? && cpd_statement.respond_to?(:log_changes_datatable)
|
|
6
6
|
= tab 'Logs' do
|
|
7
|
-
= render_inline_datatable(cpd_statement.
|
|
7
|
+
= render_inline_datatable(cpd_statement.logs_datatable)
|
|
@@ -10,13 +10,13 @@
|
|
|
10
10
|
|
|
11
11
|
%hr
|
|
12
12
|
|
|
13
|
-
%h2
|
|
13
|
+
%h2 #{cpd_audits_label}
|
|
14
14
|
- datatable = Admin::EffectiveCpdAuditsDatatable.new(user: user)
|
|
15
15
|
= render_datatable(datatable)
|
|
16
16
|
|
|
17
17
|
- if user.try(:cpd_audit_reviewer?)
|
|
18
18
|
%hr
|
|
19
19
|
|
|
20
|
-
%h2
|
|
20
|
+
%h2 #{cpd_audit_reviews_label}
|
|
21
21
|
- datatable = Admin::EffectiveCpdAuditReviewsDatatable.new(user: user)
|
|
22
22
|
= render_datatable(datatable)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
- if user.try(:cpd_audit_reviewer?)
|
|
2
|
-
%h2
|
|
3
|
-
- datatable = Admin::EffectiveCpdAuditReviewsDatatable.new(user: user)
|
|
2
|
+
%h2 #{cpd_audit_reviews_label}
|
|
3
|
+
- datatable = EffectiveResources.best('Admin::EffectiveCpdAuditReviewsDatatable').new(user: user)
|
|
4
4
|
= render_datatable(datatable)
|
|
5
5
|
- else
|
|
6
|
-
%h2
|
|
7
|
-
- datatable = Admin::EffectiveCpdAuditsDatatable.new(user: user)
|
|
6
|
+
%h2 #{cpd_audits_label}
|
|
7
|
+
- datatable = EffectiveResources.best('Admin::EffectiveCpdAuditsDatatable').new(user: user)
|
|
8
8
|
= render_datatable(datatable)
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
%h2
|
|
1
|
+
%h2 #{cpd_name_label}
|
|
2
2
|
|
|
3
3
|
- # In progress
|
|
4
4
|
- cpd_audit = current_user.cpd_audits.in_progress.first
|
|
5
5
|
|
|
6
6
|
- if cpd_audit.present? && cpd_audit.in_progress?
|
|
7
|
-
%p Your
|
|
7
|
+
%p Your #{cpd_audit_label} is in progress.
|
|
8
8
|
|
|
9
9
|
%p
|
|
10
10
|
Please
|
|
11
|
-
= link_to("Continue
|
|
11
|
+
= link_to("Continue #{cpd_audit_label}", effective_cpd.cpd_audit_build_path(cpd_audit, cpd_audit.next_step), 'data-turbolinks' => false, class: 'btn btn-primary')
|
|
12
12
|
to continue.
|
|
13
13
|
|
|
14
14
|
%hr
|
|
@@ -17,19 +17,19 @@
|
|
|
17
17
|
- auditing = EffectiveCpdAvailableAuditsDatatable.new(self)
|
|
18
18
|
- if auditing.present?
|
|
19
19
|
.mt-4
|
|
20
|
-
%p You have been selected
|
|
20
|
+
%p You have been selected to submit a #{cpd_audit_label}:
|
|
21
21
|
= render_datatable(auditing, simple: true)
|
|
22
22
|
|
|
23
23
|
- audited = EffectiveCpdCompletedAuditsDatatable.new(self)
|
|
24
24
|
- if audited.present?
|
|
25
25
|
.mt-4
|
|
26
|
-
%p You have completed these past
|
|
26
|
+
%p You have completed these past #{cpd_audits_label}:
|
|
27
27
|
= render_datatable(audited, simple: true)
|
|
28
28
|
|
|
29
29
|
- available = EffectiveCpdAvailableCyclesDatatable.new(self)
|
|
30
30
|
- if available.present?
|
|
31
31
|
.mt-4
|
|
32
|
-
%p Please submit a
|
|
32
|
+
%p Please submit a #{cpd_statement_label} for the following available #{cpd_cycles_label}:
|
|
33
33
|
= render_datatable(available, simple: true)
|
|
34
34
|
- elsif current_user.try(:cpd_audit_cpd_required?)
|
|
35
35
|
%p There are no #{cpd_cycles_label} available to submit. When there are, we'll show them here.
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
- completed = EffectiveCpdCompletedStatementsDatatable.new(self)
|
|
38
38
|
- if completed.present?
|
|
39
39
|
.mt-4
|
|
40
|
-
%p You have completed these past
|
|
40
|
+
%p You have completed these past #{cpd_statements_label}:
|
|
41
41
|
= render_datatable(completed, simple: true)
|
|
42
42
|
|
|
43
43
|
- unless current_user.try(:cpd_audit_reviewer?)
|
|
@@ -49,13 +49,13 @@
|
|
|
49
49
|
- reviewing = EffectiveCpdAvailableAuditReviewsDatatable.new(self)
|
|
50
50
|
- if reviewing.present?
|
|
51
51
|
.mt-4
|
|
52
|
-
%p You have been selected to
|
|
52
|
+
%p You have been selected to review the following #{cpd_audits_label}:
|
|
53
53
|
= render_datatable(reviewing, simple: true)
|
|
54
54
|
- else
|
|
55
|
-
%p There are no
|
|
55
|
+
%p There are no #{cpd_audits_label} available to review. When there are, we'll show them here.
|
|
56
56
|
|
|
57
57
|
- reviewed = EffectiveCpdCompletedAuditReviewsDatatable.new(self)
|
|
58
58
|
- if reviewed.present?
|
|
59
59
|
.mt-4
|
|
60
|
-
%p You have completed these past
|
|
60
|
+
%p You have completed these past #{cpd_audit_reviews_label}:
|
|
61
61
|
= render_datatable(reviewed, simple: true)
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
.mb-3= render('effective/cpd_audit_level_questions/cpd_audit_level_question', cpd_audit_level_question: cpd_audit_level_question)
|
|
16
16
|
|
|
17
17
|
%p
|
|
18
|
-
%strong
|
|
18
|
+
%strong #{cpd_auditee_label} Response:
|
|
19
19
|
|
|
20
20
|
.mb-3= render('effective/cpd_audit_responses/cpd_audit_response', cpd_audit_response: cpd_audit_response)
|
|
21
21
|
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
%tbody
|
|
6
6
|
- if request.path.start_with?('/admin')
|
|
7
7
|
%tr
|
|
8
|
-
%th
|
|
8
|
+
%th #{cpd_audit_label}
|
|
9
9
|
%td
|
|
10
10
|
= link_to(cpd_audit, effective_cpd.edit_admin_cpd_audit_path(cpd_audit), target: '_blank')
|
|
11
11
|
|
|
12
12
|
%tr
|
|
13
|
-
%th
|
|
13
|
+
%th #{cpd_reviewer_label}
|
|
14
14
|
%td
|
|
15
15
|
- if cpd_audit_review.anonymous?
|
|
16
16
|
%p= cpd_audit_review.anonymous_name
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
%small= mail_to cpd_audit_review.user.email
|
|
30
30
|
|
|
31
31
|
%tr
|
|
32
|
-
%th
|
|
32
|
+
%th #{cpd_auditee_label}
|
|
33
33
|
%td
|
|
34
34
|
- if cpd_audit.anonymous?
|
|
35
35
|
%p= cpd_audit.anonymous_name
|
|
@@ -20,6 +20,6 @@
|
|
|
20
20
|
= f.text_area :conflict_of_interest_reason, required: true
|
|
21
21
|
|
|
22
22
|
%hr
|
|
23
|
-
= f.text_area :comments,
|
|
23
|
+
= f.text_area :comments, hint: "Not displayed to the #{cpd_auditee_label}"
|
|
24
24
|
|
|
25
25
|
= f.submit 'Save and Continue', center: true
|
|
@@ -38,6 +38,6 @@
|
|
|
38
38
|
.mb-2= cpd_audit_level_section.bottom_content.to_s
|
|
39
39
|
|
|
40
40
|
%hr
|
|
41
|
-
= f.text_area :comments,
|
|
41
|
+
= f.text_area :comments, hint: "Not displayed to the #{cpd_auditee_label}"
|
|
42
42
|
|
|
43
43
|
= f.submit 'Save and Continue', center: true
|
|
@@ -30,6 +30,6 @@
|
|
|
30
30
|
= render('/effective/cpd_audit_review_items/fields', f: fi, cpd_audit_review: resource)
|
|
31
31
|
|
|
32
32
|
%hr
|
|
33
|
-
= f.text_area :comments,
|
|
33
|
+
= f.text_area :comments, hint: "Not displayed to the #{cpd_auditee_label}"
|
|
34
34
|
|
|
35
35
|
= f.submit 'Save and Continue', center: true
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
= render('layout') do
|
|
2
2
|
.mb-3
|
|
3
|
-
= collapse(
|
|
3
|
+
= collapse("Show #{cpd_audit_label}...", card_class: '') do
|
|
4
4
|
.mt-4= render('effective/cpd_audits/cpd_audit', cpd_audit: resource.cpd_audit)
|
|
5
5
|
|
|
6
6
|
%p Please provide any final feedback for #{resource.cpd_audit.name}:
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
|
9
9
|
= f.hidden_field :current_step
|
|
10
10
|
|
|
11
|
-
= f.text_area :feedback, label:
|
|
11
|
+
= f.text_area :feedback, label: "Feedback for the #{cpd_auditee_label}"
|
|
12
12
|
|
|
13
13
|
%hr
|
|
14
|
-
= f.text_area :comments,
|
|
14
|
+
= f.text_area :comments, hint: "Not displayed to the #{cpd_auditee_label}"
|
|
15
15
|
|
|
16
16
|
= f.submit 'Save and Continue', center: true
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
= f.hidden_field :current_step
|
|
4
4
|
|
|
5
5
|
%p
|
|
6
|
-
The
|
|
6
|
+
The #{cpd_auditee_label} attached the following files:
|
|
7
7
|
- if resource.cpd_audit.files.blank?
|
|
8
8
|
None
|
|
9
9
|
|
|
@@ -12,6 +12,6 @@
|
|
|
12
12
|
%li= link_to(file.filename, url_for(file), target: '_blank')
|
|
13
13
|
|
|
14
14
|
%hr
|
|
15
|
-
= f.text_area :comments,
|
|
15
|
+
= f.text_area :comments, hint: "Not displayed to the #{cpd_auditee_label}"
|
|
16
16
|
|
|
17
17
|
= f.submit 'Save and Continue', center: true
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
%hr
|
|
6
6
|
|
|
7
7
|
%p The following rolling notes will be displayed for your use on each step.
|
|
8
|
-
= f.text_area :comments,
|
|
8
|
+
= f.text_area :comments, hint: "Not displayed to the #{cpd_auditee_label}"
|
|
9
9
|
|
|
10
10
|
= f.submit 'Save and Continue', center: true
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
= render('layout') do
|
|
2
2
|
.mb-3
|
|
3
|
-
= collapse(
|
|
3
|
+
= collapse("Show #{cpd_audit_label}...", card_class: '') do
|
|
4
4
|
.mt-4= render('effective/cpd_audits/cpd_audit', cpd_audit: resource.cpd_audit)
|
|
5
5
|
|
|
6
6
|
%p Please provide your final recommendation on #{resource.cpd_audit.name}:
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
|
9
9
|
= f.hidden_field :current_step
|
|
10
10
|
|
|
11
|
-
= f.text_area :feedback, label:
|
|
11
|
+
= f.text_area :feedback, label: "Feedback for the #{cpd_auditee_label}"
|
|
12
12
|
|
|
13
13
|
- recommendations = resource.cpd_audit_level.recommendations
|
|
14
14
|
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
= f.radios :recommendation, recommendations, inline: true
|
|
19
19
|
|
|
20
20
|
%hr
|
|
21
|
-
= f.text_area :comments,
|
|
21
|
+
= f.text_area :comments, hint: "Not displayed to the #{cpd_auditee_label}"
|
|
22
22
|
|
|
23
23
|
= f.submit 'Save and Continue', center: true
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
= render('layout') do
|
|
2
|
-
%p You have been selected to
|
|
2
|
+
%p You have been selected to review #{resource}.
|
|
3
3
|
|
|
4
4
|
- if resource.cpd_audit_level.anonymous?
|
|
5
|
-
%p This is an anonymous
|
|
6
|
-
%p You have been matched with the
|
|
5
|
+
%p This is an anonymous #{cpd_audit_label}, and you have been assigned the name #{resource.name}.
|
|
6
|
+
%p You have been matched with the #{cpd_auditee_label}, #{resource.cpd_audit.name}.
|
|
7
7
|
|
|
8
8
|
- else
|
|
9
|
-
%p You have been matched with the
|
|
9
|
+
%p You have been matched with the #{cpd_auditee_label}:
|
|
10
10
|
|
|
11
11
|
%ul
|
|
12
12
|
%li #{resource.cpd_audit.user} <#{mail_to(resource.cpd_audit.user.email)}>
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
= render('layout') do
|
|
2
2
|
- cpd_audit = resource.cpd_audit
|
|
3
3
|
|
|
4
|
-
%p #{cpd_audit.name} has submitted the following
|
|
4
|
+
%p #{cpd_audit.name} has submitted the following #{cpd_statements_label}:
|
|
5
5
|
|
|
6
6
|
- datatable = EffectiveCpdCompletedStatementsDatatable.new(user: cpd_audit.user, actions: false)
|
|
7
7
|
|
|
8
8
|
- if datatable.blank?(self)
|
|
9
9
|
%p
|
|
10
|
-
%strong There are no completed
|
|
10
|
+
%strong There are no completed #{cpd_statements_label} from #{cpd_audit.name}.
|
|
11
11
|
- else
|
|
12
12
|
= render_datatable(datatable, simple: true)
|
|
13
13
|
|
|
14
|
-
%h2 All
|
|
15
|
-
%p Click to expand
|
|
14
|
+
%h2 All #{cpd_statements_label}
|
|
15
|
+
%p Click to expand
|
|
16
16
|
|
|
17
17
|
- datatable.collection.sorted.each do |cpd_statement|
|
|
18
18
|
.mb-3
|
|
19
|
-
= collapse("#{cpd_statement.to_s}...", card_class: 'mb-3') do
|
|
19
|
+
= collapse("Show #{cpd_statement.to_s}...", card_class: 'mb-3') do
|
|
20
20
|
= render('effective/cpd_statements/cpd_statement', cpd_statement: cpd_statement)
|
|
21
21
|
|
|
22
22
|
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
|
23
23
|
= f.hidden_field :current_step
|
|
24
24
|
|
|
25
25
|
%hr
|
|
26
|
-
= f.text_area :comments,
|
|
26
|
+
= f.text_area :comments, hint: "Not displayed to the #{cpd_auditee_label}"
|
|
27
27
|
|
|
28
28
|
= f.submit 'Save and Continue', center: true
|
|
@@ -11,4 +11,4 @@
|
|
|
11
11
|
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
|
12
12
|
= f.hidden_field :current_step
|
|
13
13
|
|
|
14
|
-
= f.submit
|
|
14
|
+
= f.submit "Submit #{cpd_audit_review_label}", center: true, 'data-confirm': "Really Submit #{cpd_audit_review_label}?"
|
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
|
|
4
4
|
- if resource.completed?
|
|
5
5
|
.alert.alert-success.mb-4
|
|
6
|
-
This
|
|
6
|
+
This #{cpd_audit_review_label} was submitted on #{resource.submitted_at.strftime('%F')}
|
|
7
7
|
|
|
8
8
|
%p Thank you for your review.
|
|
9
9
|
|
|
10
10
|
= render 'effective/cpd_audit_reviews/summary', cpd_audit_review: resource
|
|
11
11
|
|
|
12
12
|
.mb-4
|
|
13
|
-
= collapse(
|
|
13
|
+
= collapse("Show #{cpd_audit_review_label}...", card_class: 'my-2') do
|
|
14
14
|
= render('effective/cpd_audit_reviews/cpd_audit_review', cpd_audit_review: resource)
|
|
15
15
|
|
|
16
16
|
.mb-4
|
|
17
|
-
= collapse(
|
|
17
|
+
= collapse("Show #{cpd_audit_label}...", card_class: 'my-2') do
|
|
18
18
|
= render 'effective/cpd_audits/cpd_audit', cpd_audit: resource.cpd_audit
|
|
19
19
|
|
|
20
20
|
= link_to "Return to Dashboard", return_to_dashboard_path, class: 'btn btn-lg btn-primary btn-block'
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
%p
|
|
7
7
|
Please revisit each wizard step and
|
|
8
8
|
= link_to 'Complete all missing information', wizard_path(:instructions), class: 'btn btn-primary'
|
|
9
|
-
for this
|
|
9
|
+
for this #{cpd_audit_label}.
|
|
10
10
|
|
|
11
11
|
%p
|
|
12
|
-
Once you're ready, click below to re-submit your
|
|
12
|
+
Once you're ready, click below to re-submit your #{cpd_audit_label} with the updated information.
|
|
13
13
|
|
|
14
14
|
%p
|
|
15
15
|
= effective_form_with(model: resource, url: wizard_path(step), method: :put) do |f|
|
|
16
16
|
= f.hidden_field :id
|
|
17
17
|
|
|
18
18
|
- # If you change this label, update EffectiveMemberships ApplicantsController
|
|
19
|
-
= f.save 'Resubmit
|
|
19
|
+
= f.save 'Resubmit', 'data-confirm': "Really re-submit #{cpd_audit_label}?", class: 'btn-sm'
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
%table.table
|
|
3
3
|
%tbody
|
|
4
4
|
%tr
|
|
5
|
-
%th
|
|
5
|
+
%th #{cpd_auditee_label}
|
|
6
6
|
%td
|
|
7
7
|
- if cpd_audit.anonymous?
|
|
8
8
|
%p= cpd_audit.anonymous_name
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
%small= mail_to cpd_audit.user.email
|
|
22
22
|
|
|
23
23
|
%tr
|
|
24
|
-
%th
|
|
24
|
+
%th #{cpd_reviewer_label}
|
|
25
25
|
%td
|
|
26
26
|
- cpd_audit.cpd_audit_reviews.each do |cpd_audit_review|
|
|
27
27
|
- if cpd_audit_review.anonymous?
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
= render('layout') do
|
|
2
|
-
%p You have been selected for #{resource.cpd_audit_level}
|
|
2
|
+
%p You have been selected for #{resource.cpd_audit_level} #{cpd_audit_label} and matched with:
|
|
3
3
|
|
|
4
4
|
%ul
|
|
5
5
|
- resource.cpd_audit_reviews.each do |cpd_audit_review|
|
|
@@ -24,6 +24,6 @@
|
|
|
24
24
|
= f.show_if :conflict_of_interest, false do
|
|
25
25
|
= f.hidden_field :conflict_of_interest_reason, value: ''
|
|
26
26
|
|
|
27
|
-
%p A new
|
|
27
|
+
%p A new #{cpd_reviewer_label} will be selected if there is a conflict of interest.
|
|
28
28
|
|
|
29
29
|
= f.submit 'Save and Continue', center: true
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
= render('layout') do
|
|
2
|
-
%p You have been selected for #{resource.cpd_audit_level}
|
|
2
|
+
%p You have been selected for #{resource.cpd_audit_level} #{cpd_audit_label}.
|
|
3
3
|
|
|
4
4
|
- if resource.cpd_audit_level.anonymous?
|
|
5
|
-
%p This is an anonymous
|
|
5
|
+
%p This is an anonymous #{cpd_audit_label}, and you have been assigned the name #{resource.name}
|
|
6
6
|
|
|
7
7
|
- if resource.cpd_audit_level.anonymous? == false
|
|
8
8
|
%p You have been matched with:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
= render('layout') do
|
|
2
2
|
%p
|
|
3
|
-
Please review your
|
|
3
|
+
Please review your #{cpd_audit_label} before submitting.
|
|
4
4
|
|
|
5
5
|
%p
|
|
6
6
|
Once submitted you
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
= f.hidden_field :current_step
|
|
14
14
|
|
|
15
15
|
- if EffectiveResources.authorized?(self, :resubmit, resource)
|
|
16
|
-
= f.submit 'Resubmit
|
|
16
|
+
= f.submit 'Resubmit', center: true, 'data-confirm': "Really Resubmit #{cpd_audit_label}?"
|
|
17
17
|
- else
|
|
18
|
-
= f.submit 'Submit
|
|
18
|
+
= f.submit 'Submit', center: true, 'data-confirm': "Really Submit #{cpd_audit_label}?"
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
- if resource.was_submitted?
|
|
5
5
|
.alert.alert-success.mb-4
|
|
6
|
-
This
|
|
6
|
+
This #{cpd_audit_label} was submitted on #{resource.submitted_at.strftime('%F')}
|
|
7
7
|
|
|
8
8
|
- if resource.missing_info?
|
|
9
9
|
= card do
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
|
|
12
12
|
- if resource.was_submitted?
|
|
13
13
|
%p
|
|
14
|
-
The following
|
|
14
|
+
The following #{cpd_audit_label} was successfully submitted at
|
|
15
15
|
= succeed('.') do
|
|
16
16
|
= resource.submitted_at.strftime('%F')
|
|
17
17
|
|
|
18
18
|
- unless resource.determination.present?
|
|
19
|
-
Your
|
|
19
|
+
Your #{cpd_audit_label} must be reviewed and a final determination made.
|
|
20
20
|
We will send
|
|
21
21
|
%strong= resource.user.email
|
|
22
22
|
an email notifying you of the determination.
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
= render 'effective/cpd_audits/summary', cpd_audit: resource
|
|
25
25
|
|
|
26
26
|
.mb-4
|
|
27
|
-
= collapse(
|
|
27
|
+
= collapse("Show #{cpd_audit_label}...", card_class: 'my-2') do
|
|
28
28
|
= render 'effective/cpd_audits/cpd_audit', cpd_audit: resource
|
|
29
29
|
|
|
30
30
|
= link_to "Return to Dashboard", return_to_dashboard_path, class: 'btn btn-lg btn-primary btn-block'
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
- if resource.exemption_request?
|
|
13
13
|
%h2 Exemption Request
|
|
14
|
-
%p You have requested an exemption
|
|
14
|
+
%p You have requested an exemption.
|
|
15
15
|
= render("effective/cpd_audits/exemption", cpd_audit: resource, step: :exemption)
|
|
16
16
|
|
|
17
17
|
- if resource.extension_request?
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
.row
|
|
3
3
|
.col-8
|
|
4
4
|
.col-2.score
|
|
5
|
-
%strong= cpd_credits_label
|
|
5
|
+
%strong= cpd_credits_label
|
|
6
6
|
.col-2.carry-forward
|
|
7
7
|
%strong Carry Forward
|
|
8
8
|
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
|
|
58
58
|
.row
|
|
59
59
|
.col-8
|
|
60
|
-
%h4 Total #{cpd_credits_label}
|
|
60
|
+
%h4 Total #{cpd_credits_label}
|
|
61
61
|
.col-2.score
|
|
62
62
|
%h4= cpd_score(cpd_statement.score)
|
|
63
63
|
.col-2.carry-forward
|
|
@@ -15,6 +15,6 @@
|
|
|
15
15
|
= f.check_box :confirm_factual, label: "Yes, I declare all provided information to be factual and complete"
|
|
16
16
|
|
|
17
17
|
%h2 Resume
|
|
18
|
-
= f.file_field :files, label: 'Attach resume', hint:
|
|
18
|
+
= f.file_field :files, label: 'Attach resume', hint: "Please attach your resume or other #{cpd_name_label} related documents"
|
|
19
19
|
|
|
20
20
|
= f.submit 'Save and Continue', center: true
|
data/config/effective_cpd.rb
CHANGED
|
@@ -39,11 +39,6 @@ EffectiveCpd.setup do |config|
|
|
|
39
39
|
# config.cpd_audit_review_class_name = 'Effective::CpdAuditReview'
|
|
40
40
|
# config.cpd_bulk_audit_class_name = 'Effective::CpdBulkAudit'
|
|
41
41
|
|
|
42
|
-
# Program label settings
|
|
43
|
-
config.program_label = 'CPD' # CPD or MCE
|
|
44
|
-
config.cycle_label = 'year' # 'cycle', 'season'
|
|
45
|
-
config.credit_label = 'credit' # 'credit', 'PDH', 'PDU', 'CCC'
|
|
46
|
-
|
|
47
42
|
# Auditee Scope Collection
|
|
48
43
|
#
|
|
49
44
|
# When creating a new audit, these are used to select the auditee
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
en:
|
|
2
|
+
effective_cpd:
|
|
3
|
+
name: 'Continuing Professional Development'
|
|
4
|
+
credit: 'Credit'
|
|
5
|
+
|
|
6
|
+
activerecord:
|
|
7
|
+
models:
|
|
8
|
+
# These ones might be app level
|
|
9
|
+
app/cpd_audit: 'CPD Audit'
|
|
10
|
+
app/cpd_audit_level: 'CPD Audit Level'
|
|
11
|
+
app/cpd_audit_review: 'CPD Audit Review'
|
|
12
|
+
app/cpd_bulk_audit: 'Bulk Create CPD Audit Review'
|
|
13
|
+
app/cpd_statement: 'CPD Statement'
|
|
14
|
+
|
|
15
|
+
# These ones should stay effective
|
|
16
|
+
effective/cpd_cycle: 'CPD Period'
|
|
17
|
+
effective/cpd_statement_activity: 'CPD Statement Activity'
|
|
18
|
+
effective/cpd_category: 'CPD Category'
|
|
19
|
+
|
|
20
|
+
attributes:
|
|
21
|
+
# These ones might be app level
|
|
22
|
+
app/cpd_audit:
|
|
23
|
+
user: 'Auditee'
|
|
24
|
+
cpd_audit_comments: 'Reviewer Notes'
|
|
25
|
+
|
|
26
|
+
app/cpd_audit_review:
|
|
27
|
+
user: 'Reviewer'
|
|
28
|
+
comments: 'Reviewer Notes'
|
data/config/routes.rb
CHANGED
|
@@ -5,7 +5,7 @@ end
|
|
|
5
5
|
EffectiveCpd::Engine.routes.draw do
|
|
6
6
|
scope module: 'effective' do
|
|
7
7
|
# Statements wizard
|
|
8
|
-
resources :cpd_cycles,
|
|
8
|
+
resources :cpd_cycles, only: [:show] do
|
|
9
9
|
resources :cpd_statements, path: :statements, only: [:new, :show] do
|
|
10
10
|
resources :build, controller: :cpd_statements, only: [:show, :update]
|
|
11
11
|
end
|
data/lib/effective_cpd.rb
CHANGED
|
@@ -14,7 +14,7 @@ module EffectiveCpd
|
|
|
14
14
|
:cpd_audit_level_questions_table_name, :cpd_audit_level_question_options_table_name,
|
|
15
15
|
:cpd_audits_table_name, :cpd_audit_responses_table_name, :cpd_audit_response_options_table_name,
|
|
16
16
|
:cpd_audit_reviews_table_name, :cpd_audit_review_items_table_name, :cpd_bulk_audits_table_name,
|
|
17
|
-
:
|
|
17
|
+
:layout, :auditee_user_scope, :audit_reviewer_user_scope,
|
|
18
18
|
:use_effective_messaging,
|
|
19
19
|
:mailer, :parent_mailer, :deliver_method, :mailer_layout, :mailer_sender, :mailer_admin, :mailer_subject, :use_effective_email_templates,
|
|
20
20
|
:cpd_statement_class_name, :cpd_audit_class_name, :cpd_audit_level_class_name, :cpd_audit_review_class_name, :cpd_bulk_audit_class_name
|
|
@@ -19,6 +19,10 @@ module EffectiveCpd
|
|
|
19
19
|
template ('../' * 3) + 'config/effective_cpd.rb', 'config/initializers/effective_cpd.rb'
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
+
def copy_locale
|
|
23
|
+
template ('../' * 3) + 'config/locales/effective_cpd.en.yml', 'config/locales/effective_cpd.en.yml'
|
|
24
|
+
end
|
|
25
|
+
|
|
22
26
|
def create_migration_file
|
|
23
27
|
@cpd_categories_table_name = ':' + EffectiveCpd.cpd_categories_table_name.to_s
|
|
24
28
|
@cpd_activities_table_name = ':' + EffectiveCpd.cpd_activities_table_name.to_s
|