effective_committees 0.3.4 → 0.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: 2dbf5431951175c003067b688990bab70bed951ce3ce3789aced0cd086582860
4
- data.tar.gz: 21df5777b6941e57da909d5052eab66cd000b4f24ee7c1cc2bac03bbf943372b
3
+ metadata.gz: e28282d238abfca45a4fea8be72728d21bafd74aad6b38abb849e9df45a73e30
4
+ data.tar.gz: 20defd897b8846e1c4f6353a0cddc21e912984bd5b5470b72088729ac79b3b2b
5
5
  SHA512:
6
- metadata.gz: d468e614bebd4783bfe3ba8a794d0581e6e41936f86a1480dfdd7ca5316068436cfc22d3f53b935fe2d64e43f753916f7ee8305ae2f5f61caa275b931f4e7410
7
- data.tar.gz: d19d8a0f10d252b32ce11bbd3346e07c7e33c993862af462d35160a8000eb845861a982402a625d6c91ca04ef692c84c55975c0a00e51be0d016f551b1fd2f96
6
+ metadata.gz: 6382fab2239e1aeb85b9633d93fff8a9c5e94b8f877282a57990920fbdc6ea2a0c291346627fc966213cac1d2f715d3560b9ae4dbd4853b6348fc38c55d736c9
7
+ data.tar.gz: 8974e1afaf75472c938be8bb31b0c5ffe2e315341a7031a620f26a5ef173cca7a56fa4857954ef2d8aad5fb306de64e732f7eb65087abddf61c7a46fc86d13c7
@@ -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, url_for(file.file), target: '_blank')
23
+ - else
24
+ = file
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.5'.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.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-11-16 00:00:00.000000000 Z
11
+ date: 2023-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails