scrivito_two_column_widget 0.0.60 → 0.65.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +1 -1
- data/README.md +1 -23
- data/app/models/two_column_widget.rb +2 -12
- data/app/views/two_column_widget/details.html.erb +2 -12
- data/lib/scrivito_two_column_widget/version.rb +1 -1
- metadata +3 -6
- data/app/assets/javascripts/scrivito_two_column_widget/application.js +0 -13
- data/app/assets/stylesheets/scrivito_two_column_widget/application.css +0 -15
- data/app/views/layouts/scrivito_two_column_widget/application.html.erb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2eea01c3c08fc9ae7b82bb421534db741dd716a
|
4
|
+
data.tar.gz: 7454b6bb1c80e32d463f7ba63222ebb7c4dce317
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 920ff0916c2858660ecc797942f385712f354c410b960e9caf8cdc2d06b2ee8789ab823eadbeb24d222d36d66a6b22fdac60e74efcd32a2db2cb163814dd5b8c
|
7
|
+
data.tar.gz: e75537c0fb693da735c73b46713a6425a91a7b0e3fab49a2493c0fe7349ae907332a94e0b1b78b0dfa5956179d0b8d7d86accb4516ea7063202a779a99271a9d
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -4,32 +4,10 @@ This Gem adds a two-column grid widget to your Scrivito app. You can fill both c
|
|
4
4
|
|
5
5
|
## Prerequisites
|
6
6
|
|
7
|
-
Use Bootstrap in your Rails App.
|
7
|
+
Use Bootstrap in your Rails App.
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
11
11
|
Add the gem to your Gemfile:
|
12
12
|
|
13
13
|
gem 'scrivito_two_column_widget'
|
14
|
-
|
15
|
-
Run bundle:
|
16
|
-
|
17
|
-
$ bundle
|
18
|
-
|
19
|
-
(Currently you need to download the gem's files from github and install it locally.)
|
20
|
-
|
21
|
-
Run
|
22
|
-
|
23
|
-
$ rake scrivito:migrate:install
|
24
|
-
$ rake scrivito:migrate
|
25
|
-
|
26
|
-
Switch to your Workspace 'rtc' and follow below Steps for Usage. If you are happy with the outcome run
|
27
|
-
|
28
|
-
$ rake scrivito:migrate:publish
|
29
|
-
|
30
|
-
|
31
|
-
## Steps for Usage
|
32
|
-
|
33
|
-
- Insert the Widget 'Two Columns' somewhere and put a widget into both columns that become visible.
|
34
|
-
- Edit the Widget Properties to modify the column widths.
|
35
|
-
|
@@ -1,20 +1,10 @@
|
|
1
1
|
class TwoColumnWidget < Widget
|
2
2
|
attribute :column_1, :widgetlist
|
3
|
-
attribute :column_1_width, :string
|
4
3
|
attribute :column_2, :widgetlist
|
5
|
-
attribute :
|
6
|
-
|
7
|
-
attribute :column_1, :widgetlist
|
8
|
-
attribute :column_2, :widgetlist
|
9
|
-
attribute :column_1_width, :string
|
10
|
-
attribute :column_2_width, :string
|
11
|
-
|
12
|
-
def column_1_width
|
13
|
-
self[:column_1_width].presence || '6'
|
14
|
-
end
|
4
|
+
attribute :column_1_width, :string, default: '6'
|
15
5
|
|
16
6
|
def column_2_width
|
17
|
-
self
|
7
|
+
12 - self.column_1_width.to_i
|
18
8
|
end
|
19
9
|
|
20
10
|
end
|
@@ -1,13 +1,3 @@
|
|
1
|
-
|
2
|
-
<h4>
|
3
|
-
Column 1 width
|
4
|
-
</h4>
|
5
|
-
|
1
|
+
<%= scrivito_details_for 'column 1' do %>
|
6
2
|
<%= scrivito_tag(:div, widget, :column_1_width, data: { editor: 'slider', min: 1, max: 12 }) %>
|
7
|
-
|
8
|
-
<h4>
|
9
|
-
Column 2 width
|
10
|
-
</h4>
|
11
|
-
|
12
|
-
<%= scrivito_tag(:div, widget, :column_2_width, data: { editor: 'slider', min: 1, max: 12 }) %>
|
13
|
-
</div>
|
3
|
+
<% end %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scrivito_two_column_widget
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.65.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scrivito
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: scrivito
|
@@ -35,10 +35,7 @@ files:
|
|
35
35
|
- README.md
|
36
36
|
- Rakefile
|
37
37
|
- app/assets/images/scrivito_two_column_widget/widget_preview_2cols.png
|
38
|
-
- app/assets/javascripts/scrivito_two_column_widget/application.js
|
39
|
-
- app/assets/stylesheets/scrivito_two_column_widget/application.css
|
40
38
|
- app/models/two_column_widget.rb
|
41
|
-
- app/views/layouts/scrivito_two_column_widget/application.html.erb
|
42
39
|
- app/views/two_column_widget/details.html.erb
|
43
40
|
- app/views/two_column_widget/show.html.erb
|
44
41
|
- app/views/two_column_widget/thumbnail.html.erb
|
@@ -67,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
67
64
|
version: '0'
|
68
65
|
requirements: []
|
69
66
|
rubyforge_project:
|
70
|
-
rubygems_version: 2.4.
|
67
|
+
rubygems_version: 2.4.5
|
71
68
|
signing_key:
|
72
69
|
specification_version: 4
|
73
70
|
summary: A Scrivito Widget for a two-column layout.
|
@@ -1,13 +0,0 @@
|
|
1
|
-
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
-
// listed below.
|
3
|
-
//
|
4
|
-
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
-
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
-
//
|
7
|
-
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
-
// compiled file.
|
9
|
-
//
|
10
|
-
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
|
11
|
-
// about supported directives.
|
12
|
-
//
|
13
|
-
//= require_tree .
|
@@ -1,15 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
-
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
-
* compiled file so the styles you add here take precedence over styles defined in any styles
|
10
|
-
* defined in the other CSS/SCSS files in this directory. It is generally better to create a new
|
11
|
-
* file per style scope.
|
12
|
-
*
|
13
|
-
*= require_tree .
|
14
|
-
*= require_self
|
15
|
-
*/
|
@@ -1,14 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>ScrivitoTwoColumnWidget</title>
|
5
|
-
<%= stylesheet_link_tag "scrivito_two_column_widget/application", media: "all" %>
|
6
|
-
<%= javascript_include_tag "scrivito_two_column_widget/application" %>
|
7
|
-
<%= csrf_meta_tags %>
|
8
|
-
</head>
|
9
|
-
<body>
|
10
|
-
|
11
|
-
<%= yield %>
|
12
|
-
|
13
|
-
</body>
|
14
|
-
</html>
|