scrivito_accordion_widget 1.1.0 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +19 -4
- data/app/assets/images/widgets/scrivito_accordion_widget_preview.png +0 -0
- data/app/views/accordion_panel_widget/details.html.erb +6 -9
- data/app/views/accordion_widget/details.html.erb +1 -3
- data/app/views/accordion_widget/show.html.erb +2 -2
- data/app/views/accordion_widget/thumbnail.html.erb +2 -2
- data/lib/scrivito_accordion_widget/version.rb +1 -1
- metadata +3 -31
- data/app/assets/images/widget_preview_accordion.png +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 759bda800c524a3e8a4fd03413af86c140ba9688
|
4
|
+
data.tar.gz: c46c06b4a2321fef745e861e75c3247040575822
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5bd89bd2bcfc884d1ae70fa1666f4ad6cbbe0ea1dafd644a9c51b3abcbcf3585f98b8b46bc9631e2a6db48f0ec44c05e0cd2dd9d3a068dc6c559a9fa112acfcd
|
7
|
+
data.tar.gz: 718d73a65107483653e2ab446fea9dd6bba9a0c3e6bf66dcd17b96b61cd262700c1b98cbc5a5b8fedc3314c923048d1b19d64c7e956799b6a1579216215517b2
|
data/README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# ScrivitoAccordionWidget
|
2
2
|
|
3
|
-
A Scrivito widget
|
3
|
+
A Scrivito widget for adding an accordion.
|
4
4
|
|
5
5
|
## Prerequists
|
6
6
|
|
7
|
-
This widget requires
|
7
|
+
This widget requires Bootstrap.
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
@@ -12,9 +12,24 @@ Add this line to your application's Gemfile:
|
|
12
12
|
|
13
13
|
gem 'scrivito_accordion_widget'
|
14
14
|
|
15
|
+
## Localization
|
16
|
+
|
17
|
+
The following code shows the default localization for english. Copy it to your `en.yml` and change it if necessary:
|
18
|
+
|
19
|
+
```yaml
|
20
|
+
en:
|
21
|
+
scrivito_accordion_widget:
|
22
|
+
thumbnail:
|
23
|
+
title: Accordion
|
24
|
+
description: Displays collapsible content panels
|
25
|
+
details:
|
26
|
+
background_color: Background color
|
27
|
+
title: Title
|
28
|
+
```
|
29
|
+
|
15
30
|
## Customization
|
16
31
|
|
17
|
-
This widget includes an attribute for
|
32
|
+
This widget includes an attribute for the background color of every panel. The value of this attribute is used as a CSS class. If you want to use this feature, add a CSS rule for your selectable colors:
|
18
33
|
|
19
34
|
```css
|
20
35
|
.bg-red {
|
@@ -22,4 +37,4 @@ This widget includes an attribute for a background color of a panel. The value o
|
|
22
37
|
}
|
23
38
|
```
|
24
39
|
|
25
|
-
You can also use [Scrivito Advanced Editors](https://github.com/Scrivito/scrivito_advanced_editors #color_picker) color picker to have a better
|
40
|
+
You can also use the [Scrivito Advanced Editors](https://github.com/Scrivito/scrivito_advanced_editors #color_picker) color picker to have a better visualization of the selectable color classes.
|
Binary file
|
@@ -1,10 +1,7 @@
|
|
1
|
-
|
1
|
+
<%= scrivito_details_for do %>
|
2
|
+
<h4><%= t('scrivito_accordion_widget.details.title', default: 'Title') %></h4>
|
2
3
|
<%= scrivito_tag :div, widget, :title %>
|
3
|
-
|
4
|
-
<
|
5
|
-
|
6
|
-
|
7
|
-
<%= scrivito_tag :div, widget, :background_color, data: {colors_list: widget.scrivito_selectable_color_classes()} %>
|
8
|
-
</div>
|
9
|
-
</div>
|
10
|
-
</div>
|
4
|
+
<br />
|
5
|
+
<h4><%= t('scrivito_accordion_widget.details.background_color', default: 'Background Color') %></h4>
|
6
|
+
<%= scrivito_tag :div, widget, :background_color, data: {colors_list: widget.scrivito_selectable_color_classes} %>
|
7
|
+
<% end %>
|
@@ -3,13 +3,13 @@
|
|
3
3
|
<div class="panel panel-default">
|
4
4
|
<div class="panel-heading <%= panel.background_color %>" role="tab" id="headingOne">
|
5
5
|
<h4 class="panel-title">
|
6
|
-
<a role="button" data-toggle="collapse" data-parent="#accordion-<%= widget.id %>" href="#collapse
|
6
|
+
<a role="button" data-toggle="collapse" data-parent="#accordion-<%= widget.id %>" href="#collapse-<%= widget.id %>-<%= i %>" aria-expanded="<%= i == 0 ? 'true' : 'false'%>" aria-controls="collapse<%= i %>">
|
7
7
|
<%= scrivito_value panel.title %>
|
8
8
|
</a>
|
9
9
|
</h4>
|
10
10
|
</div>
|
11
11
|
|
12
|
-
<div id="collapse
|
12
|
+
<div id="collapse-<%= widget.id %>-<%= i %>" class="panel-collapse collapse <%= i == 0 ? 'in' : '' %>" role="tabpanel">
|
13
13
|
<div class="panel-body <%= panel.background_color %>">
|
14
14
|
<%= scrivito_tag :div, panel, :content %>
|
15
15
|
</div>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<%= scrivito_thumbnail '
|
2
|
-
Displays collapsible content panels
|
1
|
+
<%= scrivito_thumbnail t('scrivito_accordion_widget.thumbnail.title', default: 'Accrodion'), image_tag("widgets/scrivito_accordion_widget_preview.png") do %>
|
2
|
+
<%= t('scrivito_accordion_widget.thumbnail.description', default: 'Displays collapsible content panels') %>
|
3
3
|
<% end %>
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scrivito_accordion_widget
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scrivito
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: bundler
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ">="
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '0'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ">="
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '0'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: scrivito
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,20 +24,6 @@ dependencies:
|
|
38
24
|
- - ">="
|
39
25
|
- !ruby/object:Gem::Version
|
40
26
|
version: '0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rake
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
27
|
description: Scrivito Accordion Widget.
|
56
28
|
email:
|
57
29
|
- support@scrivito.com
|
@@ -62,7 +34,7 @@ files:
|
|
62
34
|
- LICENSE
|
63
35
|
- README.md
|
64
36
|
- Rakefile
|
65
|
-
- app/assets/images/
|
37
|
+
- app/assets/images/widgets/scrivito_accordion_widget_preview.png
|
66
38
|
- app/models/accordion_panel_widget.rb
|
67
39
|
- app/models/accordion_widget.rb
|
68
40
|
- app/views/accordion_panel_widget/details.html.erb
|
Binary file
|