pageflow-sitemap 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (184) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +25 -0
  3. data/.jshintrc +18 -0
  4. data/Gemfile +24 -0
  5. data/LICENSE.md +20 -0
  6. data/README.md +47 -0
  7. data/Rakefile +32 -0
  8. data/app/assets/images/pageflow/sitemap/.keep +0 -0
  9. data/app/assets/javascripts/pageflow/sitemap/.keep +0 -0
  10. data/app/assets/javascripts/pageflow/sitemap/editor/controllers/abstract_controller.js +68 -0
  11. data/app/assets/javascripts/pageflow/sitemap/editor/controllers/editor_mode_controller.js +301 -0
  12. data/app/assets/javascripts/pageflow/sitemap/editor/controllers/fragment_parser.js +31 -0
  13. data/app/assets/javascripts/pageflow/sitemap/editor/controllers/selection_mode_controller.js +37 -0
  14. data/app/assets/javascripts/pageflow/sitemap/editor/controllers/selection_navigator.js +43 -0
  15. data/app/assets/javascripts/pageflow/sitemap/editor/d3/behaviors/mouse_wheel.js +43 -0
  16. data/app/assets/javascripts/pageflow/sitemap/editor/d3/behaviors/multi_drag.js +73 -0
  17. data/app/assets/javascripts/pageflow/sitemap/editor/d3/behaviors/scroll_and_zoom.js +286 -0
  18. data/app/assets/javascripts/pageflow/sitemap/editor/d3/behaviors/selection_rect.js +104 -0
  19. data/app/assets/javascripts/pageflow/sitemap/editor/d3/behaviors/tooltip_target.js +24 -0
  20. data/app/assets/javascripts/pageflow/sitemap/editor/d3/graph_view.js +277 -0
  21. data/app/assets/javascripts/pageflow/sitemap/editor/d3/layout/chapter_collision.js +33 -0
  22. data/app/assets/javascripts/pageflow/sitemap/editor/d3/layout/collision.js +116 -0
  23. data/app/assets/javascripts/pageflow/sitemap/editor/d3/layout/dragging_decorator.js +58 -0
  24. data/app/assets/javascripts/pageflow/sitemap/editor/d3/layout/grid.js +238 -0
  25. data/app/assets/javascripts/pageflow/sitemap/editor/d3/layout/link_dragging_decorator.js +42 -0
  26. data/app/assets/javascripts/pageflow/sitemap/editor/d3/layout.js +94 -0
  27. data/app/assets/javascripts/pageflow/sitemap/editor/d3/options.js +25 -0
  28. data/app/assets/javascripts/pageflow/sitemap/editor/d3/paths/follow_path.js +36 -0
  29. data/app/assets/javascripts/pageflow/sitemap/editor/d3/paths/linkpath.js +64 -0
  30. data/app/assets/javascripts/pageflow/sitemap/editor/d3/paths/successor_path.js +49 -0
  31. data/app/assets/javascripts/pageflow/sitemap/editor/d3/utils.js +33 -0
  32. data/app/assets/javascripts/pageflow/sitemap/editor/d3/view_model.js +202 -0
  33. data/app/assets/javascripts/pageflow/sitemap/editor/d3/views/add_button_view.js +28 -0
  34. data/app/assets/javascripts/pageflow/sitemap/editor/d3/views/chapter_placeholders_view.js +22 -0
  35. data/app/assets/javascripts/pageflow/sitemap/editor/d3/views/chapters_view.js +89 -0
  36. data/app/assets/javascripts/pageflow/sitemap/editor/d3/views/group_view.js +104 -0
  37. data/app/assets/javascripts/pageflow/sitemap/editor/d3/views/page_links_view.js +7 -0
  38. data/app/assets/javascripts/pageflow/sitemap/editor/d3/views/pages_view.js +112 -0
  39. data/app/assets/javascripts/pageflow/sitemap/editor/d3/views/selectable_links_view.js +104 -0
  40. data/app/assets/javascripts/pageflow/sitemap/editor/d3/views/storylines_view.js +86 -0
  41. data/app/assets/javascripts/pageflow/sitemap/editor/d3/views/successor_links_view.js +7 -0
  42. data/app/assets/javascripts/pageflow/sitemap/editor/d3/views/text_label_view.js +45 -0
  43. data/app/assets/javascripts/pageflow/sitemap/editor/d3.js +20 -0
  44. data/app/assets/javascripts/pageflow/sitemap/editor/feature.js +126 -0
  45. data/app/assets/javascripts/pageflow/sitemap/editor/models/selection.js +41 -0
  46. data/app/assets/javascripts/pageflow/sitemap/editor/templates/scroll_bar.jst.ejs +2 -0
  47. data/app/assets/javascripts/pageflow/sitemap/editor/templates/sitemap.jst.ejs +85 -0
  48. data/app/assets/javascripts/pageflow/sitemap/editor/views/scroll_bar_view.js +130 -0
  49. data/app/assets/javascripts/pageflow/sitemap/editor/views/scroll_pane_view.js +73 -0
  50. data/app/assets/javascripts/pageflow/sitemap/editor/views/sitemap_view.js +137 -0
  51. data/app/assets/javascripts/pageflow/sitemap/editor.js +14 -0
  52. data/app/assets/javascripts/pageflow/sitemap/feature.js +3 -0
  53. data/app/assets/javascripts/pageflow/sitemap/scroll_navigator.js +112 -0
  54. data/app/assets/javascripts/pageflow/sitemap.js +5 -0
  55. data/app/assets/stylesheets/pageflow/sitemap/.keep +0 -0
  56. data/app/assets/stylesheets/pageflow/sitemap/editor/add_button.scss +29 -0
  57. data/app/assets/stylesheets/pageflow/sitemap/editor/chapter_placeholders.scss +14 -0
  58. data/app/assets/stylesheets/pageflow/sitemap/editor/chapters.scss +62 -0
  59. data/app/assets/stylesheets/pageflow/sitemap/editor/page_links.scss +19 -0
  60. data/app/assets/stylesheets/pageflow/sitemap/editor/pages.scss +78 -0
  61. data/app/assets/stylesheets/pageflow/sitemap/editor/scroll_bar.css.scss +33 -0
  62. data/app/assets/stylesheets/pageflow/sitemap/editor/scroll_pane.scss +15 -0
  63. data/app/assets/stylesheets/pageflow/sitemap/editor/selectable_links.scss +88 -0
  64. data/app/assets/stylesheets/pageflow/sitemap/editor/selection_rect.scss +12 -0
  65. data/app/assets/stylesheets/pageflow/sitemap/editor/storylines.scss +59 -0
  66. data/app/assets/stylesheets/pageflow/sitemap/editor/successor_links.scss +42 -0
  67. data/app/assets/stylesheets/pageflow/sitemap/editor/text_label.scss +23 -0
  68. data/app/assets/stylesheets/pageflow/sitemap/editor/toolbar.css.scss +45 -0
  69. data/app/assets/stylesheets/pageflow/sitemap/editor.css.scss +96 -0
  70. data/config/locales/de.yml +16 -0
  71. data/config/locales/en.yml +48 -0
  72. data/config/locales/new/help_button.de.yml +7 -0
  73. data/config/locales/new/help_button.en.yml +7 -0
  74. data/config/locales/new/tooltips.de.yml +11 -0
  75. data/config/locales/new/tooltips.en.yml +11 -0
  76. data/config/routes.rb +7 -0
  77. data/config/spring.rb +1 -0
  78. data/exec/rails +12 -0
  79. data/exec/spring +18 -0
  80. data/exec/teaspoon +17 -0
  81. data/lib/pageflow/sitemap/engine.rb +10 -0
  82. data/lib/pageflow/sitemap/plugin.rb +11 -0
  83. data/lib/pageflow/sitemap/version.rb +5 -0
  84. data/lib/pageflow-sitemap.rb +9 -0
  85. data/pageflow-sitemap.gemspec +29 -0
  86. data/spec/d/r/.gitignore +16 -0
  87. data/spec/d/r/README.rdoc +28 -0
  88. data/spec/d/r/Rakefile +6 -0
  89. data/spec/d/r/app/admin/dashboard.rb +33 -0
  90. data/spec/d/r/app/assets/images/.keep +0 -0
  91. data/spec/d/r/app/assets/javascripts/active_admin.js.coffee +2 -0
  92. data/spec/d/r/app/assets/javascripts/application.js +16 -0
  93. data/spec/d/r/app/assets/javascripts/pageflow/application.js +1 -0
  94. data/spec/d/r/app/assets/javascripts/pageflow/editor.js +4 -0
  95. data/spec/d/r/app/assets/stylesheets/active_admin.css.scss +18 -0
  96. data/spec/d/r/app/assets/stylesheets/application.css +13 -0
  97. data/spec/d/r/app/assets/stylesheets/pageflow/application.css.scss +1 -0
  98. data/spec/d/r/app/assets/stylesheets/pageflow/editor.css.scss +1 -0
  99. data/spec/d/r/app/controllers/application_controller.rb +5 -0
  100. data/spec/d/r/app/controllers/concerns/.keep +0 -0
  101. data/spec/d/r/app/helpers/application_helper.rb +2 -0
  102. data/spec/d/r/app/mailers/.keep +0 -0
  103. data/spec/d/r/app/models/.keep +0 -0
  104. data/spec/d/r/app/models/ability.rb +12 -0
  105. data/spec/d/r/app/models/concerns/.keep +0 -0
  106. data/spec/d/r/app/models/user.rb +9 -0
  107. data/spec/d/r/app/views/layouts/application.html.erb +14 -0
  108. data/spec/d/r/bin/bundle +3 -0
  109. data/spec/d/r/bin/rails +4 -0
  110. data/spec/d/r/bin/rake +4 -0
  111. data/spec/d/r/config/application.rb +31 -0
  112. data/spec/d/r/config/boot.rb +4 -0
  113. data/spec/d/r/config/database.yml +39 -0
  114. data/spec/d/r/config/environment.rb +5 -0
  115. data/spec/d/r/config/environments/development.rb +29 -0
  116. data/spec/d/r/config/environments/production.rb +80 -0
  117. data/spec/d/r/config/environments/test.rb +37 -0
  118. data/spec/d/r/config/initializers/active_admin.rb +225 -0
  119. data/spec/d/r/config/initializers/backtrace_silencers.rb +7 -0
  120. data/spec/d/r/config/initializers/devise.rb +252 -0
  121. data/spec/d/r/config/initializers/devise_async.rb +6 -0
  122. data/spec/d/r/config/initializers/filter_parameter_logging.rb +4 -0
  123. data/spec/d/r/config/initializers/friendly_id.rb +88 -0
  124. data/spec/d/r/config/initializers/inflections.rb +16 -0
  125. data/spec/d/r/config/initializers/mime_types.rb +5 -0
  126. data/spec/d/r/config/initializers/pageflow.rb +76 -0
  127. data/spec/d/r/config/initializers/resque.rb +4 -0
  128. data/spec/d/r/config/initializers/resque_enqueue_after_commit_patch.rb +25 -0
  129. data/spec/d/r/config/initializers/resque_logger.rb +16 -0
  130. data/spec/d/r/config/initializers/resque_mailer.rb +4 -0
  131. data/spec/d/r/config/initializers/secret_token.rb +12 -0
  132. data/spec/d/r/config/initializers/session_store.rb +3 -0
  133. data/spec/d/r/config/initializers/wrap_parameters.rb +14 -0
  134. data/spec/d/r/config/locales/devise.en.yml +59 -0
  135. data/spec/d/r/config/locales/en.yml +23 -0
  136. data/spec/d/r/config/routes.rb +59 -0
  137. data/spec/d/r/config.ru +4 -0
  138. data/spec/d/r/db/migrate/00000000000000_create_test_hosted_file.rb +7 -0
  139. data/spec/d/r/db/migrate/00000000000001_create_test_revision_component.rb +10 -0
  140. data/spec/d/r/db/migrate/20150209101518_create_active_admin_comments.rb +19 -0
  141. data/spec/d/r/db/migrate/20150209101524_devise_create_users.rb +46 -0
  142. data/spec/d/r/db/migrate/20150209101530_create_friendly_id_slugs.rb +15 -0
  143. data/spec/d/r/db/migrate/20150209101540_setup_schema.pageflow.rb +208 -0
  144. data/spec/d/r/db/migrate/20150209101541_add_attributes_to_users.pageflow.rb +16 -0
  145. data/spec/d/r/db/migrate/20150209101542_create_themings.pageflow.rb +16 -0
  146. data/spec/d/r/db/migrate/20150209101543_create_themings_for_existing_accounts.pageflow.rb +27 -0
  147. data/spec/d/r/db/migrate/20150209101544_change_theme_references_to_theming_references.pageflow.rb +46 -0
  148. data/spec/d/r/db/migrate/20150209101545_remove_attributes_from_themes.pageflow.rb +11 -0
  149. data/spec/d/r/db/migrate/20150209101546_create_accounts_themes_join_table.pageflow.rb +9 -0
  150. data/spec/d/r/db/migrate/20150209101547_move_cname_from_account_to_theming.pageflow.rb +22 -0
  151. data/spec/d/r/db/migrate/20150209101548_drop_themes.pageflow.rb +15 -0
  152. data/spec/d/r/db/migrate/20150209101549_add_confirmed_by_to_encoded_files.pageflow.rb +7 -0
  153. data/spec/d/r/db/migrate/20150209101550_add_home_url_attributes_to_themings_and_revisions.pageflow.rb +10 -0
  154. data/spec/d/r/db/migrate/20150209101551_create_widgets.pageflow.rb +12 -0
  155. data/spec/d/r/db/migrate/20150209101552_add_emphasize_chapter_beginning_to_revisions.pageflow.rb +6 -0
  156. data/spec/d/r/db/migrate/20150209101553_add_emphasize_new_pages_to_revisions.pageflow.rb +6 -0
  157. data/spec/d/r/db/migrate/20150209101554_add_sharing_image_to_revisions.pageflow.rb +8 -0
  158. data/spec/d/r/db/schema.rb +316 -0
  159. data/spec/d/r/db/seeds.rb +30 -0
  160. data/spec/d/r/lib/assets/.keep +0 -0
  161. data/spec/d/r/lib/tasks/.keep +0 -0
  162. data/spec/d/r/lib/tasks/resque.rake +7 -0
  163. data/spec/d/r/public/404.html +58 -0
  164. data/spec/d/r/public/422.html +58 -0
  165. data/spec/d/r/public/500.html +57 -0
  166. data/spec/d/r/public/favicon.ico +0 -0
  167. data/spec/d/r/public/javascripts/translations.js +2 -0
  168. data/spec/d/r/public/robots.txt +5 -0
  169. data/spec/d/r/vendor/assets/javascripts/.keep +0 -0
  170. data/spec/d/r/vendor/assets/stylesheets/.keep +0 -0
  171. data/spec/javascripts/.jshintrc +26 -0
  172. data/spec/javascripts/pageflow/sitemap/editor/controllers/selection_navigator_spec.js +52 -0
  173. data/spec/javascripts/pageflow/sitemap/editor/d3/layout/collision_spec.js +99 -0
  174. data/spec/javascripts/pageflow/sitemap/editor/d3/layout/dragging_decorator_spec.js +114 -0
  175. data/spec/javascripts/pageflow/sitemap/editor/d3/layout/grid_spec.js +183 -0
  176. data/spec/javascripts/pageflow/sitemap/editor/d3/layout_spec.js +31 -0
  177. data/spec/javascripts/pageflow/sitemap/editor/d3/view_model_spec.js +56 -0
  178. data/spec/javascripts/pageflow/sitemap/editor/models/selection_spec.js +62 -0
  179. data/spec/javascripts/pageflow/sitemap/scroll_navigator_spec.js +5 -0
  180. data/spec/javascripts/spec_helper.js +13 -0
  181. data/spec/javascripts/support/factories.js +81 -0
  182. data/spec/teaspoon_env.rb +182 -0
  183. data/vendor/assets/javascripts/d3.v3.js +9215 -0
  184. metadata +379 -0
@@ -0,0 +1,42 @@
1
+ .successor_link {
2
+ .arrow {
3
+ stroke: $successor-link-color;
4
+ marker-end: url(#successor_link_triangle);
5
+ }
6
+
7
+ &.placeholder {
8
+ .drag_target {
9
+ transform: translateY(-5px);
10
+ }
11
+ }
12
+ }
13
+
14
+ &.editor_mode .successor_link {
15
+ &.dragged,
16
+ &.highlight {
17
+ .arrow {
18
+ marker-end: url(#successor_link_triangle_highlight);
19
+ }
20
+ }
21
+
22
+ &.placeholder {
23
+ pointer-events: bounding-box;
24
+ }
25
+
26
+ &.placeholder:hover .add_page {
27
+ visibility: visible;
28
+ }
29
+
30
+ &.dragged:hover .add_page {
31
+ visibility: hidden;
32
+ transition: none;
33
+ }
34
+ }
35
+
36
+ #successor_link_triangle {
37
+ fill: $successor-link-color;
38
+ }
39
+
40
+ #successor_link_triangle_highlight {
41
+ fill: $highlight-color;
42
+ }
@@ -0,0 +1,23 @@
1
+ .text_label {
2
+ pointer-events: none;
3
+
4
+ &.empty {
5
+ display: none;
6
+ }
7
+
8
+ rect {
9
+ fill: rgba(0,0,0,0.6);
10
+ stroke: #444;
11
+ stroke-width: 1;
12
+ shape-rendering: crispEdges;
13
+ }
14
+
15
+ text {
16
+ fill: #fff;
17
+ font-size: 12px;
18
+ }
19
+
20
+ &.anchor_right text {
21
+ text-anchor: end;
22
+ }
23
+ }
@@ -0,0 +1,45 @@
1
+ .toolbar {
2
+ position: absolute;
3
+ right: 100px;
4
+ top: 5px;
5
+
6
+ > * {
7
+ display: inline-block;
8
+ vertical-align: middle;
9
+ }
10
+
11
+ .help_button {
12
+ @include background-icon-center($color: #a0c4e0, $font-size: 16px);
13
+ @include help-circled-icon;
14
+ width: 40px;
15
+ height: 25px;
16
+ margin-right: 5px;
17
+ }
18
+
19
+ .scale_slider {
20
+ width: 300px;
21
+ }
22
+
23
+ .scale_minus,
24
+ .scale_plus {
25
+ @include background-icon-center($font-size: 16px);
26
+ width: 40px;
27
+ height: 25px;
28
+ }
29
+
30
+ .scale_minus {
31
+ @include fa-search-minus-icon;
32
+ }
33
+
34
+ .scale_plus {
35
+ @include fa-search-plus-icon;
36
+ }
37
+
38
+ .items a {
39
+ display: inline-block;
40
+ font-size: 13px;
41
+ cursor: pointer;
42
+ padding: 5px 15px 5px 30px;
43
+ border-right: solid 1px #aaa;
44
+ }
45
+ }
@@ -0,0 +1,96 @@
1
+ $highlight-color: orange;
2
+ $stroke-color: #3182bd;
3
+ $stroke-width: 1.5px;
4
+ $font: 10px sans-serif;
5
+ $selection-color: red;
6
+
7
+ $follow-link-color: #bbb;
8
+ $successor-link-color: #bbb;
9
+ $page-link-color: #9ecae1;
10
+
11
+ @mixin highlight() {
12
+ stroke: $highlight-color;
13
+ stroke-width: 2px;
14
+ }
15
+
16
+ .sitemap {
17
+ @extend %pageflow-ui;
18
+
19
+ @import "./editor/selection_rect";
20
+ @import "./editor/storylines";
21
+ @import "./editor/chapters";
22
+ @import "./editor/chapter_placeholders";
23
+ @import "./editor/pages";
24
+ @import "./editor/add_button";
25
+ @import "./editor/selectable_links";
26
+ @import "./editor/page_links";
27
+ @import "./editor/successor_links";
28
+ @import "./editor/scroll_bar";
29
+ @import "./editor/scroll_pane";
30
+ @import "./editor/toolbar";
31
+ @import "./editor/text_label";
32
+
33
+ @include user-select(none);
34
+ background-color: #fff;
35
+
36
+ position: absolute;
37
+ top: 0;
38
+ left: 0;
39
+ right: 0;
40
+ bottom: 0;
41
+ z-index: 100000;
42
+
43
+ h2 {
44
+ font-size: 13px;
45
+ font-weight: normal;
46
+ margin: 10px;
47
+ }
48
+
49
+ div.svgcontainer {
50
+ cursor: default;
51
+ border: solid 1px #ddd;
52
+
53
+ z-index: 10000;
54
+ position: absolute;
55
+ top: 35px;
56
+ right: 15px;
57
+ left: 1px;
58
+ bottom: 15px;
59
+ }
60
+
61
+ marker {
62
+ stroke: inherit;
63
+ fill: inherit;
64
+ }
65
+
66
+ .scroll_bar_x {
67
+ position: absolute;
68
+ bottom: 1px;
69
+ left: 1px;
70
+ right: 17px;
71
+ height: 13px;
72
+ }
73
+
74
+ .scroll_bar_y {
75
+ position: absolute;
76
+ right: 1px;
77
+ top: 37px;
78
+ bottom: 15px;
79
+ width: 13px;
80
+ }
81
+
82
+ .button {
83
+ display: block;
84
+ position: absolute;
85
+ z-index: 100000;
86
+ font-size: 13px;
87
+ cursor: pointer;
88
+ }
89
+
90
+ .close {
91
+ height: 25px;
92
+ width: 80px;
93
+ top: 10px;
94
+ right: 10px;
95
+ }
96
+ }
@@ -0,0 +1,16 @@
1
+ de:
2
+ pageflow:
3
+ sitemap:
4
+ editor:
5
+ headers:
6
+ select_page: Klicke auf eine Zielseite für den Verweis
7
+ main_menu_item: Sitemap
8
+ templates:
9
+ sitemap:
10
+ cancel: Abbrechen
11
+ close: Schließen
12
+ feature_name: Sitemap
13
+ help_entries:
14
+ main:
15
+ menu_item: Sitemap
16
+ text: ! "# Sitemap\n\nDie Sitemap unterstützt Dich bei der Planung und der Umsetzung von Pageflows mit mehreren Erzählsträngen. Dabei kannst Du per Mausklick neue Kapitel erstellen, Seiten einfügen und per Drag&Drop Verweis-Ziele und Scroll-Nachfolge-Pfeile festlegen. Hierzu ziehst Du ausgehend vom Halbkreis am unteren Ende einer Box einen Pfeil zu einer bereits bestehenden Seite oder an die Position, an der Du einen neuen Erzählstrang erstellen möchtest. Bei Verweis-Seiten wird dieser Bereich zum Verknüpfen als Halbkreis an der rechten Seite angezeigt.\n\nAuf diese Weise behältst Du den Überblick und kannst zum Beispiel ein Storyboard auf Pageflow übertragen. Außerdem kann die Sitemap zur Navigation während des gesamten Editier-Prozesses genutzt werden, denn: Sobald Du ein Element in der Sitemap anklickst, kannst Du es in der Seitenleiste editieren.\n\n### Weitere Optionen\n\nMit dem Auswahl-Rechteck können auch mehrere Erzählstränge markiert und gemeinsam verschoben werden.\nDurch einen Doppelklick auf einen Erzählstrang-Header wird der entsprechende Erzählstrang in der Gliederung angezeigt.\nEin Doppelklick auf eine Seite führt in die Vorschau.\n\n### Tastatur Shortcuts\n\n* Mausrad: Sitemap vertikal Scrollen\n* Umschalten + Mausrad: Sitemap horizontal Scrollen \n* Alt + Mausrad: Sitemap zoomen\n* Strg + Umschalten + Drag&Drop: Bildausschnitt in der Sitemap verschieben\n* Alt + s: Sitemap anzeigen/ausblenden\n* Alt + x: Aktuelle Seite in der Seitenleiste bearbeiten"
@@ -0,0 +1,48 @@
1
+ en:
2
+ pageflow:
3
+ sitemap:
4
+ editor:
5
+ headers:
6
+ select_page: Click on the target page for the link
7
+ main_menu_item: Sitemap
8
+ templates:
9
+ sitemap:
10
+ cancel: Cancel
11
+ close: Close
12
+ feature_name: Sitemap
13
+ help_entries:
14
+ main:
15
+ menu_item: Sitemap
16
+ text: ! '# Sitemap
17
+
18
+
19
+ The Sitemap assists you in planning and implementing a story with multiple storylines. In this way you can easily create new chapters and pages via mouse click. Dragging arrows creates links and defines scroll-successor pages. Just pull an arrow from the semicircle at the bottom of a box to the desired position to create a new storyline. The semicircle for connecting link pages is placed on the right side of a box.
20
+
21
+
22
+ The Sitemap helps to keep the overview and lets you transfer a storyboard to the system. Besides that, the Sitemap can be used to navigate throughout the whole editing process. As soon as you click onto an element within the Sitemap, it appears in the sidebar, ready to be edited.
23
+
24
+
25
+ ### Further options
26
+
27
+
28
+ Drag a rectangle to select and move multiple storylines by using the left mouse button.
29
+
30
+ With a double click on a storyline’s header its chapters will be displayed in the sidebar.
31
+
32
+ A double click onto a page will open its preview.
33
+
34
+
35
+ ### Keyboard Shortcuts
36
+
37
+
38
+ * Mouse wheel: Scroll Sitemap vertically
39
+
40
+ * Shift + Mouse wheel: Scroll Sitemap horizontally
41
+
42
+ * Alt + Mouse wheel: Zoom Sitemap
43
+
44
+ * Ctrl + Shift + drag&drop: Move Sitemap viewport
45
+
46
+ * Alt + s: Show/hide Sitemap
47
+
48
+ * Alt + x: Edit current page in sidebar'
@@ -0,0 +1,7 @@
1
+ de:
2
+ pageflow:
3
+ sitemap:
4
+ editor:
5
+ templates:
6
+ sitemap:
7
+ help: Hilfe anzeigen
@@ -0,0 +1,7 @@
1
+ en:
2
+ pageflow:
3
+ sitemap:
4
+ editor:
5
+ templates:
6
+ sitemap:
7
+ help: Display help
@@ -0,0 +1,11 @@
1
+ de:
2
+ pageflow:
3
+ sitemap:
4
+ editor:
5
+ tooltips:
6
+ add_page_link: 'Ziehen um Verweis zu erstellen'
7
+ set_successor: 'Ziehen um Scroll Nachfolger festzulegen'
8
+ insert_chapter: 'Kapitel einfügen'
9
+ insert_page: 'Seite einfügen'
10
+ unnamed_chapter: '(Neues Kapitel)'
11
+ unnamed_page: '(Neue Seite)'
@@ -0,0 +1,11 @@
1
+ en:
2
+ pageflow:
3
+ sitemap:
4
+ editor:
5
+ tooltips:
6
+ add_page_link: 'Drag to create page link'
7
+ set_successor: 'Drag to set scroll successor'
8
+ insert_chapter: 'Insert chapter'
9
+ insert_page: 'Insert page'
10
+ unnamed_chapter: '(New chapter)'
11
+ unnamed_page: '(New page)'
data/config/routes.rb ADDED
@@ -0,0 +1,7 @@
1
+ module Pageflow
2
+ Sitemap::Engine.routes.draw do
3
+
4
+ get '/test' => 'foo_test#index'
5
+
6
+ end
7
+ end
data/config/spring.rb ADDED
@@ -0,0 +1 @@
1
+ Spring.application_root = Dir[File.expand_path(File.join(__FILE__, "../../spec/dummy/rails-*"))].first
data/exec/rails ADDED
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application.
3
+
4
+ ENGINE_ROOT = File.expand_path('../..', __FILE__)
5
+ ENGINE_PATH = File.expand_path('../../lib/pageflow/sitemap/engine', __FILE__)
6
+
7
+ # Set up gems listed in the Gemfile.
8
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
9
+ require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
10
+
11
+ require 'rails/all'
12
+ require 'rails/engine/commands'
data/exec/spring ADDED
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # This file loads spring without using Bundler, in order to be fast
4
+ # It gets overwritten when you run the `spring binstub` command
5
+
6
+ unless defined?(Spring)
7
+ require "rubygems"
8
+ require "bundler"
9
+
10
+ if match = Bundler.default_lockfile.read.match(/^GEM$.*?^ spring \((.*?)\)$.*?^$/m)
11
+ ENV["GEM_PATH"] = ([Bundler.bundle_path.to_s] + Gem.path).join(File::PATH_SEPARATOR)
12
+ ENV["GEM_HOME"] = ""
13
+ Gem.paths = ENV
14
+
15
+ gem "spring", match[1]
16
+ require "spring/binstub"
17
+ end
18
+ end
data/exec/teaspoon ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ dummy_dir = File.expand_path('../spec/dummy', File.dirname(__FILE__))
4
+
5
+ begin
6
+ load File.expand_path('../spring', __FILE__) if File.exists?(dummy_dir)
7
+ rescue LoadError
8
+ end
9
+
10
+ require 'bundler/setup'
11
+
12
+ ENV['PAGEFLOW_PLUGIN_ENGINE'] = 'pageflow_sitemap'
13
+
14
+ require 'pageflow/support'
15
+ Pageflow::Dummy.setup
16
+
17
+ load Gem.bin_path('teaspoon', 'teaspoon')
@@ -0,0 +1,10 @@
1
+ module Pageflow
2
+ module Sitemap
3
+ class Engine < Rails::Engine
4
+ isolate_namespace Pageflow::Sitemap
5
+
6
+ config.autoload_paths << File.join(config.root, 'lib')
7
+ config.i18n.load_path += Dir[config.root.join('config', 'locales', '**', '*.yml').to_s]
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,11 @@
1
+ module Pageflow
2
+ module Sitemap
3
+ class Plugin < Pageflow::Plugin
4
+ def configure(config)
5
+ config.features.register('sitemap') do |feature_config|
6
+ feature_config.help_entries.register('pageflow.sitemap.help_entries.main', priority: 6)
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,5 @@
1
+ module Pageflow
2
+ module Sitemap
3
+ VERSION = "0.1.0"
4
+ end
5
+ end
@@ -0,0 +1,9 @@
1
+ require "pageflow/sitemap/engine"
2
+
3
+ module Pageflow
4
+ module Sitemap
5
+ def self.plugin
6
+ Sitemap::Plugin.new
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,29 @@
1
+ $:.push File.expand_path("../lib", __FILE__)
2
+
3
+ # Maintain your gem's version:
4
+ require "pageflow/sitemap/version"
5
+
6
+ # Describe your gem and declare its dependencies:
7
+ Gem::Specification.new do |s|
8
+ s.name = "pageflow-sitemap"
9
+ s.version = Pageflow::Sitemap::VERSION
10
+ s.authors = ["Codevise Solutions Ltd."]
11
+ s.email = ["info@codevise.de"]
12
+ s.homepage = "http://pageflow.io"
13
+ s.summary = "Summary of PageflowSitemap."
14
+ s.description = "Description of PageflowSitemap."
15
+ s.license = "MIT"
16
+
17
+ s.files = `git ls-files`.split($/)
18
+ s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
+ s.test_files = s.files.grep(%r{^(test|spec|features)/})
20
+ s.require_paths = ["lib"]
21
+
22
+ s.add_runtime_dependency 'pageflow', '~> 0.10'
23
+
24
+ s.add_development_dependency 'pageflow-support'
25
+ s.add_development_dependency 'teaspoon'
26
+
27
+ # Semantic versioning rake tasks
28
+ s.add_development_dependency 'semmy', '~> 0.2'
29
+ end
@@ -0,0 +1,16 @@
1
+ # See https://help.github.com/articles/ignoring-files for more about ignoring files.
2
+ #
3
+ # If you find yourself ignoring temporary files generated by your text editor
4
+ # or operating system, you probably want to add a global ignore instead:
5
+ # git config --global core.excludesfile '~/.gitignore_global'
6
+
7
+ # Ignore bundler config.
8
+ /.bundle
9
+
10
+ # Ignore the default SQLite database.
11
+ /db/*.sqlite3
12
+ /db/*.sqlite3-journal
13
+
14
+ # Ignore all logfiles and tempfiles.
15
+ /log/*.log
16
+ /tmp
@@ -0,0 +1,28 @@
1
+ == README
2
+
3
+ This README would normally document whatever steps are necessary to get the
4
+ application up and running.
5
+
6
+ Things you may want to cover:
7
+
8
+ * Ruby version
9
+
10
+ * System dependencies
11
+
12
+ * Configuration
13
+
14
+ * Database creation
15
+
16
+ * Database initialization
17
+
18
+ * How to run the test suite
19
+
20
+ * Services (job queues, cache servers, search engines, etc.)
21
+
22
+ * Deployment instructions
23
+
24
+ * ...
25
+
26
+
27
+ Please feel free to use a different markup language if you do not plan to run
28
+ <tt>rake doc:app</tt>.
data/spec/d/r/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ # Add your own tasks in files placed in lib/tasks ending in .rake,
2
+ # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
+
4
+ require File.expand_path('../config/application', __FILE__)
5
+
6
+ Rails405::Application.load_tasks
@@ -0,0 +1,33 @@
1
+ ActiveAdmin.register_page "Dashboard" do
2
+
3
+ menu :priority => 1, :label => proc{ I18n.t("active_admin.dashboard") }
4
+
5
+ content :title => proc{ I18n.t("active_admin.dashboard") } do
6
+ div :class => "blank_slate_container", :id => "dashboard_default_message" do
7
+ span :class => "blank_slate" do
8
+ span I18n.t("active_admin.dashboard_welcome.welcome")
9
+ small I18n.t("active_admin.dashboard_welcome.call_to_action")
10
+ end
11
+ end
12
+
13
+ # Here is an example of a simple dashboard with columns and panels.
14
+ #
15
+ # columns do
16
+ # column do
17
+ # panel "Recent Posts" do
18
+ # ul do
19
+ # Post.recent(5).map do |post|
20
+ # li link_to(post.title, admin_post_path(post))
21
+ # end
22
+ # end
23
+ # end
24
+ # end
25
+
26
+ # column do
27
+ # panel "Info" do
28
+ # para "Welcome to ActiveAdmin."
29
+ # end
30
+ # end
31
+ # end
32
+ end # content
33
+ end
File without changes
@@ -0,0 +1,2 @@
1
+ #= require active_admin/base
2
+ #= require pageflow/admin
@@ -0,0 +1,16 @@
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 jquery
14
+ //= require jquery_ujs
15
+ //= require turbolinks
16
+ //= require_tree .
@@ -0,0 +1 @@
1
+ //= require pageflow/base
@@ -0,0 +1,4 @@
1
+ //= require i18n
2
+ //= require i18n/translations
3
+
4
+ //= require pageflow/editor/base
@@ -0,0 +1,18 @@
1
+ // SASS variable overrides must be declared before loading up Active Admin's styles.
2
+ //
3
+ // To view the variables that Active Admin provides, take a look at
4
+ // `app/assets/stylesheets/active_admin/mixins/_variables.css.scss` in the
5
+ // Active Admin source.
6
+ //
7
+ // For example, to change the sidebar width:
8
+ // $sidebar-width: 242px;
9
+
10
+ // Active Admin's got SASS!
11
+ @import "active_admin/mixins";
12
+ @import "active_admin/base";
13
+
14
+ // Overriding any non-variable SASS must be done after the fact.
15
+ // For example, to change the default status-tag color:
16
+ //
17
+ // .status_tag { background: #6090DB; }
18
+ @import "pageflow/admin";
@@ -0,0 +1,13 @@
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 top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require_self
12
+ *= require_tree .
13
+ */
@@ -0,0 +1 @@
1
+ @import "pageflow/base";
@@ -0,0 +1 @@
1
+ @import "pageflow/editor/base";
@@ -0,0 +1,5 @@
1
+ class ApplicationController < ActionController::Base
2
+ # Prevent CSRF attacks by raising an exception.
3
+ # For APIs, you may want to use :null_session instead.
4
+ protect_from_forgery with: :exception
5
+ end
File without changes
@@ -0,0 +1,2 @@
1
+ module ApplicationHelper
2
+ end
File without changes
File without changes
@@ -0,0 +1,12 @@
1
+ class Ability
2
+ include CanCan::Ability
3
+ include Pageflow::AbilityMixin
4
+
5
+ def initialize(user)
6
+ # Setup abilities for Pageflow models
7
+ pageflow_default_abilities(user)
8
+
9
+ # Allow signed-in users to view the admin dashboard
10
+ can :read, ActiveAdmin::Page, :name => "Dashboard"
11
+ end
12
+ end
File without changes
@@ -0,0 +1,9 @@
1
+ class User < ActiveRecord::Base
2
+ # Include default devise modules. Others available are:
3
+ # :token_authenticatable, :confirmable,
4
+ # :lockable, :timeoutable and :omniauthable
5
+ devise :database_authenticatable,
6
+ :recoverable, :rememberable, :trackable, :validatable
7
+
8
+ include Pageflow::UserMixin
9
+ end