effective_committees 0.1.0 → 0.1.2

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: 28d74bcf027154279f851db5e99cee0c51b9186c25a837180e23dfafd697bbcc
4
- data.tar.gz: 1e7641b9f98d62005a02bff2a16b28f00d9f2a8d2c4630f488aef2e61f5a8dcf
3
+ metadata.gz: 63a0f1fb0d95dfae23974217952a389877c115b31e9ba3b73b616138ff0ae9b9
4
+ data.tar.gz: 38c05e3f466ae93f9258dd9394caa177a1fa7c4dd944b776e6866b9ecef2253a
5
5
  SHA512:
6
- metadata.gz: 93bd25448c0b357ac22b723a935e38afc912251b834e3f1974def069e8e1e514f78f00bcbf6129378e3da89f129d4cda7f3cb9778d2ed2d2cd8b2b7bf4e0e1a0
7
- data.tar.gz: 60c71f4139a15d3d2b4a75fab1ed716af680d4f8f1686e79faf00c380ae3165308d7e4c91bda9ff1f9cd16c8cee48e5ecff044422a010d5983b9a5cc3eb0b6b7
6
+ metadata.gz: 977e23882e20848a4b6aead2a8966e913664cf27ab396fc5ab24f3b85d58d47a9ae770ec368d2eb866ad88786beab86fb6982da6bf2956c805030f840ac8ab61
7
+ data.tar.gz: 6ab21c11c4bfec46be1347c57c0fca82163e601671a752a85735187c66ed5c66b51dda390e45d3b934098a305a17e319a3fcece909b31a062c41d9c0c9d84577
@@ -11,7 +11,10 @@
11
11
  - current_url = (effective_committees.commitee_url(f.object) rescue nil)
12
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
- = f.rich_text_area :body, hint: 'Displayed on the folder page'
14
+ - if defined?(EffectiveArticleEditor)
15
+ = f.article_editor :body, hint: 'Displayed on the folder page'
16
+ - else
17
+ = f.rich_text_area :body, hint: 'Displayed on the folder page'
15
18
 
16
19
  = f.submit
17
20
 
@@ -4,4 +4,7 @@
4
4
  - current_url = (effective_committees.committee_url(f.object) rescue nil)
5
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
- = f.rich_text_area :body, hint: 'Displayed on the committee page'
7
+ - if defined?(EffectiveArticleEditor)
8
+ = f.article_editor :body, hint: 'Displayed on the committee page'
9
+ - else
10
+ = f.rich_text_area :body, hint: 'Displayed on the committee page'
@@ -6,7 +6,7 @@
6
6
 
7
7
  .effective-committee-folder
8
8
  - if committee_folder.rich_text_body.present?
9
- .mb-4= committee_folder.rich_text_body
9
+ .mb-4= committee_folder.rich_text_body.to_s
10
10
 
11
11
  %table.table.table-striped
12
12
  %thead
@@ -5,7 +5,7 @@
5
5
 
6
6
  .effective-committee
7
7
  - if committee.rich_text_body.present?
8
- .mb-4= committee.rich_text_body
8
+ .mb-4= committee.rich_text_body.to_s
9
9
 
10
10
  %table.table.table-striped
11
11
  %thead
@@ -1,2 +1,6 @@
1
1
  = f.text_field :title
2
- = f.rich_text_area :rich_text_body, hint: 'The main body'
2
+
3
+ - if defined?(EffectiveArticleEditor)
4
+ = f.article_editor :rich_text_body, hint: 'The main body'
5
+ - else
6
+ = f.rich_text_area :rich_text_body, hint: 'The main body'
@@ -1,13 +1,66 @@
1
- class CreateEffectiveCommittees < ActiveRecord::Migration[6.0]
1
+ class CreateEffectiveCommittees < ActiveRecord::Migration[6.1]
2
2
  def change
3
3
  # Committees
4
- create_table :committees do |t|
4
+ create_table <%= @committees_table_name %> do |t|
5
+ t.string :title
6
+ t.string :slug
7
+
8
+ t.integer :committee_members_count, default: 0
9
+ t.integer :committee_folders_count, default: 0
10
+ t.integer :committee_files_count, default: 0
11
+
12
+ t.datetime :updated_at
13
+ t.datetime :created_at
5
14
  end
6
15
 
7
- add_index :committees, :title
16
+ add_index <%= @committees_table_name %>, :title
17
+ add_index <%= @committees_table_name %>, :slug
8
18
 
9
19
  # Representatives
10
- create_table :representatives do |t|
20
+ create_table <%= @committee_members_table_name %> do |t|
21
+ t.integer :committee_id
22
+ t.string :committee_type
23
+
24
+ t.integer :user_id
25
+ t.string :user_type
26
+
27
+ t.integer :roles_mask
28
+
29
+ t.datetime :updated_at
30
+ t.datetime :created_at
31
+ end
32
+
33
+ add_index <%= @committee_members_table_name %>, [:committee_id]
34
+ add_index <%= @committee_members_table_name %>, [:user_id, :user_type]
35
+
36
+ create_table <%= @committee_folders_table_name %> do |t|
37
+ t.integer :committee_id
38
+ t.string :committee_type
39
+
40
+ t.string :title
41
+ t.string :slug
42
+
43
+ t.integer :position
44
+ t.integer :committee_files_count, default: 0
45
+
46
+ t.datetime :updated_at
47
+ t.datetime :created_at
48
+ end
49
+
50
+ add_index <%= @committee_folders_table_name %>, [:committee_id, :committee_type]
51
+ add_index <%= @committee_folders_table_name %>, [:position]
52
+
53
+ create_table <%= @committee_files_table_name %> do |t|
54
+ t.integer :committee_id
55
+ t.string :committee_type
56
+
57
+ t.integer :committee_folder_id
58
+
59
+ t.string :title
60
+ t.text :notes
61
+
62
+ t.datetime :updated_at
63
+ t.datetime :created_at
11
64
  end
12
65
 
13
66
  end
@@ -1,3 +1,3 @@
1
1
  module EffectiveCommittees
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.1.2'.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.1.0
4
+ version: 0.1.2
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-03-01 00:00:00.000000000 Z
11
+ date: 2022-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails