pageflow-external-links 0.0.1 → 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 +8 -8
- data/CHANGELOG.md +13 -0
- data/README.md +12 -2
- data/app/assets/images/pageflow/external_links_sprite.png +0 -0
- data/app/helpers/pageflow/external_links/sites_helper.rb +11 -0
- data/app/models/pageflow/external_links/site.rb +4 -0
- data/app/views/pageflow/external_links/sites/_site.html.erb +1 -1
- data/pageflow-external-links.gemspec +2 -2
- metadata +6 -4
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
ODU5OTA5OGZkNDhmNWFiYjVlYjk2NjAyZmM4MWIwZWM2Yjk5MjBmZQ==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
N2QxN2ZhYTQ3ZmQ2OTBmMDVkZWEwYTY2ODNiM2VkYTViMmRkMmRlNw==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
Y2M3NTZmMzJlNzVjNmY5ZGVhNjI5YWJhZWMyNDJlODg2YzY4YzBiYzk5ODAx
|
|
10
|
+
OGFkNjdhNTU5NmZlZTAxYmNhMzA3ODNjYWVlN2IyMGFmMjRhNTZmYTlkMzY4
|
|
11
|
+
MTBkNTM2NjQ1M2Y0MTFjYmExMjRkYjZlYmNkMzFhZTI1ZmQ5MzI=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
MDI3ZWRkNDA0NDVmN2U2NzY5Yzg4YzE5NjIzZGQzMGMyNDI3MzY1YzE0YTVh
|
|
14
|
+
NGI2NWIwM2IwNzJlMGRhNDk2Y2JmZGI3MWEyYjdkOWE4NmE3OTFhYzNhNGNi
|
|
15
|
+
ODkzNTMyNDI3ZjUyMTMwMDQ2ZTA3YzcxZTM1Mzc1OWQxZDkwYmE=
|
data/CHANGELOG.md
ADDED
data/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Pageflow External Links
|
|
2
2
|
|
|
3
|
+
[](http://badge.fury.io/rb/pageflow-external-links)
|
|
4
|
+
|
|
3
5
|
Page type to display links to external pages.
|
|
4
6
|
|
|
5
7
|
## Installation
|
|
@@ -22,10 +24,10 @@ Include javascripts and stylesheets:
|
|
|
22
24
|
# app/assets/javascripts/pageflow/editor.js
|
|
23
25
|
//= require pageflow/external_links/editor
|
|
24
26
|
|
|
25
|
-
# app/assets/stylesheets/pageflow/application.scss
|
|
27
|
+
# app/assets/stylesheets/pageflow/application.css.scss
|
|
26
28
|
@import "pageflow/external_links";
|
|
27
29
|
|
|
28
|
-
# app/assets/stylesheets/pageflow/editor.scss
|
|
30
|
+
# app/assets/stylesheets/pageflow/editor.css.scss
|
|
29
31
|
@import "pageflow/external_links/editor";
|
|
30
32
|
|
|
31
33
|
Mount the routes in `config/routes.rb`:
|
|
@@ -47,3 +49,11 @@ Migrate the database:
|
|
|
47
49
|
bundle exec rake db:migrate
|
|
48
50
|
|
|
49
51
|
Restart the application server.
|
|
52
|
+
|
|
53
|
+
## Troubleshooting
|
|
54
|
+
|
|
55
|
+
If you run into problems while installing the page type, please also refer to the
|
|
56
|
+
[Troubleshooting](https://github.com/codevise/pageflow/wiki/Troubleshooting) wiki
|
|
57
|
+
page in the [Pageflow repository](https://github.com/codevise/pageflow). If that
|
|
58
|
+
doesn't help, consider
|
|
59
|
+
[filing an issue](https://github.com/codevise/pageflow-external-links/issues).
|
|
Binary file
|
|
@@ -4,6 +4,17 @@ module Pageflow
|
|
|
4
4
|
def external_links_site_css_class(site)
|
|
5
5
|
['link-item', site.title.blank? && site.description.blank? ? 'no_text' : ''].compact.join(' ')
|
|
6
6
|
end
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def external_links_site_thumbnail_css_class(site)
|
|
10
|
+
classes = ['link-thumbnail']
|
|
11
|
+
|
|
12
|
+
if file = site.thumbnail_file
|
|
13
|
+
classes << file_thumbnail_css_class(file, :link_thumbnail_large)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
classes.join(' ')
|
|
17
|
+
end
|
|
7
18
|
end
|
|
8
19
|
end
|
|
9
20
|
end
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
class: external_links_site_css_class(site),
|
|
3
3
|
target: site.open_in_new_tab? ? '_blank' : nil) do %>
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
<%= content_tag(:div, '', class: external_links_site_thumbnail_css_class(site)) %>
|
|
6
6
|
<div class="link-details">
|
|
7
7
|
<p class="link-title"><%= site.title %></p>
|
|
8
8
|
<p class="link-description"><%= raw(site.description) %></p>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Gem::Specification.new do |spec|
|
|
4
4
|
spec.name = "pageflow-external-links"
|
|
5
|
-
spec.version = "0.0
|
|
5
|
+
spec.version = "0.1.0"
|
|
6
6
|
spec.authors = ["Tim Fischbach"]
|
|
7
7
|
spec.email = ["tfischbach@codevise.de"]
|
|
8
8
|
spec.summary = "Pageflow Page Type for links to external sites"
|
|
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
|
|
|
14
14
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
15
15
|
spec.require_paths = ["lib"]
|
|
16
16
|
|
|
17
|
-
spec.add_runtime_dependency
|
|
17
|
+
spec.add_runtime_dependency 'pageflow', '>= 0.5.0'
|
|
18
18
|
|
|
19
19
|
# Using translations from rails locales in javascript code.
|
|
20
20
|
spec.add_runtime_dependency 'i18n-js'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pageflow-external-links
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 0.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tim Fischbach
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-
|
|
11
|
+
date: 2014-10-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: pageflow
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - ! '>='
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
19
|
+
version: 0.5.0
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - ! '>='
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
26
|
+
version: 0.5.0
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: i18n-js
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -118,11 +118,13 @@ files:
|
|
|
118
118
|
- .gitignore
|
|
119
119
|
- .jshintignore
|
|
120
120
|
- .jshintrc
|
|
121
|
+
- CHANGELOG.md
|
|
121
122
|
- Gemfile
|
|
122
123
|
- README.md
|
|
123
124
|
- Rakefile
|
|
124
125
|
- app/assets/images/pageflow/external_links_pictogram.png
|
|
125
126
|
- app/assets/images/pageflow/external_links_pictogram_small.png
|
|
127
|
+
- app/assets/images/pageflow/external_links_sprite.png
|
|
126
128
|
- app/assets/images/pageflow/ov-external_links.png
|
|
127
129
|
- app/assets/javascript/pageflow/external_links.js
|
|
128
130
|
- app/assets/javascript/pageflow/external_links/editor.js
|