pageflow 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pageflow might be problematic. Click here for more details.

Files changed (426) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +181 -0
  3. data/README.md +11 -37
  4. data/admins/pageflow/accounts.rb +20 -2
  5. data/admins/pageflow/entry.rb +55 -30
  6. data/admins/pageflow/membership.rb +1 -0
  7. data/admins/pageflow/revisions.rb +2 -0
  8. data/admins/pageflow/user.rb +25 -16
  9. data/app/assets/images/pageflow/editor/blank_entry/logo.png +0 -0
  10. data/app/assets/images/pageflow/themes/default/close_button_sprite.png +0 -0
  11. data/app/assets/images/pageflow/themes/default/favicon.ico +0 -0
  12. data/app/assets/images/pageflow/{touch_indicator.png → themes/default/indicators/hidden_text.png} +0 -0
  13. data/app/assets/images/pageflow/{touch_indicator_invert.png → themes/default/indicators/hidden_text_invert.png} +0 -0
  14. data/app/assets/images/pageflow/{scroll_down_indicator.png → themes/default/indicators/scroll_down.png} +0 -0
  15. data/app/assets/images/pageflow/{scroll_down_indicator_invert.png → themes/default/indicators/scroll_down_invert.png} +0 -0
  16. data/app/assets/images/pageflow/themes/default/loading_spinner/logo.png +0 -0
  17. data/app/assets/images/pageflow/themes/default/logo_header.png +0 -0
  18. data/app/assets/images/pageflow/themes/default/logo_header_invert.png +0 -0
  19. data/app/assets/images/pageflow/themes/default/logo_print.png +0 -0
  20. data/app/assets/images/pageflow/{menu_mobile_imprint.png → themes/default/mobile_navigation/imprint_sprite.png} +0 -0
  21. data/app/assets/images/pageflow/{menu_mobile_sprite3.png → themes/default/mobile_navigation/index_sprite.png} +0 -0
  22. data/app/assets/images/pageflow/{mobile_sharing.png → themes/default/mobile_navigation/sharing_icons_sprite.png} +0 -0
  23. data/app/assets/images/pageflow/{menu_mobile_sharing.png → themes/default/mobile_navigation/sharing_sprite.png} +0 -0
  24. data/app/assets/images/pageflow/{chapter_bottom.png → themes/default/overview_chapter_borders/bottom.png} +0 -0
  25. data/app/assets/images/pageflow/{chapter_end.png → themes/default/overview_chapter_borders/end.png} +0 -0
  26. data/app/assets/images/pageflow/{chapter_start.png → themes/default/overview_chapter_borders/start.png} +0 -0
  27. data/app/assets/images/pageflow/{chapter_bg.png → themes/default/overview_chapter_borders/tile.png} +0 -0
  28. data/app/assets/images/pageflow/{chapter_top.png → themes/default/overview_chapter_borders/top.png} +0 -0
  29. data/app/assets/images/pageflow/themes/default/{audio_sprite.png → page_type_pictograms/audio/sprite.png} +0 -0
  30. data/app/assets/images/pageflow/themes/default/page_type_pictograms/audio/wide.png +0 -0
  31. data/app/assets/images/pageflow/themes/default/{image_sprite.png → page_type_pictograms/audio_loop/sprite.png} +0 -0
  32. data/app/assets/images/pageflow/themes/default/page_type_pictograms/audio_loop/wide.png +0 -0
  33. data/app/assets/images/pageflow/themes/default/page_type_pictograms/background_image/sprite.png +0 -0
  34. data/app/assets/images/pageflow/themes/default/page_type_pictograms/background_image/wide.png +0 -0
  35. data/app/assets/images/pageflow/themes/default/page_type_pictograms/background_video/sprite.png +0 -0
  36. data/app/assets/images/pageflow/themes/default/page_type_pictograms/background_video/wide.png +0 -0
  37. data/app/assets/images/pageflow/themes/default/{video_sprite.png → page_type_pictograms/video/sprite.png} +0 -0
  38. data/app/assets/images/pageflow/themes/default/page_type_pictograms/video/wide.png +0 -0
  39. data/app/assets/images/pageflow/themes/default/player_controls/slim/scroller_mask.png +0 -0
  40. data/app/assets/images/pageflow/themes/default/{loading_small.png → player_controls_loading_spinner.png} +0 -0
  41. data/app/assets/images/pageflow/themes/default/{video_controls.png → player_controls_sprite.png} +0 -0
  42. data/app/assets/images/pageflow/{menu-arrow-short.png → themes/legacy/menu-arrow-short.png} +0 -0
  43. data/app/assets/images/pageflow/themes/legacy/menu_mobile_imprint.png +0 -0
  44. data/app/assets/images/pageflow/themes/legacy/menu_mobile_sharing.png +0 -0
  45. data/app/assets/images/pageflow/themes/legacy/menu_mobile_sprite3.png +0 -0
  46. data/app/assets/images/pageflow/themes/legacy/mobile_sharing.png +0 -0
  47. data/app/assets/images/pageflow/{page_thumbnail_mask.png → themes/legacy/page_thumbnail_mask.png} +0 -0
  48. data/app/assets/images/pageflow/themes/legacy/scroll_down_indicator.png +0 -0
  49. data/app/assets/images/pageflow/themes/legacy/scroll_down_indicator_invert.png +0 -0
  50. data/app/assets/images/pageflow/{scroll_indicator_sprite.png → themes/legacy/scroll_indicator_sprite.png} +0 -0
  51. data/app/assets/images/pageflow/themes/legacy/touch_indicator.png +0 -0
  52. data/app/assets/images/pageflow/themes/legacy/touch_indicator_invert.png +0 -0
  53. data/app/assets/images/pageflow/{volume_control_sprite.png → themes/legacy/volume_control_sprite.png} +0 -0
  54. data/app/assets/javascripts/pageflow/admin.js +2 -0
  55. data/app/assets/javascripts/pageflow/admin/entries.js +1 -1
  56. data/app/assets/javascripts/pageflow/base.js +2 -0
  57. data/app/assets/javascripts/pageflow/browser/agent.js +36 -0
  58. data/app/assets/javascripts/pageflow/browser/facebook.js +10 -0
  59. data/app/assets/javascripts/pageflow/browser/ios_platform.js +1 -4
  60. data/app/assets/javascripts/pageflow/editor/models/theming.js +4 -0
  61. data/app/assets/javascripts/pageflow/editor/views/edit_meta_data_view.js +17 -3
  62. data/app/assets/javascripts/pageflow/editor/views/editor_view.js +21 -0
  63. data/app/assets/javascripts/pageflow/editor/views/entry_preview_view.js +1 -0
  64. data/app/assets/javascripts/pageflow/focus_outline.js +44 -0
  65. data/app/assets/javascripts/pageflow/highlighted_page.js +10 -4
  66. data/app/assets/javascripts/pageflow/links.js +0 -7
  67. data/app/assets/javascripts/pageflow/page_types/audio.js +13 -0
  68. data/app/assets/javascripts/pageflow/page_types/mixins/info_box.js +5 -2
  69. data/app/assets/javascripts/pageflow/page_types/video.js +65 -59
  70. data/app/assets/javascripts/pageflow/ready.js +4 -2
  71. data/app/assets/javascripts/pageflow/slideshow.js +1 -0
  72. data/app/assets/javascripts/pageflow/slideshow/atmo.js +1 -1
  73. data/app/assets/javascripts/pageflow/slideshow/hide_text.js +5 -1
  74. data/app/assets/javascripts/pageflow/slideshow/page_widget.js +17 -0
  75. data/app/assets/javascripts/pageflow/slideshow/scroll_indicator.js +27 -0
  76. data/app/assets/javascripts/pageflow/slideshow/scroll_indicator_widget.js +53 -10
  77. data/app/assets/javascripts/pageflow/slideshow/scroller_widget.js +8 -1
  78. data/app/assets/javascripts/pageflow/ui/views/inputs/slider_input_view.js +15 -4
  79. data/app/assets/javascripts/pageflow/widgets.js +9 -0
  80. data/app/assets/javascripts/pageflow/widgets/auto_hide_player_controls.js +59 -0
  81. data/app/assets/javascripts/pageflow/widgets/header.js +11 -7
  82. data/app/assets/javascripts/pageflow/widgets/hide_content_during_playback.js +68 -0
  83. data/app/assets/javascripts/pageflow/widgets/loading_spinner.js +2 -0
  84. data/app/assets/javascripts/pageflow/widgets/mark_with_played_states.js +23 -0
  85. data/app/assets/javascripts/pageflow/widgets/multimedia_alert.js +2 -0
  86. data/app/assets/javascripts/pageflow/widgets/navigation.js +3 -5
  87. data/app/assets/javascripts/pageflow/widgets/navigation_mobile.js +2 -0
  88. data/app/assets/javascripts/pageflow/widgets/overview.js +2 -1
  89. data/app/assets/javascripts/pageflow/widgets/page_navigation_list.js +7 -3
  90. data/app/assets/javascripts/pageflow/widgets/player_controls.js +24 -19
  91. data/app/assets/javascripts/pageflow/widgets/share_menu.js +5 -4
  92. data/app/assets/stylesheets/pageflow/{admin.css.scss → admin.scss} +7 -5
  93. data/app/assets/stylesheets/pageflow/admin/{columns.css.scss → columns.scss} +0 -0
  94. data/app/assets/stylesheets/pageflow/admin/embedded_index_table.scss +14 -0
  95. data/app/assets/stylesheets/pageflow/admin/{entries.css.scss → entries.scss} +7 -11
  96. data/app/assets/stylesheets/pageflow/admin/entries/{folders.css.scss → folders.scss} +0 -0
  97. data/app/assets/stylesheets/pageflow/admin/entries/index_table.scss +15 -0
  98. data/app/assets/stylesheets/pageflow/admin/entries/{user_badge_list.css.scss → user_badge_list.scss} +0 -0
  99. data/app/assets/stylesheets/pageflow/admin/filters.scss +3 -0
  100. data/app/assets/stylesheets/pageflow/admin/icon_button.scss +25 -0
  101. data/app/assets/stylesheets/pageflow/admin/icon_link.scss +31 -0
  102. data/app/assets/stylesheets/pageflow/admin/publication_state_indicator.scss +18 -0
  103. data/app/assets/stylesheets/pageflow/admin/{quotas.css.scss → quotas.scss} +0 -0
  104. data/app/assets/stylesheets/pageflow/admin/{tabs_view.css.scss → tabs_view.scss} +3 -2
  105. data/app/assets/stylesheets/pageflow/admin/tooltip_bubble.scss +30 -0
  106. data/app/assets/stylesheets/pageflow/{animations.css.scss → animations.scss} +0 -0
  107. data/app/assets/stylesheets/pageflow/animations/{blink.css.scss → blink.scss} +0 -0
  108. data/app/assets/stylesheets/pageflow/animations/{bounce.css.scss → bounce.scss} +0 -0
  109. data/app/assets/stylesheets/pageflow/animations/{fade.css.scss → fade.scss} +0 -0
  110. data/app/assets/stylesheets/pageflow/animations/{loading.css.scss → loading.scss} +0 -0
  111. data/app/assets/stylesheets/pageflow/animations/{scroll.css.scss → scroll.scss} +0 -0
  112. data/app/assets/stylesheets/pageflow/{application_with_simulated_media_queries.css.scss → application_with_simulated_media_queries.scss} +0 -0
  113. data/app/assets/stylesheets/pageflow/{base.css.scss → base.scss} +15 -5
  114. data/app/assets/stylesheets/pageflow/{delayed_text_fade_in.css.scss → delayed_text_fade_in.scss} +0 -0
  115. data/app/assets/stylesheets/pageflow/editor/{back_button_decorator.css.scss → back_button_decorator.scss} +0 -0
  116. data/app/assets/stylesheets/pageflow/editor/{background_positioning.css.scss → background_positioning.scss} +0 -0
  117. data/app/assets/stylesheets/pageflow/editor/{base.css.scss → base.scss} +3 -1
  118. data/app/assets/stylesheets/pageflow/editor/{blank_entry.css.scss → blank_entry.scss} +6 -4
  119. data/app/assets/stylesheets/pageflow/editor/{colors.css.scss → colors.scss} +0 -0
  120. data/app/assets/stylesheets/pageflow/editor/{confirm_encoding.css.scss → confirm_encoding.scss} +0 -0
  121. data/app/assets/stylesheets/pageflow/editor/{dialogs.css.scss → dialogs.scss} +0 -0
  122. data/app/assets/stylesheets/pageflow/editor/{disabled_atmo_indicator.css.scss → disabled_atmo_indicator.scss} +0 -0
  123. data/app/assets/stylesheets/pageflow/editor/{drop_down_button.css.scss → drop_down_button.scss} +0 -0
  124. data/app/assets/stylesheets/pageflow/editor/{failures.css.scss → failures.scss} +0 -0
  125. data/app/assets/stylesheets/pageflow/editor/{file_meta_data.css.scss → file_meta_data.scss} +0 -0
  126. data/app/assets/stylesheets/pageflow/editor/{file_stages.css.scss → file_stages.scss} +0 -0
  127. data/app/assets/stylesheets/pageflow/editor/{file_thumbnails.css.scss → file_thumbnails.scss} +0 -0
  128. data/app/assets/stylesheets/pageflow/editor/{files.css.scss → files.scss} +0 -0
  129. data/app/assets/stylesheets/pageflow/editor/{files_explorer.css.scss → files_explorer.scss} +0 -0
  130. data/app/assets/stylesheets/pageflow/editor/{files_gallery.css.scss → files_gallery.scss} +0 -0
  131. data/app/assets/stylesheets/pageflow/editor/{help.css.scss → help.scss} +0 -0
  132. data/app/assets/stylesheets/pageflow/editor/{indicators.css.scss → indicators.scss} +0 -0
  133. data/app/assets/stylesheets/pageflow/editor/{inputs.css.scss → inputs.scss} +0 -0
  134. data/app/assets/stylesheets/pageflow/editor/inputs/{reference.css.scss → reference.scss} +0 -0
  135. data/app/assets/stylesheets/pageflow/editor/{list.css.scss → list.scss} +0 -0
  136. data/app/assets/stylesheets/pageflow/editor/{loading.css.scss → loading.scss} +0 -0
  137. data/app/assets/stylesheets/pageflow/editor/{locked.css.scss → locked.scss} +0 -0
  138. data/app/assets/stylesheets/pageflow/editor/{manage_files.css.scss → manage_files.scss} +0 -0
  139. data/app/assets/stylesheets/pageflow/editor/{menu.css.scss → menu.scss} +0 -0
  140. data/app/assets/stylesheets/pageflow/editor/{notifications.css.scss → notifications.scss} +0 -0
  141. data/app/assets/stylesheets/pageflow/editor/{other_entry_item.css.scss → other_entry_item.scss} +0 -0
  142. data/app/assets/stylesheets/pageflow/editor/{outline.css.scss → outline.scss} +0 -0
  143. data/app/assets/stylesheets/pageflow/editor/{page_links.css.scss → page_links.scss} +0 -0
  144. data/app/assets/stylesheets/pageflow/editor/{page_selection.css.scss → page_selection.scss} +0 -0
  145. data/app/assets/stylesheets/pageflow/editor/{publish_entry.css.scss → publish_entry.scss} +0 -0
  146. data/app/assets/stylesheets/pageflow/editor/{quotas.css.scss → quotas.scss} +0 -0
  147. data/app/assets/stylesheets/pageflow/editor/{select_button.css.scss → select_button.scss} +0 -0
  148. data/app/assets/stylesheets/pageflow/editor/{storyline_picker.css.scss → storyline_picker.scss} +0 -0
  149. data/app/assets/stylesheets/pageflow/editor/unsupported_browser_hint.scss +15 -0
  150. data/app/assets/stylesheets/pageflow/editor/{widgets.css.scss → widgets.scss} +0 -0
  151. data/app/assets/stylesheets/pageflow/editor/{wysihtml5.css.scss → wysihtml5.scss} +0 -0
  152. data/app/assets/stylesheets/pageflow/{entries.css.scss → entries.scss} +16 -58
  153. data/app/assets/stylesheets/pageflow/focus_outline.scss +23 -0
  154. data/app/assets/stylesheets/pageflow/{fonts.css.scss → fonts.scss} +0 -0
  155. data/app/assets/stylesheets/pageflow/{header.css.scss → header.scss} +0 -0
  156. data/app/assets/stylesheets/pageflow/{hide_text.css.scss → hide_text.scss} +4 -6
  157. data/app/assets/stylesheets/pageflow/{ie9.css.scss → ie9.scss} +2 -1
  158. data/app/assets/stylesheets/pageflow/jquery_ui.scss +26 -0
  159. data/app/assets/stylesheets/pageflow/{loading_spinner.css.scss → loading_spinner.scss} +0 -0
  160. data/app/assets/stylesheets/pageflow/{lt_ie9.css.scss → lt_ie9.scss} +0 -4
  161. data/app/assets/stylesheets/pageflow/{mixins.css.scss → mixins.scss} +2 -0
  162. data/app/assets/stylesheets/pageflow/mixins/{background_icons.css.scss → background_icons.scss} +13 -1
  163. data/app/assets/stylesheets/pageflow/mixins/{breakpoints.css.scss → breakpoints.scss} +0 -0
  164. data/app/assets/stylesheets/pageflow/mixins/{buttons.css.scss → buttons.scss} +0 -0
  165. data/app/assets/stylesheets/pageflow/mixins/{hidden_text.css.scss → hidden_text.scss} +0 -0
  166. data/app/assets/stylesheets/pageflow/mixins/{hover.css.scss → hover.scss} +0 -0
  167. data/app/assets/stylesheets/pageflow/mixins/{icons.css.scss → icons.scss} +4 -4
  168. data/app/assets/stylesheets/pageflow/mixins/icons/{entypo.css.scss → entypo.scss} +0 -0
  169. data/app/assets/stylesheets/pageflow/mixins/icons/{fontawesome.css.scss → fontawesome.scss} +1 -1
  170. data/app/assets/stylesheets/pageflow/mixins/ie_fixes.scss +4 -0
  171. data/app/assets/stylesheets/pageflow/mixins/{label.css.scss → label.scss} +0 -0
  172. data/app/assets/stylesheets/pageflow/mixins/map_to_css.scss +5 -0
  173. data/app/assets/stylesheets/pageflow/mixins/{pageflow.css.scss → pageflow.scss} +9 -1
  174. data/app/assets/stylesheets/pageflow/mixins/{pressed.css.scss → pressed.scss} +0 -0
  175. data/app/assets/stylesheets/pageflow/mixins/{shadow.css.scss → shadow.scss} +6 -1
  176. data/app/assets/stylesheets/pageflow/mixins/{text_size_adjust.css.scss → text_size_adjust.scss} +0 -0
  177. data/app/assets/stylesheets/pageflow/mixins/{unselectable.css.scss → unselectable.scss} +0 -0
  178. data/app/assets/stylesheets/pageflow/{multimedia_alert.css.scss → multimedia_alert.scss} +1 -0
  179. data/app/assets/stylesheets/pageflow/{navigation_bar.css.scss → navigation_bar.scss} +7 -199
  180. data/app/assets/stylesheets/pageflow/{navigation_mobile.css.scss → navigation_mobile.scss} +1 -20
  181. data/app/assets/stylesheets/pageflow/{overview.css.scss → overview.scss} +6 -32
  182. data/app/assets/stylesheets/pageflow/{page.css.scss → page.scss} +1 -47
  183. data/app/assets/stylesheets/pageflow/{page_transitions.css.scss → page_transitions.scss} +0 -0
  184. data/app/assets/stylesheets/pageflow/page_transitions/{crossfade.css.scss → crossfade.scss} +0 -0
  185. data/app/assets/stylesheets/pageflow/page_transitions/{cut.css.scss → cut.scss} +0 -0
  186. data/app/assets/stylesheets/pageflow/page_transitions/{fade.css.scss → fade.scss} +0 -0
  187. data/app/assets/stylesheets/pageflow/page_transitions/{fade_to_black.css.scss → fade_to_black.scss} +0 -0
  188. data/app/assets/stylesheets/pageflow/page_transitions/{scroll.css.scss → scroll.scss} +0 -0
  189. data/app/assets/stylesheets/pageflow/page_transitions/{scroll_in.css.scss → scroll_in.scss} +0 -0
  190. data/app/assets/stylesheets/pageflow/page_transitions/{scroll_in_right.css.scss → scroll_in_right.scss} +0 -0
  191. data/app/assets/stylesheets/pageflow/page_transitions/{scroll_left.css.scss → scroll_left.scss} +0 -0
  192. data/app/assets/stylesheets/pageflow/page_transitions/{scroll_right.css.scss → scroll_right.scss} +0 -0
  193. data/app/assets/stylesheets/pageflow/{page_types.css.scss → page_types.scss} +0 -0
  194. data/app/assets/stylesheets/pageflow/page_types/{audio.css.scss → audio.scss} +0 -15
  195. data/app/assets/stylesheets/pageflow/page_types/{audio_loop.css.scss → audio_loop.scss} +0 -0
  196. data/app/assets/stylesheets/pageflow/page_types/{background-image.css.scss → background-image.scss} +0 -0
  197. data/app/assets/stylesheets/pageflow/page_types/{background-video.css.scss → background-video.scss} +0 -0
  198. data/app/assets/stylesheets/pageflow/page_types/video.scss +116 -0
  199. data/app/assets/stylesheets/pageflow/page_types/video/content_hiding.scss +32 -0
  200. data/app/assets/stylesheets/pageflow/{print_view.css.scss → print_view.scss} +0 -0
  201. data/app/assets/stylesheets/pageflow/{skip_links.css.scss → skip_links.scss} +0 -9
  202. data/app/assets/stylesheets/pageflow/{slideshow.css.scss → slideshow.scss} +7 -7
  203. data/app/assets/stylesheets/pageflow/{subshare.css.scss → subshare.scss} +0 -0
  204. data/app/assets/stylesheets/pageflow/{text_variants.css.scss → text_variants.scss} +0 -0
  205. data/app/assets/stylesheets/pageflow/themes/default.scss +1 -0
  206. data/app/assets/stylesheets/pageflow/themes/default/README.md +26 -0
  207. data/app/assets/stylesheets/pageflow/themes/default/anchors.scss +24 -0
  208. data/app/assets/stylesheets/pageflow/themes/default/animations.scss +2 -0
  209. data/app/assets/stylesheets/pageflow/themes/default/animations/rotate.scss +9 -0
  210. data/app/assets/stylesheets/pageflow/themes/default/animations/rotate_and_blink.scss +16 -0
  211. data/app/assets/stylesheets/pageflow/themes/default/{base.css.scss → base.scss} +10 -2
  212. data/app/assets/stylesheets/pageflow/themes/default/built_in_page_types.scss +5 -0
  213. data/app/assets/stylesheets/pageflow/themes/default/definitions.scss +9 -0
  214. data/app/assets/stylesheets/pageflow/themes/default/functions/icon_font_options.scss +8 -0
  215. data/app/assets/stylesheets/pageflow/themes/default/indicators.scss +28 -0
  216. data/app/assets/stylesheets/pageflow/themes/default/indicators/colors.scss +47 -0
  217. data/app/assets/stylesheets/pageflow/themes/default/indicators/icons/default.scss +45 -0
  218. data/app/assets/stylesheets/pageflow/themes/default/indicators/icons/icon_font.scss +26 -0
  219. data/app/assets/stylesheets/pageflow/themes/default/indicators/icons/sprite.scss +38 -0
  220. data/app/assets/stylesheets/pageflow/themes/default/indicators/typography.scss +3 -0
  221. data/app/assets/stylesheets/pageflow/themes/default/indicators/widget_margins.scss +3 -0
  222. data/app/assets/stylesheets/pageflow/themes/default/loading_spinner.scss +90 -0
  223. data/app/assets/stylesheets/pageflow/themes/default/logo.scss +54 -0
  224. data/app/assets/stylesheets/pageflow/themes/default/logo/variant/background_image.scss +37 -0
  225. data/app/assets/stylesheets/pageflow/themes/default/logo/variant/watermark.scss +90 -0
  226. data/app/assets/stylesheets/pageflow/themes/default/mixins/indicator_typography.scss +30 -0
  227. data/app/assets/stylesheets/pageflow/themes/default/mixins/sprite_icons.scss +87 -0
  228. data/app/assets/stylesheets/pageflow/themes/default/mixins/typography.scss +7 -0
  229. data/app/assets/stylesheets/pageflow/themes/default/mobile_navigation.scss +104 -0
  230. data/app/assets/stylesheets/pageflow/themes/default/navigation.scss +102 -0
  231. data/app/assets/stylesheets/pageflow/themes/default/navigation/credits.scss +7 -0
  232. data/app/assets/stylesheets/pageflow/themes/default/navigation/dimensions.scss +87 -0
  233. data/app/assets/stylesheets/pageflow/themes/default/navigation/icons/icon_font.scss +232 -0
  234. data/app/assets/stylesheets/pageflow/themes/default/navigation/icons/sprite.scss +124 -0
  235. data/app/assets/stylesheets/pageflow/themes/default/navigation/menu_boxes.scss +99 -0
  236. data/app/assets/stylesheets/pageflow/themes/default/navigation/separator_lines.scss +21 -0
  237. data/app/assets/stylesheets/pageflow/themes/default/navigation/share_box.scss +28 -0
  238. data/app/assets/stylesheets/pageflow/themes/default/navigation/typography.scss +40 -0
  239. data/app/assets/stylesheets/pageflow/themes/default/navigation/volume_control.scss +17 -0
  240. data/app/assets/stylesheets/pageflow/themes/default/navigation/widget_margin.scss +19 -0
  241. data/app/assets/stylesheets/pageflow/themes/default/overview.scss +43 -0
  242. data/app/assets/stylesheets/pageflow/themes/default/overview/chapter_border_images.scss +70 -0
  243. data/app/assets/stylesheets/pageflow/themes/default/overview/chapter_numbers.scss +14 -0
  244. data/app/assets/stylesheets/pageflow/themes/default/overview/colors.scss +100 -0
  245. data/app/assets/stylesheets/pageflow/themes/default/overview/icons/icon_font.scss +50 -0
  246. data/app/assets/stylesheets/pageflow/themes/default/overview/icons/sprite.scss +25 -0
  247. data/app/assets/stylesheets/pageflow/themes/default/overview/typography.scss +61 -0
  248. data/app/assets/stylesheets/pageflow/themes/default/page.scss +237 -0
  249. data/app/assets/stylesheets/pageflow/themes/default/page/anchors.scss +19 -0
  250. data/app/assets/stylesheets/pageflow/themes/default/player_controls.scss +30 -0
  251. data/app/assets/stylesheets/pageflow/themes/default/player_controls/classic.scss +36 -0
  252. data/app/assets/stylesheets/pageflow/themes/default/player_controls/classic/close_button.scss +52 -0
  253. data/app/assets/stylesheets/pageflow/themes/default/player_controls/classic/container.scss +48 -0
  254. data/app/assets/stylesheets/pageflow/themes/default/player_controls/classic/control_bar.scss +222 -0
  255. data/app/assets/stylesheets/pageflow/themes/default/player_controls/classic/control_bar/timestamp_position/right.scss +22 -0
  256. data/app/assets/stylesheets/pageflow/themes/default/player_controls/classic/control_bar/timestamp_position/split.scss +22 -0
  257. data/app/assets/stylesheets/pageflow/themes/default/player_controls/classic/icons/icon_font.scss +87 -0
  258. data/app/assets/stylesheets/pageflow/themes/default/player_controls/classic/icons/sprite.scss +59 -0
  259. data/app/assets/stylesheets/pageflow/themes/default/player_controls/classic/info_box.scss +137 -0
  260. data/app/assets/stylesheets/pageflow/themes/default/player_controls/slim.scss +21 -0
  261. data/app/assets/stylesheets/pageflow/themes/default/player_controls/slim/close_button.scss +38 -0
  262. data/app/assets/stylesheets/pageflow/themes/default/player_controls/slim/container.scss +50 -0
  263. data/app/assets/stylesheets/pageflow/themes/default/player_controls/slim/control_bar.scss +249 -0
  264. data/app/assets/stylesheets/pageflow/themes/default/player_controls/slim/info_box.scss +112 -0
  265. data/app/assets/stylesheets/pageflow/themes/default/player_controls/slim/scroller.scss +21 -0
  266. data/app/assets/stylesheets/pageflow/themes/default/player_controls/vjs_mapping.scss +86 -0
  267. data/app/assets/stylesheets/pageflow/themes/default/player_controls/widget_margins.scss +10 -0
  268. data/app/assets/stylesheets/pageflow/themes/default/slideshow.scss +3 -0
  269. data/app/assets/stylesheets/pageflow/themes/default/variables.scss +4 -0
  270. data/app/assets/stylesheets/pageflow/themes/default/variables/standard.scss +33 -0
  271. data/app/assets/stylesheets/pageflow/themes/default/variables/widgets.scss +28 -0
  272. data/app/assets/stylesheets/pageflow/themes/default/video_player.scss +1 -0
  273. data/app/assets/stylesheets/pageflow/themes/default/video_player/vjs_base.scss +121 -0
  274. data/app/assets/stylesheets/pageflow/themes/default/video_wrapper.scss +14 -0
  275. data/app/assets/stylesheets/pageflow/themes/legacy.scss +8 -0
  276. data/app/assets/stylesheets/pageflow/themes/legacy/indicators.scss +64 -0
  277. data/app/assets/stylesheets/pageflow/themes/legacy/navigation.scss +262 -0
  278. data/app/assets/stylesheets/pageflow/themes/legacy/navigation_mobile.scss +52 -0
  279. data/app/assets/stylesheets/pageflow/themes/legacy/overview.scss +50 -0
  280. data/app/assets/stylesheets/pageflow/themes/legacy/page.scss +48 -0
  281. data/app/assets/stylesheets/pageflow/themes/legacy/page_types.scss +2 -0
  282. data/app/assets/stylesheets/pageflow/themes/legacy/page_types/audio.scss +5 -0
  283. data/app/assets/stylesheets/pageflow/{page_types/video.css.scss → themes/legacy/page_types/video.scss} +4 -109
  284. data/app/assets/stylesheets/pageflow/{player_controls.css.scss → themes/legacy/player_controls.scss} +13 -12
  285. data/app/assets/stylesheets/pageflow/{video_player.css.scss → themes/legacy/video_player.scss} +0 -0
  286. data/app/assets/stylesheets/pageflow/{ui.css.scss → ui.scss} +0 -0
  287. data/app/assets/stylesheets/pageflow/ui/{forms.css.scss → forms.scss} +0 -0
  288. data/app/assets/stylesheets/pageflow/ui/input/{extended_select_input.css.scss → extended_select_input.scss} +0 -0
  289. data/app/assets/stylesheets/pageflow/ui/{tabs_view.css.scss → tabs_view.scss} +0 -0
  290. data/app/controllers/pageflow/application_controller.rb +8 -2
  291. data/app/controllers/pageflow/entries_controller.rb +6 -6
  292. data/app/helpers/pageflow/admin/entries_helper.rb +15 -0
  293. data/app/helpers/pageflow/admin/form_helper.rb +14 -0
  294. data/app/helpers/pageflow/admin/users_helper.rb +9 -0
  295. data/app/helpers/pageflow/entries_helper.rb +3 -2
  296. data/app/helpers/pageflow/info_box_helper.rb +17 -5
  297. data/app/helpers/pageflow/navigation_bar_helper.rb +11 -0
  298. data/app/helpers/pageflow/social_share_helper.rb +16 -3
  299. data/app/helpers/pageflow/social_share_links_helper.rb +32 -0
  300. data/app/helpers/pageflow/widgets_helper.rb +1 -1
  301. data/app/mailers/pageflow/user_mailer.rb +3 -1
  302. data/app/models/concerns/pageflow/entry_publication_states.rb +63 -0
  303. data/app/models/pageflow/account.rb +2 -2
  304. data/app/models/pageflow/draft_entry.rb +5 -1
  305. data/app/models/pageflow/entry.rb +7 -11
  306. data/app/models/pageflow/invited_user.rb +16 -6
  307. data/app/models/pageflow/overview_button.rb +19 -0
  308. data/app/models/pageflow/published_entry.rb +7 -2
  309. data/app/models/pageflow/revision.rb +4 -1
  310. data/app/models/pageflow/theming.rb +13 -0
  311. data/app/views/admin/accounts/_form.html.erb +13 -1
  312. data/app/views/admin/accounts/_theming_details.html.arb +3 -0
  313. data/app/views/admin/entries/_attributes_table.html.arb +1 -1
  314. data/app/views/admin/entries/_links.html.arb +11 -3
  315. data/app/views/admin/features/_form.html.erb +1 -1
  316. data/app/views/admin/memberships/_form.html.erb +1 -1
  317. data/app/views/admin/revisions/_form.html.erb +1 -1
  318. data/app/views/admin/users/_form.html.erb +1 -1
  319. data/app/views/admin/users/delete_me.html.erb +1 -1
  320. data/app/views/admin/users/me.html.erb +5 -6
  321. data/app/views/components/pageflow/admin/embedded_index_table.rb +67 -10
  322. data/app/views/components/pageflow/admin/entries_tab.rb +6 -9
  323. data/app/views/components/pageflow/admin/entry_publication_state_indicator.rb +26 -0
  324. data/app/views/components/pageflow/admin/icon_link_to.rb +21 -0
  325. data/app/views/components/pageflow/admin/members_tab.rb +19 -12
  326. data/app/views/components/pageflow/admin/revisions_tab.rb +1 -1
  327. data/app/views/components/pageflow/admin/users_tab.rb +6 -10
  328. data/app/views/pageflow/admin/users/_cannot_delete.html.erb +3 -0
  329. data/app/views/pageflow/admin/users/_may_delete.html.erb +6 -0
  330. data/app/views/pageflow/admin/widgets/_fields.html.erb +1 -1
  331. data/app/views/pageflow/config/_editor_seeds.json.jbuilder +3 -0
  332. data/app/views/pageflow/editor/entries/_entry.json.jbuilder +5 -1
  333. data/app/views/pageflow/editor/entries/_unsupported_browser_hint.html.erb +5 -0
  334. data/app/views/pageflow/editor/themings/_theming.json.jbuilder +1 -0
  335. data/app/views/pageflow/entries/_loading_spinner.html.erb +3 -1
  336. data/app/views/pageflow/entries/_navigation.html.erb +1 -1
  337. data/app/views/pageflow/entries/edit.html.erb +1 -0
  338. data/app/views/pageflow/entries/navigation/_bar_top.html.erb +1 -6
  339. data/app/views/pageflow/entries/navigation/_overview_button.html.erb +8 -0
  340. data/app/views/pageflow/entries/navigation/_page.html.erb +1 -2
  341. data/app/views/pageflow/entries/share_menu/_facebook_link.html.erb +4 -11
  342. data/app/views/pageflow/entries/share_menu/_google_link.html.erb +4 -11
  343. data/app/views/pageflow/entries/share_menu/_twitter_link.html.erb +4 -11
  344. data/app/views/pageflow/pages/templates/_audio.html.erb +6 -3
  345. data/app/views/pageflow/pages/templates/_video.html.erb +5 -2
  346. data/app/views/pageflow/social_share/_entry_meta_tags.html.erb +8 -8
  347. data/app/views/pageflow/social_share/_image_tags.html.erb +3 -3
  348. data/app/views/pageflow/social_share/_page_meta_tags.html.erb +9 -9
  349. data/app/views/pageflow/user_mailer/invitation.html.erb +2 -2
  350. data/app/views/pageflow/user_mailer/invitation.text.erb +1 -1
  351. data/app/views/pageflow/widgets/_placeholder.html.erb +1 -0
  352. data/config/initializers/active_admin_patches.rb +10 -0
  353. data/config/initializers/widget_types.rb +3 -0
  354. data/config/locales/de.yml +38 -2
  355. data/config/locales/en.yml +39 -3
  356. data/db/migrate/20160131222203_add_cache_counters.rb +23 -0
  357. data/db/migrate/20160225075853_add_overview_button_enabled_to_revisions.rb +5 -0
  358. data/db/migrate/20160310080213_add_edited_at_to_entries.rb +9 -0
  359. data/db/migrate/20160425192648_add_index_for_revision_publication_timestamps.rb +5 -0
  360. data/db/migrate/20160617123557_add_meta_fields_to_theming.rb +7 -0
  361. data/db/migrate/20160715105408_add_share_url_to_revisions.rb +5 -0
  362. data/lib/generators/pageflow/active_admin_initializer/active_admin_initializer_generator.rb +24 -0
  363. data/lib/generators/pageflow/assets/assets_generator.rb +5 -3
  364. data/lib/generators/pageflow/assets/templates/{application.css.scss → application.scss} +0 -0
  365. data/lib/generators/pageflow/assets/templates/{editor.css.scss → editor.scss} +0 -0
  366. data/lib/generators/pageflow/cancan/cancan_generator.rb +4 -8
  367. data/lib/generators/pageflow/error_pages/error_pages_generator.rb +27 -0
  368. data/lib/generators/pageflow/error_pages/templates/404.html +15 -0
  369. data/lib/generators/pageflow/error_pages/templates/fonts/sourcesanspro-bold-webfont.eot +0 -0
  370. data/lib/generators/pageflow/error_pages/templates/fonts/sourcesanspro-bold-webfont.svg +245 -0
  371. data/lib/generators/pageflow/error_pages/templates/fonts/sourcesanspro-bold-webfont.ttf +0 -0
  372. data/lib/generators/pageflow/error_pages/templates/fonts/sourcesanspro-bold-webfont.woff +0 -0
  373. data/lib/generators/pageflow/error_pages/templates/fonts/sourcesanspro-regular-webfont.eot +0 -0
  374. data/lib/generators/pageflow/error_pages/templates/fonts/sourcesanspro-regular-webfont.svg +245 -0
  375. data/lib/generators/pageflow/error_pages/templates/fonts/sourcesanspro-regular-webfont.ttf +0 -0
  376. data/lib/generators/pageflow/error_pages/templates/fonts/sourcesanspro-regular-webfont.woff +0 -0
  377. data/lib/generators/pageflow/error_pages/templates/images/bg.jpg +0 -0
  378. data/lib/generators/pageflow/error_pages/templates/stylesheets/main.css +40 -0
  379. data/lib/generators/pageflow/initializer/initializer_generator.rb +2 -0
  380. data/lib/generators/pageflow/initializer/templates/pageflow.rb +0 -3
  381. data/lib/generators/pageflow/install/install_generator.rb +2 -0
  382. data/lib/generators/pageflow/procfile/procfile_generator.rb +15 -0
  383. data/lib/generators/pageflow/procfile/templates/Procfile +3 -0
  384. data/lib/generators/pageflow/resque/resque_generator.rb +2 -0
  385. data/lib/generators/pageflow/routes/routes_generator.rb +2 -0
  386. data/lib/generators/pageflow/seeds/seeds_generator.rb +2 -0
  387. data/lib/generators/pageflow/theme/templates/themes/%name%.scss.tt +4 -0
  388. data/lib/generators/pageflow/theme/templates/themes/%name%/variables.scss.tt +10 -0
  389. data/lib/generators/pageflow/theme/theme_generator.rb +10 -18
  390. data/lib/generators/pageflow/user/user_generator.rb +2 -0
  391. data/lib/pageflow.rb +4 -0
  392. data/lib/pageflow/ability_mixin.rb +4 -0
  393. data/lib/pageflow/active_admin_patches/views/attributes_table.rb +31 -0
  394. data/lib/pageflow/active_admin_patches/views/pages/base.rb +14 -0
  395. data/lib/pageflow/active_admin_patches/views/table_for.rb +42 -0
  396. data/lib/pageflow/built_in_widget_type.rb +9 -1
  397. data/lib/pageflow/configuration.rb +17 -0
  398. data/lib/pageflow/engine.rb +6 -4
  399. data/lib/pageflow/theme.rb +4 -0
  400. data/lib/pageflow/user_mixin.rb +10 -10
  401. data/lib/pageflow/version.rb +1 -1
  402. data/spec/factories/revisions.rb +18 -0
  403. metadata +386 -203
  404. data/app/assets/images/pageflow/anchor_black.png +0 -0
  405. data/app/assets/images/pageflow/anchor_green.png +0 -0
  406. data/app/assets/images/pageflow/anchor_white.png +0 -0
  407. data/app/assets/images/pageflow/menu_mobile_sprite.png +0 -0
  408. data/app/assets/images/pageflow/menu_mobile_sprite2.png +0 -0
  409. data/app/assets/images/pageflow/themes/default/arrow_left_sprite.png +0 -0
  410. data/app/assets/images/pageflow/themes/default/arrow_right_sprite.png +0 -0
  411. data/app/assets/images/pageflow/themes/default/close_sprite.png +0 -0
  412. data/app/assets/images/pageflow/themes/default/loading_spinner.png +0 -0
  413. data/app/assets/images/pageflow/themes/default/loading_spinner_bg.png +0 -0
  414. data/app/assets/images/pageflow/themes/default/scroll_indicator_sprite.png +0 -0
  415. data/app/assets/stylesheets/pageflow/jquery_ui.css.scss +0 -16
  416. data/app/assets/stylesheets/pageflow/themes/default.css.scss +0 -1
  417. data/app/assets/stylesheets/pageflow/themes/default/anchors.css.scss +0 -56
  418. data/app/assets/stylesheets/pageflow/themes/default/loading_spinner.css.scss +0 -146
  419. data/app/assets/stylesheets/pageflow/themes/default/navigation.css.scss +0 -277
  420. data/app/assets/stylesheets/pageflow/themes/default/overview.css.scss +0 -134
  421. data/app/assets/stylesheets/pageflow/themes/default/page.css.scss +0 -276
  422. data/app/assets/stylesheets/pageflow/themes/default/player_controls.css.scss +0 -31
  423. data/app/assets/stylesheets/pageflow/themes/default/variables.css.scss +0 -20
  424. data/lib/active_admin/patches/views/attributes_table.rb +0 -20
  425. data/lib/active_admin/patches/views/pages/base.rb +0 -8
  426. data/lib/active_admin/patches/views/table_for.rb +0 -32
@@ -19,7 +19,7 @@ module Pageflow
19
19
  def present_widgets_css_class(entry)
20
20
  entry.resolve_widgets.map do |widget|
21
21
  "widget_#{widget.widget_type.name}_present"
22
- end.join(' ')
22
+ end.push('widgets_present').join(' ')
23
23
  end
24
24
 
25
25
  def widget_types_json_seeds(config)
@@ -4,9 +4,11 @@ module Pageflow
4
4
 
5
5
  def invitation(options)
6
6
  @user = User.find(options['user_id'])
7
+ @password_token = options['password_token']
8
+
7
9
  I18n.with_locale(@user.locale) do
8
10
  headers('X-Language' => I18n.locale)
9
- mail(:to => @user.email, :subject => t('.subject'), :from => Pageflow.config.mailer_sender)
11
+ mail(to: @user.email, subject: t('.subject'), from: Pageflow.config.mailer_sender)
10
12
  end
11
13
  end
12
14
  end
@@ -0,0 +1,63 @@
1
+ module Pageflow
2
+ module EntryPublicationStates
3
+ extend ActiveSupport::Concern
4
+
5
+ included do
6
+ scope(:published, -> { joins(:published_revision) })
7
+
8
+ scope(:published_without_password_protection,
9
+ -> { published.merge(Revision.without_password_protection) })
10
+
11
+ scope(:published_with_password_protection,
12
+ -> { published.merge(Revision.with_password_protection) })
13
+
14
+ scope(:not_published,
15
+ lambda do
16
+ includes(:published_revision)
17
+ .references(:pageflow_revisions)
18
+ .where(pageflow_revisions: {id: nil})
19
+ end)
20
+ end
21
+
22
+ def publication_state
23
+ if published_with_password_protection?
24
+ 'published_with_password_protection'
25
+ elsif published?
26
+ 'published_without_password_protection'
27
+ else
28
+ 'not_published'
29
+ end
30
+ end
31
+
32
+ def published_with_password_protection?
33
+ published? && published_revision.password_protected?
34
+ end
35
+
36
+ def published?
37
+ published_revision.present?
38
+ end
39
+
40
+ def published_at
41
+ published? ? published_revision.published_at : nil
42
+ end
43
+
44
+ def published_until
45
+ published? ? published_revision.published_until : nil
46
+ end
47
+
48
+ module ClassMethods
49
+ def with_publication_state(state)
50
+ case state
51
+ when 'published_with_password_protection'
52
+ published_with_password_protection
53
+ when 'published_without_password_protection'
54
+ published_without_password_protection
55
+ when 'not_published'
56
+ not_published
57
+ else
58
+ fail(ArgumentError, "Unknown publication state #{state}")
59
+ end
60
+ end
61
+ end
62
+ end
63
+ end
@@ -2,8 +2,8 @@ module Pageflow
2
2
  class Account < ActiveRecord::Base
