effective_cpd 1.2.4 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/admin/cpd_audits_controller.rb +4 -4
  3. data/app/controllers/admin/cpd_statement_activities_controller.rb +3 -5
  4. data/app/controllers/admin/cpd_statements_controller.rb +0 -2
  5. data/app/controllers/effective/cpd_audits_controller.rb +1 -1
  6. data/app/datatables/admin/effective_cpd_audit_reviews_datatable.rb +6 -6
  7. data/app/datatables/admin/effective_cpd_audits_datatable.rb +10 -10
  8. data/app/datatables/admin/effective_cpd_bulk_audits_datatable.rb +3 -4
  9. data/app/datatables/admin/effective_cpd_rules_datatable.rb +4 -4
  10. data/app/datatables/admin/effective_cpd_special_rules_datatable.rb +2 -2
  11. data/app/datatables/admin/effective_cpd_statement_activities_datatable.rb +3 -3
  12. data/app/datatables/admin/effective_cpd_statements_datatable.rb +1 -1
  13. data/app/datatables/effective_cpd_available_audit_reviews_datatable.rb +2 -2
  14. data/app/datatables/effective_cpd_available_audits_datatable.rb +1 -1
  15. data/app/datatables/effective_cpd_available_cycles_datatable.rb +1 -1
  16. data/app/datatables/effective_cpd_completed_audit_reviews_datatable.rb +3 -3
  17. data/app/datatables/effective_cpd_completed_audits_datatable.rb +2 -2
  18. data/app/datatables/effective_cpd_completed_statements_datatable.rb +3 -3
  19. data/app/helpers/effective_cpd_audits_helper.rb +1 -2
  20. data/app/helpers/effective_cpd_helper.rb +58 -6
  21. data/app/models/concerns/effective_cpd_audit.rb +21 -16
  22. data/app/models/concerns/effective_cpd_audit_level.rb +1 -1
  23. data/app/models/concerns/effective_cpd_audit_review.rb +1 -1
  24. data/app/models/concerns/effective_cpd_bulk_audit.rb +1 -1
  25. data/app/models/concerns/effective_cpd_statement.rb +1 -1
  26. data/app/models/effective/cpd_activity.rb +1 -1
  27. data/app/models/effective/cpd_audit_level_question.rb +1 -1
  28. data/app/models/effective/cpd_audit_level_question_option.rb +1 -1
  29. data/app/models/effective/cpd_audit_level_section.rb +1 -1
  30. data/app/models/effective/cpd_audit_response.rb +1 -1
  31. data/app/models/effective/cpd_audit_review_item.rb +1 -1
  32. data/app/models/effective/cpd_category.rb +1 -1
  33. data/app/models/effective/cpd_cycle.rb +1 -1
  34. data/app/models/effective/cpd_special_rule.rb +1 -1
  35. data/app/models/effective/cpd_statement_activity.rb +1 -1
  36. data/app/views/admin/cpd_activities/_form.html.haml +1 -1
  37. data/app/views/admin/cpd_audit_level_questions/_form.html.haml +1 -1
  38. data/app/views/admin/cpd_audit_levels/_form.html.haml +4 -4
  39. data/app/views/admin/cpd_audit_levels/_form_content_audit.html.haml +1 -1
  40. data/app/views/admin/cpd_audit_levels/_form_content_audit_review.html.haml +1 -1
  41. data/app/views/admin/cpd_audit_levels/_form_cpd_audit_level.html.haml +25 -18
  42. data/app/views/admin/cpd_audit_levels/_form_cpd_audit_level_section.html.haml +1 -1
  43. data/app/views/admin/cpd_audit_reviews/_form.html.haml +2 -2
  44. data/app/views/admin/cpd_audits/_audit_reviewer_fields.html.haml +1 -1
  45. data/app/views/admin/cpd_audits/_auditee_fields.html.haml +2 -2
  46. data/app/views/admin/cpd_audits/_form_chat.html.haml +2 -2
  47. data/app/views/admin/cpd_audits/_form_close.html.haml +2 -2
  48. data/app/views/admin/cpd_audits/_form_complete.html.haml +4 -4
  49. data/app/views/admin/cpd_audits/_form_conflict.html.haml +5 -5
  50. data/app/views/admin/cpd_audits/_form_cpd_audit.html.haml +6 -6
  51. data/app/views/admin/cpd_audits/_form_deadlines.html.haml +2 -2
  52. data/app/views/admin/cpd_audits/_form_exemption.html.haml +2 -2
  53. data/app/views/admin/cpd_audits/_form_extension.html.haml +2 -2
  54. data/app/views/admin/cpd_audits/_form_files.html.haml +1 -1
  55. data/app/views/admin/cpd_audits/_form_missing_info.html.haml +1 -1
  56. data/app/views/admin/cpd_audits/_form_new.html.haml +10 -12
  57. data/app/views/admin/cpd_audits/_form_process.html.haml +1 -1
  58. data/app/views/admin/cpd_audits/_status.html.haml +7 -10
  59. data/app/views/admin/cpd_bulk_audits/_form_cpd_bulk_audit.html.haml +6 -6
  60. data/app/views/admin/cpd_categories/_form.html.haml +2 -2
  61. data/app/views/admin/cpd_cycles/_form_cpd_cycle.html.haml +5 -5
  62. data/app/views/admin/cpd_special_rules/_form.html.haml +2 -2
  63. data/app/views/admin/cpd_statements/_cpd_statement.html.haml +2 -2
  64. data/app/views/admin/users/_form_cpd.html.haml +2 -2
  65. data/app/views/admin/users/_form_cpd_audits.html.haml +4 -4
  66. data/app/views/effective/cpd/_dashboard.html.haml +10 -10
  67. data/app/views/effective/cpd_audit_reviews/_cpd_audit_level_section.html.haml +1 -1
  68. data/app/views/effective/cpd_audit_reviews/_summary.html.haml +3 -3
  69. data/app/views/effective/cpd_audit_reviews/conflict.html.haml +1 -1
  70. data/app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml +1 -1
  71. data/app/views/effective/cpd_audit_reviews/cpd_statement.html.haml +1 -1
  72. data/app/views/effective/cpd_audit_reviews/feedback.html.haml +3 -3
  73. data/app/views/effective/cpd_audit_reviews/files.html.haml +2 -2
  74. data/app/views/effective/cpd_audit_reviews/instructions.html.haml +1 -1
  75. data/app/views/effective/cpd_audit_reviews/questionnaire.html.haml +1 -1
  76. data/app/views/effective/cpd_audit_reviews/recommendation.html.haml +3 -3
  77. data/app/views/effective/cpd_audit_reviews/start.html.haml +4 -4
  78. data/app/views/effective/cpd_audit_reviews/statements.html.haml +6 -6
  79. data/app/views/effective/cpd_audit_reviews/submit.html.haml +1 -1
  80. data/app/views/effective/cpd_audit_reviews/submitted.html.haml +3 -3
  81. data/app/views/effective/cpd_audit_reviews/waiting.html.haml +1 -1
  82. data/app/views/effective/cpd_audits/_missing_info.html.haml +3 -3
  83. data/app/views/effective/cpd_audits/_summary.html.haml +2 -2
  84. data/app/views/effective/cpd_audits/conflict.html.haml +2 -2
  85. data/app/views/effective/cpd_audits/start.html.haml +2 -2
  86. data/app/views/effective/cpd_audits/submit.html.haml +3 -3
  87. data/app/views/effective/cpd_audits/submitted.haml +4 -4
  88. data/app/views/effective/cpd_audits/waiting.html.haml +1 -1
  89. data/app/views/effective/cpd_statements/_activities_new.html.haml +1 -1
  90. data/app/views/effective/cpd_statements/_activities_table.html.haml +2 -2
  91. data/app/views/effective/cpd_statements/_summary.html.haml +1 -1
  92. data/app/views/effective/cpd_statements/agreements.html.haml +1 -1
  93. data/app/views/effective/cpd_statements/submit.html.haml +1 -1
  94. data/config/effective_cpd.rb +0 -5
  95. data/config/locales/effective_cpd.en.yml +28 -0
  96. data/config/routes.rb +1 -1
  97. data/lib/effective_cpd/version.rb +1 -1
  98. data/lib/effective_cpd.rb +1 -1
  99. data/lib/generators/effective_cpd/install_generator.rb +4 -0
  100. metadata +3 -2
@@ -10,13 +10,13 @@
10
10
 
11
11
  %hr
12
12
 
13
- %h2 Audits
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 Audit Reviews
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 Audit Reviews
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 Audits
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 Continuing Professional Development
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 audit is in progress.
7
+ %p Your #{cpd_audit_label} is in progress.
8
8
 
9
9
  %p
10
10
  Please
11
- = link_to("Continue audit", effective_cpd.cpd_audit_build_path(cpd_audit, cpd_audit.next_step), 'data-turbolinks' => false, class: 'btn btn-primary')
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 for audit:
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 audits:
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 CPD statement for the following available #{cpd_cycles_label}:
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 statements:
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 assess the following audits:
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 audits available to review. When there are, we'll show them here.
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 audit assessments:
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 Auditee Response:
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 Audit
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 Audit Reviewer
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 Auditee
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, label: 'Reviewer notes', hint: 'Not displayed to the auditee'
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, label: 'Reviewer notes', hint: 'Not displayed to the auditee'
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, label: 'Reviewer notes', hint: 'Not displayed to the auditee'
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('Show audit...', card_class: '') do
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: 'Feedback for the auditee'
11
+ = f.text_area :feedback, label: "Feedback for the #{cpd_auditee_label}"
12
12
 
13
13
  %hr
14
- = f.text_area :comments, label: 'Reviewer notes', hint: 'Not displayed to the auditee'
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 auditee attached the following files:
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, label: 'Reviewer notes', hint: 'Not displayed to the auditee'
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, label: 'Reviewer notes', hint: 'Not displayed to the auditee'
8
+ = f.text_area :comments, hint: "Not displayed to the #{cpd_auditee_label}"
9
9
 
10
10
  = f.submit 'Save and Continue', center: true
@@ -3,6 +3,6 @@
3
3
  = f.hidden_field :current_step
4
4
 
5
5
  %hr
6
- = f.text_area :comments, label: 'Reviewer notes', hint: 'Not displayed to the auditee'
6
+ = f.text_area :comments, hint: "Not displayed to the #{cpd_auditee_label}"
7
7
 
8
8
  = f.submit 'Save and Continue', center: true
@@ -1,6 +1,6 @@
1
1
  = render('layout') do
2
2
  .mb-3
3
- = collapse('Show audit...', card_class: '') do
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: 'Feedback for the auditee'
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, label: 'Reviewer notes', hint: 'Not displayed to the auditee'
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 conduct a #{resource.cpd_audit.cpd_audit_level} audit.
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 audit, and you have been assigned the name #{resource.name}.
6
- %p You have been matched with the auditee, #{resource.cpd_audit.name}.
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 auditee:
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 statements:
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 CPD statements from #{cpd_audit.name}.
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 Statements
15
- %p Click to expand any statements
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, label: 'Reviewer notes', hint: 'Not displayed to the auditee'
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 'Submit Audit Review', center: true, 'data-confirm': "Really Submit Audit Review?"
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 audit review was submitted on #{resource.submitted_at.strftime('%F')}
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('Show audit review...', card_class: 'my-2') do
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('Show audit...', card_class: 'my-2') do
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'
@@ -4,6 +4,6 @@
4
4
 
5
5
  %p
6
6
  You may not continue at this time.
7
- Please wait for an email when this audit becomes available for review.
7
+ Please wait for an email when this #{cpd_audit_label} becomes available.
8
8
 
9
9
  %p Thank you and have a great day!
@@ -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 audit.
9
+ for this #{cpd_audit_label}.
10
10
 
11
11
  %p
12
- Once you're ready, click below to re-submit your audit with the updated information.
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 Audit', 'data-confirm': "Really re-submit?", class: 'btn-sm'
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 Auditee
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 Audit Reviewer
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} audit and matched with:
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 auditor will be selected if there is a conflict of interest.
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} audit.
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 audit, and you have been assigned the name #{resource.name}
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 audit before submitting.
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 Audit', center: true, 'data-confirm': "Really Resubmit Audit?"
16
+ = f.submit 'Resubmit', center: true, 'data-confirm': "Really Resubmit #{cpd_audit_label}?"
17
17
  - else
18
- = f.submit 'Submit Audit', center: true, 'data-confirm': "Really Submit Audit?"
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 audit was submitted on #{resource.submitted_at.strftime('%F')}
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 audit was successfully submitted at
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 audit must be reviewed and a final determination made.
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('Show audit...', card_class: 'my-2') do
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 from this audit.
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?
@@ -6,7 +6,7 @@
6
6
  - rule = cpd_statement.cpd_cycle.rule_for(category)
7
7
  - next if rule.unavailable?
8
8
 
9
- = tab(category) do
9
+ = tab(category.to_s) do
10
10
  .float-right= link_to icon('x', class: 'small-1'), '#', 'data-cpd-collapse': true
11
11
 
12
12
  %h3
@@ -2,7 +2,7 @@
2
2
  .row
3
3
  .col-8
4
4
  .col-2.score
5
- %strong= cpd_credits_label.capitalize
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} in statement
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
@@ -21,7 +21,7 @@
21
21
  %td= cpd_statement.submitted_at.strftime('%F %H:%M')
22
22
 
23
23
  %tr
24
- %th= cpd_cycle_label.capitalize
24
+ %th= cpd_cycle_label
25
25
  %td= cpd_statement.cpd_cycle
26
26
 
27
27
  %tr
@@ -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: 'Please attach your resume or other CPD related documents'
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
@@ -16,4 +16,4 @@
16
16
 
17
17
  = f.check_box :confirm_readonly, label: cpd_statement_submit_label(f.object)
18
18
 
19
- = f.submit 'Submit Statement', center: true
19
+ = f.submit 'Submit', center: true, 'data-confirm': "Really submit #{cpd_statement_label}?"
@@ -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, path: "cpd_#{EffectiveCpd.cycle_label.pluralize.parameterize.underscore}", only: [:show] do
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
@@ -1,3 +1,3 @@
1
1
  module EffectiveCpd
2
- VERSION = '1.2.4'
2
+ VERSION = '1.3.0'
3
3
  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
- :program_label, :cycle_label, :credit_label, :layout, :auditee_user_scope, :audit_reviewer_user_scope,
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
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_cpd
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.4
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-06 00:00:00.000000000 Z
11
+ date: 2023-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -446,6 +446,7 @@ files:
446
446
  - app/views/users/_demographics.html.haml
447
447
  - app/views/users/_fields_demographics.html.haml
448
448
  - config/effective_cpd.rb
449
+ - config/locales/effective_cpd.en.yml
449
450
  - config/routes.rb
450
451
  - db/migrate/01_create_effective_cpd.rb.erb
451
452
  - db/seeds.rb