pageflow-internal-links 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +22 -0
  3. data/.jshintrc +22 -0
  4. data/CHANGELOG.md +7 -0
  5. data/Gemfile +10 -0
  6. data/README.md +63 -0
  7. data/Rakefile +7 -0
  8. data/app/assets/images/pageflow/internal_links_grid_pictogram.png +0 -0
  9. data/app/assets/images/pageflow/internal_links_grid_pictogram_small.png +0 -0
  10. data/app/assets/images/pageflow/internal_links_grid_sprite.png +0 -0
  11. data/app/assets/images/pageflow/internal_links_list_pictogram.png +0 -0
  12. data/app/assets/images/pageflow/internal_links_list_pictogram_small.png +0 -0
  13. data/app/assets/images/pageflow/internal_links_list_sprite.png +0 -0
  14. data/app/assets/images/pageflow/ov-internal_links_grid.png +0 -0
  15. data/app/assets/javascripts/pageflow/internal_links/editor/collections/grid_page_links_collection.js +20 -0
  16. data/app/assets/javascripts/pageflow/internal_links/editor/collections/list_page_links_collection.js +12 -0
  17. data/app/assets/javascripts/pageflow/internal_links/editor/collections/page_links_collection.js +90 -0
  18. data/app/assets/javascripts/pageflow/internal_links/editor/config.js +45 -0
  19. data/app/assets/javascripts/pageflow/internal_links/editor/controllers/side_bar_controller.js +14 -0
  20. data/app/assets/javascripts/pageflow/internal_links/editor/models/page_configuration_mixin.js +19 -0
  21. data/app/assets/javascripts/pageflow/internal_links/editor/models/page_link.js +35 -0
  22. data/app/assets/javascripts/pageflow/internal_links/editor/routers/side_bar_router.js +5 -0
  23. data/app/assets/javascripts/pageflow/internal_links/editor/templates/edit_page_link.jst.ejs +3 -0
  24. data/app/assets/javascripts/pageflow/internal_links/editor/templates/grid_item_embedded.jst.ejs +4 -0
  25. data/app/assets/javascripts/pageflow/internal_links/editor/templates/list_item_embedded.jst.ejs +7 -0
  26. data/app/assets/javascripts/pageflow/internal_links/editor/views/edit_page_link_view.js +67 -0
  27. data/app/assets/javascripts/pageflow/internal_links/editor/views/editable_links_mode_view.js +10 -0
  28. data/app/assets/javascripts/pageflow/internal_links/editor/views/grid_configuration_editor_view.js +30 -0
  29. data/app/assets/javascripts/pageflow/internal_links/editor/views/grid_item_embedded_view.js +227 -0
  30. data/app/assets/javascripts/pageflow/internal_links/editor/views/list_configuration_editor_view.js +29 -0
  31. data/app/assets/javascripts/pageflow/internal_links/editor/views/list_embedded_view.js +23 -0
  32. data/app/assets/javascripts/pageflow/internal_links/editor/views/list_item_embedded_view.js +103 -0
  33. data/app/assets/javascripts/pageflow/internal_links/editor/views/page_link_embedded_view.js +106 -0
  34. data/app/assets/javascripts/pageflow/internal_links/editor.js +11 -0
  35. data/app/assets/javascripts/pageflow/internal_links/grid_page_type.js +31 -0
  36. data/app/assets/javascripts/pageflow/internal_links/list_page_type.js +29 -0
  37. data/app/assets/javascripts/pageflow/internal_links.js +2 -0
  38. data/app/assets/stylesheets/pageflow/internal_links/editor/embedded_grid_item.css.scss +118 -0
  39. data/app/assets/stylesheets/pageflow/internal_links/editor/embedded_list_item.scss +33 -0
  40. data/app/assets/stylesheets/pageflow/internal_links/editor.css.scss +2 -0
  41. data/app/assets/stylesheets/pageflow/internal_links/grid.scss +230 -0
  42. data/app/assets/stylesheets/pageflow/internal_links/list.scss +76 -0
  43. data/app/assets/stylesheets/pageflow/internal_links.css.scss +2 -0
  44. data/app/helpers/pageflow/internal_links/grid_helper.rb +50 -0
  45. data/app/helpers/pageflow/internal_links/list_helper.rb +10 -0
  46. data/app/helpers/pageflow/internal_links/page_links.rb +79 -0
  47. data/app/views/pageflow/internal_links/grid/_grid.html.erb +7 -0
  48. data/app/views/pageflow/internal_links/grid/page.html.erb +25 -0
  49. data/app/views/pageflow/internal_links/list/_list.html.erb +6 -0
  50. data/app/views/pageflow/internal_links/list/_page_link.html.erb +14 -0
  51. data/app/views/pageflow/internal_links/list/page.html.erb +26 -0
  52. data/config/locales/de.yml +61 -0
  53. data/config/locales/en.yml +64 -0
  54. data/db/migrate/20150109121800_rename_internal_links_page_type.rb +13 -0
  55. data/lib/pageflow/internal_links/engine.rb +9 -0
  56. data/lib/pageflow/internal_links/grid_page_type.rb +19 -0
  57. data/lib/pageflow/internal_links/list_page_type.rb +19 -0
  58. data/lib/pageflow/internal_links/plugin.rb +9 -0
  59. data/lib/pageflow-internal-links.rb +17 -0
  60. data/pageflow-internal-links.gemspec +18 -0
  61. metadata +117 -0
@@ -0,0 +1,13 @@
1
+ class RenameInternalLinksPageType < ActiveRecord::Migration
2
+ def up
3
+ execute(<<-SQL)
4
+ UPDATE pageflow_pages SET template = 'internal_links_grid' WHERE template = 'internal_links';
5
+ SQL
6
+ end
7
+
8
+ def down
9
+ execute(<<-SQL)
10
+ UPDATE pageflow_pages SET template = 'internal_links' WHERE template = 'internal_links_grid';
11
+ SQL
12
+ end
13
+ end
@@ -0,0 +1,9 @@
1
+ module Pageflow
2
+ module InternalLinks
3
+ class Engine < Rails::Engine
4
+ isolate_namespace Pageflow::InternalLinks
5
+
6
+ config.autoload_paths << File.join(config.root, 'lib')
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,19 @@
1
+ module Pageflow
2
+ module InternalLinks
3
+ class GridPageType < Pageflow::PageType
4
+ name 'internal_links_grid'
5
+
6
+ def translation_key_prefix
7
+ 'pageflow.internal_links.grid'
8
+ end
9
+
10
+ def template_path
11
+ 'pageflow/internal_links/grid/page'
12
+ end
13
+
14
+ def view_helpers
15
+ [GridHelper]
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,19 @@
1
+ module Pageflow
2
+ module InternalLinks
3
+ class ListPageType < Pageflow::PageType
4
+ name 'internal_links_list'
5
+
6
+ def translation_key_prefix
7
+ 'pageflow.internal_links.list'
8
+ end
9
+
10
+ def template_path
11
+ 'pageflow/internal_links/list/page'
12
+ end
13
+
14
+ def view_helpers
15
+ [InternalLinks::ListHelper]
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,9 @@
1
+ module Pageflow
2
+ module InternalLinks
3
+ class Plugin < Pageflow::Plugin
4
+ def configure(config)
5
+ config.features.register(PageTypeFeature.new(InternalLinks.list_page_type))
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,17 @@
1
+ require 'pageflow/internal_links/engine'
2
+
3
+ module Pageflow
4
+ module InternalLinks
5
+ def self.plugin
6
+ InternalLinks::Plugin.new
7
+ end
8
+
9
+ def self.grid_page_type
10
+ InternalLinks::GridPageType.new
11
+ end
12
+
13
+ def self.list_page_type
14
+ InternalLinks::ListPageType.new
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,18 @@
1
+ # coding: utf-8
2
+
3
+ Gem::Specification.new do |spec|
4
+ spec.name = 'pageflow-internal-links'
5
+ spec.version = '0.1.0'
6
+ spec.authors = ['Codevise Solutions']
7
+ spec.email = ['info@codevise.de']
8
+ spec.summary = 'Pageflow page types for linking to other pages.'
9
+ spec.homepage = ''
10
+ spec.license = 'MIT'
11
+
12
+ spec.files = `git ls-files`.split($/)
13
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
14
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
15
+ spec.require_paths = ['lib']
16
+
17
+ spec.add_runtime_dependency('pageflow', '~> 0.9')
18
+ end
metadata ADDED
@@ -0,0 +1,117 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pageflow-internal-links
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Codevise Solutions
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-10-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: pageflow
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '0.9'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '0.9'
27
+ description:
28
+ email:
29
+ - info@codevise.de
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - .gitignore
35
+ - .jshintrc
36
+ - CHANGELOG.md
37
+ - Gemfile
38
+ - README.md
39
+ - Rakefile
40
+ - app/assets/images/pageflow/internal_links_grid_pictogram.png
41
+ - app/assets/images/pageflow/internal_links_grid_pictogram_small.png
42
+ - app/assets/images/pageflow/internal_links_grid_sprite.png
43
+ - app/assets/images/pageflow/internal_links_list_pictogram.png
44
+ - app/assets/images/pageflow/internal_links_list_pictogram_small.png
45
+ - app/assets/images/pageflow/internal_links_list_sprite.png
46
+ - app/assets/images/pageflow/ov-internal_links_grid.png
47
+ - app/assets/javascripts/pageflow/internal_links.js
48
+ - app/assets/javascripts/pageflow/internal_links/editor.js
49
+ - app/assets/javascripts/pageflow/internal_links/editor/collections/grid_page_links_collection.js
50
+ - app/assets/javascripts/pageflow/internal_links/editor/collections/list_page_links_collection.js
51
+ - app/assets/javascripts/pageflow/internal_links/editor/collections/page_links_collection.js
52
+ - app/assets/javascripts/pageflow/internal_links/editor/config.js
53
+ - app/assets/javascripts/pageflow/internal_links/editor/controllers/side_bar_controller.js
54
+ - app/assets/javascripts/pageflow/internal_links/editor/models/page_configuration_mixin.js
55
+ - app/assets/javascripts/pageflow/internal_links/editor/models/page_link.js
56
+ - app/assets/javascripts/pageflow/internal_links/editor/routers/side_bar_router.js
57
+ - app/assets/javascripts/pageflow/internal_links/editor/templates/edit_page_link.jst.ejs
58
+ - app/assets/javascripts/pageflow/internal_links/editor/templates/grid_item_embedded.jst.ejs
59
+ - app/assets/javascripts/pageflow/internal_links/editor/templates/list_item_embedded.jst.ejs
60
+ - app/assets/javascripts/pageflow/internal_links/editor/views/edit_page_link_view.js
61
+ - app/assets/javascripts/pageflow/internal_links/editor/views/editable_links_mode_view.js
62
+ - app/assets/javascripts/pageflow/internal_links/editor/views/grid_configuration_editor_view.js
63
+ - app/assets/javascripts/pageflow/internal_links/editor/views/grid_item_embedded_view.js
64
+ - app/assets/javascripts/pageflow/internal_links/editor/views/list_configuration_editor_view.js
65
+ - app/assets/javascripts/pageflow/internal_links/editor/views/list_embedded_view.js
66
+ - app/assets/javascripts/pageflow/internal_links/editor/views/list_item_embedded_view.js
67
+ - app/assets/javascripts/pageflow/internal_links/editor/views/page_link_embedded_view.js
68
+ - app/assets/javascripts/pageflow/internal_links/grid_page_type.js
69
+ - app/assets/javascripts/pageflow/internal_links/list_page_type.js
70
+ - app/assets/stylesheets/pageflow/internal_links.css.scss
71
+ - app/assets/stylesheets/pageflow/internal_links/editor.css.scss
72
+ - app/assets/stylesheets/pageflow/internal_links/editor/embedded_grid_item.css.scss
73
+ - app/assets/stylesheets/pageflow/internal_links/editor/embedded_list_item.scss
74
+ - app/assets/stylesheets/pageflow/internal_links/grid.scss
75
+ - app/assets/stylesheets/pageflow/internal_links/list.scss
76
+ - app/helpers/pageflow/internal_links/grid_helper.rb
77
+ - app/helpers/pageflow/internal_links/list_helper.rb
78
+ - app/helpers/pageflow/internal_links/page_links.rb
79
+ - app/views/pageflow/internal_links/grid/_grid.html.erb
80
+ - app/views/pageflow/internal_links/grid/page.html.erb
81
+ - app/views/pageflow/internal_links/list/_list.html.erb
82
+ - app/views/pageflow/internal_links/list/_page_link.html.erb
83
+ - app/views/pageflow/internal_links/list/page.html.erb
84
+ - config/locales/de.yml
85
+ - config/locales/en.yml
86
+ - db/migrate/20150109121800_rename_internal_links_page_type.rb
87
+ - lib/pageflow-internal-links.rb
88
+ - lib/pageflow/internal_links/engine.rb
89
+ - lib/pageflow/internal_links/grid_page_type.rb
90
+ - lib/pageflow/internal_links/list_page_type.rb
91
+ - lib/pageflow/internal_links/plugin.rb
92
+ - pageflow-internal-links.gemspec
93
+ homepage: ''
94
+ licenses:
95
+ - MIT
96
+ metadata: {}
97
+ post_install_message:
98
+ rdoc_options: []
99
+ require_paths:
100
+ - lib
101
+ required_ruby_version: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ! '>='
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ required_rubygems_version: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ requirements: []
112
+ rubyforge_project:
113
+ rubygems_version: 2.4.2
114
+ signing_key:
115
+ specification_version: 4
116
+ summary: Pageflow page types for linking to other pages.
117
+ test_files: []