effective_cpd 1.3.3 → 1.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fba654344bd04bbe55816f34a8f5598a4c413c753b7de458315c877549e7833a
4
- data.tar.gz: afbf52fb5987b51acc284864ee98daf8d97b0b3b2246e6ee88f011b9ad505b74
3
+ metadata.gz: 2ebbcc7dc3960807c1489de54504c7011e3a4bc01abc476cdb49b968bf5748d8
4
+ data.tar.gz: 3ff3732c603740dd984c0ed0deec2d7d2ed8d43e533914a76cf8080de79ceec6
5
5
  SHA512:
6
- metadata.gz: 157e522d6b1868bbb86c14aae06a3d2b136d4489a027ad7a9fcab42f3a972efb31ba458a9635d81ef1f1208c0bfc9bd39c4a730aefbb7967db75d2d5952169bf
7
- data.tar.gz: d299c09f5bcbe5b0f1e8718fcc54a1e92b52b3183b87079560847fb93e7e209b1219cf65ae2f2cf9d092c190d82a1142f1ce01cb9e138d8c006840faa4604ce3
6
+ metadata.gz: 97c4d7aae9fcf23aa1117c93cf5a261825ee447815e5a7c4e1deea0a3c320116289aa36d8c01c26e184131b0bfd0cb56dcd87993bbea994ce91175a37170cb38
7
+ data.tar.gz: 185bdbc435e66f12c005b01bb0f2e0b72073eb39665bbf83ac202e21a2e450e64138b896e793a69beb26fa1be8bb0163626f9e89f1ff24c0d036b03a8d0f72f2
@@ -8,7 +8,7 @@ module Effective
8
8
 
9
9
  submit :resubmit, 'Resubmit'
10
10
 
11
- page_title 'Chat', only: [:chat]
11
+ page_title EffectiveResources.et('effective_cpd.chat'), only: [:chat]
12
12
 
13
13
  # Reuse the same view for all cpd_audit_level_section steps
14
14
  # https://github.com/zombocom/wicked/blob/v1.3.4/lib/wicked/controller/concerns/render_redirect.rb#L32
@@ -27,6 +27,8 @@ module Effective
27
27
  before_action(only: [:show, :update]) do
28
28
  cycle = resource.cpd_cycle
29
29
 
30
+ cpd_cycle_label = EffectiveResources.et(Effective::CpdCycle)
31
+
30
32
  unless cycle.available?
31
33
  flash[:danger] = begin
32
34
  if cycle.ended?
@@ -18,9 +18,9 @@
18
18
  - if EffectiveCpd.use_effective_messaging?
19
19
  .list-group
20
20
  - if (controller.action_name == 'chat')
21
- %a.active.list-group-item.list-group-item-action Chat
21
+ %a.active.list-group-item.list-group-item-action.btn-lg= et('effective_cpd.chat_sidebar')
22
22
  - else
23
- %a.list-group-item.list-group-item-action{href: effective_cpd.chat_cpd_audit_review_path(resource)} Chat
23
+ %a.list-group-item.list-group-item-action.btn-lg{href: effective_cpd.chat_cpd_audit_review_path(resource)}= et('effective_cpd.chat_sidebar')
24
24
 
25
25
  .col-9
26
26
  %h1= @page_title
@@ -26,12 +26,14 @@
26
26
  %td
27
27
  %td
28
28
 
29
+
29
30
  - if EffectiveCpd.use_effective_messaging?
30
- .list-group
31
- - if (controller.action_name == 'chat')
32
- %a.active.list-group-item.list-group-item-action Chat
33
- - else
34
- %a.list-group-item.list-group-item-action{href: effective_cpd.chat_cpd_audit_path(resource)} Chat
31
+ - if resource.chats.present? || resource.cpd_audit_reviews.present?
32
+ .list-group
33
+ - if (controller.action_name == 'chat')
34
+ %a.active.list-group-item.list-group-item-action.btn-lg= et('effective_cpd.chat_sidebar')
35
+ - else
36
+ %a.list-group-item.list-group-item-action.btn-lg{href: effective_cpd.chat_cpd_audit_path(resource)}= et('effective_cpd.chat_sidebar')
35
37
 
36
38
  .col-9
37
39
  %h1= @page_title
@@ -2,6 +2,8 @@ en:
2
2
  effective_cpd:
3
3
  name: 'Continuing Professional Development'
4
4
  credit: 'Credit'
5
+ chat: 'Send a Message'
6
+ chat_sidebar: 'Send a Message'
5
7
 
6
8
  activerecord:
7
9
  models:
@@ -9,7 +9,7 @@ module EffectiveCpd
9
9
 
10
10
  # Include acts_as_addressable concern and allow any ActiveRecord object to call it
11
11
  initializer 'effective_cpd.active_record' do |app|
12
- ActiveSupport.on_load :active_record do
12
+ app.config.to_prepare do
13
13
  ActiveRecord::Base.extend(EffectiveCpdUser::Base)
14
14
  ActiveRecord::Base.extend(EffectiveCpdStatement::Base)
15
15
  ActiveRecord::Base.extend(EffectiveCpdAudit::Base)
@@ -1,3 +1,3 @@
1
1
  module EffectiveCpd
2
- VERSION = '1.3.3'
2
+ VERSION = '1.3.5'
3
3
  end
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.3.3
4
+ version: 1.3.5
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-10 00:00:00.000000000 Z
11
+ date: 2023-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails