bullet_train-super_scaffolding 1.6.10 → 1.6.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/app/models/scaffolding/absolutely_abstract/creative_concept.rb +0 -18
  3. data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/_creative_concept.html.erb +0 -1
  4. data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/_index.html.erb +0 -1
  5. data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/show.html.erb +0 -31
  6. data/config/locales/en/scaffolding/absolutely_abstract/creative_concepts.en.yml +0 -8
  7. data/config/routes.rb +2 -18
  8. data/lib/bullet_train/super_scaffolding/version.rb +1 -1
  9. data/lib/generators/super_scaffold/USAGE +36 -0
  10. data/lib/generators/super_scaffold/field/USAGE +15 -0
  11. data/lib/generators/super_scaffold/field/field_generator.rb +27 -0
  12. data/lib/generators/super_scaffold/incoming_webhooks/USAGE +16 -0
  13. data/lib/generators/super_scaffold/incoming_webhooks/incoming_webhooks_generator.rb +18 -0
  14. data/lib/generators/super_scaffold/join_model/USAGE +28 -0
  15. data/lib/generators/super_scaffold/join_model/join_model_generator.rb +28 -0
  16. data/lib/generators/super_scaffold/oauth_provider/USAGE +50 -0
  17. data/lib/generators/super_scaffold/oauth_provider/oauth_provider_generator.rb +24 -0
  18. data/lib/generators/super_scaffold/super_scaffold_base.rb +41 -0
  19. data/lib/generators/super_scaffold/super_scaffold_generator.rb +34 -0
  20. data/lib/scaffolding/script.rb +2 -0
  21. data/lib/scaffolding/transformer.rb +1 -1
  22. metadata +13 -13
  23. data/app/controllers/account/scaffolding/absolutely_abstract/creative_concepts/collaborators_controller.rb +0 -81
  24. data/app/models/scaffolding/absolutely_abstract/creative_concepts/collaborator.rb +0 -39
  25. data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/_breadcrumbs.html.erb +0 -8
  26. data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/_form.html.erb +0 -19
  27. data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/_index.html.erb +0 -64
  28. data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/_menu_item.html.erb +0 -10
  29. data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/edit.html.erb +0 -7
  30. data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/index.html.erb +0 -4
  31. data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/new.html.erb +0 -7
  32. data/app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/show.html.erb +0 -29
  33. data/config/locales/en/scaffolding/absolutely_abstract/creative_concepts/collaborators.en.yml +0 -98
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5a81928799da06bd66f5a448dcca5c0ab9ab320634bce133c0e2f27ce2989033
4
- data.tar.gz: 6c9308af45451d22d1cfb3290702144b15dc946392595143810186d96c298091
3
+ metadata.gz: e5a15e9fcfe1268219c9bf057521179f25cfeeaa5c0a9411bcdcbd8cbe270152
4
+ data.tar.gz: 613a44877e831dd2c1e3715666d4059a623716a2450c2bd7ceff0aa304371e0c
5
5
  SHA512:
6
- metadata.gz: 489d045886f249d95899ef983aeb531291320a25693270c0d083633b375e8f8e1b138004fe998db6cb2396bd5b4ba180c56fc62b3d8977c5c2e79d979b4f7b40
7
- data.tar.gz: 7a63f65facdced42273921ec43dd5f52b6c9a267b207d61a0fcbc2cff35f2371d86f6613eb9bbbd09b94f87fe07e736060f35a16eece157d163d7c531d8bf3e3
6
+ metadata.gz: 2b076a56ddd441d854d649ba0dd5dd2e4f4494747bf1fde9b0b239eb32a82fbc04b2437186383da1fc90e2c025b446ed21899e5c5ef7c8e7b8f8ec9db2a0a4de
7
+ data.tar.gz: 713d83c5c6bc8d09653267cd7725548ffe7cad57d8000cf421e5ecf88c9373cab7048f4e8b4d39ca54bdfefcd2c84b841c63b39a756ca3d01ec55c2874944439
@@ -7,8 +7,6 @@ class Scaffolding::AbsolutelyAbstract::CreativeConcept < ApplicationRecord
7
7
  # TODO: We shouldn't have to explicitly set the order here, so we need to find out why these records
8
8
  # are being returned in descending order when calling @creative_concept.completely_concrete_tangible_things.
9
9
  has_many :completely_concrete_tangible_things, -> { order(:id) }, class_name: "Scaffolding::CompletelyConcrete::TangibleThing", foreign_key: :absolutely_abstract_creative_concept_id, dependent: :destroy
10
- has_many :collaborators, class_name: "Scaffolding::AbsolutelyAbstract::CreativeConcepts::Collaborator", dependent: :destroy, foreign_key: :creative_concept_id
11
- has_many :memberships, through: :collaborators
12
10
  # 🚅 add has_many associations above.
13
11
 
14
12
  # 🚅 add oauth providers above.
@@ -24,21 +22,5 @@ class Scaffolding::AbsolutelyAbstract::CreativeConcept < ApplicationRecord
24
22
 
25
23
  # 🚅 add delegations above.
26
24
 
27
- def admins
28
- collaborators.admins.map(&:membership)
29
- end
30
-
31
- def editors
32
- collaborators.editors.map(&:membership)
33
- end
34
-
35
- def viewers
36
- collaborators.viewers.map(&:membership)
37
- end
38
-
39
- def all_collaborators
40
- team.admins.or(Membership.where(id: memberships.pluck(:id)))
41
- end
42
-
43
25
  # 🚅 add methods above.
44
26
  end
@@ -5,7 +5,6 @@
5
5
  <% with_attribute_settings object: creative_concept do %>
6
6
  <tr data-id="<%= creative_concept.id %>">
7
7
  <td><%= render 'shared/attributes/text', attribute: :name, url: [:account, creative_concept] %></td>
8
- <td><%= render 'account/shared/memberships/photos', memberships: creative_concept.all_collaborators.excluding_platform_agents, size: 9, align: :center %></td>
9
8
  <%# 🚅 super scaffolding will insert new fields above this line. %>
10
9
  <td><%= display_date_and_time(creative_concept.created_at) %></td>
11
10
  <td class="buttons">
@@ -20,7 +20,6 @@
20
20
  <thead>
21
21
  <tr>
22
22
  <th><%= t('.fields.name.heading') %></th>
23
- <th class="text-center"><%= t('.fields.all_collaborators.heading') %></th>
24
23
  <%# 🚅 super scaffolding will insert new field headers above this line. %>
25
24
  <th><%= t('.fields.created_at.heading') %></th>
26
25
  <th></th>
@@ -9,33 +9,6 @@
9
9
  <%= render 'shared/attributes/text', attribute: :name %>
10
10
  <%= render 'shared/attributes/text', attribute: :description %>
11
11
  <%# 🚅 super scaffolding will insert new fields above this line. %>
12
-
13
- <div class="grid grid-cols-1 gap-y gap-x sm:grid-cols-3">
14
- <div class="sm:col-span-1">
15
- <%= render 'shared/attributes/base' do |p| %>
16
- <% p.heading t(".fields.admins.heading") %>
17
- <% p.body.render 'account/shared/memberships/photos', memberships: (@team.admins.reject(&:platform_agent?) + @creative_concept.admins.reject(&:platform_agent?)).uniq %>
18
- <% end %>
19
- </div>
20
-
21
- <% if @creative_concept.editors.any? %>
22
- <div class="sm:col-span-1">
23
- <%= render 'shared/attributes/base' do |p| %>
24
- <% p.heading t(".fields.editors.heading") %>
25
- <% p.body.render 'account/shared/memberships/photos', memberships: @creative_concept.editors.reject(&:platform_agent?) %>
26
- <% end %>
27
- </div>
28
- <% end %>
29
-
30
- <% if @creative_concept.viewers.any? %>
31
- <div class="sm:col-span-1">
32
- <%= render 'shared/attributes/base' do |p| %>
33
- <% p.heading t(".fields.viewers.heading") %>
34
- <% p.body.render 'account/shared/memberships/photos', memberships: @creative_concept.viewers.reject(&:platform_agent?) %>
35
- <% end %>
36
- </div>
37
- <% end %>
38
- </div>
39
12
  <% end %>
40
13
  <% end %>
41
14
 
@@ -49,10 +22,6 @@
49
22
 
50
23
  <%= render 'account/scaffolding/completely_concrete/tangible_things/index', tangible_things: @creative_concept.completely_concrete_tangible_things, hide_back: true %>
51
24
 
52
- <% if can? :read, Scaffolding::AbsolutelyAbstract::CreativeConcepts::Collaborator.new(creative_concept: @creative_concept) %>
53
- <%= render 'account/scaffolding/absolutely_abstract/creative_concepts/collaborators/index', collaborators: @creative_concept.collaborators, hide_back: true %>
54
- <% end %>
55
-
56
25
  <%# 🚅 super scaffolding will insert new children above this line. %>
57
26
  <% end %>
58
27
  <% end %>
@@ -31,14 +31,6 @@ en:
31
31
  name: &description Description
32
32
  label: *description
33
33
  heading: *description
34
- all_collaborators:
35
- heading: Collaborators
36
- admins:
37
- heading: Administrators
38
- editors:
39
- heading: Editors
40
- viewers:
41
- heading: Viewers
42
34
  # 🚅 super scaffolding will insert new fields above this line.
43
35
  created_at:
44
36
  name: &created_at Added
data/config/routes.rb CHANGED
@@ -10,15 +10,7 @@ Rails.application.routes.draw do
10
10
  unless scaffolding_things_disabled?
11
11
  namespace :scaffolding do
12
12
  namespace :absolutely_abstract do
13
- resources :creative_concepts do
14
- scope module: "creative_concepts" do
15
- resources :collaborators, only: collection_actions
16
- end
17
-
18
- namespace :creative_concepts do
19
- resources :collaborators, except: collection_actions
20
- end
21
- end
13
+ resources :creative_concepts
22
14
  end
23
15
  resources :absolutely_abstract_creative_concepts, path: "absolutely_abstract/creative_concepts" do
24
16
  namespace :completely_concrete do
@@ -38,15 +30,7 @@ Rails.application.routes.draw do
38
30
  unless scaffolding_things_disabled?
39
31
  namespace :scaffolding do
40
32
  namespace :absolutely_abstract do
41
- resources :creative_concepts do
42
- scope module: "creative_concepts" do
43
- resources :collaborators, only: collection_actions
44
- end
45
-
46
- namespace :creative_concepts do
47
- resources :collaborators, except: collection_actions
48
- end
49
- end
33
+ resources :creative_concepts
50
34
  end
51
35
  resources :absolutely_abstract_creative_concepts, path: "absolutely_abstract/creative_concepts" do
52
36
  namespace :completely_concrete do
@@ -1,5 +1,5 @@
1
1
  module BulletTrain
2
2
  module SuperScaffolding
3
- VERSION = "1.6.10"
3
+ VERSION = "1.6.12"
4
4
  end
5
5
  end
@@ -0,0 +1,36 @@
1
+ Description:
2
+ Generate a production ready CRUD interface for a model. See the docs for more details:
3
+ https://bullettrain.co/docs/super-scaffolding
4
+
5
+ E.g. a Team has many Sites with some attributes:
6
+ rails g super_scaffold Site Team name:text_field url:text_area
7
+
8
+ E.g. a Section belongs to a Page, which belongs to a Site, which belongs to a Team:
9
+ rails g super_scaffold Section Page,Site,Team title:text_field body:text_area
10
+
11
+ E.g. an Image belongs to either a Page or a Site:
12
+ Doable! See https://bit.ly/2NvO8El for a step by step guide.
13
+
14
+ E.g. Pages belong to a Site and are sortable via drag-and-drop:
15
+ rails g super_scaffold Page Site,Team name:text_field path:text_area --sortable
16
+
17
+ Example:
18
+ E.g. a Team has many Projects each having a name:
19
+ bin/rails generate super_scaffold Project Team name:text_field
20
+
21
+ This will create:
22
+ app/controllers/account/projects_controller.rb
23
+ app/controllers/api/v1/projects_controller.rb
24
+ app/models/project.rb
25
+ app/views/account/projects/
26
+ app/views/api/v1/projects/
27
+ config/locales/en/projects.en.yml
28
+ db/migrate/20231004190209_create_projects.rb
29
+ test/controllers/api/v1/projects_controller_test.rb
30
+ test/factories/projects.rb
31
+ test/models/project_test.rb
32
+
33
+ 🏆 Protip: Commit your other changes before running Super Scaffolding so it's easy to undo if you (or we) make any mistakes.
34
+ If you do that, you can reset to your last commit state by using `git checkout .` and `git clean -d -f`.
35
+
36
+ Give it a shot! Let us know if you have any trouble with it! ✌️
@@ -0,0 +1,15 @@
1
+ Description:
2
+ Add a new field to an existing Super Scaffold. See the docs for more details:
3
+ https://bullettrain.co/docs/super-scaffolding
4
+
5
+ Example:
6
+ bin/rails generate super_scaffold:field Project description:trix_editor
7
+
8
+ This will update:
9
+ app/models/project.rb
10
+ app/views/account/projects/_form.html.erb
11
+ app/views/account/projects/show.html.erb
12
+ config/locales/en/projects.en.yml
13
+ config/locales/en/projects.en.yml
14
+ app/controllers/account/projects_controller.rb
15
+ app/controllers/api/v1/projects_controller.rb
@@ -0,0 +1,27 @@
1
+ require_relative "../super_scaffold_base"
2
+
3
+ class FieldGenerator < Rails::Generators::Base
4
+ include SuperScaffoldBase
5
+
6
+ source_root File.expand_path("templates", __dir__)
7
+
8
+ namespace "super_scaffold:field"
9
+
10
+ argument :model, type: :string
11
+ argument :attributes, type: :array, default: [], banner: "attribute:type attribute:type"
12
+
13
+ class_option :skip_migration_generation, type: :boolean, default: false, desc: "Don't generate the model migration"
14
+ class_option :skip_form, type: :boolean, default: false, desc: "Don't alter the new/edit form"
15
+ class_option :skip_show, type: :boolean, default: false, desc: "Don't alter the show view"
16
+ class_option :skip_table, type: :boolean, default: false, desc: "Only add to the new/edit form and show view."
17
+ class_option :skip_locales, type: :boolean, default: false, desc: "Don't alter locale files"
18
+ class_option :skip_api, type: :boolean, default: false, desc: "Don't alter the api payloads"
19
+ class_option :skip_model, type: :boolean, default: false, desc: "Don't alter the model file"
20
+
21
+ def generate
22
+ # We add the name of the specific super_scaffolding command that we want to
23
+ # invoke to the beginning of the argument string.
24
+ ARGV.unshift "crud-field"
25
+ BulletTrain::SuperScaffolding::Runner.new.run
26
+ end
27
+ end
@@ -0,0 +1,16 @@
1
+ Description:
2
+ Generate a handler for incoming webhooks from an outside source.
3
+
4
+ Example:
5
+ E.g. prepare to receive system-level webhooks from ClickFunnels
6
+ rails g bullet_train:incoming_webhooks ClickFunnels
7
+
8
+ This will create:
9
+ app/models/webhooks/incoming/click_funnel_webhook.rb
10
+ app/controllers/webhooks/incoming/click_funnel_webhooks_controller.rb
11
+ test/controllers/webhooks/incoming/click_funnel_webhooks_controller_test.rb
12
+ And update:
13
+ config/routes.rb
14
+
15
+ 🏆 Protip: Commit your other changes before running Super Scaffolding so it's easy to undo if you (or we) make any mistakes.
16
+ If you do that, you can reset to your last commit state by using `git checkout .` and `git clean -d -f`.
@@ -0,0 +1,18 @@
1
+ require_relative "super_scaffold_base"
2
+
3
+ class IncomingWebhooksGenerator < Rails::Generators::Base
4
+ include SuperScaffoldBase
5
+
6
+ source_root File.expand_path("templates", __dir__)
7
+
8
+ namespace "super_scaffold:incoming_webhooks"
9
+
10
+ argument :provider_name
11
+
12
+ def generate
13
+ # We add the name of the specific super_scaffolding command that we want to
14
+ # invoke to the beginning of the argument string.
15
+ ARGV.unshift "incoming-webhooks"
16
+ BulletTrain::SuperScaffolding::Runner.new.run
17
+ end
18
+ end
@@ -0,0 +1,28 @@
1
+ Description:
2
+ Generate a Bullet Train Join Model.
3
+
4
+ Example:
5
+ E.g. Add project-specific tags to a project:
6
+
7
+ Given the following example models:
8
+
9
+ rails g super_scaffold Project Team name:text_field description:trix_editor
10
+ rails g super_scaffold Projects::Tag Team name:text_field
11
+
12
+ 1️⃣ Use the standard Rails model generator to generate the join model:
13
+
14
+ rails g model Projects::AppliedTag project:references tag:references
15
+
16
+ 👋 Don't run migrations yet! Sometimes Super Scaffolding updates them for you.
17
+
18
+ 2️⃣ Use `join-model` scaffolding to prepare the join model for use in `crud-field` scaffolding:
19
+
20
+ rails g bullet_train:join_model Projects::AppliedTag project_id{class_name=Project} tag_id{class_name=Projects::Tag}
21
+
22
+ 3️⃣ Now you can use `crud-field` scaffolding to actually add the field to the form of the parent model:
23
+
24
+ rails g super_scaffold:field Project tag_ids:super_select{class_name=Projects::Tag}
25
+
26
+ 👋 Heads up! There will be one follow-up step output by this command that you need to take action on.
27
+
28
+ 4️⃣ Now you can run your migrations.
@@ -0,0 +1,28 @@
1
+ require_relative "super_scaffold_base"
2
+
3
+ class JoinModelGenerator < Rails::Generators::Base
4
+ include SuperScaffoldBase
5
+
6
+ source_root File.expand_path("templates", __dir__)
7
+
8
+ namespace "super_scaffold:join_model"
9
+
10
+ argument :join_model
11
+ argument :left_association
12
+ argument :right_association
13
+
14
+ class_option :skip_migration_generation, type: :boolean, default: false, desc: "Don't generate the model migration"
15
+ class_option :skip_form, type: :boolean, default: false, desc: "Don't alter the new/edit form"
16
+ class_option :skip_show, type: :boolean, default: false, desc: "Don't alter the show view"
17
+ class_option :skip_table, type: :boolean, default: false, desc: "Only add to the new/edit form and show view."
18
+ class_option :skip_locales, type: :boolean, default: false, desc: "Don't alter locale files"
19
+ class_option :skip_api, type: :boolean, default: false, desc: "Don't alter the api payloads"
20
+ class_option :skip_model, type: :boolean, default: false, desc: "Don't alter the model file"
21
+
22
+ def generate
23
+ # We add the name of the specific super_scaffolding command that we want to
24
+ # invoke to the beginning of the argument string.
25
+ ARGV.unshift "join-model"
26
+ BulletTrain::SuperScaffolding::Runner.new.run
27
+ end
28
+ end
@@ -0,0 +1,50 @@
1
+ Description:
2
+ Generate the setup and configuration for using an external OAuth Provider.
3
+
4
+ For a list of readily available provider strategies, see https://github.com/omniauth/omniauth/wiki/List-of-Strategies
5
+
6
+ Example:
7
+ E.g. what we actually did to start Shopify off:
8
+ bin/rails generate bullet_train:oauth_provider omniauth-shopify-oauth2 shopify Oauth::ShopifyAccount SHOPIFY_API_KEY SHOPIFY_API_SECRET_KEY --icon=ti-shopping-cart
9
+ (Please note here that the SHOPIFY_API_KEY and SHOPIFY_API_SECRET_KEY strings are not the actual values, just the names we give to the environment variables.)
10
+
11
+ This will create:
12
+ app/models/oauth/shopify_account.rb
13
+ app/models/concerns/oauth/shopify_accounts/base.rb
14
+ app/models/webhooks/incoming/oauth/shopify_account_webhook.rb
15
+ app/models/concerns/webhooks/incoming/oauth/shopify_account_webhooks/base.rb
16
+ app/controllers/account/oauth/shopify_accounts_controller.rb
17
+ app/controllers/webhooks/incoming/oauth/shopify_account_webhooks_controller.rb
18
+ app/views/account/oauth/shopify_accounts/index.html.erb
19
+ app/views/account/oauth/shopify_accounts/_menu_item.html.erb
20
+ app/views/account/oauth/shopify_accounts/_index.html.erb
21
+ app/views/account/oauth/shopify_accounts/edit.html.erb
22
+ app/views/account/oauth/shopify_accounts/show.html.erb
23
+ app/views/account/oauth/shopify_accounts/_form.html.erb
24
+ app/views/account/oauth/shopify_accounts/_breadcrumbs.html.erb
25
+ test/models/oauth/shopify_account_test.rb
26
+ test/factories/oauth/shopify_accounts.rb
27
+ config/locales/en/oauth/shopify_accounts.en.yml
28
+ app/views/devise/shared/oauth/_shopify.html.erb
29
+ app/models/integrations/shopify_installation.rb
30
+ app/models/concerns/integrations/shopify_installations/base.rb
31
+ app/controllers/account/integrations/shopify_installations_controller.rb
32
+ app/views/account/integrations/shopify_installations/index.html.erb
33
+ app/views/account/integrations/shopify_installations/_menu_item.html.erb
34
+ app/views/account/integrations/shopify_installations/_index.html.erb
35
+ app/views/account/integrations/shopify_installations/_list.html.erb
36
+ app/views/account/integrations/shopify_installations/edit.html.erb
37
+ app/views/account/integrations/shopify_installations/show.html.erb
38
+ app/views/account/integrations/shopify_installations/_form.html.erb
39
+ app/views/account/integrations/shopify_installations/new.html.erb
40
+ app/views/account/integrations/shopify_installations/_breadcrumbs.html.erb
41
+ test/models/integrations/shopify_installation_test.rb
42
+ test/factories/integrations/shopify_installations.rb
43
+ config/locales/en/integrations/shopify_installations.en.yml
44
+ app/models/webhooks/incoming/oauth/shopify_account_webhook.rb
45
+ app/controllers/webhooks/incoming/oauth/shopify_account_webhooks_controller.rb
46
+
47
+ 🏆 Protip: Commit your other changes before running Super Scaffolding so it's easy to undo if you (or we) make any mistakes.
48
+ If you do that, you can reset to your last commit state by using `git checkout .` and `git clean -d -f`.
49
+
50
+
@@ -0,0 +1,24 @@
1
+ require_relative "super_scaffold_base"
2
+
3
+ class OauthProviderGenerator < Rails::Generators::Base
4
+ include SuperScaffoldBase
5
+
6
+ source_root File.expand_path("templates", __dir__)
7
+
8
+ namespace "super_scaffold:oauth_provider"
9
+
10
+ argument :omniauth_gem
11
+ argument :gems_provider_name
12
+ argument :our_provider_name
13
+ argument :PROVIDER_API_KEY_ENV_VAR_NAME
14
+ argument :PROVIDER_API_SECRET_ENV_VAR_NAME
15
+
16
+ class_option :icon, type: :string, desc: "Specify an icon."
17
+
18
+ def generate
19
+ # We add the name of the specific super_scaffolding command that we want to
20
+ # invoke to the beginning of the argument string.
21
+ ARGV.unshift "oauth-provider"
22
+ BulletTrain::SuperScaffolding::Runner.new.run
23
+ end
24
+ end
@@ -0,0 +1,41 @@
1
+ module SuperScaffoldBase
2
+ extend ActiveSupport::Concern
3
+
4
+ included do
5
+ # ##############################
6
+ #
7
+ # TODO: Should we retain some of these class options?
8
+ #
9
+ # By default we inherit a bunch of options that _would_ automatically be used if we
10
+ # were writing a normal Rails generator that used normal methods of generating files.
11
+ # So if you invoke this generator without passing any arguments (and without these
12
+ # remove_class_option lines) then at the top of the help text you'd see info about all
13
+ # of these options:
14
+ #
15
+ # ##############################
16
+ #
17
+ # rails g super_scaffold
18
+ #
19
+ # Options:
20
+ # [--skip-namespace], [--no-skip-namespace] # Skip namespace (affects only isolated engines)
21
+ # [--skip-collision-check], [--no-skip-collision-check] # Skip collision check
22
+ #
23
+ # Runtime options:
24
+ # -f, [--force] # Overwrite files that already exist
25
+ # -p, [--pretend], [--no-pretend] # Run but do not make any changes
26
+ # -q, [--quiet], [--no-quiet] # Suppress status output
27
+ # -s, [--skip], [--no-skip] # Skip files that already exist
28
+ #
29
+ # ##############################
30
+ #
31
+ # Maye we have comparable options for some of these and should retain them and
32
+ # pass them through to the rake task?
33
+
34
+ remove_class_option :skip_namespace
35
+ remove_class_option :skip_collision_check
36
+ remove_class_option :force
37
+ remove_class_option :pretend
38
+ remove_class_option :quiet
39
+ remove_class_option :skip
40
+ end
41
+ end
@@ -0,0 +1,34 @@
1
+ require_relative "super_scaffold_base"
2
+
3
+ class SuperScaffoldGenerator < Rails::Generators::Base
4
+ include SuperScaffoldBase
5
+
6
+ source_root File.expand_path("templates", __dir__)
7
+
8
+ namespace "super_scaffold"
9
+
10
+ argument :model, type: :string
11
+ argument :parent_models, type: :string
12
+ argument :attributes, type: :array, default: [], banner: "attribute:type attribute:type"
13
+
14
+ class_option :skip_migration_generation, type: :boolean, default: false, desc: "Don't generate the model migration"
15
+ class_option :sortable, type: :boolean, default: false, desc: "https://bullettrain.co/docs/super-scaffolding/sortable"
16
+ class_option :namespace, type: :string, desc: "https://bullettrain.co/docs/namespacing"
17
+ class_option :sidebar, type: :string, desc: "Pass the Themify icon or Font Awesome icon to automatically add it to the navbar"
18
+ class_option :only_index, type: :boolean, default: false, desc: "Only scaffold the index view for a model"
19
+ class_option :skip_views, type: :boolean, default: false, desc: "Don't generate views"
20
+ class_option :skip_form, type: :boolean, default: false, desc: "Don't generate a new/edit form"
21
+ class_option :skip_locales, type: :boolean, default: false, desc: "Don't generate locale files"
22
+ class_option :skip_api, type: :boolean, default: false, desc: "Don't generate api files"
23
+ class_option :skip_model, type: :boolean, default: false, desc: "Don't generate a model file"
24
+ class_option :skip_controller, type: :boolean, default: false, desc: "Don't generate a controller file"
25
+ class_option :skip_routes, type: :boolean, default: false, desc: "Don't generate any routes"
26
+ class_option :skip_parent, type: :boolean, default: false, desc: "Don't add child models to the show page of their parent"
27
+
28
+ def generate
29
+ # We add the name of the specific super_scaffolding command that we want to
30
+ # invoke to the beginning of the argument string.
31
+ ARGV.unshift "crud"
32
+ BulletTrain::SuperScaffolding::Runner.new.run
33
+ end
34
+ end
@@ -237,6 +237,8 @@ scaffolding_type = argv.shift
237
237
  if BulletTrain::SuperScaffolding.scaffolders.include?(scaffolding_type)
238
238
  scaffolder = BulletTrain::SuperScaffolding.scaffolders[scaffolding_type].constantize
239
239
  scaffolder.new(argv, @options).run
240
+ elsif argv.empty? || !BulletTrain::SuperScaffolding.scaffolders.include?(scaffolding_type)
241
+ show_usage
240
242
  elsif argv.count > 1
241
243
  puts ""
242
244
  puts "👋"
@@ -396,7 +396,7 @@ class Scaffolding::Transformer
396
396
  transformed_content_to_replace = transform_string(content_to_replace)
397
397
  content_replacement_transformed = content_to_replace != transformed_content_to_replace
398
398
  options = {suppress_could_not_find: suppress_could_not_find, content_replacement_transformed: content_replacement_transformed}
399
- Scaffolding::FileManipulator.replace_line_in_file(file, content, transformed_content_to_replace, **options)
399
+ Scaffolding::FileManipulator.replace_line_in_file(file, content, transformed_content_to_replace, options)
400
400
  end
401
401
 
402
402
  # if class_name isn't specified, we use `child`.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet_train-super_scaffolding
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.10
4
+ version: 1.6.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-03 00:00:00.000000000 Z
11
+ date: 2023-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard
@@ -92,7 +92,6 @@ files:
92
92
  - README.md
93
93
  - Rakefile
94
94
  - app/assets/config/bullet_train_super_scaffolding_manifest.js
95
- - app/controllers/account/scaffolding/absolutely_abstract/creative_concepts/collaborators_controller.rb
96
95
  - app/controllers/account/scaffolding/absolutely_abstract/creative_concepts_controller.rb
97
96
  - app/controllers/account/scaffolding/completely_concrete/tangible_things_controller.rb
98
97
  - app/controllers/api.rb
@@ -108,7 +107,6 @@ files:
108
107
  - app/models/scaffolding/absolutely_abstract.rb
109
108
  - app/models/scaffolding/absolutely_abstract/creative_concept.rb
110
109
  - app/models/scaffolding/absolutely_abstract/creative_concepts.rb
111
- - app/models/scaffolding/absolutely_abstract/creative_concepts/collaborator.rb
112
110
  - app/models/scaffolding/completely_concrete.rb
113
111
  - app/models/scaffolding/completely_concrete/tangible_thing.rb
114
112
  - app/models/scaffolding/completely_concrete/tangible_things.rb
@@ -118,14 +116,6 @@ files:
118
116
  - app/views/account/scaffolding/absolutely_abstract/creative_concepts/_form.html.erb
119
117
  - app/views/account/scaffolding/absolutely_abstract/creative_concepts/_index.html.erb
120
118
  - app/views/account/scaffolding/absolutely_abstract/creative_concepts/_menu_item.html.erb
121
- - app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/_breadcrumbs.html.erb
122
- - app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/_form.html.erb
123
- - app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/_index.html.erb
124
- - app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/_menu_item.html.erb
125
- - app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/edit.html.erb
126
- - app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/index.html.erb
127
- - app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/new.html.erb
128
- - app/views/account/scaffolding/absolutely_abstract/creative_concepts/collaborators/show.html.erb
129
119
  - app/views/account/scaffolding/absolutely_abstract/creative_concepts/edit.html.erb
130
120
  - app/views/account/scaffolding/absolutely_abstract/creative_concepts/index.html.erb
131
121
  - app/views/account/scaffolding/absolutely_abstract/creative_concepts/new.html.erb
@@ -149,7 +139,6 @@ files:
149
139
  - app/views/shared/tables/_checkbox.html.erb
150
140
  - app/views/shared/tables/_select_all.html.erb
151
141
  - config/locales/en/scaffolding/absolutely_abstract/creative_concepts.en.yml
152
- - config/locales/en/scaffolding/absolutely_abstract/creative_concepts/collaborators.en.yml
153
142
  - config/locales/en/scaffolding/completely_concrete/tangible_things.en.yml
154
143
  - config/routes.rb
155
144
  - db/migrate/20190124040656_add_csv_import_to_scaffolding_things.rb
@@ -174,6 +163,17 @@ files:
174
163
  - lib/bullet_train/super_scaffolding/scaffolders/oauth_provider_scaffolder.rb
175
164
  - lib/bullet_train/super_scaffolding/version.rb
176
165
  - lib/bullet_train/terminal_commands.rb
166
+ - lib/generators/super_scaffold/USAGE
167
+ - lib/generators/super_scaffold/field/USAGE
168
+ - lib/generators/super_scaffold/field/field_generator.rb
169
+ - lib/generators/super_scaffold/incoming_webhooks/USAGE
170
+ - lib/generators/super_scaffold/incoming_webhooks/incoming_webhooks_generator.rb
171
+ - lib/generators/super_scaffold/join_model/USAGE
172
+ - lib/generators/super_scaffold/join_model/join_model_generator.rb
173
+ - lib/generators/super_scaffold/oauth_provider/USAGE
174
+ - lib/generators/super_scaffold/oauth_provider/oauth_provider_generator.rb
175
+ - lib/generators/super_scaffold/super_scaffold_base.rb
176
+ - lib/generators/super_scaffold/super_scaffold_generator.rb
177
177
  - lib/scaffolding.rb
178
178
  - lib/scaffolding/attribute.rb
179
179
  - lib/scaffolding/block_manipulator.rb