3
3
  include FeatureTarget
4
4
 
5
- has_many :users
6
- has_many :entries
5
+ has_many :users, dependent: :restrict_with_exception
6
+ has_many :entries, dependent: :restrict_with_exception
7
7
  has_many :folders, dependent: :destroy
8
8
 
9
9
  has_many :themings, dependent: :destroy
@@ -17,7 +17,7 @@ module Pageflow
17
17
  :storylines, :main_storyline_chapters, :chapters, :pages,
18
18
  :emphasize_chapter_beginning,
19
19
  :emphasize_new_pages,
20
- :share_image_id, :share_image_x, :share_image_y,
20
+ :share_url, :share_image_id, :share_image_x, :share_image_y,
21
21
  :files,
22
22
  :image_files, :video_files, :audio_files,
23
23
  :locale,
@@ -88,6 +88,10 @@ module Pageflow
88
88
  HomeButton.new(draft, theming)
89
89
  end
90
90
 
91
+ def overview_button
92
+ OverviewButton.new(draft, theming)
93
+ end
94
+
91
95
  def resolve_widgets(options = {})
92
96
  widgets.resolve(Pageflow.config_for(entry), options)
93
97
  end
@@ -4,11 +4,12 @@ module Pageflow
4
4
  end
5
5
 
6
6
  include FeatureTarget
7
+ include EntryPublicationStates
7
8
 
8
9
  extend FriendlyId
9
10
  friendly_id :slug_candidates, :use => [:finders, :slugged]
10
11
 
11
- belongs_to :account
12
+ belongs_to :account, counter_cache: true
12
13
  belongs_to :folder
13
14
  belongs_to :theming
14
15
 
@@ -34,7 +35,6 @@ module Pageflow
34
35
  validates :account, :theming, :presence => true
35
36
  validate :folder_belongs_to_same_account
36
37
 
37
- scope :published, -> { joins(:published_revision) }
38
38
  scope :editing, -> { joins(:edit_lock).merge(Pageflow::EditLock.active) }
39
39
 
40
40
  attr_accessor :skip_draft_creation
@@ -42,7 +42,7 @@ module Pageflow
42
42
  after_create unless: :skip_draft_creation do
43
43
  create_draft!(home_button_enabled: theming.home_button_enabled_by_default)
44
44
  draft.storylines.create!(configuration: {main: true})
45
- theming.widgets.copy_all_to(draft)
45
+ theming.copy_defaults_to(draft)
46
46
  end
47
47
 
48
48
  def edit_lock
@@ -96,14 +96,6 @@ module Pageflow
96
96
  EntryDuplicate.of(self).create!
97
97
  end
98
98
 
99
- def published?
100
- published_revision.present?
101
- end
102
-
103
- def published_until
104
- published? ? published_revision.published_until : nil
105
- end
106
-
107
99
  def should_generate_new_friendly_id?
108
100
  slug.blank? || title_changed?
109
101
  end
@@ -112,6 +104,10 @@ module Pageflow
112
104
  [:title, [:title, :id]]
113
105
  end
114
106
 
107
+ def self.ransackable_scopes(_)
108
+ [:with_publication_state, :published]
109
+ end
110
+
115
111
  private
116
112
 
117
113
  def folder_belongs_to_same_account
@@ -6,22 +6,32 @@ module Pageflow
6
6
  after_create :send_invitation
7
7
 
8
8
  def send_invitation!
9
- generate_reset_password_token! if should_generate_reset_token?
9
+ prepare_invitation
10
+ save(validate: false)
10
11
  send_invitation
11
12
  end
12
13
 
13
14
  private
14
15
 
15
- def password_required?
16
- false
16
+ def prepare_invitation
17
+ @token = generate_reset_password_token
17
18
  end
18
19
 
19
- def prepare_invitation
20
- generate_reset_password_token if should_generate_reset_token?
20
+ def generate_reset_password_token
21
+ raw, enc = Devise.token_generator.generate(self.class, :reset_password_token)
22
+
23
+ self.reset_password_token = enc
24
+ self.reset_password_sent_at = Time.now.utc
25
+
26
+ raw
27
+ end
28
+
29
+ def password_required?
30
+ false
21
31
  end
22
32
 
23
33
  def send_invitation
24
- UserMailer.invitation('user_id' => id).deliver
34
+ UserMailer.invitation('user_id' => id, 'password_token' => @token).deliver
25
35
  end
26
36
  end
27
37
  end
@@ -0,0 +1,19 @@
1
+ module Pageflow
2
+ class OverviewButton
3
+ attr_reader :revision, :theming
4
+
5
+ def initialize(revision, theming)
6
+ @revision = revision
7
+ @theming = theming
8
+ end
9
+
10
+ def enabled?
11
+ revision.overview_button_enabled? &&
12
+ theming.theme.has_overview_button?
13
+ end
14
+
15
+ def enabled_value
16
+ revision.overview_button_enabled?
17
+ end
18
+ end
19
+ end
@@ -20,7 +20,7 @@ module Pageflow
20
20
  :summary, :credits, :manual_start,
21
21
  :emphasize_chapter_beginning,
22
22
  :emphasize_new_pages,
23
- :share_image_id, :share_image_x, :share_image_y,
23
+ :share_url, :share_image_id, :share_image_x, :share_image_y,
24
24
  :locale,
25
25
  :author, :publisher, :keywords,
26
26
  :password_protected?,
@@ -59,13 +59,18 @@ module Pageflow
59
59
  end
60
60
 
61
61
  def cache_key
62
- "#{self.class.model_name.cache_key}/#{entry.cache_key}-#{revision.cache_key}"
62
+ "#{self.class.model_name.cache_key}/" \
63
+ "#{entry.cache_key}-#{revision.cache_key}-#{theming.cache_key}"
63
64
  end
64
65
 
65
66
  def home_button
66
67
  HomeButton.new(revision, theming)
67
68
  end
68
69
 
70
+ def overview_button
71
+ OverviewButton.new(revision, theming)
72
+ end
73
+
69
74
  def resolve_widgets(options = {})
70
75
  widgets.resolve(Pageflow.config_for(entry), options)
71
76
  end
@@ -6,7 +6,7 @@ module Pageflow
6
6
  'pageflow_pages.position ASC'
7
7
  ].join(',')
8
8
 
9
- belongs_to :entry, :touch => true
9
+ belongs_to :entry, touch: :edited_at
10
10
  belongs_to :creator, :class_name => 'User'
11
11
  belongs_to :restored_from, :class_name => 'Pageflow::Revision'
12
12
 
@@ -29,6 +29,9 @@ module Pageflow
29
29
  {:now => Time.now}])
30
30
  end
31
31
 
32
+ scope(:with_password_protection, -> { where('password_protected IS TRUE') })
33
+ scope(:without_password_protection, -> { where('password_protected IS NOT TRUE') })
34
+
32
35
  scope :editable, -> { where('frozen_at IS NULL') }
33
36
  scope :frozen, -> { where('frozen_at IS NOT NULL') }
34
37
 
@@ -26,5 +26,18 @@ module Pageflow
26
26
  def name
27
27
  I18n.t('pageflow.admin.themings.name', :account_name => account.name, :theme_name => theme_name)
28
28
  end
29
+
30
+ def copy_defaults_to(revision)
31
+ widgets.copy_all_to(revision)
32
+ copy_default_meta_tags(revision)
33
+ end
34
+
35
+ def copy_default_meta_tags(revision)
36
+ revision.update(
37
+ author: default_author.presence || Pageflow.config.default_author_meta_tag,
38
+ publisher: default_publisher.presence || Pageflow.config.default_publisher_meta_tag,
39
+ keywords: default_keywords.presence || Pageflow.config.default_keywords_meta_tag
40
+ )
41
+ end
29
42
  end
30
43
  end
@@ -1,4 +1,4 @@
1
- <%= semantic_form_for [:admin, resource] do |f| %>
1
+ <%= admin_form_for [:admin, resource] do |f| %>
2
2
  <% account_config = Pageflow.config_for(f.object) %>
3
3
 
4
4
  <%= f.inputs do %>
@@ -18,6 +18,18 @@
18
18
  <%= theming.input :home_url, hint: t('pageflow.admin.themings.home_url_hint') %>
19
19
  <% end %>
20
20
 
21
+ <%= f.inputs do %>
22
+ <%= theming.input :default_author,
23
+ hint: t('pageflow.admin.themings.default_author_hint'),
24
+ placeholder: Pageflow.config.default_author_meta_tag %>
25
+ <%= theming.input :default_publisher,
26
+ hint: t('pageflow.admin.themings.default_publisher_hint'),
27
+ placeholder: Pageflow.config.default_publisher_meta_tag %>
28
+ <%= theming.input :default_keywords,
29
+ hint: t('pageflow.admin.themings.default_keywords_hint'),
30
+ placeholder: Pageflow.config.default_keywords_meta_tag %>
31
+ <% end %>
32
+
21
33
  <%= f.inputs do %>
22
34
  <%= theming.input :home_button_enabled_by_default %>
23
35
  <%= theming.input :imprint_link_label %>
@@ -3,4 +3,7 @@ attributes_table_for account.default_theming do
3
3
  row :theme, :class => 'theme' do
4
4
  account.default_theming.theme.name
5
5
  end
6
+ row :default_author, class: 'default_author'
7
+ row :default_publisher, class: 'default_publisher'
8
+ row :default_keywords, class: 'default_keywords'
6
9
  end
@@ -4,7 +4,7 @@ attributes_table_for entry do
4
4
  row :account, :class => 'account'
5
5
  end
6
6
  row :created_at
7
- row :updated_at
7
+ row :edited_at
8
8
  row :published?, :class => 'published' do
9
9
  span :'data-published' => entry.published? do
10
10
  if entry.published?
@@ -1,9 +1,17 @@
1
1
  para do
2
2
  if authorized?(:edit, Pageflow::Entry)
3
- span(link_to(I18n.t('pageflow.admin.entries.editor'), pageflow.edit_entry_path(entry), :class => 'editor button'))
3
+ span(link_to(I18n.t('pageflow.admin.entries.editor'),
4
+ pageflow.edit_entry_path(entry),
5
+ class: 'editor icon_button button'))
4
6
  end
5
- span(link_to(I18n.t('pageflow.admin.entries.preview'), preview_admin_entry_path(entry), :class => 'preview button'))
7
+
8
+ span(link_to(I18n.t('pageflow.admin.entries.preview'),
9
+ preview_admin_entry_path(entry),
10
+ class: 'preview icon_button button'))
11
+
6
12
  if entry.published?
7
- span(link_to(I18n.t('pageflow.admin.entries.show_public'), pretty_entry_url(entry), :class => 'show_public button'))
13
+ span(link_to(I18n.t('pageflow.admin.entries.show_public'),
14
+ pretty_entry_url(entry),
15
+ class: 'show_public icon_button button'))
8
16
  end
9
17
  end
@@ -1,4 +1,4 @@
1
- <%= semantic_form_for [:admin, resource], html: {class: 'features'} do |f| %>
1
+ <%= admin_form_for [:admin, resource], html: {class: 'features'} do |f| %>
2
2
  <%= hidden_field_tag('tab', params[:tab]) %>
3
3
 
4
4
  <%= f.inputs do %>
@@ -1,4 +1,4 @@
1
- <%= semantic_form_for [:admin, parent, resource] do |f| %>
1
+ <%= admin_form_for [:admin, parent, resource] do |f| %>
2
2
  <%= f.inputs do %>
3
3
  <%= f.input :user,
4
4
  :input_html => { :disabled => (parent_type == :user) },
@@ -1,4 +1,4 @@
1
- <%= semantic_form_for [:admin, resource] do |f| %>
1
+ <%= admin_form_for [:admin, resource] do |f| %>
2
2
  <%= f.inputs do %>
3
3
  <%= f.input(:published_until,
4
4
  :as => :string,
@@ -1,7 +1,7 @@
1
1
  <% if @user.new_record? && Pageflow.config.quotas.get(:users, @user.account).exhausted? %>
2
2
  <%= render 'admin/users/quota_exhausted' %>
3
3
  <% else %>
4
- <%= semantic_form_for([:admin, @user.becomes(User)]) do |f| %>
4
+ <%= admin_form_for([:admin, @user.becomes(User)]) do |f| %>
5
5
  <%= f.inputs "Details" do %>
6
6
  <% if @user.new_record? %>
7
7
  <%= quota_state_description(:users, @user.account) %>
@@ -1,4 +1,4 @@
1
- <%= semantic_form_for current_user, :url => delete_me_admin_users_path, :method => 'delete', :html => {:class => 'delete_account'} do |form| %>
1
+ <%= admin_form_for current_user, :url => delete_me_admin_users_path, :method => 'delete', :html => {:class => 'delete_account'} do |form| %>
2
2
  <%= form.inputs do %>
3
3
  <li>
4
4
  <p><%= t('pageflow.admin.users.delete_me.warning_html') %></p>
@@ -1,7 +1,7 @@
1
- <%= semantic_form_for current_user, :url => me_admin_users_path, :html => {:class => 'profile'} do |form| %>
1
+ <%= admin_form_for current_user, :url => me_admin_users_path, :html => {:class => 'profile'} do |form| %>
2
2
  <%= form.inputs :first_name, :last_name %>
3
3
 
4
- <%= form.inputs do %>
4
+ <%= form.inputs do %>
5
5
  <%= form.input :locale,
6
6
  as: :select,
7
7
  include_blank: false,
@@ -13,9 +13,8 @@
13
13
  <%= form.input :password %>
14
14
  <%= form.input :password_confirmation %>
15
15
  <% end %>
16
+
16
17
  <%= form.actions %>
17
- <p>
18
- <%= t('pageflow.admin.users.me.delete_account_hint') %>
19
- <%= link_to(t('pageflow.admin.users.me.delete_account'), delete_me_admin_users_path, :class => 'delete_account') %>
20
- </p>
18
+
19
+ <%= delete_own_user_section %>
21
20
  <% end %>
@@ -8,6 +8,7 @@ module Pageflow
8
8
  def build(base_collection, options = {})
9
9
  @base_collection = base_collection
10
10
  @scopes = []
11
+ @sort_columns = []
11
12
  @blank_slate_text = options[:blank_slate_text]
12
13
  super()
13
14
  end
@@ -16,13 +17,15 @@ module Pageflow
16
17
  scopes << ActiveAdmin::Scope.new(*args)
17
18
  end
18
19
 
19
- def table_for_collection(*args, &block)
20
+ def table_for_collection(options = {}, &block)
20
21
  if scopes.any?
21
- custom_scopes_renderer(scopes, :default_scope => scopes.first.id)
22
+ custom_scopes_renderer(scopes, default_scope: scopes.first.id)
22
23
  end
23
24
 
25
+ record_sort_columns(&block) if options[:sortable]
26
+
24
27
  if scoped_collection.any?
25
- build_table(*args, &block)
28
+ build_table(options, &block)
26
29
  else
27
30
  build_blank_slate
28
31
  end
@@ -30,16 +33,16 @@ module Pageflow
30
33
 
31
34
  private
32
35
 
33
- def build_table(*args, &block)
34
- paginated_collection(scoped_collection.page(params[:page]).per(10),
35
- :download_links => false) do
36
- table_for(collection, *args, &block)
36
+ def build_table(options, &block)
37
+ paginated_collection(paginate(apply_sorting(scoped_collection)),
38
+ download_links: false) do
39
+ table_for(collection, options, &block)
37
40
  end
38
41
  end
39
42
 
40
43
  def build_blank_slate
41
- div :class => "blank_slate_container" do
42
- span :class => "blank_slate" do
44
+ div class: 'blank_slate_container' do
45
+ span class: 'blank_slate' do
43
46
  @blank_slate_text
44
47
  end
45
48
  end
@@ -50,10 +53,64 @@ module Pageflow
50
53
  end
51
54
 
52
55
  def current_scope
53
- scopes.find do |scope|
56
+ scopes.detect do |scope|
54
57
  scope.id.to_s == params[:scope]
55
58
  end || scopes.first
56
59
  end
60
+
61
+ def paginate(collection)
62
+ collection.page(params[:page]).per(10)
63
+ end
64
+
65
+ def apply_sorting(collection)
66
+ if has_sort_columns?
67
+ collection.reorder(order_clause)
68
+ else
69
+ collection
70
+ end
71
+ end
72
+
73
+ def has_sort_columns?
74
+ @sort_columns.any?
75
+ end
76
+
77
+ def order_clause
78
+ if valid_order?
79
+ params[:order].gsub('_asc', ' ASC').gsub('_desc', ' DESC')
80
+ else
81
+ "#{@sort_columns.first} ASC"
82
+ end
83
+ end
84
+
85
+ def valid_order?
86
+ params[:order] &&
87
+ @sort_columns.include?(params[:order].gsub('_asc', '').gsub('_desc', ''))
88
+ end
89
+
90
+ def record_sort_columns(&block)
91
+ recorder = SortColumnRecorder.new
92
+ recorder.instance_eval(&block)
93
+ @sort_columns = recorder.columns
94
+ end
95
+
96
+ class SortColumnRecorder
97
+ attr_reader :columns
98
+
99
+ def initialize
100
+ @columns = []
101
+ end
102
+
103
+ def column(name = nil, options = {})
104
+ if options[:sortable].is_a?(String) || options[:sortable].is_a?(Symbol)
105
+ @columns << options[:sortable].to_s
106
+ elsif options[:sortable] != false && name
107
+ @columns << name.to_s
108
+ end
109
+ end
110
+
111
+ def row_attributes
112
+ end
113
+ end
57
114
  end
58
115
  end
59
116
  end