effective_cpd 0.0.1 → 0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (167) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +89 -10
  3. data/app/controllers/admin/cpd_audit_level_questions_controller.rb +13 -0
  4. data/app/controllers/admin/cpd_audit_levels_controller.rb +13 -0
  5. data/app/controllers/admin/cpd_audit_reviews_controller.rb +13 -0
  6. data/app/controllers/admin/cpd_audits_controller.rb +41 -0
  7. data/app/controllers/effective/cpd_audit_reviews_controller.rb +60 -0
  8. data/app/controllers/effective/cpd_audits_controller.rb +55 -0
  9. data/app/controllers/effective/cpd_cycles_controller.rb +1 -0
  10. data/app/controllers/effective/cpd_statements_controller.rb +1 -3
  11. data/app/datatables/admin/effective_cpd_audit_level_questions_datatable.rb +30 -0
  12. data/app/datatables/admin/effective_cpd_audit_levels_datatable.rb +34 -0
  13. data/app/datatables/admin/effective_cpd_audit_reviews_datatable.rb +29 -0
  14. data/app/datatables/admin/effective_cpd_audits_datatable.rb +67 -0
  15. data/app/datatables/admin/effective_cpd_statements_datatable.rb +3 -3
  16. data/app/datatables/effective_cpd_available_audit_reviews_datatable.rb +37 -0
  17. data/app/datatables/effective_cpd_available_audits_datatable.rb +30 -0
  18. data/app/datatables/{effective_cpd_datatable.rb → effective_cpd_available_cycles_datatable.rb} +3 -4
  19. data/app/datatables/effective_cpd_completed_audit_reviews_datatable.rb +32 -0
  20. data/app/datatables/effective_cpd_completed_audits_datatable.rb +24 -0
  21. data/app/datatables/effective_cpd_completed_statements_datatable.rb +28 -0
  22. data/app/helpers/effective_cpd_audits_helper.rb +48 -0
  23. data/app/mailers/effective/cpd_mailer.rb +155 -3
  24. data/app/models/effective/cpd_activity.rb +16 -3
  25. data/app/models/effective/cpd_audit.rb +380 -0
  26. data/app/models/effective/cpd_audit_level.rb +87 -0
  27. data/app/models/effective/cpd_audit_level_question.rb +91 -0
  28. data/app/models/effective/cpd_audit_level_question_option.rb +34 -0
  29. data/app/models/effective/cpd_audit_level_section.rb +50 -0
  30. data/app/models/effective/cpd_audit_response.rb +86 -0
  31. data/app/models/effective/cpd_audit_response_option.rb +6 -0
  32. data/app/models/effective/cpd_audit_review.rb +222 -0
  33. data/app/models/effective/cpd_audit_review_item.rb +34 -0
  34. data/app/models/effective/cpd_category.rb +12 -3
  35. data/app/models/effective/cpd_cycle.rb +7 -0
  36. data/app/models/effective/cpd_rule.rb +3 -1
  37. data/app/models/effective/cpd_statement.rb +15 -8
  38. data/app/views/admin/cpd_activities/_form.html.haml +1 -1
  39. data/app/views/admin/cpd_audit_level_questions/_form.html.haml +100 -0
  40. data/app/views/admin/cpd_audit_levels/_form.html.haml +24 -0
  41. data/app/views/admin/cpd_audit_levels/_form_content_audit.html.haml +15 -0
  42. data/app/views/admin/cpd_audit_levels/_form_content_audit_review.html.haml +15 -0
  43. data/app/views/admin/cpd_audit_levels/_form_cpd_audit_level.html.haml +52 -0
  44. data/app/views/admin/cpd_audit_levels/_form_cpd_audit_level_section.html.haml +10 -0
  45. data/app/views/admin/cpd_audit_reviews/_cpd_audit_review.html.haml +1 -0
  46. data/app/views/admin/cpd_audit_reviews/_form.html.haml +13 -0
  47. data/app/views/admin/cpd_audits/_audit_reviewer_fields.html.haml +2 -0
  48. data/app/views/admin/cpd_audits/_auditee_fields.html.haml +2 -0
  49. data/app/views/admin/cpd_audits/_form.html.haml +46 -0
  50. data/app/views/admin/cpd_audits/_form_conflict.html.haml +24 -0
  51. data/app/views/admin/cpd_audits/_form_determination.html.haml +10 -0
  52. data/app/views/admin/cpd_audits/_form_exemption.html.haml +24 -0
  53. data/app/views/admin/cpd_audits/_form_extension.html.haml +24 -0
  54. data/app/views/admin/cpd_audits/_form_new.html.haml +28 -0
  55. data/app/views/admin/cpd_audits/_status.html.haml +121 -0
  56. data/app/views/admin/cpd_categories/_form.html.haml +1 -1
  57. data/app/views/admin/cpd_cycles/_form.html.haml +4 -4
  58. data/app/views/admin/cpd_cycles/_form_cpd_cycle.html.haml +3 -0
  59. data/app/views/admin/cpd_statements/_cpd_statement.html.haml +7 -0
  60. data/app/views/effective/cpd_audit_level_questions/_cpd_audit_level_question.html.haml +5 -0
  61. data/app/views/effective/cpd_audit_responses/_cpd_audit_response.html.haml +4 -0
  62. data/app/views/effective/cpd_audit_responses/_fields.html.haml +13 -0
  63. data/app/views/effective/cpd_audit_responses/fields/_choose_one.html.haml +1 -0
  64. data/app/views/effective/cpd_audit_responses/fields/_date.html.haml +2 -0
  65. data/app/views/effective/cpd_audit_responses/fields/_email.html.haml +2 -0
  66. data/app/views/effective/cpd_audit_responses/fields/_long_answer.html.haml +1 -0
  67. data/app/views/effective/cpd_audit_responses/fields/_number.html.haml +2 -0
  68. data/app/views/effective/cpd_audit_responses/fields/_select_all_that_apply.html.haml +1 -0
  69. data/app/views/effective/cpd_audit_responses/fields/_select_up_to_1.html.haml +1 -0
  70. data/app/views/effective/cpd_audit_responses/fields/_select_up_to_2.html.haml +1 -0
  71. data/app/views/effective/cpd_audit_responses/fields/_select_up_to_3.html.haml +1 -0
  72. data/app/views/effective/cpd_audit_responses/fields/_select_up_to_4.html.haml +1 -0
  73. data/app/views/effective/cpd_audit_responses/fields/_select_up_to_5.html.haml +1 -0
  74. data/app/views/effective/cpd_audit_responses/fields/_short_answer.html.haml +1 -0
  75. data/app/views/effective/cpd_audit_responses/fields/_upload_file.html.haml +1 -0
  76. data/app/views/effective/cpd_audit_responses/responses/_choose_one.html.haml +1 -0
  77. data/app/views/effective/cpd_audit_responses/responses/_date.html.haml +1 -0
  78. data/app/views/effective/cpd_audit_responses/responses/_email.html.haml +1 -0
  79. data/app/views/effective/cpd_audit_responses/responses/_long_answer.html.haml +1 -0
  80. data/app/views/effective/cpd_audit_responses/responses/_number.html.haml +1 -0
  81. data/app/views/effective/cpd_audit_responses/responses/_select_all_that_apply.html.haml +5 -0
  82. data/app/views/effective/cpd_audit_responses/responses/_select_up_to_1.html.haml +1 -0
  83. data/app/views/effective/cpd_audit_responses/responses/_select_up_to_2.html.haml +5 -0
  84. data/app/views/effective/cpd_audit_responses/responses/_select_up_to_3.html.haml +5 -0
  85. data/app/views/effective/cpd_audit_responses/responses/_select_up_to_4.html.haml +5 -0
  86. data/app/views/effective/cpd_audit_responses/responses/_select_up_to_5.html.haml +5 -0
  87. data/app/views/effective/cpd_audit_responses/responses/_short_answer.html.haml +1 -0
  88. data/app/views/effective/cpd_audit_responses/responses/_upload_file.html.haml +4 -0
  89. data/app/views/effective/cpd_audit_review_items/_cpd_audit_review_item.html.haml +6 -0
  90. data/app/views/effective/cpd_audit_review_items/_fields.html.haml +11 -0
  91. data/app/views/effective/cpd_audit_reviews/_conflict.html.haml +15 -0
  92. data/app/views/effective/cpd_audit_reviews/_cpd_audit_level_section.html.haml +23 -0
  93. data/app/views/effective/cpd_audit_reviews/_cpd_audit_review.html.haml +17 -0
  94. data/app/views/effective/cpd_audit_reviews/_cpd_statement.html.haml +15 -0
  95. data/app/views/effective/cpd_audit_reviews/_layout.html.haml +24 -0
  96. data/app/views/effective/cpd_audit_reviews/_recommendation.html.haml +9 -0
  97. data/app/views/effective/cpd_audit_reviews/_summary.html.haml +47 -0
  98. data/app/views/effective/cpd_audit_reviews/complete.html.haml +20 -0
  99. data/app/views/effective/cpd_audit_reviews/conflict.html.haml +21 -0
  100. data/app/views/effective/cpd_audit_reviews/cpd_audit_level_section.html.haml +43 -0
  101. data/app/views/effective/cpd_audit_reviews/cpd_statement.html.haml +35 -0
  102. data/app/views/effective/cpd_audit_reviews/information.html.haml +5 -0
  103. data/app/views/effective/cpd_audit_reviews/instructions.html.haml +10 -0
  104. data/app/views/effective/cpd_audit_reviews/questionnaire.html.haml +8 -0
  105. data/app/views/effective/cpd_audit_reviews/recommendation.html.haml +21 -0
  106. data/app/views/effective/cpd_audit_reviews/start.html.haml +10 -0
  107. data/app/views/effective/cpd_audit_reviews/statements.html.haml +29 -0
  108. data/app/views/effective/cpd_audit_reviews/submit.html.haml +14 -0
  109. data/app/views/effective/cpd_audit_reviews/waiting.html.haml +9 -0
  110. data/app/views/effective/cpd_audits/_conflict.html.haml +15 -0
  111. data/app/views/effective/cpd_audits/_cpd_audit.html.haml +12 -0
  112. data/app/views/effective/cpd_audits/_cpd_audit_level_section.html.haml +14 -0
  113. data/app/views/effective/cpd_audits/_exemption.html.haml +26 -0
  114. data/app/views/effective/cpd_audits/_extension.html.haml +30 -0
  115. data/app/views/effective/cpd_audits/_files.html.haml +12 -0
  116. data/app/views/effective/cpd_audits/_layout.html.haml +33 -0
  117. data/app/views/effective/cpd_audits/_summary.html.haml +54 -0
  118. data/app/views/effective/cpd_audits/_waiting.html.haml +6 -0
  119. data/app/views/effective/cpd_audits/complete.html.haml +24 -0
  120. data/app/views/effective/cpd_audits/conflict.html.haml +22 -0
  121. data/app/views/effective/cpd_audits/cpd_audit_level_section.html.haml +20 -0
  122. data/app/views/effective/cpd_audits/exemption.html.haml +19 -0
  123. data/app/views/effective/cpd_audits/extension.html.haml +21 -0
  124. data/app/views/effective/cpd_audits/files.html.haml +7 -0
  125. data/app/views/effective/cpd_audits/information.html.haml +5 -0
  126. data/app/views/effective/cpd_audits/instructions.html.haml +5 -0
  127. data/app/views/effective/cpd_audits/questionnaire.html.haml +5 -0
  128. data/app/views/effective/cpd_audits/start.html.haml +11 -0
  129. data/app/views/effective/cpd_audits/submit.html.haml +15 -0
  130. data/app/views/effective/cpd_audits/waiting.html.haml +24 -0
  131. data/app/views/effective/cpd_mailer/README.md +1 -0
  132. data/app/views/effective/cpd_mailer/cpd_audit_closed.liquid +15 -0
  133. data/app/views/effective/cpd_mailer/cpd_audit_conflict_resolved.liquid +15 -0
  134. data/app/views/effective/cpd_mailer/cpd_audit_conflicted.liquid +13 -0
  135. data/app/views/effective/cpd_mailer/cpd_audit_exemption_denied.liquid +13 -0
  136. data/app/views/effective/cpd_mailer/cpd_audit_exemption_granted.liquid +13 -0
  137. data/app/views/effective/cpd_mailer/cpd_audit_exemption_request.liquid +13 -0
  138. data/app/views/effective/cpd_mailer/cpd_audit_extension_denied.liquid +13 -0
  139. data/app/views/effective/cpd_mailer/cpd_audit_extension_granted.liquid +13 -0
  140. data/app/views/effective/cpd_mailer/cpd_audit_extension_request.liquid +13 -0
  141. data/app/views/effective/cpd_mailer/cpd_audit_opened.liquid +13 -0
  142. data/app/views/effective/cpd_mailer/cpd_audit_review_opened.liquid +15 -0
  143. data/app/views/effective/cpd_mailer/cpd_audit_review_ready.liquid +13 -0
  144. data/app/views/effective/cpd_mailer/cpd_audit_review_submitted.liquid +11 -0
  145. data/app/views/effective/cpd_mailer/cpd_audit_reviewed.liquid +13 -0
  146. data/app/views/effective/cpd_mailer/cpd_audit_submitted.liquid +13 -0
  147. data/app/views/effective/cpd_statement_activities/_cpd_statement_activity.html.haml +65 -0
  148. data/app/views/effective/cpd_statement_activities/_form.html.haml +9 -10
  149. data/app/views/effective/cpd_statements/_activities.html.haml +3 -64
  150. data/app/views/effective/cpd_statements/_activities_edit.html.haml +2 -0
  151. data/app/views/effective/cpd_statements/_activities_table.html.haml +64 -0
  152. data/app/views/effective/cpd_statements/_agreements.html.haml +19 -5
  153. data/app/views/effective/cpd_statements/_cpd_statement.html.haml +6 -3
  154. data/app/views/effective/cpd_statements/_summary.html.haml +26 -31
  155. data/app/views/effective/cpd_statements/activities.html.haml +1 -1
  156. data/app/views/effective/cpd_statements/agreements.html.haml +7 -1
  157. data/app/views/effective/cpd_statements/submit.html.haml +1 -1
  158. data/config/effective_cpd.rb +47 -10
  159. data/config/routes.rb +18 -1
  160. data/db/migrate/01_create_effective_cpd.rb.erb +157 -1
  161. data/db/seeds.rb +2 -1
  162. data/lib/effective_cpd.rb +42 -3
  163. data/lib/effective_cpd/version.rb +1 -1
  164. data/lib/generators/effective_cpd/install_generator.rb +16 -3
  165. metadata +168 -9
  166. data/app/datatables/effective_cpd_statements_datatable.rb +0 -23
  167. data/app/views/admin/cpd_statements/_form.html.haml +0 -6
@@ -1,23 +0,0 @@
1
- # Displays past cpd statements that were completed by the user
2
-
3
- class EffectiveCpdStatementsDatatable < Effective::Datatable
4
- datatable do
5
- order :cpd_cycle_id
6
-
7
- col(:cpd_cycle_id, label: cpd_cycle_label.titleize) do |statement|
8
- statement.cpd_cycle.to_s
9
- end
10
-
11
- col :completed_at, label: 'Completed'
12
-
13
- actions_col(actions: []) do |cpd_statement|
14
- dropdown_link_to('Show', effective_cpd.cpd_cycle_cpd_statement_build_path(cpd_statement.cpd_cycle, cpd_statement, cpd_statement.last_completed_step))
15
- end
16
- end
17
-
18
- collection do
19
- raise('expected a current_user') unless current_user.present?
20
- Effective::CpdStatement.completed.where(user: current_user).includes(:cpd_cycle)
21
- end
22
-
23
- end
@@ -1,6 +0,0 @@
1
- = tabs do
2
- = tab 'Statement' do
3
- = render('effective/cpd_statements/cpd_statement', cpd_statement: cpd_statement)
4
-
5
- = tab 'Logs' do
6
- = render_inline_datatable(cpd_statement.log_changes_datatable)