effective_committees 0.0.2 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/effective/committee_folders_controller.rb +3 -0
- data/app/datatables/admin/effective_committees_datatable.rb +3 -3
- data/app/models/effective/committee.rb +1 -1
- data/app/models/effective/committee_folder.rb +1 -1
- data/app/views/admin/committee_folders/_form.html.haml +2 -2
- data/app/views/admin/committees/_fields.html.haml +2 -2
- data/lib/effective_committees/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28d74bcf027154279f851db5e99cee0c51b9186c25a837180e23dfafd697bbcc
|
4
|
+
data.tar.gz: 1e7641b9f98d62005a02bff2a16b28f00d9f2a8d2c4630f488aef2e61f5a8dcf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 93bd25448c0b357ac22b723a935e38afc912251b834e3f1974def069e8e1e514f78f00bcbf6129378e3da89f129d4cda7f3cb9778d2ed2d2cd8b2b7bf4e0e1a0
|
7
|
+
data.tar.gz: 60c71f4139a15d3d2b4a75fab1ed716af680d4f8f1686e79faf00c380ae3165308d7e4c91bda9ff1f9cd16c8cee48e5ecff044422a010d5983b9a5cc3eb0b6b7
|
@@ -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 = (
|
12
|
-
= f.text_field :slug, hint: "The slug controls this
|
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 = (
|
5
|
-
= f.text_field :slug, hint: "The slug controls this
|
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'
|
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
|
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
|
11
|
+
date: 2022-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|