effective_committees 0.0.2 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b793fe3d40958ea8fc7e853979a10ef40cdbdfc043893b93690ad62f8d5c7604
4
- data.tar.gz: 414192d935ae2fc8f6b5b24617a97c219e72a069728c8e3a22241ef7449301bb
3
+ metadata.gz: 28d74bcf027154279f851db5e99cee0c51b9186c25a837180e23dfafd697bbcc
4
+ data.tar.gz: 1e7641b9f98d62005a02bff2a16b28f00d9f2a8d2c4630f488aef2e61f5a8dcf
5
5
  SHA512:
6
- metadata.gz: 784a0ccd91b3d7fdff1023a75f41506a771b17293ad73cb4c14de8d1184cd1c580a10c46d29072302c182ed906d13910f6837e191169306e052fbf77b30a5a74
7
- data.tar.gz: 0b09e1874e3a24d4e29b71e12ecddf4920634d4c57fcdbf0a1c5d6e49210fb5e5b18c80d9d4507d0fbec1bd8852f19b18d4c13a0befe7530c0e6924c4d5d7495
6
+ metadata.gz: 93bd25448c0b357ac22b723a935e38afc912251b834e3f1974def069e8e1e514f78f00bcbf6129378e3da89f129d4cda7f3cb9778d2ed2d2cd8b2b7bf4e0e1a0
7
+ data.tar.gz: 60c71f4139a15d3d2b4a75fab1ed716af680d4f8f1686e79faf00c380ae3165308d7e4c91bda9ff1f9cd16c8cee48e5ecff044422a010d5983b9a5cc3eb0b6b7
@@ -3,5 +3,8 @@ module Effective
3
3
  before_action(:authenticate_user!) if defined?(Devise)
4
4
 
5
5
  include Effective::CrudController
6
+
7
+ resource_scope -> { Effective::CommitteeFolder.deep }
8
+
6
9
  end
7
10
  end
@@ -9,15 +9,15 @@ module Admin
9
9
 
10
10
  col :title, label: 'Committee'
11
11
  col :slug, visible: false
12
- col :body
12
+ col :body, visible: false
13
13
 
14
14
  col :committee_members, label: 'Members', search: :string
15
15
  col :committee_members_count, label: 'Members Count', visible: false
16
16
 
17
- col :committee_folders, label: 'Folders', search: :string
17
+ col :committee_folders, label: 'Folders', search: :string, visible: false
18
18
  col :committee_folders_count, label: 'Folders Count', visible: false
19
19
 
20
- col :committee_files, label: 'Files', search: :string
20
+ col :committee_files, label: 'Files', search: :string, visible: false
21
21
  col :committee_files_count, label: 'Files Count', visible: false
22
22
 
23
23
  actions_col do |committee|
@@ -30,7 +30,7 @@ module Effective
30
30
  end
31
31
 
32
32
  scope :sorted, -> { order(:title) }
33
- scope :deep, -> { includes(:committee_members) }
33
+ scope :deep, -> { includes(:committee_members, committee_folders: [:committee_files, :rich_text_body]) }
34
34
 
35
35
  validates :title, presence: true, uniqueness: true, length: { maximum: 255 }
36
36
 
@@ -10,7 +10,7 @@ module Effective
10
10
  belongs_to :committee, polymorphic: true, counter_cache: true
11
11
 
12
12
  has_rich_text :body
13
- has_many :committee_files, -> { Effective::CommitteeFile.sorted }, dependent: :destroy, inverse_of: :committee
13
+ has_many :committee_files, -> { Effective::CommitteeFile.sorted.deep }, dependent: :destroy, inverse_of: :committee
14
14
 
15
15
  effective_resource do
16
16
  title :string
@@ -8,8 +8,8 @@
8
8
  = f.text_field :title
9
9
 
10
10
  - if f.object.persisted? || f.object.errors.include?(:slug)
11
- - current_url = (effective_events.event_url(f.object) rescue nil)
12
- = f.text_field :slug, hint: "The slug controls this event's internet address. Be careful, changing the slug will break links that other websites may have to the old address.<br>#{('This folder is currently reachable via ' + link_to(current_url.gsub(f.object.slug, '<strong>' + f.object.slug + '</strong>').html_safe, current_url)) if current_url }".html_safe
11
+ - current_url = (effective_committees.commitee_url(f.object) rescue nil)
12
+ = f.text_field :slug, hint: "The slug controls this committee's internet address. Be careful, changing the slug will break links that other websites may have to the old address.<br>#{('This folder is currently reachable via ' + link_to(current_url.gsub(f.object.slug, '<strong>' + f.object.slug + '</strong>').html_safe, current_url)) if current_url }".html_safe
13
13
 
14
14
  = f.rich_text_area :body, hint: 'Displayed on the folder page'
15
15
 
@@ -1,7 +1,7 @@
1
1
  = f.text_field :title
2
2
 
3
3
  - if f.object.persisted? || f.object.errors.include?(:slug)
4
- - current_url = (effective_events.event_url(f.object) rescue nil)
5
- = f.text_field :slug, hint: "The slug controls this event's internet address. Be careful, changing the slug will break links that other websites may have to the old address.<br>#{('This committee is currently reachable via ' + link_to(current_url.gsub(f.object.slug, '<strong>' + f.object.slug + '</strong>').html_safe, current_url)) if current_url }".html_safe
4
+ - current_url = (effective_committees.committee_url(f.object) rescue nil)
5
+ = f.text_field :slug, hint: "The slug controls this committee's internet address. Be careful, changing the slug will break links that other websites may have to the old address.<br>#{('This committee is currently reachable via ' + link_to(current_url.gsub(f.object.slug, '<strong>' + f.object.slug + '</strong>').html_safe, current_url)) if current_url }".html_safe
6
6
 
7
7
  = f.rich_text_area :body, hint: 'Displayed on the committee page'
@@ -1,3 +1,3 @@
1
1
  module EffectiveCommittees
2
- VERSION = '0.0.2'.freeze
2
+ VERSION = '0.1.0'.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.0.2
4
+ version: 0.1.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: 2022-01-17 00:00:00.000000000 Z
11
+ date: 2022-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails