collavre_plan 0.1.0
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 +7 -0
- data/Rakefile +2 -0
- data/app/components/collavre/plans_timeline_component.html.erb +14 -0
- data/app/components/collavre/plans_timeline_component.rb +53 -0
- data/app/controllers/collavre_plan/application_controller.rb +4 -0
- data/app/controllers/collavre_plan/creative_plans_controller.rb +69 -0
- data/app/controllers/collavre_plan/plans_controller.rb +170 -0
- data/app/javascript/collavre_plan.js +8 -0
- data/app/javascript/controllers/creatives/set_plan_modal_controller.js +124 -0
- data/app/javascript/controllers/index.js +6 -0
- data/app/javascript/modules/plans_menu.js +50 -0
- data/app/javascript/modules/plans_timeline.js +411 -0
- data/app/models/collavre/plan.rb +43 -0
- data/app/services/collavre/creatives/plan_tagger.rb +64 -0
- data/app/views/collavre/creatives/_set_plan_modal.html.erb +32 -0
- data/app/views/collavre/labels/_plan_extra.html.erb +14 -0
- data/app/views/collavre/labels/_plan_suffix.html.erb +3 -0
- data/app/views/collavre_plan/creatives/_set_plan_button.html.erb +1 -0
- data/app/views/collavre_plan/shared/navigation/_mobile_plans_button.html.erb +1 -0
- data/app/views/collavre_plan/shared/navigation/_panels.html.erb +3 -0
- data/app/views/collavre_plan/shared/navigation/_plans_button.html.erb +3 -0
- data/config/locales/plans.en.yml +16 -0
- data/config/locales/plans.ko.yml +23 -0
- data/config/routes.rb +4 -0
- data/lib/collavre_plan/engine.rb +87 -0
- data/lib/collavre_plan/version.rb +3 -0
- data/lib/collavre_plan.rb +5 -0
- metadata +96 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
module CollavrePlan
|
|
2
|
+
class Engine < ::Rails::Engine
|
|
3
|
+
isolate_namespace CollavrePlan
|
|
4
|
+
|
|
5
|
+
config.generators do |g|
|
|
6
|
+
g.test_framework :minitest
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
# Path to engine's JavaScript sources for jsbundling-rails integration
|
|
10
|
+
def self.javascript_path
|
|
11
|
+
root.join("app/javascript")
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
# Path to engine's stylesheet sources
|
|
15
|
+
def self.stylesheet_path
|
|
16
|
+
root.join("app/assets/stylesheets")
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# Load locale files
|
|
20
|
+
config.i18n.load_path += Dir[root.join("config", "locales", "*.yml")]
|
|
21
|
+
|
|
22
|
+
# Auto-mount engine routes at "/" to preserve existing URL paths (/plans, /creative_plan).
|
|
23
|
+
# Unlike slack/notion/github engines which have their own URL namespace, Plan routes
|
|
24
|
+
# don't conflict with core routes and are tightly integrated into the creatives UI.
|
|
25
|
+
initializer "collavre_plan.routes", before: :add_routing_paths do |app|
|
|
26
|
+
app.routes.append do
|
|
27
|
+
mount CollavrePlan::Engine => "/", as: :collavre_plan_engine
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Add engine stylesheets to asset paths for Propshaft
|
|
32
|
+
initializer "collavre_plan.assets" do |app|
|
|
33
|
+
if app.config.respond_to?(:assets) && app.config.assets.respond_to?(:paths)
|
|
34
|
+
app.config.assets.paths << root.join("app/assets/stylesheets")
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Register Plan navigation items via Collavre::Navigation::Registry
|
|
39
|
+
initializer "collavre_plan.navigation", after: "collavre.navigation_reset" do
|
|
40
|
+
Rails.application.config.to_prepare do
|
|
41
|
+
next unless defined?(Navigation::Registry)
|
|
42
|
+
|
|
43
|
+
# Mobile plans button
|
|
44
|
+
Navigation::Registry.instance.register(
|
|
45
|
+
key: :mobile_plans,
|
|
46
|
+
label: "app.plans",
|
|
47
|
+
type: :partial,
|
|
48
|
+
partial: "collavre_plan/shared/navigation/mobile_plans_button",
|
|
49
|
+
priority: 100,
|
|
50
|
+
requires_auth: true,
|
|
51
|
+
desktop: false,
|
|
52
|
+
mobile: true
|
|
53
|
+
)
|
|
54
|
+
|
|
55
|
+
# Desktop plans button
|
|
56
|
+
Navigation::Registry.instance.register(
|
|
57
|
+
key: :plans,
|
|
58
|
+
label: "app.plans",
|
|
59
|
+
type: :partial,
|
|
60
|
+
partial: "collavre_plan/shared/navigation/plans_button",
|
|
61
|
+
priority: 120,
|
|
62
|
+
requires_auth: true,
|
|
63
|
+
mobile: false
|
|
64
|
+
)
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Register Plan view extensions into core's extension slots
|
|
69
|
+
initializer "collavre_plan.view_extensions", after: "collavre.navigation_reset" do
|
|
70
|
+
Rails.application.config.to_prepare do
|
|
71
|
+
next unless defined?(Collavre::ViewExtensions)
|
|
72
|
+
|
|
73
|
+
# Set Plan button in creative toolbar (select mode)
|
|
74
|
+
Collavre::ViewExtensions.register(:creative_toolbar,
|
|
75
|
+
partial: "collavre_plan/creatives/set_plan_button")
|
|
76
|
+
|
|
77
|
+
# Set Plan modal in creative modals area
|
|
78
|
+
Collavre::ViewExtensions.register(:creative_modals,
|
|
79
|
+
partial: "collavre/creatives/set_plan_modal")
|
|
80
|
+
|
|
81
|
+
# Plans timeline panel in navigation panels
|
|
82
|
+
Collavre::ViewExtensions.register(:navigation_panels,
|
|
83
|
+
partial: "collavre_plan/shared/navigation/panels")
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: collavre_plan
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Collavre
|
|
8
|
+
bindir: bin
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: rails
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '8.0'
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - ">="
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '8.0'
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: collavre
|
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - ">="
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '0'
|
|
33
|
+
type: :runtime
|
|
34
|
+
prerelease: false
|
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - ">="
|
|
38
|
+
- !ruby/object:Gem::Version
|
|
39
|
+
version: '0'
|
|
40
|
+
description: Plugin engine providing plan/timeline management for Collavre creatives
|
|
41
|
+
email:
|
|
42
|
+
- support@collavre.com
|
|
43
|
+
executables: []
|
|
44
|
+
extensions: []
|
|
45
|
+
extra_rdoc_files: []
|
|
46
|
+
files:
|
|
47
|
+
- Rakefile
|
|
48
|
+
- app/components/collavre/plans_timeline_component.html.erb
|
|
49
|
+
- app/components/collavre/plans_timeline_component.rb
|
|
50
|
+
- app/controllers/collavre_plan/application_controller.rb
|
|
51
|
+
- app/controllers/collavre_plan/creative_plans_controller.rb
|
|
52
|
+
- app/controllers/collavre_plan/plans_controller.rb
|
|
53
|
+
- app/javascript/collavre_plan.js
|
|
54
|
+
- app/javascript/controllers/creatives/set_plan_modal_controller.js
|
|
55
|
+
- app/javascript/controllers/index.js
|
|
56
|
+
- app/javascript/modules/plans_menu.js
|
|
57
|
+
- app/javascript/modules/plans_timeline.js
|
|
58
|
+
- app/models/collavre/plan.rb
|
|
59
|
+
- app/services/collavre/creatives/plan_tagger.rb
|
|
60
|
+
- app/views/collavre/creatives/_set_plan_modal.html.erb
|
|
61
|
+
- app/views/collavre/labels/_plan_extra.html.erb
|
|
62
|
+
- app/views/collavre/labels/_plan_suffix.html.erb
|
|
63
|
+
- app/views/collavre_plan/creatives/_set_plan_button.html.erb
|
|
64
|
+
- app/views/collavre_plan/shared/navigation/_mobile_plans_button.html.erb
|
|
65
|
+
- app/views/collavre_plan/shared/navigation/_panels.html.erb
|
|
66
|
+
- app/views/collavre_plan/shared/navigation/_plans_button.html.erb
|
|
67
|
+
- config/locales/plans.en.yml
|
|
68
|
+
- config/locales/plans.ko.yml
|
|
69
|
+
- config/routes.rb
|
|
70
|
+
- lib/collavre_plan.rb
|
|
71
|
+
- lib/collavre_plan/engine.rb
|
|
72
|
+
- lib/collavre_plan/version.rb
|
|
73
|
+
homepage: https://collavre.com
|
|
74
|
+
licenses:
|
|
75
|
+
- AGPL
|
|
76
|
+
metadata:
|
|
77
|
+
homepage_uri: https://collavre.com
|
|
78
|
+
source_code_uri: https://github.com/sh1nj1/plan42
|
|
79
|
+
rdoc_options: []
|
|
80
|
+
require_paths:
|
|
81
|
+
- lib
|
|
82
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
83
|
+
requirements:
|
|
84
|
+
- - ">="
|
|
85
|
+
- !ruby/object:Gem::Version
|
|
86
|
+
version: '0'
|
|
87
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
|
+
requirements:
|
|
89
|
+
- - ">="
|
|
90
|
+
- !ruby/object:Gem::Version
|
|
91
|
+
version: '0'
|
|
92
|
+
requirements: []
|
|
93
|
+
rubygems_version: 3.6.7
|
|
94
|
+
specification_version: 4
|
|
95
|
+
summary: Plan feature for Collavre
|
|
96
|
+
test_files: []
|