effective_committees 0.4.0 → 0.4.1

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: d8a33f8d6be9ba291dc023ec6e8446f7c4ca40cf66177622cfb85800f766d350
4
- data.tar.gz: 3a1b0d3a1935cbc0eda280459ebe6438fc4e720ca3b1c71567a6c31d73edfd8c
3
+ metadata.gz: 9fabc85ad20b5778187b27d0dddc44fa061b230cf00313f246d63b19eefc0194
4
+ data.tar.gz: eff1264712bb09674761ed9b12e90e37b1b8f429dd4200029854a67b77fe1bbc
5
5
  SHA512:
6
- metadata.gz: cd7e918cfc94e6002b680f6214e4ee1c6b299a472c7ea140ccb9ac6ea4875e8fabb11d9192d8c30b9dc8897c097b10bcdb55815911bbb7a5a5ae67c956e84bbd
7
- data.tar.gz: 71c6f864296103d659ad309605b28ca71aeb53b9e12087c3f2013569419ddd8bfc5ecf52a030737e36aec42221a9efc241d5526531d8e5799428aa85bbd7228a
6
+ metadata.gz: d7a14251a0911976e25844e8b95772a5115a1309aa6e83730851dffad40003d05564041fad867655b88b0c7c1b05b0bd78e0bf3ac0c8b89c26e655862dba7087
7
+ data.tar.gz: b002ccbf9cf44d651fe7e71d0d2d6ae1096c39b8239a5cf3f7da9847d91c81d1a1083848d0093ba0cc0146c00b3b87866e3699feaf1f9d7751cc27c770997be2
@@ -1,35 +1,36 @@
1
- %nav{'aria-label': 'breadcrumb'}
2
- %ol.breadcrumb
3
- - if EffectiveResources.authorized?(self, :index, Effective::Committee)
4
- %li.breadcrumb-item= link_to("All #{committees_label}", effective_committees.committees_path)
5
- - elsif EffectiveResources.authorized?(self, :my_committees, Effective::Committee)
6
- %li.breadcrumb-item= link_to("My #{committees_label}", effective_committees.my_committees_path)
7
- - else
8
- %li.breadcrumb-item= link_to("Home", root_path)
1
+ = render('layout') do
2
+ %nav{'aria-label': 'breadcrumb'}
3
+ %ol.breadcrumb
4
+ - if EffectiveResources.authorized?(self, :index, Effective::Committee)
5
+ %li.breadcrumb-item= link_to("All #{committees_label}", effective_committees.committees_path)
6
+ - elsif EffectiveResources.authorized?(self, :my_committees, Effective::Committee)
7
+ %li.breadcrumb-item= link_to("My #{committees_label}", effective_committees.my_committees_path)
8
+ - else
9
+ %li.breadcrumb-item= link_to("Home", root_path)
9
10
 
10
- %li.breadcrumb-item= link_to(committee_folder.committee, effective_committees.committee_path(committee_folder.committee))
11
- %li.breadcrumb-item.active{'aria-current': 'page'}= committee_folder
11
+ %li.breadcrumb-item= link_to(committee_folder.committee, effective_committees.committee_path(committee_folder.committee))
12
+ %li.breadcrumb-item.active{'aria-current': 'page'}= committee_folder
12
13
 
13
- .effective-committee-folder
14
- - if committee_folder.rich_text_body.present?
15
- .mb-4= committee_folder.rich_text_body.to_s
14
+ .effective-committee-folder
15
+ - if committee_folder.rich_text_body.present?
16
+ .mb-4= committee_folder.rich_text_body.to_s
16
17
 
17
- %table.table.table-striped
18
- %thead
19
- %tr
20
- %th File
21
- %th Date Added
22
- %th Description
18
+ %table.table.table-striped
19
+ %thead
20
+ %tr
21
+ %th File
22
+ %th Date Added
23
+ %th Description
23
24
 
24
- - committee_folder.committee_files.each do |file|
25
- %tr
26
- %td
27
- - if file.file.attached?
28
- = link_to(icon('download') + ' ' + file.to_s, url_for(file.file), target: '_blank')
29
- - else
30
- = file.to_s
25
+ - committee_folder.committee_files.each do |file|
26
+ %tr
27
+ %td
28
+ - if file.file.attached?
29
+ = link_to(icon('download') + ' ' + file.to_s, url_for(file.file), target: '_blank')
30
+ - else
31
+ = file.to_s
31
32
 