@@ -1,81 +0,0 @@
1
- class Account::Scaffolding::AbsolutelyAbstract::CreativeConcepts::CollaboratorsController < Account::ApplicationController
2
- account_load_and_authorize_resource :collaborator, through: :creative_concept, through_association: :collaborators
3
-
4
- # GET /account/scaffolding/absolutely_abstract/creative_concepts/:creative_concept_id/collaborators
5
- # GET /account/scaffolding/absolutely_abstract/creative_concepts/:creative_concept_id/collaborators.json
6
- def index
7
- redirect_to [:account, @creative_concept]
8
- end
9
-
10
- # GET /account/scaffolding/absolutely_abstract/creative_concepts/collaborators/:id
11
- # GET /account/scaffolding/absolutely_abstract/creative_concepts/collaborators/:id.json
12
- def show
13
- redirect_to [:account, @creative_concept]
14
- end
15
-
16
- # GET /account/scaffolding/absolutely_abstract/creative_concepts/:creative_concept_id/collaborators/new
17
- def new
18
- end
19
-
20
- # GET /account/scaffolding/absolutely_abstract/creative_concepts/collaborators/:id/edit
21
- def edit
22
- end
23
-
24
- # POST /account/scaffolding/absolutely_abstract/creative_concepts/:creative_concept_id/collaborators
25
- # POST /account/scaffolding/absolutely_abstract/creative_concepts/:creative_concept_id/collaborators.json
26
- def create
27
- respond_to do |format|
28
- if @collaborator.save
29
- format.html { redirect_to [:account, @creative_concept, :collaborators], notice: I18n.t("scaffolding/absolutely_abstract/creative_concepts/collaborators.notifications.created") }
30
- format.json { render :show, status: :created, location: [:account, @collaborator] }
31
- else
32
- format.html { render :new, status: :unprocessable_entity }
33
- format.json { render json: @collaborator.errors, status: :unprocessable_entity }
34
- end
35
- end
36
- end
37
-
38
- # PATCH/PUT /account/scaffolding/absolutely_abstract/creative_concepts/collaborators/:id
39
- # PATCH/PUT /account/scaffolding/absolutely_abstract/creative_concepts/collaborators/:id.json
40
- def update
41
- respond_to do |format|
42
- if @collaborator.update(collaborator_params)
43
- format.html { redirect_to [:account, @collaborator], notice: I18n.t("scaffolding/absolutely_abstract/creative_concepts/collaborators.notifications.updated") }
44
- format.json { render :show, status: :ok, location: [:account, @collaborator] }
45
- else
46
- format.html { render :edit, status: :unprocessable_entity }
47
- format.json { render json: @collaborator.errors, status: :unprocessable_entity }
48
- end
49
- end
50
- end
51
-
52
- # DELETE /account/scaffolding/absolutely_abstract/creative_concepts/collaborators/:id
53
- # DELETE /account/scaffolding/absolutely_abstract/creative_concepts/collaborators/:id.json
54
- def destroy
55
- @collaborator.destroy
56
- respond_to do |format|
57
- format.html { redirect_to [:account, @creative_concept, :collaborators], notice: I18n.t("scaffolding/absolutely_abstract/creative_concepts/collaborators.notifications.destroyed") }
58
- format.json { head :no_content }
59
- end
60
- end
61
-
62
- private
63
-
64
- # Only allow a list of trusted parameters through.
65
- def collaborator_params
66
- role_ids = params.dig(:scaffolding_absolutely_abstract_creative_concepts_collaborator, :role_ids)
67
- role_ids = [role_ids] unless role_ids.is_a?(Array)
68
- params[:scaffolding_absolutely_abstract_creative_concepts_collaborator][:role_ids] = role_ids
69
- strong_params = params.require(:scaffolding_absolutely_abstract_creative_concepts_collaborator).permit(
70
- :membership_id,
71
- # 🚅 super scaffolding will insert new fields above this line.
72
- role_ids: []
73
- # 🚅 super scaffolding will insert new arrays above this line.
74
- )
75
-
76
- assign_checkboxes(strong_params, :roles)
77
- # 🚅 super scaffolding will insert processing for new fields above this line.
78
-
79
- strong_params
80
- end
81
- end
@@ -1,39 +0,0 @@
1
- class Scaffolding::AbsolutelyAbstract::CreativeConcepts::Collaborator < ApplicationRecord
2
- include Roles::Support
3
- # 🚅 add concerns above.
4
-
5
- belongs_to :creative_concept
6
- belongs_to :membership
7
- # 🚅 add belongs_to associations above.
8
-
9
- # 🚅 add has_many associations above.
10
-
11
- has_one :team, through: :creative_concept
12
- has_one :user, through: :membership
13
- # 🚅 add has_one associations above.
14
-
15
- # 🚅 add scopes above.
16
-
17
- validates :membership_id, presence: true
18
- validate :validate_membership
19
- # 🚅 add validations above.
20
-
21
- # 🚅 add callbacks above.
22
-
23
- # 🚅 add delegations above.
24
-
25
- def valid_memberships
26
- team.memberships.current_and_invited
27
- end
28
-
29
- def validate_membership
30
- if membership_id.present?
31
- # don't allow users to assign the ids of other teams' or users' resources to this attribute.
32
- unless valid_memberships.ids.include?(membership_id)
33
- errors.add(:membership_id, :invalid)
34
- end
35
- end
36
- end
37
-
38
- # 🚅 add methods above.
39
- end
@@ -1,8 +0,0 @@
1
- <% collaborator ||= @collaborator %>
2
- <% creative_concept ||= @creative_concept || collaborator&.creative_concept %>
3
- <%= render 'account/scaffolding/absolutely_abstract/creative_concepts/breadcrumbs', creative_concept: creative_concept %>
4
- <%= render 'account/shared/breadcrumb', label: t('.label'), url: [:account, creative_concept, :collaborators] %>
5
- <% if collaborator&.persisted? %>
6
- <%= render 'account/shared/breadcrumb', label: collaborator.label_string, url: [:account, collaborator] %>
7
- <% end %>
8
- <%= render 'account/shared/breadcrumbs/actions', only_for: 'scaffolding/absolutely_abstract/creative_concepts/collaborators' %>
@@ -1,19 +0,0 @@
1
- <%= form_with model: collaborator, url: (collaborator.persisted? ? [:account, collaborator] : [:account, @creative_concept, :collaborators]), local: true, class: 'form' do |form| %>
2
- <%= render 'account/shared/forms/errors', form: form %>
3
-
4
- <%= render 'shared/fields/super_select', form: form, method: :membership_id, options: {autofocus: true, include_blank: t('.fields.membership_id.placeholder')},
5
- choices_url: url_for([:search, :account, @team, :memberships]), other_options: {search: true} %>
6
-
7
- <%= render 'shared/fields/buttons', form: form, method: :role_ids, multiple: false, options: role_options_for(collaborator) %>
8
- <%# 🚅 super scaffolding will insert new fields above this line. %>
9
-
10
- <div class="buttons">
11
- <%= form.submit (form.object.persisted? ? t('.buttons.update') : t('.buttons.create')), class: "button" %>
12
- <% if form.object.persisted? %>
13
- <%= link_to t('global.buttons.cancel'), [:account, collaborator], class: "button-secondary" %>
14
- <% else %>
15
- <%= link_to t('global.buttons.cancel'), [:account, @creative_concept, :collaborators], class: "button-secondary" %>
16
- <% end %>
17
- </div>
18
-
19
- <% end %>
@@ -1,64 +0,0 @@
1
- <% creative_concept = @creative_concept %>
2
- <% context ||= creative_concept %>
3
- <% collection ||= :collaborators %>
4
- <% hide_actions ||= false %>
5
- <% hide_back ||= false %>
6
-
7
- <%= render 'account/shared/box' do |box| %>
8
- <% box.title t(".contexts.#{context.class.name.underscore}.header") %>
9
- <% box.description t(".contexts.#{context.class.name.underscore}.description") %>
10
-
11
- <% box.table do %>
12
- <% if collaborators.any? %>
13
- <table class="table">
14
- <thead>
15
- <tr>
16
- <th><%= t('.fields.membership_id.heading') %></th>
17
- <th><%= t('.fields.role_ids.heading') %></th>
18
- <%# 🚅 super scaffolding will insert new field headers above this line. %>
19
- <th class="text-right"></th>
20
- </tr>
21
- </thead>
22
- <tbody>
23
- <% collaborators.each do |collaborator| %>
24
- <tr data-id="<%= collaborator.id %>">
25
- <td><%= link_to collaborator.membership.label_string, [:account, collaborator] %></td>
26
- <td>
27
- <% if collaborator.roles_without_defaults.present? %>
28
- <%= collaborator.roles_without_defaults.map { |role| t("#{collaborator.class.to_s.pluralize.underscore}.fields.role_ids.options.#{role.key}.label") }.to_sentence %>
29
- <% else %>
30
- <%= t(".fields.role_ids.none") %>
31
- <% end %>
32
- </td>
33
- <%# 🚅 super scaffolding will insert new fields above this line. %>
34
- <td class="buttons">
35
- <% unless hide_actions %>
36
- <% if can? :edit, collaborator %>
37
- <%= link_to t('.buttons.shorthand.edit'), [:edit, :account, collaborator], class: 'button-secondary button-smaller' %>
38
- <% end %>
39
- <% if can? :destroy, collaborator %>
40
- <%= button_to t('.buttons.shorthand.destroy'), [:account, collaborator], method: :delete, data: { confirm: t('.buttons.confirmations.destroy', model_locales(collaborator)) }, class: 'button-secondary button-smaller' %>
41
- <% end %>
42
- <% end %>
43
- </td>
44
- </tr>
45
- <% end %>
46
- </tbody>
47
- </table>
48
- <% end %>
49
- <% end %>
50
-
51
- <% box.actions do %>
52
- <% unless hide_actions %>
53
- <% if context == creative_concept %>
54
- <% if can? :create, Scaffolding::AbsolutelyAbstract::CreativeConcepts::Collaborator.new(creative_concept: creative_concept) %>
55
- <%= link_to t('.buttons.new'), [:new, :account, creative_concept, :collaborator], class: 'button' %>
56
- <% end %>
57
- <% end %>
58
-
59
- <% unless hide_back %>
60
- <%= link_to t('global.buttons.back'), [:account, context], class: 'button-secondary' %>
61
- <% end %>
62
- <% end %>
63
- <% end %>
64
- <% end %>
@@ -1,10 +0,0 @@
1
- <% if can? :read, Scaffolding::AbsolutelyAbstract::CreativeConcepts::Collaborator.new(team: current_team) %>
2
- <%= render 'account/shared/menu/item', {
3
- url: main_app.polymorphic_path([:account, current_team, :scaffolding_absolutely_abstract_creative_concepts_collaborators]),
4
- label: t('scaffolding/absolutely_abstract/creative_concepts/collaborators.navigation.label'),
5
- } do |p| %>
6
- <% p.icon do %>
7
- <i class="<%= t('scaffolding/absolutely_abstract/creative_concepts/collaborators.navigation.icon') %>"></i>
8
- <% end %>
9
- <% end %>
10
- <% end %>
@@ -1,7 +0,0 @@
1
- <%= render 'account/shared/page' do |page| %>
2
- <% page.title t('.section') %>
3
- <% page.body.render 'account/shared/box', divider: true do |box| %>
4
- <% box.t :description, title: '.header' %>
5
- <% box.body.render 'form', collaborator: @collaborator %>
6
- <% end %>
7
- <% end %>
@@ -1,4 +0,0 @@
1
- <%= render 'account/shared/page' do |page| %>
2
- <% page.title t('.section') %>
3
- <% page.body.render 'index', collaborators: @collaborators %>
4
- <% end %>
@@ -1,7 +0,0 @@
1
- <%= render 'account/shared/page' do |page| %>
2
- <% page.title t('.section') %>
3
- <% page.body.render 'account/shared/box', divider: true do |box| %>
4
- <% box.t :description, title: '.header' %>
5
- <% box.body.render 'form', collaborator: @collaborator %>
6
- <% end %>
7
- <% end %>
@@ -1,29 +0,0 @@
1
- <%= render 'account/shared/page' do |page| %>
2
- <% page.title t('.section') %>
3
- <% page.body do %>
4
- <%= render 'account/shared/box', divider: true do |box| %>
5
- <% box.t :description, title: '.header' %>
6
-
7
- <% box.body do %>
8
- <%= render 'shared/attributes/belongs_to', object: @collaborator, attribute: :membership %>
9
- <%= render 'shared/attributes/attribute', object: @collaborator, attribute: :roles do %>
10
- <% if @collaborator.roles.present? %>
11
- <%= @collaborator.roles.map { |role| t(".fields.roles.options.#{role}") }.to_sentence %>
12
- <% else %>
13
- <%= t(".fields.roles.none") %>
14
- <% end %>
15
- <% end %>
16
- <%# 🚅 super scaffolding will insert new fields above this line. %>
17
- <% end %>
18
-
19
- <% box.actions do %>
20
- <%= link_to t('.buttons.edit'), [:edit, :account, @collaborator], class: first_button_primary if can? :edit, @collaborator %>
21
- <%= button_to t('.buttons.destroy'), [:account, @collaborator], method: :delete, class: first_button_primary, data: { confirm: t('.buttons.confirmations.destroy', model_locales(@collaborator)) } if can? :destroy, @collaborator %>
22
- <%= link_to t('global.buttons.back'), [:account, @creative_concept, :collaborators], class: first_button_primary %>
23
- <% end %>
24
- <% end %>
25
-
26
- <%# 🚅 super scaffolding will insert new children above this line. %>
27
-
28
- <% end %>
29
- <% end %>
@@ -1,98 +0,0 @@
1
- en:
2
- scaffolding/absolutely_abstract/creative_concepts/collaborators: &collaborators
3
- label: &label Collaborators
4
- breadcrumbs:
5
- label: *label
6
- navigation:
7
- label: *label
8
- icon: fal fa-puzzle-piece
9
- buttons: &buttons
10
- new: Add New Collaborator
11
- create: Create Collaborator
12
- edit: Edit Collaborator
13
- update: Update Collaborator
14
- destroy: Remove Collaborator
15
- shorthand:
16
- edit: Edit
17
- destroy: Delete
18
- confirmations:
19
- # TODO customize for your use-case.
20
- destroy: Are you sure you want to remove %{collaborator_name}? This will also remove it's associated data. This can't be undone.
21
- fields: &fields
22
- membership_id: &membership
23
- name: &membership_id Membership
24
- label: *membership_id
25
- heading: *membership_id
26
- placeholder: Select a Membership
27
-
28
- membership: *membership
29
-
30
- role_ids:
31
- name: &roles Privileges
32
- label: *roles
33
- heading: *roles
34
- options:
35
- default:
36
- label: Observer
37
- description: Can view all data
38
- editor:
39
- label: Editor
40
- description: Can edit but not delete this object
41
- admin:
42
- label: Admin
43
- description: Can manage all data
44
- none: Observer
45
-
46
- # 🚅 super scaffolding will insert new fields above this line.
47
- created_at:
48
- name: &created_at Added
49
- label: *created_at
50
- heading: *created_at
51
- updated_at:
52
- name: &updated_at Updated
53
- label: *updated_at
54
- heading: *updated_at
55
- index:
56
- section: "%{creative_concepts_possessive} Collaborators"
57
- contexts:
58
- scaffolding/absolutely_abstract/creative_concept:
59
- header: Additional Collaborators
60
- description: All %{team_name} Administrators can collaborate on %{creative_concept_name} by default. Below is a list of additional Collaborators that have been added for %{creative_concept_name}. Only %{team_name} and %{creative_concept_name} Administrators can manage Collaborators below.
61
- fields: *fields
62
- buttons: *buttons
63
- show:
64
- section: "%{collaborator_name}"
65
- header: Collaborator Details
66
- description: Below are the details we have for %{collaborator_name}. You'll also find options for updating these details or removing %{collaborator_name} from %{creative_concept_name} entirely.
67
- fields: *fields
68
- buttons: *buttons
69
- form: &form
70
- buttons: *buttons
71
- fields: *fields
72
- new:
73
- section: "New Collaborator for %{creative_concept_name}"
74
- header: New Collaborator Details
75
- description: Please provide the details of the new Collaborator you'd like to add to %{creative_concept_name}.
76
- form: *form
77
- edit:
78
- section: "%{collaborator_name}"
79
- header: Edit Collaborator Details
80
- description: You can update the details or settings for %{collaborator_name} below.
81
- form: *form
82
- notifications:
83
- created: Collaborator was successfully created.
84
- updated: Collaborator was successfully updated.
85
- destroyed: Collaborator was successfully destroyed.
86
- account:
87
- scaffolding:
88
- absolutely_abstract:
89
- creative_concepts:
90
- collaborators: *collaborators
91
- activerecord:
92
- attributes:
93
- scaffolding/absolutely_abstract/creative_concepts/collaborator:
94
- membership_id: *membership_id
95
- roles: *roles
96
- # 🚅 super scaffolding will insert new activerecord attributes above this line.
97
- created_at: *created_at
98
- updated_at: *updated_at