promethee 1.2.12 → 1.2.13
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 +4 -4
- data/app/views/promethee/_edit.html.erb +5 -2
- data/lib/promethee.rb +4 -0
- data/lib/promethee/rails/helper.rb +38 -0
- data/lib/promethee/rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8cd891f654c2d59ee21918dca07957436bc7ff19
|
4
|
+
data.tar.gz: ea8b5ca7a147ab8b119b1ebfff68d064f5380db9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf5646f59a748349f1d61eb3a3628d845d406a89818fae66028e42a79c0dfafdffeb9d5041fc0f4eba24c8586f0ad0db8c74bfa5aaae4dd06c4940488a3a8c0f
|
7
|
+
data.tar.gz: 7135aaa7b45d83272563dc2da8a7ba1ec2a1ed2a8704c8ebb6cf880f56d1e4f2c4297b06eb8fb9a33b99a532c23e148770f711eb37135c1d380e487893efccca
|
@@ -68,7 +68,9 @@ var promethee = angular
|
|
68
68
|
};
|
69
69
|
};
|
70
70
|
});
|
71
|
+
</script>
|
71
72
|
|
73
|
+
<script type="text/javascript">
|
72
74
|
promethee.controller('PrometheeController', ['$scope', function($scope) {
|
73
75
|
|
74
76
|
// Data (TODO use Adder and probably page definition to init)
|
@@ -157,10 +159,11 @@ promethee.controller('PrometheeController', ['$scope', function($scope) {
|
|
157
159
|
</div>
|
158
160
|
</div>
|
159
161
|
</nav>
|
160
|
-
|
161
|
-
|
162
|
+
|
163
|
+
<% promethee_component_partials.each do |partial| %>
|
162
164
|
<%= render partial %>
|
163
165
|
<% end %>
|
166
|
+
|
164
167
|
<%= render 'promethee/edit/write' %>
|
165
168
|
<%= render 'promethee/edit/move' %>
|
166
169
|
<%= render 'promethee/edit/preview' %>
|
data/lib/promethee.rb
CHANGED
@@ -6,4 +6,42 @@ module Promethee::Rails::Helper
|
|
6
6
|
def promethee_class_for component
|
7
7
|
"promethee__component promethee__component--#{component[:type]}"
|
8
8
|
end
|
9
|
+
|
10
|
+
# [
|
11
|
+
# Pathname:promethee/components/column/edit.define,
|
12
|
+
# Pathname:promethee/components/column/edit.inspect,
|
13
|
+
# Pathname:promethee/components/column/edit.move,
|
14
|
+
# Pathname:promethee/components/column/edit.write,
|
15
|
+
# Pathname:promethee/components/cover/edit.define,
|
16
|
+
# Pathname:promethee/components/cover/edit.inspect,
|
17
|
+
# ...
|
18
|
+
# ]
|
19
|
+
def promethee_component_partials
|
20
|
+
promethee_component_partial_paths.map { |path| (path.dirname + path.basename('.html.erb').to_s[1..-1]).to_s }
|
21
|
+
end
|
22
|
+
|
23
|
+
protected
|
24
|
+
|
25
|
+
# [
|
26
|
+
# Pathname:promethee/components/column/_edit.define.html.erb,
|
27
|
+
# Pathname:promethee/components/column/_edit.inspect.html.erb,
|
28
|
+
# Pathname:promethee/components/column/_edit.move.html.erb,
|
29
|
+
# Pathname:promethee/components/column/_edit.write.html.erb,
|
30
|
+
# Pathname:promethee/components/cover/_edit.define.html.erb,
|
31
|
+
# Pathname:promethee/components/cover/_edit.inspect.html.erb,
|
32
|
+
# ...
|
33
|
+
# ]
|
34
|
+
def promethee_component_partial_paths
|
35
|
+
promethee_component_partial_sources.map do |source|
|
36
|
+
Dir[source + 'promethee/components/*/_edit.*.html.erb'].map { |file| Pathname.new(file).relative_path_from source }
|
37
|
+
end.flatten.uniq(&:to_s)
|
38
|
+
end
|
39
|
+
|
40
|
+
# [
|
41
|
+
# Pathname:/Users/lespoupeesrusses/Developer/a-rails-app/app/views,
|
42
|
+
# Pathname:/Users/lespoupeesrusses/.rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/promethee-1.2.12/app/views
|
43
|
+
# ]
|
44
|
+
def promethee_component_partial_sources
|
45
|
+
[Rails.root, Promethee.root].map { |source| source + 'app/views' }
|
46
|
+
end
|
9
47
|
end
|