32
- %td= file.created_at.strftime('%F')
33
- %td= file.notes
33
+ %td= file.created_at.strftime('%F')
34
+ %td= file.notes
34
35
 
35
- %p Displaying #{pluralize(committee_folder.committee_files.length, 'file')}
36
+ %p Displaying #{pluralize(committee_folder.committee_files.length, 'file')}
@@ -0,0 +1,2 @@
1
+ .effective-committee-folders
2
+ = yield
@@ -1,42 +1,43 @@
1
- %nav{'aria-label': 'breadcrumb'}
2
- %ol.breadcrumb
3
- - if EffectiveResources.authorized?(self, :index, Effective::Committee)
4
- %li.breadcrumb-item= link_to("All #{committees_label}", effective_committees.committees_path)
5
- - elsif EffectiveResources.authorized?(self, :my_committees, Effective::Committee)
6
- %li.breadcrumb-item= link_to("My #{committees_label}", effective_committees.my_committees_path)
7
- - else
8
- %li.breadcrumb-item= link_to("Home", root_path)
9
-
10
- %li.breadcrumb-item.active{'aria-current': 'page'}= committee
11
-
12
- .effective-committee
13
- - if committee.rich_text_body.present?
14
- .mb-4= committee.rich_text_body.to_s
15
-
16
- .mb-4
17
- = collapse("Show #{committee_members_label.downcase}") do
18
- - members = committee.committee_members.select(&:active?).sort_by(&:to_s)
19
-
20
- %p= pluralize(members.length, committee_member_label.downcase)
21
-
22
- %ul
23
- - members.each do |member|
24
- %li
25
- = member.user.to_s
26
- - if member.category.present?
27
- = badge(member.category)
28
-
29
- %table.table.table-striped
30
- %thead
31
- %tr
32
- %th Folder
33
- %th Files
34
- %th Description
35
-
36
- - committee.committee_folders.each do |folder|
37
- %tr
38
- %td= link_to(icon('folder') + ' ' + folder.to_s, effective_committees.committee_committee_folder_path(committee, folder))
39
- %td= pluralize(folder.committee_files.length, 'file')
40
- %td= folder.body.to_s
41
-
42
- %p Displaying #{pluralize(committee.committee_folders.length, 'folder')}
1
+ = render('layout') do
2
+ %nav{'aria-label': 'breadcrumb'}
3
+ %ol.breadcrumb
4
+ - if EffectiveResources.authorized?(self, :index, Effective::Committee)
5
+ %li.breadcrumb-item= link_to("All #{committees_label}", effective_committees.committees_path)
6
+ - elsif EffectiveResources.authorized?(self, :my_committees, Effective::Committee)
7
+ %li.breadcrumb-item= link_to("My #{committees_label}", effective_committees.my_committees_path)
8
+ - else
9
+ %li.breadcrumb-item= link_to("Home", root_path)
10
+
11
+ %li.breadcrumb-item.active{'aria-current': 'page'}= committee
12
+
13
+ .effective-committee
14
+ - if committee.rich_text_body.present?
15
+ .mb-4= committee.rich_text_body.to_s
16
+
17
+ .mb-4
18
+ = collapse("Show #{committee_members_label.downcase}") do
19
+ - members = committee.committee_members.select(&:active?).sort_by(&:to_s)
20
+
21
+ %p= pluralize(members.length, committee_member_label.downcase)
22
+
23
+ %ul
24
+ - members.each do |member|
25
+ %li
26
+ = member.user.to_s
27
+ - if member.category.present?
28
+ = badge(member.category)
29
+
30
+ %table.table.table-striped
31
+ %thead
32
+ %tr
33
+ %th Folder
34
+ %th Files
35
+ %th Description
36
+
37
+ - committee.committee_folders.each do |folder|
38
+ %tr
39
+ %td= link_to(icon('folder') + ' ' + folder.to_s, effective_committees.committee_committee_folder_path(committee, folder))
40
+ %td= pluralize(folder.committee_files.length, 'file')
41
+ %td= folder.body.to_s
42
+
43
+ %p Displaying #{pluralize(committee.committee_folders.length, 'folder')}
@@ -0,0 +1,2 @@
1
+ .effective-committees
2
+ = yield
@@ -1,36 +1,37 @@
1
1
  - committees = @committees.sorted
2
2
 
3
- %nav{'aria-label': 'breadcrumb'}
4
- %ol.breadcrumb
5
- %li.breadcrumb-item= link_to("Home", root_path)
6
- %li.breadcrumb-item.active{'aria-current': 'page'}= @page_title
7
-
8
- %h1= @page_title
9
-
10
- - if committees.blank?
11
- %p There are no #{committees_label.downcase} to display.
12
- - else
13
- %p
14
- = succeed('.') do
15
- There are #{pluralize(committees.length, committee_label.downcase)} and
16
- = pluralize(Effective::CommitteeMember.pluck(:user_id).uniq.length, committee_member_label.downcase)
17
-
18
- .effective-committees
19
- - committees.each do |committee|
20
- %h3= committee
21
-
22
- - members = committee.committee_members.select(&:active?).sort_by(&:to_s)
23
- %ul
24
- - members.each do |member|
25
- %li
26
- = member.user.to_s
27
- - if member.category.present?
28
- = badge(member.category)
29
-
30
- - if members.blank?
31
- %li No #{committee_members_label.downcase}
32
-
33
- .my-4
34
-
35
- .form-actions
36
- = link_to 'Continue', return_to_dashboard_path, class: 'btn btn-primary mb-4'
3
+ = render('layout') do
4
+ %nav{'aria-label': 'breadcrumb'}
5
+ %ol.breadcrumb
6
+ %li.breadcrumb-item= link_to("Home", root_path)
7
+ %li.breadcrumb-item.active{'aria-current': 'page'}= @page_title
8
+
9
+ %h1= @page_title
10
+
11
+ - if committees.blank?
12
+ %p There are no #{committees_label.downcase} to display.
13
+ - else
14
+ %p
15
+ = succeed('.') do
16
+ There are #{pluralize(committees.length, committee_label.downcase)} and
17
+ = pluralize(Effective::CommitteeMember.pluck(:user_id).uniq.length, committee_member_label.downcase)
18
+
19
+ .effective-committees
20
+ - committees.each do |committee|
21
+ %h3= committee
22
+
23
+ - members = committee.committee_members.select(&:active?).sort_by(&:to_s)
24
+ %ul
25
+ - members.each do |member|
26
+ %li
27
+ = member.user.to_s
28
+ - if member.category.present?
29
+ = badge(member.category)
30
+
31
+ - if members.blank?
32
+ %li No #{committee_members_label.downcase}
33
+
34
+ .my-4
35
+
36
+ .form-actions
37
+ = link_to 'Continue', return_to_dashboard_path, class: 'btn btn-primary mb-4'
@@ -1,46 +1,47 @@
1
1
  - committees = @committees.sorted.where(id: current_user.committees)
2
2
 
