effective_memberships 0.15.3 → 0.16.0

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: e2cafda7d6dc70a59ef3d1589f5cab97c69d5b42af028d79828286b2303761b4
4
- data.tar.gz: 8e9cab71adbb73b888f9910466e08c987c81c8e4861744cee471968cd24f9832
3
+ metadata.gz: 2724aef02cc204497fbe0fea92c61ca1b61cfb37ac49711dd80ca3627577d90d
4
+ data.tar.gz: 46e0ac6f3754616c32c4d0bbbf581ae653ed90124e958e9d16ae512eff4e2a80
5
5
  SHA512:
6
- metadata.gz: 9018813c526f99303b07116a8a431658cf47866cc1c1dfa31f85074f9d68450a714d8c0dc420240d725ef73ac0b3c428c6a3c2fd05639f4d2aacbe35371d929f
7
- data.tar.gz: b3143712b61f5f7691c46b017db9901eb6fcf5ffcc6288f43767d7525298702f864f4e4220b4486d522a0fc05813f8dd139abaa1aca70a2fa365a097ec3b265b
6
+ metadata.gz: 36111838c17b71691f8d16e2b4638d106823cb5b78d879c92b675f6d87a8241f3c5c8f42c92e39ce3fc7b45228875ffeb292aa30803836ec6dd28b8cdc8529f1
7
+ data.tar.gz: 773521c071ea206c07191528a681cc79b5c22476d7158b98a7e4cd5e253a852d1307b0864244733be09d3ed9e15d2a31a0484a23e69e4d3f4d5a0cc944544a04
@@ -12,6 +12,7 @@ module Admin
12
12
  end
13
13
 
14
14
  col :roles, search: roles_collection
15
+ col :display_on_directory, label: 'Directory'
15
16
 
16
17
  actions_col
17
18
  end
@@ -12,6 +12,7 @@ class EffectiveRepresentativesDatatable < Effective::Datatable
12
12
  end
13
13
 
14
14
  col :roles, search: roles_collection
15
+ col :display_on_directory, label: 'Directory'
15
16
 
16
17
  unless attributes[:actions] == false
17
18
  actions_col
@@ -16,6 +16,7 @@ module Effective
16
16
 
17
17
  effective_resource do
18
18
  roles_mask :integer
19
+ display_on_directory :boolean
19
20
 
20
21
  timestamps
21
22
  end
@@ -11,6 +11,7 @@
11
11
  = f.select :organization, { 'Organizations' => EffectiveMemberships.Organization.sorted }, polymorphic: true
12
12
 
13
13
  = f.checks :roles, EffectiveRoles.roles_collection(f.object, skip_disabled: true)
14
+ = f.check_box :display_on_directory
14
15
 
15
16
  - unless inline_datatable? && inline_datatable.attributes[:user_id].present?
16
17
  = f.radios :new_representative_user_action, ['Invite new user', 'Add existing user'], inline: true, label: 'Representative'
@@ -30,9 +31,10 @@
30
31
  = f.static_field :user
31
32
 
32
33
  = f.checks :roles, EffectiveRoles.roles_collection(f.object, skip_disabled: true)
34
+ = f.check_box :display_on_directory
33
35
 
34
36
  - unless inline_datatable? && inline_datatable.attributes[:user_id].present?
35
37
  = f.fields_for :user, f.object.user do |fu|
36
38
  = render 'admin/representatives/user_fields', f: fu
37
39
 
38
- = f.submit
40
+ = f.submit "Save " + et(f.object)
@@ -11,6 +11,7 @@
11
11
  = f.select :organization, { 'Organizations' => EffectiveMemberships.Organization.sorted }, polymorphic: true
12
12
 
13
13
  = f.checks :roles, EffectiveRoles.roles_collection(f.object, skip_disabled: true)
14
+ = f.check_box :display_on_directory
14
15
 
15
16
  - unless inline_datatable? && inline_datatable.attributes[:user_id].present?
16
17
  = f.hidden_field :new_representative_user_action, value: 'Invite new user'
@@ -26,8 +27,9 @@
26
27
  = f.static_field :user
27
28
 
28
29
  = f.checks :roles, EffectiveRoles.roles_collection(f.object, skip_disabled: true)
30
+ = f.check_box :display_on_directory
29
31
 
30
32
  = f.fields_for :user, f.object.user do |fu|
31
33
  = render 'effective/representatives/user_fields', f: fu
32
34
 
33
- = f.submit
35
+ = f.submit "Save " + et(f.object)
@@ -38,3 +38,7 @@ en:
38
38
  effective/membership_history: 'Membership History'
39
39
  effective/membership: 'Membership'
40
40
  effective/representative: 'Representative'
41
+
42
+ attributes:
43
+ effective/representative:
44
+ display_on_directory: 'Display this representative on the member directory'
@@ -184,6 +184,7 @@ class CreateEffectiveMemberships < ActiveRecord::Migration[6.0]
184
184
  t.string :user_type
185
185
 
186
186
  t.integer :roles_mask
187
+ t.boolean :display_on_directory, :boolean, default: false
187
188
 
188
189
  t.datetime :updated_at
189
190
  t.datetime :created_at
@@ -1,3 +1,3 @@
1
1
  module EffectiveMemberships
2
- VERSION = '0.15.3'
2
+ VERSION = '0.16.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_memberships
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.3
4
+ version: 0.16.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-04-20 00:00:00.000000000 Z
11
+ date: 2023-04-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails