promethee 1.6.39 → 1.6.40

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
  SHA1:
3
- metadata.gz: 423588b5117e7e560121abd2b48e8a42a2dfd423
4
- data.tar.gz: c9e6a036853333eef43bf4f880b758483a78f693
3
+ metadata.gz: ffcc80d40a9f6d9affafa69b71ab7c632dd8a925
4
+ data.tar.gz: efa57b444697f5209ba539babe69e3e82ae905a7
5
5
  SHA512:
6
- metadata.gz: 0bec717d2797a5552a16817448c99ee50af49cf3a4b0bd534d94decd2e610ce2f4522f594438f9c79c4d939754c183832df51aa751f0594cded17f8bb5747820
7
- data.tar.gz: a38c0185a0f96c4754a2a3bb3bf0a40c987ed1bc9fd0bc55b7dfead76533680eb8d3e57614c27b1b6045d4a8afce099ddbf7767f2093aacb11da15edee4457c0
6
+ metadata.gz: c4ac68f2fecf0272f162ff59b82e9ee74e92955c45ef2b2b05553272655cce6cda54ff569e96778c0df7e4e53e121ec069f916034d6c8b8183c381300f496ed9
7
+ data.tar.gz: 8db198ce2caaa70e63179611e565f3a1408fbdac76aad25778b5098883bc52ce2a87d48b78a2753d5c2f3c371545b150488cfa1283cce633ef31fcb0d7bc611c
@@ -0,0 +1,18 @@
1
+ <%
2
+ init = <<~JAVASCRIPT
3
+ promethee.definitions.push({
4
+ name: 'Blockquote',
5
+ icon: #{ promethee_component_render_icon 'blockquote' },
6
+ position: 50,
7
+ library: true,
8
+ data: {
9
+ type: 'blockquote',
10
+ attributes: {
11
+ searchable_body: '<p>Edit me</p>',
12
+ searchable_author: ''
13
+ }
14
+ }
15
+ })
16
+ JAVASCRIPT
17
+ %>
18
+ <div ng-init="<%= init %>"></div>
@@ -0,0 +1,14 @@
1
+ <script type="text/ng-template" id="promethee/components/blockquote/edit/inspect">
2
+ <div class="form-group">
3
+ <summernote config="summernoteConfig" ng-model="promethee.inspected.attributes.searchable_body"></summernote>
4
+ <small>Quotation marks are added automatically.</small>
5
+ </div>
6
+
7
+ <div class="form-group">
8
+ <label class="label-control">Author</label>
9
+ <input ng-model="promethee.inspected.attributes.searchable_author" class="form-control" type="text"/>
10
+ </div>
11
+
12
+ {{promethee.inspected.attributes.searchable_body | textContentFromHTML: 'distinctParagraphs' | numberOfWords}} words<br>
13
+ {{promethee.inspected.attributes.searchable_body | textContentFromHTML | numberOfCharacters}} characters
14
+ </script>
@@ -0,0 +1,14 @@
1
+ <script type="text/ng-template" id="promethee/components/blockquote/edit/move">
2
+ <%= render 'promethee/edit/move.header', type: 'blockquote' %>
3
+ <div class="row">
4
+ <div class="col-md-8" ng-bind-html="component.attributes.searchable_body | htmlSafe"></div>
5
+ <div class="col-md-4">
6
+ <%= image_tag "drawings/blockquote/pencil.png", class: "img-responsive" %>
7
+ </div>
8
+ <div ng-show="component.attributes.searchable_author" class="col-xs-12">
9
+ <p>{{component.attributes.searchable_author}}</p>
10
+ </div>
11
+ </div>
12
+ </div>
13
+ </div>
14
+ </script>
@@ -0,0 +1,7 @@
1
+ <svg id="svg2" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="100" width="100" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 99.999997 99.999997">
2
+ <g id="layer1" transform="translate(0 -952.36)">
3
+ <g id="g3" transform="matrix(2 0 0 2 -238.74 442.06)">
4
+ <path id="path5" fill="#fff" d="m135.2 287.6c-0.3 0-0.7-0.1-0.9-0.2-0.3-0.2-0.7-0.5-0.7-1.4 0-1 0.9-1.5 1.4-1.8l0.2-0.1c0.7-0.4 1.2-0.7 1.7-1.1 0.6-0.5 1-0.9 1.1-1.2h-0.3c-0.2 0-0.3 0-0.5-0.1-0.8-0.1-1.5-0.5-2.1-1.1-1.3-1.3-1.7-3.5-0.9-5.2 0.8-1.6 2.5-2.7 4.4-2.7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 </svg>
@@ -0,0 +1,30 @@
1
+ <script type="text/ng-template" id="promethee/components/blockquote/localize">
2
+ <div ng-show="component.master.attributes.searchable_body">
3
+ <hr>
4
+ <div class="row">
5
+ <div class="col-md-6">
6
+ <b>Body</b>
7
+ <div ng-bind-html="component.master.attributes.searchable_body | htmlSafe"></div>
8
+ </div>
9
+ <div class="col-md-6">
10
+ <div class="form-group">
11
+ <label class="label-control">Body</label>
12
+ <summernote config="summernoteConfig" ng-model="component.attributes.searchable_body"></summernote>
13
+ </div>
14
+ </div>
15
+ </div>
16
+ </div>
17
+
18
+ <div class="row" ng-show="component.master.attributes.searchable_author">
19
+ <div class="col-md-6">
20
+ <b>Author</b>
21
+ <p>{{component.master.attributes.searchable_author}}</p>
22
+ </div>
23
+ <div class="col-md-6">
24
+ <div class="form-group">
25
+ <label class="label-control">Author</label>
26
+ <input class="form-control" ng-model="component.attributes.searchable_author" type="text">
27
+ </div>
28
+ </div>
29
+ </div>
30
+ </script>
@@ -0,0 +1,17 @@
1
+ <%
2
+ body = component[:attributes][:searchable_body].to_s
3
+ author = component[:attributes][:searchable_author].to_s
4
+ %>
5
+
6
+ <div class="row promethee__component promethee__component__row">
7
+ <div class="col col-md-8 promethee__component promethee__component__column">
8
+ <blockquote><%= body.html_safe %></blockquote>
9
+ <% if author.present? %>
10
+ <p><%= author %></p>
11
+ <% end %>
12
+ </div>
13
+
14
+ <div class="col col-md-4 promethee__component promethee__component__column">
15
+ <%= image_tag "drawings/blockquote/pencil.png", class: "img-responsive" %>
16
+ </div>
17
+ </div>
@@ -0,0 +1,15 @@
1
+ <%
2
+ init = <<~JAVASCRIPT
3
+ promethee.definitions.push({
4
+ name: 'FAQ',
5
+ icon: #{ promethee_component_render_icon 'faq' },
6
+ position: 55,
7
+ library: true,
8
+ data: {
9
+ type: 'faq',
10
+ children: []
11
+ }
12
+ })
13
+ JAVASCRIPT
14
+ %>
15
+ <div ng-init="<%= init %>"></div>
@@ -0,0 +1,17 @@
1
+ <script type="text/ng-template" id="promethee/components/faq/edit/inspect">
2
+ <div class="form-group">
3
+ <div class="btn btn-default" ng-click="addComponentByType('faq_item', promethee.inspected.children)">Add item</div>
4
+ <div ng-show="promethee.inspected.children.length">
5
+ <br><br>
6
+ <label class="label-control">Drag the items below to reorder them:</label>
7
+ <ul ui-sortable ng-model="promethee.inspected.children" class="list-unstyled">
8
+ <li ng-repeat="item in promethee.inspected.children">
9
+ <div>
10
+ <%= fa_icon :bars %> Item {{$index + 1}}
11
+ <span class="label label-info" ng-click="promethee.inspected = item">Edit</span>
12
+ </div>
13
+ </li>
14
+ </ul>
15
+ </div>
16
+ </div>
17
+ </script>
@@ -0,0 +1,9 @@
1
+ <script type="text/ng-template" id="promethee/components/faq/edit/move">
2
+ <%= render 'promethee/edit/move.header', type: 'faq' %>
3
+ <div class="header">FAQ</div>
4
+ <div ng-repeat="component in component.children">
5
+ <ng-include src="'promethee/move/component'"></ng-include>
6
+ </div>
7
+ </div>
8
+ </div>
9
+ </script>
@@ -0,0 +1,11 @@
1
+ <svg id="svg3366" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="100" width="100" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 100 100">
2
+ <g id="layer1" transform="translate(0 -952.36)">
3
+ <g id="layer1-3" transform="matrix(2 0 0 2 -470 -33.802)">
4
+ <g id="g3349" fill="#fff" transform="translate(116,238.18)">
5
+ <path id="path3337" d="m144 265.8c-7.8 0-14.1 6.3-14.1 14.1s6.3 14.1 14.1 14.1 14.1-6.3 14.1-14.1-6.3-14.1-14.1-14.1zm0 26.8c-7 0-12.7-5.7-12.7-12.7s5.7-12.7 12.7-12.7 12.7 5.7 12.7 12.7-5.7 12.7-12.7 12.7z"/>
6
+ <path id="path3339" d="m144 284.5c-0.6 0-1.1 0.5-1.1 1.1s0.5 1.1 1.1 1.1 1.1-0.5 1.1-1.1-0.5-1.1-1.1-1.1z"/>
7
+ <path id="path3341" d="m144 273.4c-2.1 0-3.8 1.7-3.8 3.8 0 0.4 0.3 0.7 0.7 0.7s0.7-0.3 0.7-0.7c0-1.3 1.1-2.4 2.4-2.4s2.4 1.1 2.4 2.4-1.1 2.4-2.4 2.4c-0.4 0-0.7 0.3-0.7 0.7v2.1c0 0.4 0.3 0.7 0.7 0.7s0.7-0.3 0.7-0.7v-1.5c1.8-0.3 3.1-1.9 3.1-3.7 0-2.1-1.7-3.8-3.8-3.8z"/>
8
+ </g>
9
+ </g>
10
+ </g>
11
+ </svg>
@@ -0,0 +1,2 @@
1
+ <script type="text/ng-template" id="promethee/components/faq/localize">
2
+ </script>
@@ -0,0 +1,5 @@
1
+ <div class="<%= promethee_class_for component %>">
2
+ <% component[:children].each do |child| %>
3
+ <%= render 'promethee/show/component', component: child %>
4
+ <% end %>
5
+ </div>
@@ -0,0 +1,22 @@
1
+ <%
2
+ init = <<~JAVASCRIPT
3
+ promethee.definitions.push({
4
+ name: 'FAQ Item',
5
+ icon: #{ promethee_component_render_icon 'faq_item' },
6
+ position: 55,
7
+ library: false,
8
+ data: {
9
+ type: 'faq_item',
10
+ attributes: {
11
+ image: {
12
+ id: undefined,
13
+ name: ""
14
+ },
15
+ searchable_title: "",
16
+ searchable_body: ""
17
+ }
18
+ }
19
+ })
20
+ JAVASCRIPT
21
+ %>
22
+ <div ng-init="<%= init %>"></div>
@@ -0,0 +1,13 @@
1
+ <script type="text/ng-template" id="promethee/components/faq_item/edit/inspect">
2
+ <promethee-uploader ng-model="promethee.inspected.attributes.image" label="Image" limits="'.jpg,.jpeg,.png,.gif'"></promethee-uploader>
3
+
4
+ <div class="form-group">
5
+ <label class="label-control">Title</label>
6
+ <input class="form-control" ng-model="promethee.inspected.attributes.searchable_title" type="text">
7
+ </div>
8
+
9
+ <div class="form-group">
10
+ <label class="label-control">Body</label>
11
+ <summernote config="summernoteConfig" ng-model="promethee.inspected.attributes.searchable_body"></summernote>
12
+ </div>
13
+ </script>
@@ -0,0 +1,17 @@
1
+ <script type="text/ng-template" id="promethee/components/faq_item/edit/move">
2
+ <%= render 'promethee/edit/move.header', type: 'faq_item' %>
3
+ <div class="header">FAQ Item</div>
4
+ <div class="row">
5
+ <div class="col-xs-3">
6
+ <figure ng-show="component.attributes.image.id">
7
+ <img ng-src="/promethee/blob/{{component.attributes.image.id}}" class="img-responsive">
8
+ </figure>
9
+ </div>
10
+ <div class="col-xs-9">
11
+ <h4>{{component.attributes.searchable_title}}</h4>
12
+ <div ng-bind-html="component.attributes.searchable_body | htmlSafe"></div>
13
+ </div>
14
+ </div>
15
+ </div>
16
+ </div>
17
+ </script>
@@ -0,0 +1 @@
1
+ <svg id="svg3460" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="100" width="100" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 100 100"></svg>
@@ -0,0 +1,29 @@
1
+ <script type="text/ng-template" id="promethee/components/faq_item/localize">
2
+ <div ng-show="component.master.attributes.searchable_title">
3
+ <hr>
4
+ <div class="row">
5
+ <div class="col-md-6">
6
+ <b>Title</b>
7
+ <p>{{component.master.attributes.searchable_title}}</p>
8
+ </div>
9
+ <div class="col-md-6">
10
+ <div class="form-group">
11
+ <label class="label-control">Title</label>
12
+ <input class="form-control" ng-model="component.attributes.searchable_title" type="text">
13
+ </div>
14
+ </div>
15
+ </div>
16
+ <div class="row">
17
+ <div class="col-md-6">
18
+ <b>Body</b>
19
+ <p>{{component.master.attributes.searchable_body}}</p>
20
+ </div>
21
+ <div class="col-md-6">
22
+ <div class="form-group">
23
+ <label class="label-control">Body</label>
24
+ <summernote config="summernoteConfig" ng-model="component.attributes.searchable_body"></summernote>
25
+ </div>
26
+ </div>
27
+ </div>
28
+ </div>
29
+ </script>
@@ -0,0 +1,19 @@
1
+ <%
2
+ title = component[:attributes][:searchable_title].to_s
3
+ body = component[:attributes][:searchable_body].to_s
4
+
5
+ image = component[:attributes][:image]
6
+ if image && image[:id]
7
+ image_blob = ActiveStorage::Blob.find image[:id]
8
+ end
9
+ %>
10
+
11
+ <div class="row <%= promethee_class_for component %>">
12
+ <div class="col-xs-3">
13
+ <%= render 'promethee/show/image.srcset', blob: image_blob, alt: '', caption: '' if image_blob %>
14
+ </div>
15
+ <div class="col-xs-9">
16
+ <h4><%= title %></h4>
17
+ <%= body.html_safe %>
18
+ </div>
19
+ </div>
@@ -1,5 +1,5 @@
1
1
  module Promethee
2
2
  module Rails
3
- VERSION = '1.6.39'
3
+ VERSION = '1.6.40'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: promethee
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.39
4
+ version: 1.6.40
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien Dargelos
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2018-06-27 00:00:00.000000000 Z
16
+ date: 2018-06-29 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: rails
@@ -191,6 +191,12 @@ files:
191
191
  - app/views/promethee/components/aside/_icon.svg
192
192
  - app/views/promethee/components/aside/_localize.html.erb
193
193
  - app/views/promethee/components/aside/_show.html.erb
194
+ - app/views/promethee/components/blockquote/_edit.define.html.erb
195
+ - app/views/promethee/components/blockquote/_edit.inspect.html.erb
196
+ - app/views/promethee/components/blockquote/_edit.move.html.erb
197
+ - app/views/promethee/components/blockquote/_icon.svg
198
+ - app/views/promethee/components/blockquote/_localize.html.erb
199
+ - app/views/promethee/components/blockquote/_show.html.erb
194
200
  - app/views/promethee/components/collection/_edit.define.html.erb
195
201
  - app/views/promethee/components/collection/_edit.inspect.html.erb
196
202
  - app/views/promethee/components/collection/_edit.move.html.erb
@@ -215,6 +221,18 @@ files:
215
221
  - app/views/promethee/components/cover/_icon.svg
216
222
  - app/views/promethee/components/cover/_localize.html.erb
217
223
  - app/views/promethee/components/cover/_show.html.erb
224
+ - app/views/promethee/components/faq/_edit.define.html.erb
225
+ - app/views/promethee/components/faq/_edit.inspect.html.erb
226
+ - app/views/promethee/components/faq/_edit.move.html.erb
227
+ - app/views/promethee/components/faq/_icon.svg
228
+ - app/views/promethee/components/faq/_localize.html.erb
229
+ - app/views/promethee/components/faq/_show.html.erb
230
+ - app/views/promethee/components/faq_item/_edit.define.html.erb
231
+ - app/views/promethee/components/faq_item/_edit.inspect.html.erb
232
+ - app/views/promethee/components/faq_item/_edit.move.html.erb
233
+ - app/views/promethee/components/faq_item/_icon.svg
234
+ - app/views/promethee/components/faq_item/_localize.html.erb
235
+ - app/views/promethee/components/faq_item/_show.html.erb
218
236
  - app/views/promethee/components/image/_edit.define.html.erb
219
237
  - app/views/promethee/components/image/_edit.inspect.html.erb
220
238
  - app/views/promethee/components/image/_edit.move.html.erb