3
- %nav{'aria-label': 'breadcrumb'}
4
- %ol.breadcrumb
5
- - if EffectiveResources.authorized?(self, :index, Effective::Committee)
6
- %li.breadcrumb-item= link_to("All #{committees_label}", effective_committees.committees_path)
7
- - else
8
- %li.breadcrumb-item= link_to("Home", root_path)
9
-
10
- %li.breadcrumb-item.active{'aria-current': 'page'} My #{committees_label}
11
-
12
- - if committees.blank?
13
- %p There are no #{committees_label.downcase} to display.
14
-
15
- - if committees.present?
16
- %p You have access to #{pluralize(committees.length, committee_label.downcase)}: #{committees.to_sentence}
17
-
18
- .effective-committees
19
- - committees.each do |committee|
20
- .card
21
- .card-body
22
- = link_to(icon('folder') + ' ' + committee.to_s, effective_committees.committee_path(committee))
23
-
24
- = collapse("Show #{committee_members_label.downcase}", card_class: 'card card-body mt-4 mx-4', link_class: 'btn btn-link float-right') do
25
- - members = committee.committee_members.select(&:active?).sort_by(&:to_s)
26
-
27
- %p= pluralize(members.length, committee_member_label.downcase)
28
-
29
- %ul
30
- - members.each do |member|
31
- %li
32
- = member.user.to_s
33
- - if member.category.present?
34
- = badge(member.category)
35
-
36
- %table.table.table-striped.mt-3.ml-4
37
- - committee.committee_folders.each do |folder|
38
- %tr
39
- %td= link_to(icon('folder') + ' ' + folder.to_s, effective_committees.committee_committee_folder_path(committee, folder))
40
- %td= pluralize(folder.committee_files.length, 'file')
41
- %td= folder.body
42
-
43
- .my-4
44
-
45
- .form-actions
46
- = link_to 'Continue', return_to_dashboard_path, class: 'btn btn-primary mb-4'
3
+ = render('layout') do
4
+ %nav{'aria-label': 'breadcrumb'}
5
+ %ol.breadcrumb
6
+ - if EffectiveResources.authorized?(self, :index, Effective::Committee)
7
+ %li.breadcrumb-item= link_to("All #{committees_label}", effective_committees.committees_path)
8
+ - else
9
+ %li.breadcrumb-item= link_to("Home", root_path)
10
+
11
+ %li.breadcrumb-item.active{'aria-current': 'page'} My #{committees_label}
12
+
13
+ - if committees.blank?
14
+ %p There are no #{committees_label.downcase} to display.
15
+
16
+ - if committees.present?
17
+ %p You have access to #{pluralize(committees.length, committee_label.downcase)}: #{committees.to_sentence}
18
+
19
+ .effective-committees
20
+ - committees.each do |committee|
21
+ .card
22
+ .card-body
23
+ = link_to(icon('folder') + ' ' + committee.to_s, effective_committees.committee_path(committee))
24
+
25
+ = collapse("Show #{committee_members_label.downcase}", card_class: 'card card-body mt-4 mx-4', link_class: 'btn btn-link float-right') do
26
+ - members = committee.committee_members.select(&:active?).sort_by(&:to_s)
27
+
28
+ %p= pluralize(members.length, committee_member_label.downcase)
29
+
30
+ %ul
31
+ - members.each do |member|
32
+ %li
33
+ = member.user.to_s
34
+ - if member.category.present?
35
+ = badge(member.category)
36
+
37
+ %table.table.table-striped.mt-3.ml-4
38
+ - committee.committee_folders.each do |folder|
39
+ %tr
40
+ %td= link_to(icon('folder') + ' ' + folder.to_s, effective_committees.committee_committee_folder_path(committee, folder))
41
+ %td= pluralize(folder.committee_files.length, 'file')
42
+ %td= folder.body
43
+
44
+ .my-4
45
+
46
+ .form-actions
47
+ = link_to 'Continue', return_to_dashboard_path, class: 'btn btn-primary mb-4'
@@ -1,3 +1,3 @@
1
1
  module EffectiveCommittees
2
- VERSION = '0.4.0'.freeze
2
+ VERSION = '0.4.1'.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.4.0
4
+ version: 0.4.1
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: 2025-08-08 00:00:00.000000000 Z
11
+ date: 2025-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -206,6 +206,7 @@ files:
206
206
  - app/views/admin/committees/_form.html.haml
207
207
  - app/views/admin/committees/_form_committee.html.haml
208
208
  - app/views/effective/committee_folders/_committee_folder.html.haml
209
+ - app/views/effective/committee_folders/_layout.html.haml
209
210
  - app/views/effective/committee_members/_form.html.haml
210
211
  - app/views/effective/committee_members/_user_fields.html.haml
211
212
  - app/views/effective/committees/_committee.html.haml
@@ -213,6 +214,7 @@ files:
213
214
  - app/views/effective/committees/_fields.html.haml
214
215
  - app/views/effective/committees/_form.html.haml
215
216
  - app/views/effective/committees/_form_committee.html.haml
217
+ - app/views/effective/committees/_layout.html.haml
216
218
  - app/views/effective/committees/index.html.haml
217
219
  - app/views/effective/committees/my_committees.html.haml
218
220
  - config/effective_committees.rb