refinerycms-core 2.1.5 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (449) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/refinery/add.png +0 -0
  3. data/app/assets/images/refinery/admin_bg.png +0 -0
  4. data/app/assets/images/refinery/ajax-loader.gif +0 -0
  5. data/app/assets/images/refinery/branch-end.gif +0 -0
  6. data/app/assets/images/refinery/branch.gif +0 -0
  7. data/app/assets/images/refinery/cross.png +0 -0
  8. data/app/assets/images/refinery/dialogLoadingAnimation.gif +0 -0
  9. data/app/assets/images/refinery/header_background.png +0 -0
  10. data/app/assets/images/refinery/hover-gradient.jpg +0 -0
  11. data/app/assets/images/refinery/icons/accept.png +0 -0
  12. data/app/assets/images/refinery/icons/add.png +0 -0
  13. data/app/assets/images/refinery/icons/ajax-loader.gif +0 -0
  14. data/app/assets/images/refinery/icons/application_edit.png +0 -0
  15. data/app/assets/images/refinery/icons/application_go.png +0 -0
  16. data/app/assets/images/refinery/icons/arrow_left.png +0 -0
  17. data/app/assets/images/refinery/icons/arrow_left_right.png +0 -0
  18. data/app/assets/images/refinery/icons/arrow_switch.png +0 -0
  19. data/app/assets/images/refinery/icons/arrow_up.png +0 -0
  20. data/app/assets/images/refinery/icons/arrow_up_down.png +0 -0
  21. data/app/assets/images/refinery/icons/bin.png +0 -0
  22. data/app/assets/images/refinery/icons/bin_closed.png +0 -0
  23. data/app/assets/images/refinery/icons/cancel.png +0 -0
  24. data/app/assets/images/refinery/icons/cog_add.png +0 -0
  25. data/app/assets/images/refinery/icons/cog_edit.png +0 -0
  26. data/app/assets/images/refinery/icons/cross.png +0 -0
  27. data/app/assets/images/refinery/icons/delete.png +0 -0
  28. data/app/assets/images/refinery/icons/doc.png +0 -0
  29. data/app/assets/images/refinery/icons/down.gif +0 -0
  30. data/app/assets/images/refinery/icons/edit.png +0 -0
  31. data/app/assets/images/refinery/icons/email.png +0 -0
  32. data/app/assets/images/refinery/icons/email_edit.png +0 -0
  33. data/app/assets/images/refinery/icons/email_go.png +0 -0
  34. data/app/assets/images/refinery/icons/email_open.png +0 -0
  35. data/app/assets/images/refinery/icons/eye.png +0 -0
  36. data/app/assets/images/refinery/icons/folder.png +0 -0
  37. data/app/assets/images/refinery/icons/folder_open.png +0 -0
  38. data/app/assets/images/refinery/icons/folder_page_white.png +0 -0
  39. data/app/assets/images/refinery/icons/image_add.png +0 -0
  40. data/app/assets/images/refinery/icons/image_edit.png +0 -0
  41. data/app/assets/images/refinery/icons/img.png +0 -0
  42. data/app/assets/images/refinery/icons/information.png +0 -0
  43. data/app/assets/images/refinery/icons/layout_add.png +0 -0
  44. data/app/assets/images/refinery/icons/layout_edit.png +0 -0
  45. data/app/assets/images/refinery/icons/locale-blue.svg +15 -0
  46. data/app/assets/images/refinery/icons/locale.svg +11 -0
  47. data/app/assets/images/refinery/icons/music.png +0 -0
  48. data/app/assets/images/refinery/icons/page.png +0 -0
  49. data/app/assets/images/refinery/icons/page_add.png +0 -0
  50. data/app/assets/images/refinery/icons/page_edit.png +0 -0
  51. data/app/assets/images/refinery/icons/page_white_edit.png +0 -0
  52. data/app/assets/images/refinery/icons/page_white_gear.png +0 -0
  53. data/app/assets/images/refinery/icons/page_white_put.png +0 -0
  54. data/app/assets/images/refinery/icons/pdf.png +0 -0
  55. data/app/assets/images/refinery/icons/ppt.png +0 -0
  56. data/app/assets/images/refinery/icons/star.png +0 -0
  57. data/app/assets/images/refinery/icons/tick.png +0 -0
  58. data/app/assets/images/refinery/icons/up.gif +0 -0
  59. data/app/assets/images/refinery/icons/user_add.png +0 -0
  60. data/app/assets/images/refinery/icons/user_comment.png +0 -0
  61. data/app/assets/images/refinery/icons/user_edit.png +0 -0
  62. data/app/assets/images/refinery/icons/xls.png +0 -0
  63. data/app/assets/images/refinery/icons/zip.png +0 -0
  64. data/app/assets/images/refinery/icons/zoom.png +0 -0
  65. data/app/assets/images/refinery/logo-large.png +0 -0
  66. data/app/assets/images/refinery/logo-medium.png +0 -0
  67. data/app/assets/images/refinery/logo-site-bar.png +0 -0
  68. data/app/assets/images/refinery/logo-small-medium.png +0 -0
  69. data/app/assets/images/refinery/logo-small.png +0 -0
  70. data/app/assets/images/refinery/logo-tiny.png +0 -0
  71. data/app/assets/images/refinery/logo.png +0 -0
  72. data/app/assets/images/refinery/nav-3-background.gif +0 -0
  73. data/app/assets/images/refinery/nav_inactive_background.png +0 -0
  74. data/app/assets/images/refinery/orange_button.png +0 -0
  75. data/app/assets/images/refinery/page_bg.png +0 -0
  76. data/app/assets/images/refinery/text_field_background.png +0 -0
  77. data/app/assets/images/refinery/tooltip-nib.gif +0 -0
  78. data/app/assets/images/refinery/tooltip-nib.png +0 -0
  79. data/app/assets/javascripts/admin.js +7 -6
  80. data/app/assets/javascripts/refinery/admin.js.erb +99 -60
  81. data/app/assets/javascripts/refinery/ajaxy_pagination.js.coffee +2 -5
  82. data/app/assets/javascripts/refinery/application.js +8 -0
  83. data/app/assets/javascripts/refinery/core.js +4 -18
  84. data/app/assets/javascripts/refinery/interface.js.coffee.erb +5 -29
  85. data/app/assets/javascripts/refinery/modal_dialogs.js.erb +0 -105
  86. data/app/assets/javascripts/refinery/nestedsortables.js +183 -110
  87. data/app/assets/javascripts/refinery/refinery.js.erb +3 -9
  88. data/app/assets/javascripts/refinery/serializelist.js +1 -1
  89. data/app/assets/javascripts/refinery/site_bar.js +0 -5
  90. data/app/assets/javascripts/refinery/sortable_list.js +10 -11
  91. data/app/assets/javascripts/refinery/submit_continue.js.coffee.erb +1 -1
  92. data/app/assets/stylesheets/application.scss +2 -0
  93. data/app/assets/stylesheets/refinery/_colours.scss +18 -0
  94. data/app/assets/stylesheets/refinery/_icons.scss +85 -0
  95. data/app/assets/stylesheets/refinery/{layout.css.scss → _layout.scss} +306 -338
  96. data/app/assets/stylesheets/refinery/_mixins.scss +84 -0
  97. data/app/assets/stylesheets/refinery/{submenu.css.scss → _submenu.scss} +2 -2
  98. data/app/assets/stylesheets/refinery/{tooltips.css.scss → _tooltips.scss} +0 -0
  99. data/app/assets/stylesheets/refinery/_ui.scss +252 -0
  100. data/app/assets/stylesheets/refinery/{formatting.css.scss → formatting.scss} +0 -0
  101. data/app/assets/stylesheets/refinery/refinery.scss +10 -0
  102. data/app/assets/stylesheets/refinery/site_bar.scss +126 -0
  103. data/app/assets/stylesheets/refinery/{theme.css.scss → theme.scss} +0 -0
  104. data/app/controllers/refinery/admin/core_controller.rb +2 -7
  105. data/app/controllers/refinery/admin/dialogs_controller.rb +4 -3
  106. data/app/controllers/refinery/admin_controller.rb +0 -1
  107. data/app/controllers/refinery/fast_controller.rb +0 -4
  108. data/app/helpers/refinery/admin/visual_editor_helper.rb +13 -0
  109. data/app/helpers/refinery/admin_helper.rb +4 -0
  110. data/app/helpers/refinery/custom_assets_helper.rb +2 -2
  111. data/app/helpers/refinery/image_helper.rb +9 -8
  112. data/app/helpers/refinery/meta_helper.rb +1 -1
  113. data/app/helpers/refinery/site_bar_helper.rb +16 -2
  114. data/app/helpers/refinery/tag_helper.rb +38 -5
  115. data/app/models/refinery/core/base_model.rb +3 -1
  116. data/app/views/layouts/refinery/admin.html.erb +12 -10
  117. data/app/views/layouts/refinery/admin_dialog.html.erb +1 -4
  118. data/app/views/refinery/_content_page.html.erb +1 -1
  119. data/app/views/refinery/_google_analytics.html.erb +8 -9
  120. data/app/views/refinery/_head.html.erb +1 -1
  121. data/app/views/refinery/_javascripts.html.erb +0 -15
  122. data/app/views/refinery/_message.html.erb +1 -1
  123. data/app/views/refinery/_site_bar.html.erb +9 -6
  124. data/app/views/refinery/admin/_error_messages.html.erb +4 -4
  125. data/app/views/refinery/admin/_form_actions.html.erb +1 -0
  126. data/app/views/refinery/admin/_form_advanced_options_menu.html.erb +3 -4
  127. data/app/views/refinery/admin/_head.html.erb +3 -0
  128. data/app/views/refinery/admin/_image_picker.html.erb +4 -5
  129. data/app/views/refinery/admin/_javascripts.html.erb +4 -9
  130. data/app/views/refinery/admin/_locale_picker.html.erb +9 -2
  131. data/app/views/refinery/admin/_make_sortable.html.erb +8 -6
  132. data/app/views/refinery/admin/_menu.html.erb +2 -15
  133. data/app/views/refinery/admin/_menu_item.html.erb +3 -0
  134. data/app/views/refinery/admin/_resource_picker.html.erb +12 -22
  135. data/app/views/refinery/admin/_search.html.erb +1 -1
  136. data/app/views/refinery/admin/_tabbed_fields.html.erb +2 -2
  137. data/app/views/refinery/admin/_wysiwyg.html.erb +1 -1
  138. data/{lib/generators/refinery/cms/templates/app/decorators/controllers/refinery/.gitkeep → app/views/refinery/admin/dialog_success.html.erb} +0 -0
  139. data/app/views/refinery/admin/dialogs/show.html.erb +1 -19
  140. data/config/initializers/assets.rb +6 -0
  141. data/config/locales/ca.yml +84 -0
  142. data/config/locales/cs.yml +12 -5
  143. data/config/locales/en.yml +6 -2
  144. data/config/locales/fr.yml +15 -11
  145. data/config/locales/hu.yml +3 -1
  146. data/config/locales/it.yml +5 -1
  147. data/config/locales/ja.yml +2 -2
  148. data/config/locales/pt.yml +5 -3
  149. data/config/locales/ru.yml +7 -0
  150. data/config/locales/sl.yml +0 -3
  151. data/config/locales/tr.yml +43 -41
  152. data/config/routes.rb +1 -4
  153. data/lib/generators/refinery/cms/cms_generator.rb +68 -26
  154. data/lib/generators/refinery/cms/templates/app/decorators/{models/refinery/.gitkeep → controllers/refinery/.keep} +0 -0
  155. data/lib/generators/refinery/{form/templates/.gitkeep → cms/templates/app/decorators/models/refinery/.keep} +0 -0
  156. data/lib/generators/refinery/cms/templates/config/database.yml.mysql +3 -3
  157. data/lib/generators/refinery/cms/templates/config/database.yml.postgresql +3 -3
  158. data/lib/generators/refinery/core/templates/config/initializers/refinery/core.rb.erb +18 -5
  159. data/lib/generators/refinery/dummy/dummy_generator.rb +3 -1
  160. data/lib/generators/refinery/dummy/templates/rails/application.js +3 -0
  161. data/lib/generators/refinery/dummy/templates/rails/application.rb.erb +0 -2
  162. data/lib/generators/refinery/dummy/templates/rails/blank.png +0 -0
  163. data/lib/generators/refinery/dummy/templates/rails/routes.rb +1 -1
  164. data/lib/generators/refinery/engine/engine_generator.rb +3 -2
  165. data/lib/generators/refinery/engine/templates/Gemfile +9 -4
  166. data/lib/generators/refinery/engine/templates/Rakefile +3 -4
  167. data/lib/generators/refinery/engine/templates/app/controllers/refinery/namespace/admin/plural_name_controller.rb.erb +11 -2
  168. data/lib/generators/refinery/engine/templates/app/controllers/refinery/namespace/plural_name_controller.rb.erb +2 -2
  169. data/lib/generators/refinery/engine/templates/app/models/refinery/namespace/singular_name.rb.erb +5 -5
  170. data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_actions.html.erb +7 -12
  171. data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_form.html.erb +8 -8
  172. data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_records.html.erb +3 -3
  173. data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/_singular_name.html.erb +6 -11
  174. data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/admin/plural_name/index.html.erb +1 -1
  175. data/lib/generators/refinery/engine/templates/app/views/refinery/namespace/plural_name/show.html.erb +4 -4
  176. data/lib/generators/refinery/engine/templates/db/migrate/1_create_namespace_plural_name.rb.erb +2 -9
  177. data/lib/generators/refinery/engine/templates/db/seeds.rb.erb +13 -19
  178. data/lib/generators/refinery/engine/templates/lib/refinery/plural_name/engine.rb.erb +0 -4
  179. data/lib/generators/refinery/engine/templates/readme.md +3 -3
  180. data/lib/generators/refinery/engine/templates/refinerycms-extension_plural_name.gemspec +1 -0
  181. data/lib/generators/refinery/engine/templates/spec/features/refinery/namespace/admin/plural_name_spec.rb.erb +25 -28
  182. data/lib/generators/refinery/engine/templates/spec/models/refinery/namespace/singular_name_spec.rb.erb +1 -1
  183. data/lib/generators/refinery/engine/templates/spec/spec_helper.rb +1 -1
  184. data/lib/refinery.rb +7 -9
  185. data/lib/refinery/admin/base_controller.rb +42 -32
  186. data/lib/refinery/application_controller.rb +25 -17
  187. data/lib/refinery/cli.rb +54 -19
  188. data/lib/refinery/core.rb +5 -0
  189. data/lib/refinery/core/authorisation_adapter.rb +11 -0
  190. data/lib/refinery/core/authorisation_manager.rb +14 -0
  191. data/lib/refinery/core/configuration.rb +25 -4
  192. data/lib/refinery/core/default_route.rb +16 -0
  193. data/lib/refinery/core/engine.rb +44 -25
  194. data/lib/refinery/core/nil_user.rb +42 -0
  195. data/lib/refinery/crud.rb +40 -29
  196. data/lib/refinery/extension_generation.rb +11 -22
  197. data/lib/refinery/generators/generated_attribute.rb +54 -0
  198. data/lib/refinery/generators/named_base.rb +16 -0
  199. data/lib/refinery/menu.rb +3 -2
  200. data/lib/refinery/menu_item.rb +1 -1
  201. data/lib/refinery/plugin.rb +27 -43
  202. data/lib/refinery/plugins.rb +22 -26
  203. data/lib/refinery/users_manager.rb +8 -0
  204. data/lib/refinery/version.rb +7 -3
  205. data/lib/tasks/refinery.rake +7 -0
  206. data/license.md +1 -1
  207. data/refinerycms-core.gemspec +11 -8
  208. data/spec/controllers/refinery/admin/dummy_controller_spec.rb +23 -11
  209. data/spec/controllers/refinery/sitemap_controller_spec.rb +2 -2
  210. data/spec/features/refinery/admin/custom_assets_spec.rb +12 -10
  211. data/spec/features/refinery/admin/dialogs_spec.rb +5 -5
  212. data/spec/features/refinery/admin/xhr_paging_spec.rb +24 -38
  213. data/spec/features/refinery/application_layout_spec.rb +3 -3
  214. data/spec/features/refinery/core_spec.rb +1 -1
  215. data/spec/features/refinery/site_bar_spec.rb +44 -23
  216. data/spec/helpers/refinery/admin_helper_spec.rb +15 -0
  217. data/spec/helpers/refinery/custom_assets_helper_spec.rb +15 -23
  218. data/spec/helpers/refinery/html_truncation_helper_spec.rb +10 -5
  219. data/spec/helpers/refinery/meta_helper_spec.rb +3 -3
  220. data/spec/helpers/refinery/pagination_helper_spec.rb +7 -7
  221. data/spec/helpers/refinery/tag_helper_spec.rb +4 -4
  222. data/spec/helpers/refinery/translation_helper_spec.rb +3 -3
  223. data/spec/lib/generators/refinery/cms/cms_generator_spec.rb +30 -25
  224. data/spec/lib/generators/refinery/core/core_generator_spec.rb +1 -1
  225. data/spec/lib/generators/refinery/engine/engine_generator_multiple_resources_spec.rb +7 -8
  226. data/spec/lib/generators/refinery/engine/engine_generator_sanity_check_spec.rb +15 -15
  227. data/spec/lib/generators/refinery/engine/engine_generator_spec.rb +9 -9
  228. data/spec/lib/generators/refinery/engine/engine_generator_with_i18n_spec.rb +1 -1
  229. data/spec/lib/generators/refinery/engine/engine_generator_without_frontend_spec.rb +1 -1
  230. data/spec/lib/refinery/application_controller_spec.rb +16 -16
  231. data/spec/lib/refinery/authorisation_manager_spec.rb +10 -0
  232. data/spec/lib/refinery/cli_spec.rb +83 -21
  233. data/spec/lib/refinery/core/configuration_spec.rb +5 -5
  234. data/spec/lib/refinery/core/nil_user_spec.rb +39 -0
  235. data/spec/lib/refinery/core_spec.rb +39 -30
  236. data/spec/lib/refinery/crud_spec.rb +70 -59
  237. data/spec/lib/refinery/menu_spec.rb +4 -4
  238. data/spec/lib/refinery/plugin_spec.rb +56 -45
  239. data/spec/lib/refinery/plugins_spec.rb +39 -87
  240. data/spec/lib/refinery/users_manager_spec.rb +9 -0
  241. data/spec/support/refinery.rb +3 -8
  242. data/vendor/assets/fonts/font-awesome/FontAwesome.otf +0 -0
  243. data/vendor/assets/fonts/font-awesome/fontawesome-webfont.eot +0 -0
  244. data/vendor/assets/fonts/font-awesome/fontawesome-webfont.svg +565 -0
  245. data/vendor/assets/fonts/font-awesome/fontawesome-webfont.ttf +0 -0
  246. data/vendor/assets/fonts/font-awesome/fontawesome-webfont.woff +0 -0
  247. data/vendor/assets/fonts/font-awesome/fontawesome-webfont.woff2 +0 -0
  248. data/vendor/assets/stylesheets/_font-awesome-compass.scss +5 -0
  249. data/vendor/assets/stylesheets/_font-awesome-sprockets.scss +5 -0
  250. data/vendor/assets/stylesheets/_font-awesome.scss +17 -0
  251. data/vendor/assets/stylesheets/font-awesome/_animated.scss +34 -0
  252. data/vendor/assets/stylesheets/font-awesome/_bordered-pulled.scss +16 -0
  253. data/vendor/assets/stylesheets/font-awesome/_core.scss +12 -0
  254. data/vendor/assets/stylesheets/font-awesome/_extras.scss +44 -0
  255. data/vendor/assets/stylesheets/font-awesome/_fixed-width.scss +6 -0
  256. data/vendor/assets/stylesheets/font-awesome/_icons.scss +596 -0
  257. data/vendor/assets/stylesheets/font-awesome/_larger.scss +13 -0
  258. data/vendor/assets/stylesheets/font-awesome/_list.scss +19 -0
  259. data/vendor/assets/stylesheets/font-awesome/_mixins.scss +26 -0
  260. data/vendor/assets/stylesheets/font-awesome/_path.scss +14 -0
  261. data/vendor/assets/stylesheets/font-awesome/_rotated-flipped.scss +20 -0
  262. data/vendor/assets/stylesheets/font-awesome/_stacked.scss +20 -0
  263. data/vendor/assets/stylesheets/font-awesome/_variables.scss +606 -0
  264. metadata +144 -441
  265. data/app/assets/images/refinery/carousel-left.png +0 -0
  266. data/app/assets/images/refinery/carousel-right.png +0 -0
  267. data/app/assets/images/wymeditor/skins/refinery/arrow_redo.png +0 -0
  268. data/app/assets/images/wymeditor/skins/refinery/arrow_undo.png +0 -0
  269. data/app/assets/images/wymeditor/skins/refinery/eye.png +0 -0
  270. data/app/assets/images/wymeditor/skins/refinery/html5/article.png +0 -0
  271. data/app/assets/images/wymeditor/skins/refinery/html5/aside.png +0 -0
  272. data/app/assets/images/wymeditor/skins/refinery/html5/blockquote.png +0 -0
  273. data/app/assets/images/wymeditor/skins/refinery/html5/command.png +0 -0
  274. data/app/assets/images/wymeditor/skins/refinery/html5/details.png +0 -0
  275. data/app/assets/images/wymeditor/skins/refinery/html5/figcaption.png +0 -0
  276. data/app/assets/images/wymeditor/skins/refinery/html5/figure.png +0 -0
  277. data/app/assets/images/wymeditor/skins/refinery/html5/footer.png +0 -0
  278. data/app/assets/images/wymeditor/skins/refinery/html5/h1.png +0 -0
  279. data/app/assets/images/wymeditor/skins/refinery/html5/h2.png +0 -0
  280. data/app/assets/images/wymeditor/skins/refinery/html5/h3.png +0 -0
  281. data/app/assets/images/wymeditor/skins/refinery/html5/h4.png +0 -0
  282. data/app/assets/images/wymeditor/skins/refinery/html5/h5.png +0 -0
  283. data/app/assets/images/wymeditor/skins/refinery/html5/h6.png +0 -0
  284. data/app/assets/images/wymeditor/skins/refinery/html5/header.png +0 -0
  285. data/app/assets/images/wymeditor/skins/refinery/html5/hgroup.png +0 -0
  286. data/app/assets/images/wymeditor/skins/refinery/html5/mark.png +0 -0
  287. data/app/assets/images/wymeditor/skins/refinery/html5/meter.png +0 -0
  288. data/app/assets/images/wymeditor/skins/refinery/html5/nav.png +0 -0
  289. data/app/assets/images/wymeditor/skins/refinery/html5/p.png +0 -0
  290. data/app/assets/images/wymeditor/skins/refinery/html5/pre.png +0 -0
  291. data/app/assets/images/wymeditor/skins/refinery/html5/progress.png +0 -0
  292. data/app/assets/images/wymeditor/skins/refinery/html5/readme.md +0 -1
  293. data/app/assets/images/wymeditor/skins/refinery/html5/rp.png +0 -0
  294. data/app/assets/images/wymeditor/skins/refinery/html5/rt.png +0 -0
  295. data/app/assets/images/wymeditor/skins/refinery/html5/ruby.png +0 -0
  296. data/app/assets/images/wymeditor/skins/refinery/html5/section.png +0 -0
  297. data/app/assets/images/wymeditor/skins/refinery/html5/summary.png +0 -0
  298. data/app/assets/images/wymeditor/skins/refinery/html5/time.png +0 -0
  299. data/app/assets/images/wymeditor/skins/refinery/iframe/lbl-blockquote.png +0 -0
  300. data/app/assets/images/wymeditor/skins/refinery/iframe/lbl-h1.png +0 -0
  301. data/app/assets/images/wymeditor/skins/refinery/iframe/lbl-h2.png +0 -0
  302. data/app/assets/images/wymeditor/skins/refinery/iframe/lbl-h3.png +0 -0
  303. data/app/assets/images/wymeditor/skins/refinery/iframe/lbl-h4.png +0 -0
  304. data/app/assets/images/wymeditor/skins/refinery/iframe/lbl-h5.png +0 -0
  305. data/app/assets/images/wymeditor/skins/refinery/iframe/lbl-h6.png +0 -0
  306. data/app/assets/images/wymeditor/skins/refinery/iframe/lbl-p.png +0 -0
  307. data/app/assets/images/wymeditor/skins/refinery/iframe/lbl-pre.png +0 -0
  308. data/app/assets/images/wymeditor/skins/refinery/link_add.png +0 -0
  309. data/app/assets/images/wymeditor/skins/refinery/link_break.png +0 -0
  310. data/app/assets/images/wymeditor/skins/refinery/page_code.png +0 -0
  311. data/app/assets/images/wymeditor/skins/refinery/page_paste.png +0 -0
  312. data/app/assets/images/wymeditor/skins/refinery/photo_add.png +0 -0
  313. data/app/assets/images/wymeditor/skins/refinery/right.png +0 -0
  314. data/app/assets/images/wymeditor/skins/refinery/style.png +0 -0
  315. data/app/assets/images/wymeditor/skins/refinery/table_add.png +0 -0
  316. data/app/assets/images/wymeditor/skins/refinery/text_align_center.png +0 -0
  317. data/app/assets/images/wymeditor/skins/refinery/text_align_justify.png +0 -0
  318. data/app/assets/images/wymeditor/skins/refinery/text_align_left.png +0 -0
  319. data/app/assets/images/wymeditor/skins/refinery/text_align_right.png +0 -0
  320. data/app/assets/images/wymeditor/skins/refinery/text_bold.png +0 -0
  321. data/app/assets/images/wymeditor/skins/refinery/text_heading_1.png +0 -0
  322. data/app/assets/images/wymeditor/skins/refinery/text_heading_2.png +0 -0
  323. data/app/assets/images/wymeditor/skins/refinery/text_heading_3.png +0 -0
  324. data/app/assets/images/wymeditor/skins/refinery/text_heading_4.png +0 -0
  325. data/app/assets/images/wymeditor/skins/refinery/text_heading_5.png +0 -0
  326. data/app/assets/images/wymeditor/skins/refinery/text_heading_6.png +0 -0
  327. data/app/assets/images/wymeditor/skins/refinery/text_indent.png +0 -0
  328. data/app/assets/images/wymeditor/skins/refinery/text_indent_remove.png +0 -0
  329. data/app/assets/images/wymeditor/skins/refinery/text_italic.png +0 -0
  330. data/app/assets/images/wymeditor/skins/refinery/text_list_bullets.png +0 -0
  331. data/app/assets/images/wymeditor/skins/refinery/text_list_numbers.png +0 -0
  332. data/app/assets/images/wymeditor/skins/refinery/text_paragraph.png +0 -0
  333. data/app/assets/images/wymeditor/skins/refinery/text_strikethrough.png +0 -0
  334. data/app/assets/images/wymeditor/skins/refinery/text_subscript.png +0 -0
  335. data/app/assets/images/wymeditor/skins/refinery/text_superscript.png +0 -0
  336. data/app/assets/images/wymeditor/skins/refinery/text_underline.png +0 -0
  337. data/app/assets/images/wymeditor/skins/wymeditor_icon.png +0 -0
  338. data/app/assets/javascripts/refinery/boot_wym.js.erb +0 -285
  339. data/app/assets/javascripts/refinery/sortable_menu.js.coffee.erb +0 -20
  340. data/app/assets/javascripts/refinery/wymeditor.js +0 -37
  341. data/app/assets/javascripts/wymeditor/GPL-license.txt +0 -278
  342. data/app/assets/javascripts/wymeditor/MIT-license.txt +0 -20
  343. data/app/assets/javascripts/wymeditor/README +0 -35
  344. data/app/assets/javascripts/wymeditor/browsers/ie.js.erb +0 -224
  345. data/app/assets/javascripts/wymeditor/browsers/mozilla.js.erb +0 -292
  346. data/app/assets/javascripts/wymeditor/browsers/opera.js.erb +0 -123
  347. data/app/assets/javascripts/wymeditor/browsers/webkit.js.erb +0 -283
  348. data/app/assets/javascripts/wymeditor/classes.js.erb +0 -1575
  349. data/app/assets/javascripts/wymeditor/functions.js.erb +0 -222
  350. data/app/assets/javascripts/wymeditor/lang/bg.js +0 -57
  351. data/app/assets/javascripts/wymeditor/lang/ca.js +0 -45
  352. data/app/assets/javascripts/wymeditor/lang/cs.js +0 -58
  353. data/app/assets/javascripts/wymeditor/lang/da.js +0 -48
  354. data/app/assets/javascripts/wymeditor/lang/de.js +0 -45
  355. data/app/assets/javascripts/wymeditor/lang/en.js +0 -57
  356. data/app/assets/javascripts/wymeditor/lang/es.js +0 -58
  357. data/app/assets/javascripts/wymeditor/lang/fa.js +0 -46
  358. data/app/assets/javascripts/wymeditor/lang/fi.js +0 -57
  359. data/app/assets/javascripts/wymeditor/lang/fr.js +0 -58
  360. data/app/assets/javascripts/wymeditor/lang/he.js +0 -45
  361. data/app/assets/javascripts/wymeditor/lang/hu.js +0 -45
  362. data/app/assets/javascripts/wymeditor/lang/it.js +0 -48
  363. data/app/assets/javascripts/wymeditor/lang/ja.js +0 -47
  364. data/app/assets/javascripts/wymeditor/lang/lv.js +0 -47
  365. data/app/assets/javascripts/wymeditor/lang/nb.js +0 -48
  366. data/app/assets/javascripts/wymeditor/lang/nl.js +0 -57
  367. data/app/assets/javascripts/wymeditor/lang/nn.js +0 -45
  368. data/app/assets/javascripts/wymeditor/lang/pl.js +0 -56
  369. data/app/assets/javascripts/wymeditor/lang/pt-BR.js +0 -58
  370. data/app/assets/javascripts/wymeditor/lang/pt.js +0 -45
  371. data/app/assets/javascripts/wymeditor/lang/rs.js +0 -47
  372. data/app/assets/javascripts/wymeditor/lang/ru.js +0 -57
  373. data/app/assets/javascripts/wymeditor/lang/sk.js +0 -56
  374. data/app/assets/javascripts/wymeditor/lang/sl.js +0 -47
  375. data/app/assets/javascripts/wymeditor/lang/sv.js +0 -45
  376. data/app/assets/javascripts/wymeditor/lang/tr.js +0 -45
  377. data/app/assets/javascripts/wymeditor/lang/vi.js +0 -47
  378. data/app/assets/javascripts/wymeditor/lang/zh-CN.js +0 -47
  379. data/app/assets/javascripts/wymeditor/prototypes.js.erb +0 -1103
  380. data/app/assets/javascripts/wymeditor/setup.js.erb +0 -622
  381. data/app/assets/javascripts/wymeditor/skins/refinery/skin.js +0 -45
  382. data/app/assets/javascripts/wymeditor/validators.js.erb +0 -777
  383. data/app/assets/stylesheets/refinery/refinery.css +0 -15
  384. data/app/assets/stylesheets/refinery/site_bar.css.scss +0 -92
  385. data/app/assets/stylesheets/refinery/ui.css.scss +0 -103
  386. data/app/assets/stylesheets/wymeditor/skins/refinery/skin.css.scss +0 -530
  387. data/app/assets/stylesheets/wymeditor/skins/refinery/wymiframe.css.scss +0 -156
  388. data/app/helpers/refinery/admin/core_helper.rb +0 -6
  389. data/app/helpers/refinery/admin/dialogs_helper.rb +0 -6
  390. data/app/helpers/refinery/fast_helper.rb +0 -4
  391. data/app/helpers/refinery/sitemap_helper.rb +0 -4
  392. data/app/views/refinery/wymiframe.html.erb +0 -14
  393. data/lib/generators/refinery/form/USAGE +0 -20
  394. data/lib/generators/refinery/form/form_generator.rb +0 -25
  395. data/lib/generators/refinery/form/templates/.gitignore +0 -2
  396. data/lib/generators/refinery/form/templates/app/controllers/refinery/namespace/admin/plural_name_controller.rb.erb +0 -54
  397. data/lib/generators/refinery/form/templates/app/controllers/refinery/namespace/admin/settings_controller.rb.erb +0 -45
  398. data/lib/generators/refinery/form/templates/app/controllers/refinery/namespace/plural_name_controller.rb.erb +0 -53
  399. data/lib/generators/refinery/form/templates/app/mailers/refinery/namespace/mailer.rb.erb +0 -22
  400. data/lib/generators/refinery/form/templates/app/models/refinery/namespace/setting.rb.erb +0 -34
  401. data/lib/generators/refinery/form/templates/app/models/refinery/namespace/singular_name.rb.erb +0 -49
  402. data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/plural_name/_records.html.erb +0 -23
  403. data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/plural_name/_singular_name.html.erb +0 -25
  404. data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/plural_name/_submenu.html.erb +0 -29
  405. data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/plural_name/index.html.erb +0 -4
  406. data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/plural_name/show.html.erb +0 -52
  407. data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/plural_name/spam.html.erb +0 -27
  408. data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/settings/_confirmation_email_form.html.erb +0 -51
  409. data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/settings/_notification_recipients_form.html.erb +0 -21
  410. data/lib/generators/refinery/form/templates/app/views/refinery/namespace/admin/settings/edit.html.erb +0 -5
  411. data/lib/generators/refinery/form/templates/app/views/refinery/namespace/mailer/confirmation.html.erb +0 -1
  412. data/lib/generators/refinery/form/templates/app/views/refinery/namespace/mailer/notification.html.erb +0 -17
  413. data/lib/generators/refinery/form/templates/app/views/refinery/namespace/plural_name/new.html.erb +0 -43
  414. data/lib/generators/refinery/form/templates/app/views/refinery/namespace/plural_name/thank_you.html.erb +0 -1
  415. data/lib/generators/refinery/form/templates/config/locales/cs.yml +0 -78
  416. data/lib/generators/refinery/form/templates/config/locales/da.yml +0 -66
  417. data/lib/generators/refinery/form/templates/config/locales/de.yml +0 -78
  418. data/lib/generators/refinery/form/templates/config/locales/en.yml +0 -78
  419. data/lib/generators/refinery/form/templates/config/locales/es.yml +0 -66
  420. data/lib/generators/refinery/form/templates/config/locales/fr.yml +0 -78
  421. data/lib/generators/refinery/form/templates/config/locales/it.yml +0 -66
  422. data/lib/generators/refinery/form/templates/config/locales/lv.yml +0 -77
  423. data/lib/generators/refinery/form/templates/config/locales/nb.yml +0 -75
  424. data/lib/generators/refinery/form/templates/config/locales/nl.yml +0 -78
  425. data/lib/generators/refinery/form/templates/config/locales/pt-BR.yml +0 -78
  426. data/lib/generators/refinery/form/templates/config/locales/ru.yml +0 -77
  427. data/lib/generators/refinery/form/templates/config/locales/sk.yml +0 -78
  428. data/lib/generators/refinery/form/templates/config/locales/sl.yml +0 -67
  429. data/lib/generators/refinery/form/templates/config/locales/tr.yml +0 -78
  430. data/lib/generators/refinery/form/templates/config/locales/zh-CN.yml +0 -78
  431. data/lib/generators/refinery/form/templates/config/routes.rb.erb +0 -26
  432. data/lib/generators/refinery/form/templates/db/migrate/1_create_plural_name.rb.erb +0 -39
  433. data/lib/generators/refinery/form/templates/db/seeds.rb.erb +0 -31
  434. data/lib/generators/refinery/form/templates/lib/generators/refinery/plural_name_generator.rb.erb +0 -20
  435. data/lib/generators/refinery/form/templates/lib/refinery/plural_name.rb.erb +0 -18
  436. data/lib/generators/refinery/form/templates/lib/refinery/plural_name/engine.rb.erb +0 -27
  437. data/lib/generators/refinery/form/templates/lib/refinerycms-plural_name.rb.erb +0 -1
  438. data/lib/generators/refinery/form/templates/refinerycms-plural_name.gemspec +0 -16
  439. data/lib/generators/refinery/form/templates/script/rails +0 -10
  440. data/lib/refinery/activity.rb +0 -113
  441. data/lib/refinery/ext/action_view/helpers/form_builder.rb +0 -9
  442. data/lib/refinery/ext/action_view/helpers/form_helper.rb +0 -20
  443. data/lib/refinery/ext/action_view/helpers/form_tag_helper.rb +0 -10
  444. data/spec/controllers/refinery/admin/refinery_core_controller_spec.rb +0 -19
  445. data/spec/controllers/refinery/fast_controller_spec.rb +0 -12
  446. data/spec/lib/generators/refinery/form/form_generator_spec.rb +0 -99
  447. data/spec/lib/refinery/activity_spec.rb +0 -46
  448. data/spec/support/background_selenium_firefox_driver.rb +0 -14
  449. data/vendor/assets/javascripts/jquery/jquery.jcarousel.js +0 -900
@@ -1,13 +1,8 @@
1
1
  module Refinery
2
2
  module Admin
3
3
  class CoreController < ::Refinery::AdminController
4
- def update_plugin_positions
5
- params[:menu].each_with_index do |plugin_name, index|
6
- if (plugin = current_refinery_user.plugins.find_by_name(plugin_name))
7
- plugin.update_attributes :position => index
8
- end
9
- end
10
- render :nothing => true
4
+ def index
5
+ redirect_to refinery_admin_root_path
11
6
  end
12
7
  end
13
8
  end
@@ -3,10 +3,10 @@ module ::Refinery
3
3
  class DialogsController < ::Refinery::AdminController
4
4
  TYPES = %w[image link]
5
5
 
6
- before_filter :find_dialog_type, :find_iframe_src, :only => [:show]
6
+ before_action :find_dialog_type, :find_iframe_src, :only => [:show]
7
7
 
8
8
  def index
9
- redirect_to refinery.admin_root_path
9
+ redirect_to Refinery::Core.backend_path
10
10
  end
11
11
 
12
12
  def show
@@ -18,6 +18,7 @@ module ::Refinery
18
18
  end
19
19
 
20
20
  protected
21
+
21
22
  def find_dialog_type
22
23
  error_404 if TYPES.exclude? params[:id].downcase
23
24
 
@@ -35,7 +36,7 @@ module ::Refinery
35
36
  end
36
37
 
37
38
  def url_params
38
- params.reject {|key, value| /(action)|(controller)/ === key}.
39
+ params.reject { |key, value| /(action)|(controller)/ === key}.
39
40
  merge :id => nil
40
41
  end
41
42
 
@@ -3,7 +3,6 @@
3
3
  module Refinery
4
4
  class AdminController < ::ActionController::Base
5
5
  include ::Refinery::ApplicationController
6
- helper ApplicationHelper
7
6
  helper Refinery::Core::Engine.helpers
8
7
  include Refinery::Admin::BaseController
9
8
 
@@ -1,10 +1,6 @@
1
1
  module Refinery
2
2
  class FastController < ActionController::Base
3
3
 
4
- def wymiframe
5
- render :template => "/refinery/wymiframe", :layout => false
6
- end
7
-
8
4
  def message
9
5
  render :partial => '/refinery/message', :layout => false
10
6
  end
@@ -0,0 +1,13 @@
1
+ module Refinery
2
+ module Admin
3
+ module VisualEditorHelper
4
+ def visual_editor_javascripts
5
+ Refinery::Core.visual_editor_javascripts.uniq
6
+ end
7
+
8
+ def visual_editor_stylesheets
9
+ Refinery::Core.visual_editor_stylesheets.uniq(&:path)
10
+ end
11
+ end
12
+ end
13
+ end
@@ -6,5 +6,9 @@ module Refinery
6
6
  ::I18n.locale
7
7
  end
8
8
 
9
+ def locale_country(locale)
10
+ locale.to_s.upcase.split('-').last
11
+ end
12
+
9
13
  end
10
14
  end
@@ -1,11 +1,11 @@
1
1
  module Refinery
2
2
  module CustomAssetsHelper
3
3
  def custom_javascripts
4
- ::Refinery::Core.javascripts
4
+ ::Refinery::Core.javascripts.uniq
5
5
  end
6
6
 
7
7
  def custom_stylesheets
8
- ::Refinery::Core.stylesheets
8
+ ::Refinery::Core.stylesheets.uniq(&:path)
9
9
  end
10
10
  end
11
11
  end
@@ -20,15 +20,16 @@ module Refinery
20
20
  # Say for example that we had a @model.image (@model having a belongs_to :image relationship)
21
21
  # and we wanted to display a thumbnail cropped to 200x200 then we can use image_fu like this:
22
22
  # <%= image_fu @model.image, '200x200' %> or with no thumbnail: <%= image_fu @model.image %>
23
- def image_fu(image, geometry = nil, options={})
24
- if image.present?
25
- dimensions = (image.thumbnail_dimensions(geometry) rescue {})
23
+ def image_fu(image, geometry = nil, options = {})
24
+ return nil if image.blank?
26
25
 
27
- image_tag(image.thumbnail(:geometry => geometry,
28
- :strip => options[:strip]).url, {
29
- :alt => image.respond_to?(:title) ? image.title : image.image_name,
30
- }.merge(dimensions).merge(options))
31
- end
26
+ thumbnail_args = options.slice(:strip)
27
+ thumbnail_args[:geometry] = geometry if geometry
28
+
29
+ image_tag_args = (image.thumbnail_dimensions(geometry) rescue {})
30
+ image_tag_args[:alt] = image.respond_to?(:title) ? image.title : image.image_name
31
+
32
+ image_tag(image.thumbnail(thumbnail_args).url, image_tag_args.merge(options))
32
33
  end
33
34
  end
34
35
  end
@@ -3,7 +3,7 @@ module Refinery
3
3
 
4
4
  # This is used to display the title of the current object (normally a page) in the browser's titlebar.
5
5
  #
6
- def browser_title(yield_title=nil)
6
+ def browser_title(yield_title = nil)
7
7
  [
8
8
  yield_title,
9
9
  @meta.browser_title.presence || @meta.path,
@@ -4,15 +4,29 @@ module Refinery
4
4
  # Generates the link to determine where the site bar switch button returns to.
5
5
  def site_bar_switch_link
6
6
  link_to_if(admin?, t('.switch_to_your_website', site_bar_translate_locale_args),
7
- refinery.root_path(site_bar_translate_locale_args)) do
7
+ refinery.root_path(site_bar_translate_locale_args),
8
+ 'data-no-turbolink' => true) do
8
9
  link_to t('.switch_to_your_website_editor', site_bar_translate_locale_args),
9
- refinery.admin_root_path
10
+ Refinery::Core.backend_path, 'data-no-turbolink' => true
10
11
  end
11
12
  end
12
13
 
14
+ def site_bar_edit_link
15
+ return nil if admin? || @page.nil?
16
+ link_to t('refinery.admin.pages.edit', site_bar_translate_locale_args),
17
+ refinery.admin_edit_page_path(@page.nested_url,
18
+ :switch_locale => (@page.translations.first.locale unless @page.translated_to_default_locale?)),
19
+ 'data-no-turbolink' => true
20
+ end
21
+
13
22
  def site_bar_translate_locale_args
14
23
  { :locale => Refinery::I18n.current_locale }
15
24
  end
16
25
 
26
+ def display_site_bar?
27
+ authorisation_manager.allow?(:read, :site_bar) &&
28
+ "#{controller_name}##{action_name}" !~ %r{preview#show}
29
+ end
30
+
17
31
  end
18
32
  end
@@ -2,11 +2,10 @@ module Refinery
2
2
  module TagHelper
3
3
 
4
4
  # Returns <img class='help' tooltip='Your Input' src='refinery/icons/information.png' />
5
- # Remember to wrap your block with <span class='label_with_help'></span> if you're using a label next to the help tag.
6
- def refinery_help_tag(title='')
7
- title = h(title) unless title.html_safe?
8
5
 
9
- refinery_icon_tag('information', :class => 'help', :tooltip => title)
6
+ # Remember to wrap your block with <span class='label_with_help'></span> if you're using a label next to the help tag.
7
+ def refinery_help_tag(title='Tip')
8
+ action_icon(:info, '#', title.html_safe? ? title : h(title), {tooltip: title})
10
9
  end
11
10
 
12
11
  # This is just a quick wrapper to render an image tag that lives inside refinery/icons.
@@ -16,5 +15,39 @@ module Refinery
16
15
  image_tag "refinery/icons/#{filename}", {:width => 16, :height => 16}.merge(options)
17
16
  end
18
17
 
18
+ def action_icon(action, url, title, options={})
19
+ action_icon_label(action, url, title, options, false)
20
+ end
21
+
22
+ def action_label(action, url, title, options={})
23
+ action_icon_label(action, url, title, options, true)
24
+ end
25
+
26
+ def action_icon_label(action, url, title, options={}, label = true)
27
+ # See icons.scss for defined icons/classes
28
+
29
+ options[:title] = title
30
+ options[:class].presence ? options[:class] << " #{action}_icon " : options[:class] = "#{action}_icon"
31
+ options[:class] << ' icon_label' if label
32
+
33
+ case action
34
+ when :preview
35
+ options[:target] = '_blank'
36
+ when :delete
37
+ options[:method] = :delete
38
+ when :reorder_done
39
+ options[:class] << ' hidden'
40
+ end
41
+
42
+ link_to(label && title || '', url, options)
43
+ end
44
+
45
+ # this stacks the text onto the locale icon (actually a comment balloon)
46
+ def locale_text_icon(text)
47
+ content_tag(:span, class: 'fa-stack') do
48
+ content_tag(:i, '', class: 'fa fa-comment') << content_tag(:strong, text)
49
+ end
50
+ end
51
+
19
52
  end
20
- end
53
+ end
@@ -3,9 +3,11 @@ require 'active_record'
3
3
  module Refinery
4
4
  module Core
5
5
  class BaseModel < ActiveRecord::Base
6
-
7
6
  self.abstract_class = true
8
7
 
8
+ def users_manager
9
+ @users_manager ||= Refinery::Core::UsersManager.new
10
+ end
9
11
  end
10
12
  end
11
13
  end
@@ -5,17 +5,19 @@
5
5
  <body class="<%= action_name %> <%= I18n.locale %>">
6
6
  <%= render '/refinery/site_bar' %>
7
7
  <div id='tooltip_container'></div>
8
- <header id="header">
9
- <%= render 'refinery/admin/menu' %>
10
- </header>
11
- <div id="page_container">
12
- <div id="page">
13
- <div id="content" class="clearfix">
14
- <div id="flash_container">
15
- <%= render '/refinery/no_script' %>
16
- <%= render '/refinery/message' %>
8
+ <div id="admin_container" class="clearfix">
9
+ <header id="header">
10
+ <%= render 'refinery/admin/menu' %>
11
+ </header>
12
+ <div id="page_container">
13
+ <div id="page">
14
+ <div id="content" class="clearfix">
15
+ <div id="flash_container">
16
+ <%= render '/refinery/no_script' %>
17
+ <%= render '/refinery/message' %>
18
+ </div>
19
+ <%= yield %>
17
20
  </div>
18
- <%= yield %>
19
21
  </div>
20
22
  </div>
21
23
  </div>
@@ -4,11 +4,8 @@
4
4
  <%= render '/refinery/admin/dialog_success' %>
5
5
  <% else %>
6
6
  <%= render '/refinery/admin/head' %>
7
- <body id='dialog_container' class='dialog <%= I18n.locale %><%= ' wym_iframe_body' if params[:wymeditor].presence %>'>
7
+ <body id='dialog_container' class='dialog <%= I18n.locale %><%= ' visual_editor_iframe_body' if params[:visual_editor].presence %>'>
8
8
  <div id='tooltip_container'></div>
9
- <div id="flash_container">
10
- <%= render '/refinery/message' %>
11
- </div>
12
9
  <div id='content' class='clearfix'>
13
10
  <%= yield %>
14
11
  </div>
@@ -2,4 +2,4 @@
2
2
  :hide_sections => local_assigns[:hide_sections],
3
3
  :can_use_fallback => !local_assigns[:show_empty_sections] && !local_assigns[:remove_automatic_sections]
4
4
  }) %>
5
- <%= render '/refinery/draft_page_message' unless @page.try(:live?) -%>
5
+ <%= render '/refinery/draft_page_message' if @page && @page.draft? -%>
@@ -1,15 +1,14 @@
1
1
  <% page_code = Refinery::Core.google_analytics_page_code.to_s.strip %>
2
- <% unless local_request? or refinery_user? or page_code =~ /^(UA-xxxxxx-x)?$/ -%>
2
+ <% unless local_request? or admin? or page_code =~ /^(UA-xxxxxx-x)?$/ -%>
3
3
  <!-- asynchronous google analytics snippet -->
4
4
  <script type="text/javascript">
5
- var _gaq = _gaq || [];
6
- _gaq.push(['_setAccount', '<%= page_code %>']);
7
- _gaq.push(['_trackPageview']);
5
+ (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
6
+ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
7
+ m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
8
+ })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
8
9
 
9
- (function() {
10
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
11
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
12
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
13
- })();
10
+ ga('create', '<%= page_code %>', 'auto');
11
+ ga('send', 'pageview');
14
12
  </script>
13
+ <!-- End Google Analytics -->
15
14
  <% end -%>
@@ -2,7 +2,7 @@
2
2
  <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><![endif]-->
3
3
  <title><%= browser_title(yield(:title)) %></title>
4
4
  <%= raw %(<meta name="description" content="#{@meta.meta_description}" />) if @meta.meta_description.present? -%>
5
- <%= raw %(<link rel="canonical" content="#{@canonical}" />) if @canonical.present? -%>
5
+ <%= raw %(<link rel="canonical" href="#{request.protocol}#{request.host_with_port}#{@canonical}" />) if @canonical.present? -%>
6
6
  <%= csrf_meta_tags if Refinery::Core.authenticity_token_on_frontend -%>
7
7
  <%= yield :meta %>
8
8
 
@@ -1,17 +1,2 @@
1
- <% if content_for? :before_javascript_libraries %>
2
- <% Refinery.deprecate "content_for :before_javascript_libraries", :when => '2.2', :replacement => "content_for :javascripts" %>
3
- <% content_for :javascripts, yield(:before_javascript_libraries) %>
4
- <% end %>
5
-
6
- <% if content_for? :javascript_libraries %>
7
- <% Refinery.deprecate "content_for :javascript_libraries", :when => '2.2', :replacement => "content_for :javascripts" %>
8
- <% content_for :javascripts, yield(:javascript_libraries) %>
9
- <% end %>
10
-
11
- <% if content_for? :after_javascript_libraries %>
12
- <% Refinery.deprecate "content_for :after_javascript_libraries", :when => '2.2', :replacement => "content_for :javascripts" %>
13
- <% content_for :javascripts, yield(:after_javascript_libraries) %>
14
- <% end %>
15
-
16
1
  <%= javascript_include_tag 'application' %>
17
2
  <%= yield :javascripts -%>
@@ -1,5 +1,5 @@
1
1
  <% flash.each do |key, value| %>
2
- <div id='flash' class="flash flash_<%= key %>" style='visibility: hidden;' >
2
+ <div id='flash' class="flash flash_<%= key %>">
3
3
  <%= value %>
4
4
  <%= link_to t(".close#{'_this_message' if key.to_s == "message"}"), "",
5
5
  :id => "flash_close" %>
@@ -1,17 +1,19 @@
1
- <% if refinery_user? && "#{controller_name}##{action_name}" !~ %r{preview#show} %>
1
+ <% if display_site_bar? %>
2
2
  <% unless admin? # all required JS included by backend. %>
3
3
  <% content_for :stylesheets, stylesheet_link_tag('refinery/site_bar') unless !!local_assigns[:exclude_css] %>
4
4
  <%= yield(:stylesheets) unless local_assigns[:head] || local_assigns[:exclude_css] %>
5
5
  <% end -%>
6
6
  <div id='site_bar'>
7
7
  <div id='site_bar_content' class='clearfix'>
8
+
8
9
  <div id='editor_switch'>
9
10
  <%= site_bar_switch_link -%>
11
+ <%= site_bar_edit_link -%>
10
12
  </div>
11
- <%= link_to image_tag("#{"http://refinerycms.com/images/" unless local_request? || request.ssl? }refinery/logo-site-bar.png", :alt => "Refinery (tm) Content Manager"),
12
- 'http://refinerycms.com',
13
- :target => '_blank',
14
- :id => 'site_bar_refinery_cms_logo' %>
13
+
14
+ <%= link_to 'http://refinerycms.com', :id => 'site_bar_refinery_cms_logo', :target => '_blank' do %>
15
+ <span>Refinery CMS™</span>
16
+ <% end %>
15
17
 
16
18
  <div id='site_bar_branding'>
17
19
  <span id='site_bar_company_name'>
@@ -19,7 +21,8 @@
19
21
  </span>
20
22
 
21
23
  <%= link_to t('.log_out', site_bar_translate_locale_args),
22
- refinery.logout_path, :id => 'logout' %>
24
+ ::Refinery::Core.refinery_logout_path,
25
+ :id => 'logout' if ::Refinery::Core.refinery_logout_path.present? %>
23
26
  </div>
24
27
  </div>
25
28
  </div>
@@ -1,13 +1,13 @@
1
1
  <% if object.errors.any? %>
2
- <div class="errorExplanation" id="errorExplanation">
2
+ <div class="errorExplanation error_icon" id="errorExplanation">
3
3
  <p><%= t('.problems_in_following_fields') %>:</p>
4
4
  <ul>
5
- <% unless defined?(include_object_name) and include_object_name %>
6
- <% object.errors.each do |key, value| %>
5
+ <% if defined?(include_object_name) and include_object_name %>
6
+ <% object.errors.full_messages.each do |value| %>
7
7
  <li><%= value %></li>
8
8
  <% end %>
9
9
  <% else %>
10
- <% object.errors.full_messages.each do |value| %>
10
+ <% object.errors.each do |key, value| %>
11
11
  <li><%= value %></li>
12
12
  <% end %>
13
13
  <% end %>
@@ -57,6 +57,7 @@
57
57
  :class => "close_dialog button") unless hide_cancel %>
58
58
 
59
59
  <%= local_assigns[:after_cancel_button] -%>
60
+ <i id='spinner' class='loading_icon hidden_icon'></i>
60
61
  </div>
61
62
  <div class='form-actions-right'>
62
63
  <%= local_assigns[:before_delete_button] -%>
@@ -1,12 +1,11 @@
1
1
  <div id="more_options_field" >
2
2
  <p>
3
- <%= link_to t('.advanced_options'), '#',
4
- :id => 'toggle_advanced_options',
5
- :title => t('.toggle_advanced_options') %>
6
- </p>
3
+ <%= action_label(:settings, '#', t('.toggle_advanced_options'), id: 'toggle_advanced_options') %>
4
+
7
5
  <span id="draft_field">
8
6
  <%= f.check_box :draft %>
9
7
  <%= f.label :draft, t('.save_as_draft'),
10
8
  :class => 'stripped' %>
11
9
  </span>
10
+ </p>
12
11
  </div>