effective_committees 0.1.0 → 0.1.1

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: 28d74bcf027154279f851db5e99cee0c51b9186c25a837180e23dfafd697bbcc
4
- data.tar.gz: 1e7641b9f98d62005a02bff2a16b28f00d9f2a8d2c4630f488aef2e61f5a8dcf
3
+ metadata.gz: ef9838f8461539b97096dc72613ac01253875dc41511773d0dbeb882545243c1
4
+ data.tar.gz: 362122b9df304bd2c8fcc762dae5c769736002283199ed268bd77201cbc3fccb
5
5
  SHA512:
6
- metadata.gz: 93bd25448c0b357ac22b723a935e38afc912251b834e3f1974def069e8e1e514f78f00bcbf6129378e3da89f129d4cda7f3cb9778d2ed2d2cd8b2b7bf4e0e1a0
7
- data.tar.gz: 60c71f4139a15d3d2b4a75fab1ed716af680d4f8f1686e79faf00c380ae3165308d7e4c91bda9ff1f9cd16c8cee48e5ecff044422a010d5983b9a5cc3eb0b6b7
6
+ metadata.gz: efe535f511f6f965735afdf8e9ae696422ee9fbfbcbf22a6fe5d7446e50f384d441d9489d3e6a113f7c9315d00bf2588d17935235d9de065a2175e005e87c4d5
7
+ data.tar.gz: 8163275c582aa675ef646154931930f497fb5246ffa57f8b29115d7839902b7abfa8489df8bc56d3e904b0b290af4a2532384d6d2b88237d08f5b1e2de16e819
@@ -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'
@@ -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.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.1.0
4
+ version: 0.1.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: 2022-03-01 00:00:00.000000000 Z
11
+ date: 2022-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails