effective_committees 0.3.4 → 0.3.6

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: 2dbf5431951175c003067b688990bab70bed951ce3ce3789aced0cd086582860
4
- data.tar.gz: 21df5777b6941e57da909d5052eab66cd000b4f24ee7c1cc2bac03bbf943372b
3
+ metadata.gz: 9fa32a634100dd3840025efd72b1698d500c9f8eb056c6122f6c77d4aa4e6397
4
+ data.tar.gz: 85f81da508324d9db11235c7714cfcec9778a67e2583b5d71ba5b691fc25cb22
5
5
  SHA512:
6
- metadata.gz: d468e614bebd4783bfe3ba8a794d0581e6e41936f86a1480dfdd7ca5316068436cfc22d3f53b935fe2d64e43f753916f7ee8305ae2f5f61caa275b931f4e7410
7
- data.tar.gz: d19d8a0f10d252b32ce11bbd3346e07c7e33c993862af462d35160a8000eb845861a982402a625d6c91ca04ef692c84c55975c0a00e51be0d016f551b1fd2f96
6
+ metadata.gz: dc01d62ac0d3c97d85d64407ab54080b6e02f4259132bbc5c9752e7801db08c408d78945e9e73e587f456a587c81d8b56ac6a06877e741e57f62321e75741da1
7
+ data.tar.gz: 38e49d065c3667c57439e1b8e754b5cbebd7a1b2548ed90f14ac2434a1a7399adaa4b2bd98e58ea4c38240c00303ed74d0f2698c35e00672a608534e6d9dbeaf
@@ -9,6 +9,10 @@ class EffectiveCommitteesDatatable < Effective::Datatable
9
9
 
10
10
  col :committee_members, search: :string, label: 'Members', visible: false
11
11
 
12
+ col :committee_members_count, label: 'Members' do |committee|
13
+ pluralize(committee.committee_members_count, 'members')
14
+ end
15
+
12
16
  col :committee_folders, search: :string, label: 'Folders'
13
17
 
14
18
  col :committee_folders_count, label: 'Folders', visible: false do |committee|
@@ -1,4 +1,8 @@
1
1
  = effective_form_with(model: [:admin, committee_file], engine: true) do |f|
2
+ - f.object.committee_type ||= Effective::Committee.name
3
+
4
+ = f.hidden_field :committee_type
5
+ = f.hidden_field :committee_id
2
6
 
3
7
  - if inline_datatable? && inline_datatable.attributes[:committee_folder_id].present?
4
8
  = f.hidden_field :committee_folder_id
@@ -2,8 +2,6 @@
2
2
  - f.object.user_type ||= current_user.class.name
3
3
  - f.object.committee_type ||= Effective::Committee.name
4
4
 
5
- - committees = Effective::Committee.sorted.all
6
-
7
5
  = f.hidden_field :user_type
8
6
  = f.hidden_field :user_id
9
7
 
@@ -14,14 +12,13 @@
14
12
 
15
13
  - if f.object.new_record?
16
14
  - if inline_datatable? && inline_datatable.attributes[:committee_id].present?
17
- = f.select :user_ids, current_user.class.sorted, label: 'Add user(s)', required: true, ajax_url: ajax_url, hint: 'Add one or more users'
15
+ = f.select :user_ids, current_user.class.all, label: 'Add user(s)', required: true, ajax_url: ajax_url, hint: 'Add one or more users'
18
16
 
19
17
  - if inline_datatable? && inline_datatable.attributes[:user_id].present?
20
- = f.select :committee_ids, committees, label: 'Add committee(s)', hint: 'Add one or more committees'
18
+ = f.select :committee_ids, Effective::Committee.sorted.all, label: 'Add committee(s)', hint: 'Add one or more committees'
21
19
 
22
20
  - unless inline_datatable?
23
- = f.select :committee_id, committees, label: 'Committee'
24
-
21
+ = f.select :committee_id, Effective::Committee.sorted.all, label: 'Committee'
25
22
  = f.select :user_ids, current_user.class.sorted, label: 'User(s)', required: true, ajax_url: ajax_url, hint: 'Add one or more user at a time'
26
23
 
27
24
  - if f.object.persisted?
@@ -17,7 +17,12 @@
17
17
 
18
18
  - committee_folder.committee_files.each do |file|
19
19
  %tr
20
- %td= link_to(icon('download') + file, url_for(file.file), target: '_blank')
20
+ %td
21
+ - if file.file.attached?
22
+ = link_to(icon('download') + file.to_s, url_for(file.file), target: '_blank')
23
+ - else
24
+ = file.to_s
25
+
21
26
  %td= file.created_at.strftime('%F')
22
27
  %td= file.notes
23
28
 
@@ -3,6 +3,6 @@
3
3
  = render 'effective/committees/form_committee', committee: committee
4
4
 
5
5
  - if committee.persisted?
6
- - if committee.respond_to?(:log_changes_datatable)
6
+ - if committee.respond_to?(:logs_datatable)
7
7
  = tab 'Logs' do
8
- = render_inline_datatable(committee.log_changes_datatable)
8
+ = render_inline_datatable(committee.logs_datatable)
@@ -1,3 +1,3 @@
1
1
  module EffectiveCommittees
2
- VERSION = '0.3.4'.freeze
2
+ VERSION = '0.3.6'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_committees
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.6
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-11-16 00:00:00.000000000 Z
11
+ date: 2023-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails