refinerycms-core 0.9.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (305) hide show
  1. data/app/controllers/admin/base_controller.rb +10 -0
  2. data/app/controllers/admin/dialogs_controller.rb +26 -0
  3. data/app/controllers/admin/refinery_core_controller.rb +12 -0
  4. data/app/controllers/application_controller.rb +6 -0
  5. data/app/controllers/refinery/fast_controller.rb +9 -0
  6. data/app/controllers/sitemap_controller.rb +14 -0
  7. data/app/helpers/application_helper.rb +5 -0
  8. data/app/views/admin/_head.html.erb +43 -0
  9. data/app/views/admin/_javascripts.html.erb +32 -0
  10. data/app/views/admin/_menu.html.erb +17 -0
  11. data/app/views/admin/dialogs/show.html.erb +19 -0
  12. data/app/views/layouts/admin.html.erb +24 -0
  13. data/app/views/layouts/admin_dialog.html.erb +14 -0
  14. data/app/views/layouts/application.html.erb +21 -0
  15. data/app/views/shared/_content_page.html.erb +63 -0
  16. data/app/views/shared/_draft_page_message.html.erb +3 -0
  17. data/app/views/shared/_footer.html.erb +4 -0
  18. data/app/views/shared/_google_analytics.html.erb +8 -0
  19. data/app/views/shared/_head.html.erb +42 -0
  20. data/app/views/shared/_header.html.erb +8 -0
  21. data/app/views/shared/_html_tag.html.erb +6 -0
  22. data/app/views/shared/_ie6check.html.erb +63 -0
  23. data/app/views/shared/_javascripts.html.erb +10 -0
  24. data/app/views/shared/_menu.html.erb +30 -0
  25. data/app/views/shared/_menu_branch.html.erb +26 -0
  26. data/app/views/shared/_message.html.erb +10 -0
  27. data/app/views/shared/_no_script.html.erb +9 -0
  28. data/app/views/shared/_site_bar.html.erb +25 -0
  29. data/app/views/shared/admin/_continue_editing.html.erb +3 -0
  30. data/app/views/shared/admin/_error_messages.html.erb +16 -0
  31. data/app/views/shared/admin/_form_actions.html.erb +75 -0
  32. data/app/views/shared/admin/_image_picker.html.erb +60 -0
  33. data/app/views/shared/admin/_make_sortable.html.erb +13 -0
  34. data/app/views/shared/admin/_resource_picker.html.erb +66 -0
  35. data/app/views/shared/admin/_search.html.erb +6 -0
  36. data/app/views/shared/admin/_sortable_list.html.erb +7 -0
  37. data/app/views/shared/admin/_tabbed_fields.html.erb +42 -0
  38. data/app/views/welcome.html.erb +17 -0
  39. data/app/views/wymiframe.html.erb +15 -0
  40. data/config/locales/cs.yml +77 -0
  41. data/config/locales/da.yml +75 -0
  42. data/config/locales/de.yml +75 -0
  43. data/config/locales/el.yml +75 -0
  44. data/config/locales/en.yml +75 -0
  45. data/config/locales/es.yml +68 -0
  46. data/config/locales/fr.yml +72 -0
  47. data/config/locales/it.yml +96 -0
  48. data/config/locales/lolcat.yml +68 -0
  49. data/config/locales/lt.yml +75 -0
  50. data/config/locales/lv.yml +72 -0
  51. data/config/locales/nb.yml +75 -0
  52. data/config/locales/nl.yml +75 -0
  53. data/config/locales/pl.yml +75 -0
  54. data/config/locales/pt-BR.yml +72 -0
  55. data/config/locales/rs.yml +76 -0
  56. data/config/locales/ru.yml +71 -0
  57. data/config/locales/sl.yml +72 -0
  58. data/config/locales/sv.yml +75 -0
  59. data/config/locales/vi.yml +75 -0
  60. data/config/locales/zh-CN.yml +75 -0
  61. data/config/locales/zh-TW.yml +75 -0
  62. data/config/routes.rb +19 -0
  63. data/crud.md +197 -0
  64. data/doc/included-jquery-ui-packages.jpg +0 -0
  65. data/engines.md +179 -0
  66. data/features/search.feature +55 -0
  67. data/features/site_bar.feature +24 -0
  68. data/features/step_definitions/core_steps.rb +61 -0
  69. data/features/support/paths.rb +14 -0
  70. data/features/uploads/beach.jpeg +0 -0
  71. data/features/uploads/refinery_is_awesome.txt +1 -0
  72. data/lib/gemspec.rb +43 -0
  73. data/lib/generators/refinerycms_generator.rb +110 -0
  74. data/lib/generators/templates/.gitignore +83 -0
  75. data/lib/generators/templates/app/views/sitemap/index.xml.builder +22 -0
  76. data/lib/generators/templates/autotest/autotest.rb +17 -0
  77. data/lib/generators/templates/autotest/discover.rb +2 -0
  78. data/lib/generators/templates/config/database.yml.mysql +20 -0
  79. data/lib/generators/templates/config/database.yml.postgresql +57 -0
  80. data/lib/generators/templates/config/database.yml.sqlite3 +26 -0
  81. data/lib/generators/templates/config/i18n-js.yml +6 -0
  82. data/lib/generators/templates/config/initializers/devise.rb +142 -0
  83. data/lib/generators/templates/config/settings.rb +2 -0
  84. data/lib/generators/templates/db/seeds.rb +5 -0
  85. data/lib/refinery/activity.rb +45 -0
  86. data/lib/refinery/admin/base_controller.rb +111 -0
  87. data/lib/refinery/admin_base_controller.rb +5 -0
  88. data/lib/refinery/application.rb +48 -0
  89. data/lib/refinery/application_controller.rb +120 -0
  90. data/lib/refinery/application_helper.rb +19 -0
  91. data/lib/refinery/base_presenter.rb +27 -0
  92. data/lib/refinery/catch_all_routes.rb +11 -0
  93. data/lib/refinery/crud.rb +295 -0
  94. data/lib/refinery/helpers/form_helper.rb +66 -0
  95. data/lib/refinery/helpers/head_helper.rb +17 -0
  96. data/lib/refinery/helpers/html_truncation_helper.rb +25 -0
  97. data/lib/refinery/helpers/image_helper.rb +49 -0
  98. data/lib/refinery/helpers/menu_helper.rb +68 -0
  99. data/lib/refinery/helpers/meta_helper.rb +67 -0
  100. data/lib/refinery/helpers/pagination_helper.rb +16 -0
  101. data/lib/refinery/helpers/script_helper.rb +36 -0
  102. data/lib/refinery/helpers/site_bar_helper.rb +24 -0
  103. data/lib/refinery/helpers/tag_helper.rb +21 -0
  104. data/lib/refinery/helpers/translation_helper.rb +17 -0
  105. data/lib/refinery/link_renderer.rb +55 -0
  106. data/lib/refinery/plugin.rb +106 -0
  107. data/lib/refinery/plugins.rb +75 -0
  108. data/lib/refinerycms-core.rb +156 -0
  109. data/lib/tasks/doc.rake +29 -0
  110. data/lib/tasks/refinery.rake +231 -0
  111. data/lib/tasks/yard.rake +30 -0
  112. data/license.md +21 -0
  113. data/public/404.html +26 -0
  114. data/public/422.html +26 -0
  115. data/public/500.html +26 -0
  116. data/public/favicon.ico +0 -0
  117. data/public/images/refinery/add.png +0 -0
  118. data/public/images/refinery/admin_bg.png +0 -0
  119. data/public/images/refinery/ajax-loader.gif +0 -0
  120. data/public/images/refinery/branch-end.gif +0 -0
  121. data/public/images/refinery/branch-start.gif +0 -0
  122. data/public/images/refinery/branch.gif +0 -0
  123. data/public/images/refinery/carousel-left.png +0 -0
  124. data/public/images/refinery/carousel-right.png +0 -0
  125. data/public/images/refinery/cross.png +0 -0
  126. data/public/images/refinery/dialogLoadingAnimation.gif +0 -0
  127. data/public/images/refinery/header_background.png +0 -0
  128. data/public/images/refinery/hover-gradient.jpg +0 -0
  129. data/public/images/refinery/icons/accept.png +0 -0
  130. data/public/images/refinery/icons/add.png +0 -0
  131. data/public/images/refinery/icons/ajax-loader.gif +0 -0
  132. data/public/images/refinery/icons/application_edit.png +0 -0
  133. data/public/images/refinery/icons/application_go.png +0 -0
  134. data/public/images/refinery/icons/arrow_left.png +0 -0
  135. data/public/images/refinery/icons/arrow_switch.png +0 -0
  136. data/public/images/refinery/icons/arrow_up.png +0 -0
  137. data/public/images/refinery/icons/bin.png +0 -0
  138. data/public/images/refinery/icons/bin_closed.png +0 -0
  139. data/public/images/refinery/icons/cancel.png +0 -0
  140. data/public/images/refinery/icons/cog_add.png +0 -0
  141. data/public/images/refinery/icons/cog_edit.png +0 -0
  142. data/public/images/refinery/icons/cross.png +0 -0
  143. data/public/images/refinery/icons/delete.png +0 -0
  144. data/public/images/refinery/icons/doc.png +0 -0
  145. data/public/images/refinery/icons/down.gif +0 -0
  146. data/public/images/refinery/icons/edit.png +0 -0
  147. data/public/images/refinery/icons/email.png +0 -0
  148. data/public/images/refinery/icons/email_edit.png +0 -0
  149. data/public/images/refinery/icons/email_go.png +0 -0
  150. data/public/images/refinery/icons/email_open.png +0 -0
  151. data/public/images/refinery/icons/eye.png +0 -0
  152. data/public/images/refinery/icons/folder_page_white.png +0 -0
  153. data/public/images/refinery/icons/image_add.png +0 -0
  154. data/public/images/refinery/icons/image_edit.png +0 -0
  155. data/public/images/refinery/icons/img.png +0 -0
  156. data/public/images/refinery/icons/information.png +0 -0
  157. data/public/images/refinery/icons/layout_add.png +0 -0
  158. data/public/images/refinery/icons/layout_edit.png +0 -0
  159. data/public/images/refinery/icons/music.png +0 -0
  160. data/public/images/refinery/icons/page_add.png +0 -0
  161. data/public/images/refinery/icons/page_edit.png +0 -0
  162. data/public/images/refinery/icons/page_white_edit.png +0 -0
  163. data/public/images/refinery/icons/page_white_gear.png +0 -0
  164. data/public/images/refinery/icons/page_white_put.png +0 -0
  165. data/public/images/refinery/icons/pdf.png +0 -0
  166. data/public/images/refinery/icons/ppt.png +0 -0
  167. data/public/images/refinery/icons/star.png +0 -0
  168. data/public/images/refinery/icons/tick.png +0 -0
  169. data/public/images/refinery/icons/up.gif +0 -0
  170. data/public/images/refinery/icons/user_add.png +0 -0
  171. data/public/images/refinery/icons/user_comment.png +0 -0
  172. data/public/images/refinery/icons/user_edit.png +0 -0
  173. data/public/images/refinery/icons/xls.png +0 -0
  174. data/public/images/refinery/icons/zip.png +0 -0
  175. data/public/images/refinery/icons/zoom.png +0 -0
  176. data/public/images/refinery/logo-large.png +0 -0
  177. data/public/images/refinery/logo-medium.png +0 -0
  178. data/public/images/refinery/logo-site-bar.png +0 -0
  179. data/public/images/refinery/logo-small-medium.png +0 -0
  180. data/public/images/refinery/logo-small.png +0 -0
  181. data/public/images/refinery/logo-tiny.png +0 -0
  182. data/public/images/refinery/logo.png +0 -0
  183. data/public/images/refinery/nav-3-background.gif +0 -0
  184. data/public/images/refinery/nav_inactive_background.png +0 -0
  185. data/public/images/refinery/orange_button.png +0 -0
  186. data/public/images/refinery/page_bg.png +0 -0
  187. data/public/images/refinery/resolve_digital_footer_logo.png +0 -0
  188. data/public/images/refinery/text_field_background.png +0 -0
  189. data/public/images/refinery/tooltip-nib.gif +0 -0
  190. data/public/images/refinery/tooltip-nib.png +0 -0
  191. data/public/images/wymeditor/skins/refinery/arrow_redo.png +0 -0
  192. data/public/images/wymeditor/skins/refinery/arrow_undo.png +0 -0
  193. data/public/images/wymeditor/skins/refinery/eye.png +0 -0
  194. data/public/images/wymeditor/skins/refinery/iframe/lbl-blockquote.png +0 -0
  195. data/public/images/wymeditor/skins/refinery/iframe/lbl-h1.png +0 -0
  196. data/public/images/wymeditor/skins/refinery/iframe/lbl-h2.png +0 -0
  197. data/public/images/wymeditor/skins/refinery/iframe/lbl-h3.png +0 -0
  198. data/public/images/wymeditor/skins/refinery/iframe/lbl-h4.png +0 -0
  199. data/public/images/wymeditor/skins/refinery/iframe/lbl-h5.png +0 -0
  200. data/public/images/wymeditor/skins/refinery/iframe/lbl-h6.png +0 -0
  201. data/public/images/wymeditor/skins/refinery/iframe/lbl-p.png +0 -0
  202. data/public/images/wymeditor/skins/refinery/iframe/lbl-pre.png +0 -0
  203. data/public/images/wymeditor/skins/refinery/link_add.png +0 -0
  204. data/public/images/wymeditor/skins/refinery/link_break.png +0 -0
  205. data/public/images/wymeditor/skins/refinery/page_code.png +0 -0
  206. data/public/images/wymeditor/skins/refinery/page_paste.png +0 -0
  207. data/public/images/wymeditor/skins/refinery/photo_add.png +0 -0
  208. data/public/images/wymeditor/skins/refinery/right.png +0 -0
  209. data/public/images/wymeditor/skins/refinery/style.png +0 -0
  210. data/public/images/wymeditor/skins/refinery/table_add.png +0 -0
  211. data/public/images/wymeditor/skins/refinery/text_align_center.png +0 -0
  212. data/public/images/wymeditor/skins/refinery/text_align_justify.png +0 -0
  213. data/public/images/wymeditor/skins/refinery/text_align_left.png +0 -0
  214. data/public/images/wymeditor/skins/refinery/text_align_right.png +0 -0
  215. data/public/images/wymeditor/skins/refinery/text_bold.png +0 -0
  216. data/public/images/wymeditor/skins/refinery/text_heading_1.png +0 -0
  217. data/public/images/wymeditor/skins/refinery/text_heading_2.png +0 -0
  218. data/public/images/wymeditor/skins/refinery/text_heading_3.png +0 -0
  219. data/public/images/wymeditor/skins/refinery/text_heading_4.png +0 -0
  220. data/public/images/wymeditor/skins/refinery/text_heading_5.png +0 -0
  221. data/public/images/wymeditor/skins/refinery/text_heading_6.png +0 -0
  222. data/public/images/wymeditor/skins/refinery/text_indent.png +0 -0
  223. data/public/images/wymeditor/skins/refinery/text_indent_remove.png +0 -0
  224. data/public/images/wymeditor/skins/refinery/text_italic.png +0 -0
  225. data/public/images/wymeditor/skins/refinery/text_list_bullets.png +0 -0
  226. data/public/images/wymeditor/skins/refinery/text_list_numbers.png +0 -0
  227. data/public/images/wymeditor/skins/refinery/text_paragraph.png +0 -0
  228. data/public/images/wymeditor/skins/refinery/text_strikethrough.png +0 -0
  229. data/public/images/wymeditor/skins/refinery/text_subscript.png +0 -0
  230. data/public/images/wymeditor/skins/refinery/text_superscript.png +0 -0
  231. data/public/images/wymeditor/skins/refinery/text_underline.png +0 -0
  232. data/public/images/wymeditor/skins/wymeditor_icon.png +0 -0
  233. data/public/javascripts/admin.js +7 -0
  234. data/public/javascripts/application.js +1 -0
  235. data/public/javascripts/dd_belatedpng.js +13 -0
  236. data/public/javascripts/i18n-messages.js +2 -0
  237. data/public/javascripts/jquery-min.js +16 -0
  238. data/public/javascripts/jquery-ui-custom-min.js +251 -0
  239. data/public/javascripts/jquery.js +8176 -0
  240. data/public/javascripts/jquery/GPL-LICENSE.txt +278 -0
  241. data/public/javascripts/jquery/MIT-LICENSE.txt +20 -0
  242. data/public/javascripts/jquery/jquery.corner.js +345 -0
  243. data/public/javascripts/jquery/jquery.html5-placeholder-shim.js +88 -0
  244. data/public/javascripts/jquery/jquery.jcarousel.js +900 -0
  245. data/public/javascripts/jquery/jquery.textTruncate.js +174 -0
  246. data/public/javascripts/jquery/jquery.timers.js +138 -0
  247. data/public/javascripts/modernizr-min.js +30 -0
  248. data/public/javascripts/rails.js +175 -0
  249. data/public/javascripts/refinery/admin.js +1114 -0
  250. data/public/javascripts/refinery/boot_wym.js +285 -0
  251. data/public/javascripts/refinery/core.js +18 -0
  252. data/public/javascripts/refinery/i18n.js +340 -0
  253. data/public/javascripts/refinery/nestedsortables.js +164 -0
  254. data/public/javascripts/refinery/serializelist.js +66 -0
  255. data/public/javascripts/refinery/site_bar.js +16 -0
  256. data/public/javascripts/refinery/submenu.js +49 -0
  257. data/public/javascripts/wymeditor/jquery.refinery.wymeditor.js +5156 -0
  258. data/public/javascripts/wymeditor/lang/ca.js +45 -0
  259. data/public/javascripts/wymeditor/lang/cs.js +45 -0
  260. data/public/javascripts/wymeditor/lang/da.js +48 -0
  261. data/public/javascripts/wymeditor/lang/de.js +45 -0
  262. data/public/javascripts/wymeditor/lang/en.js +47 -0
  263. data/public/javascripts/wymeditor/lang/es.js +48 -0
  264. data/public/javascripts/wymeditor/lang/fa.js +46 -0
  265. data/public/javascripts/wymeditor/lang/fr.js +45 -0
  266. data/public/javascripts/wymeditor/lang/he.js +45 -0
  267. data/public/javascripts/wymeditor/lang/hu.js +45 -0
  268. data/public/javascripts/wymeditor/lang/it.js +48 -0
  269. data/public/javascripts/wymeditor/lang/lv.js +47 -0
  270. data/public/javascripts/wymeditor/lang/nb.js +48 -0
  271. data/public/javascripts/wymeditor/lang/nl.js +47 -0
  272. data/public/javascripts/wymeditor/lang/nn.js +45 -0
  273. data/public/javascripts/wymeditor/lang/pl.js +45 -0
  274. data/public/javascripts/wymeditor/lang/pt-BR.js +47 -0
  275. data/public/javascripts/wymeditor/lang/pt.js +45 -0
  276. data/public/javascripts/wymeditor/lang/rs.js +47 -0
  277. data/public/javascripts/wymeditor/lang/ru.js +45 -0
  278. data/public/javascripts/wymeditor/lang/sl.js +47 -0
  279. data/public/javascripts/wymeditor/lang/sv.js +45 -0
  280. data/public/javascripts/wymeditor/lang/tr.js +45 -0
  281. data/public/javascripts/wymeditor/lang/vi.js +47 -0
  282. data/public/javascripts/wymeditor/lang/zh_cn.js +47 -0
  283. data/public/javascripts/wymeditor/skins/refinery/skin.js +48 -0
  284. data/public/robots.txt +3 -0
  285. data/public/stylesheets/application.css +4 -0
  286. data/public/stylesheets/formatting.css +4 -0
  287. data/public/stylesheets/home.css +4 -0
  288. data/public/stylesheets/refinery/application.css +72 -0
  289. data/public/stylesheets/refinery/formatting.css +57 -0
  290. data/public/stylesheets/refinery/home.css +0 -0
  291. data/public/stylesheets/refinery/refinery.css +1579 -0
  292. data/public/stylesheets/refinery/site_bar.css +87 -0
  293. data/public/stylesheets/refinery/submenu.css +22 -0
  294. data/public/stylesheets/refinery/theme.css +36 -0
  295. data/public/stylesheets/refinery/tooltips.css +34 -0
  296. data/public/stylesheets/refinery/ui.css +107 -0
  297. data/public/stylesheets/theme.css +4 -0
  298. data/public/stylesheets/wymeditor/skins/refinery/skin.css +528 -0
  299. data/public/stylesheets/wymeditor/skins/refinery/wymiframe.css +96 -0
  300. data/public/wymeditor/GPL-license.txt +278 -0
  301. data/public/wymeditor/MIT-license.txt +20 -0
  302. data/public/wymeditor/README +35 -0
  303. data/refinerycms-core.gemspec +391 -0
  304. data/spec/lib/refinery/plugins_spec.rb +90 -0
  305. metadata +482 -0
@@ -0,0 +1,10 @@
1
+ # Filters added to this controller apply to all controllers in the refinery backend.
2
+ # Likewise, all the methods added will be available for all controllers in the refinery backend.
3
+
4
+ # You can extend refinery backend with your own functions here and they will likely not get overriden in an update.
5
+
6
+ module Admin
7
+ class BaseController < ActionController::Base
8
+
9
+ end
10
+ end
@@ -0,0 +1,26 @@
1
+ module Admin
2
+ class DialogsController < Admin::BaseController
3
+
4
+ def show
5
+ if (@dialog_type = params[:id].try(:downcase))
6
+ url_params = params.reject {|key, value| key =~ /(action)|(controller)/}
7
+
8
+ @iframe_src = if @dialog_type == 'image'
9
+ insert_admin_images_url(url_params.merge(:id => nil, :modal => true))
10
+ elsif @dialog_type == 'link'
11
+ link_to_admin_pages_dialogs_url(url_params.merge(:id => nil))
12
+ end
13
+
14
+ render :layout => false
15
+
16
+ else
17
+ render :nothing => true
18
+ end
19
+ end
20
+
21
+ def from_dialog?
22
+ true
23
+ end
24
+
25
+ end
26
+ end
@@ -0,0 +1,12 @@
1
+ module Admin
2
+ class RefineryCoreController < Admin::BaseController
3
+ def update_plugin_positions
4
+ params[:menu].each_with_index do |plugin_name, index|
5
+ if (plugin = current_user.plugins.find_by_name(plugin_name))
6
+ plugin.update_attribute(:position, index)
7
+ end
8
+ end
9
+ render :nothing => true
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,6 @@
1
+ # Filters added to this controller apply to all controllers in the application.
2
+ # Likewise, all the methods added will be available for all controllers.
3
+
4
+ class ApplicationController < ActionController::Base
5
+
6
+ end
@@ -0,0 +1,9 @@
1
+ module Refinery
2
+ class FastController < ActionController::Base
3
+
4
+ def wymiframe
5
+ render :template => "/wymiframe", :layout => false
6
+ end
7
+
8
+ end
9
+ end
@@ -0,0 +1,14 @@
1
+ class SitemapController < ::Refinery::FastController
2
+ layout nil
3
+
4
+ def index
5
+ headers['Content-Type'] = 'application/xml'
6
+
7
+ respond_to do |format|
8
+ format.xml do
9
+ @pages = Page.live.includes(:parts)
10
+ end
11
+ end
12
+ end
13
+
14
+ end
@@ -0,0 +1,5 @@
1
+ # Methods added to this helper will be available to all templates in the application.
2
+
3
+ module ApplicationHelper
4
+
5
+ end
@@ -0,0 +1,43 @@
1
+ <%
2
+ if (yielded_head = yield(:head)).present?
3
+ logger.warn "\n-- DEPRECATION WARNING --"
4
+ logger.warn "The use of 'content_for :head' is DEPRECATED for the admin layouts."
5
+ logger.warn "For stylesheets, use content_for :stylesheets"
6
+ logger.warn "For javascripts, use content_for :javascripts"
7
+ logger.warn "For meta tags, use content_for :meta"
8
+ logger.warn "This change is necessary so that we can deliver a performant experience for the user."
9
+ logger.warn "Called from: #{caller.detect{|c| c =~ %r{#{Rails.root.to_s}}}.inspect.to_s.split(':in').first}\n\n"
10
+ end
11
+ if (yielded_head_libraries = yield(:head)).present?
12
+ logger.warn "\n-- DEPRECATION WARNING --"
13
+ logger.warn "The use of 'content_for :head_libraries' is DEPRECATED for the admin layouts."
14
+ logger.warn "Please use content_for :before_javascript_libraries or content_for :after_javascript_libraries instead."
15
+ logger.warn "This change is necessary so that we can deliver a performant experience for the user."
16
+ logger.warn "Called from: #{caller.detect{|c| c =~ %r{#{Rails.root.to_s}}}.inspect.to_s.split(':in').first}\n\n"
17
+ end
18
+ -%>
19
+ <head>
20
+ <meta charset='<%= ::Refinery::Application.config.encoding %>' />
21
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
22
+ <%= yield :meta %>
23
+ <title><%= RefinerySetting.find_or_set(:site_name, 'Company Name') -%> - Refinery</title>
24
+ <%= csrf_meta_tag %>
25
+
26
+ <%= stylesheet_link_tag 'refinery/site_bar',
27
+ 'refinery/refinery',
28
+ 'refinery/ui',
29
+ 'refinery/submenu',
30
+ 'refinery/tooltips',
31
+ 'wymeditor/skins/refinery/skin',
32
+ :cache => ("cache/refinery" if Rails.root.writable? and
33
+ RefinerySetting.find_or_set(:use_resource_caching, true) and
34
+ request.env['HTTP_USER_AGENT'] !~ /MSIE/) -%>
35
+
36
+ <%= yield :stylesheets %>
37
+
38
+ <%= javascript_include_tag 'modernizr-min' %>
39
+
40
+ <% #TODO: REMOVE yielded_head and yielded_head_libraries and deprecation notice 0.9.9 <=> 1.0 %>
41
+ <%= yielded_head_libraries %>
42
+ <%= yielded_head %>
43
+ </head>
@@ -0,0 +1,32 @@
1
+ <%
2
+ js_caching = Rails.root.writable? and RefinerySetting.find_or_set(:use_resource_caching, true)
3
+ login = defined?(login) ? login : login?
4
+ -%>
5
+ <%= yield :before_javascript_libraries -%>
6
+ <%= javascript_include_tag 'refinery/i18n' -%>
7
+ <script>I18n.locale = '<%= I18n.locale %>';</script>
8
+
9
+ <%= jquery_include_tags :caching => js_caching -%>
10
+
11
+ <%= javascript_include_tag 'rails.js' %>
12
+
13
+ <%= javascript_include_tag 'jquery/jquery.corner.js',
14
+ 'jquery/jquery.textTruncate.js',
15
+ 'jquery/jquery.html5-placeholder-shim.js',
16
+ 'jquery/jquery.timers.js',
17
+ 'jquery/jquery.jcarousel.js',
18
+ :cache => ("cache/jquery-plugins" if js_caching) unless login -%>
19
+
20
+ <%= yield :after_javascript_libraries -%>
21
+
22
+ <%= javascript_include_tag 'wymeditor/jquery.refinery.wymeditor.js',
23
+ 'admin',
24
+ 'refinery/boot_wym',
25
+ 'refinery/core',
26
+ 'refinery/site_bar',
27
+ 'refinery/admin',
28
+ 'refinery/submenu',
29
+ :cache => ("cache/admin" if js_caching) unless login -%>
30
+ <%= javascript_include_tag 'refinery/core' if login -%>
31
+
32
+ <%= yield :javascripts -%>
@@ -0,0 +1,17 @@
1
+ <nav id="menu">
2
+ <% Refinery::Plugins.active.in_menu.each do |plugin| -%>
3
+ <%= link_to plugin.title, plugin.url,
4
+ :class => (plugin.highlighted?(params) ? "active" : ""),
5
+ :id => "plugin_#{plugin.name}" %>
6
+ <% end -%>
7
+ <% if Refinery::Plugins.active.in_menu.many? -%>
8
+ <%= link_to refinery_icon_tag('arrow_switch.png'), "",
9
+ :id => "menu_reorder",
10
+ :title => t('.reorder_menu') %>
11
+
12
+ <%= link_to refinery_icon_tag('tick.png'), "",
13
+ :id => "menu_reorder_done",
14
+ :title => t('.reorder_menu_done'),
15
+ :style => "display: none;" %>
16
+ <% end %>
17
+ </nav>
@@ -0,0 +1,19 @@
1
+ <form id='wym_dialog_form' class='wym_dialog wym_dialog_<%= @dialog_type %>'>
2
+ <input type='hidden' id='wym_dialog_type' class='wym_dialog_type' value='<%= @dialog_type %>' />
3
+ <iframe src='<%= @iframe_src %>' id='dialog_frame' frameborder='0' marginheight='0' marginwidth='0' border='0'></iframe>
4
+ <div class='wym_hideables'>
5
+ <% if @dialog_type == "image" %>
6
+ <input type='hidden' id='wym_src' class='wym_src' value='' />
7
+ <input type='hidden' id='wym_alt' class='wym_alt' value='' />
8
+ <input type='hidden' id='wym_title' class='wym_title' value='' />
9
+ <input type='hidden' id='wym_size' class='wym_size' value='' />
10
+ <% elsif @dialog_type == "link" %>
11
+ <input type='hidden' id='wym_href' class='wym_href' value='' />
12
+ <input type='hidden' id='wym_title' class='wym_title' value='' />
13
+ <input type='hidden' id='wym_target' class='wym_target' value='' />
14
+ <% end %>
15
+
16
+ <input id='wym_dialog_submit' class='wym_submit submit_dialog button' type='button' value='<%= t('.save') %>' />
17
+ <a id='wym_dialog_cancel' href='' class='wym_cancel close_dialog button'><%= t('.cancel') %></a>
18
+ </div>
19
+ </form>
@@ -0,0 +1,24 @@
1
+ <!DOCTYPE html>
2
+ <%= render :partial => "/shared/html_tag" %>
3
+ <% content_for :meta, "<meta refinerycms='#{Refinery.version}' />".html_safe %>
4
+ <%= render :partial => "/admin/head" %>
5
+ <body class='<%= action_name %> <%= I18n.locale %>'>
6
+ <%= render :partial => '/shared/site_bar' %>
7
+ <div id='tooltip_container'></div>
8
+ <header>
9
+ <%= render :partial => "/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 :partial => '/shared/no_script' %>
16
+ <%= render :partial => "/shared/message" %>
17
+ </div>
18
+ <%= yield %>
19
+ </div>
20
+ </div>
21
+ </div>
22
+ <%= render :partial => "/admin/javascripts" %>
23
+ </body>
24
+ </html>
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <%= render :partial => "/shared/html_tag" %>
3
+ <%= render :partial => "/admin/head" %>
4
+ <body id='dialog_container' class='dialog <%= I18n.locale %><%= ' wym_iframe_body' if params[:wymeditor].presence %>'>
5
+ <div id='tooltip_container'></div>
6
+ <div id="flash_container">
7
+ <%= render :partial => '/shared/message' %>
8
+ </div>
9
+ <div id='content' class='clearfix'>
10
+ <%= yield %>
11
+ </div>
12
+ <%= render :partial => "/admin/javascripts" %>
13
+ </body>
14
+ </html>
@@ -0,0 +1,21 @@
1
+ <!DOCTYPE html>
2
+ <%= render :partial => "/shared/html_tag" %>
3
+ <% site_bar = render(:partial => "/shared/site_bar", :locals => {:head => true}) -%>
4
+ <%= render :partial => "/shared/head" %>
5
+ <body>
6
+ <%= site_bar -%>
7
+ <%= render :partial => "/shared/ie6check" if request.env['HTTP_USER_AGENT'] =~ /MSIE/ -%>
8
+ <div id="page_container">
9
+ <header>
10
+ <%= render :partial => "/shared/header" -%>
11
+ </header>
12
+ <section id='page'>
13
+ <%= yield %>
14
+ </section>
15
+ <footer>
16
+ <%= render :partial => "/shared/footer" -%>
17
+ </footer>
18
+ </div>
19
+ <%= render :partial => "/shared/javascripts" %>
20
+ </body>
21
+ </html>
@@ -0,0 +1,63 @@
1
+ <%
2
+ # provide a default array for collecting CSS for sections
3
+ css = []
4
+
5
+ # if 'sections' is passed in as a local_assigns, all of this is ignored.
6
+ if local_assigns[:sections].blank?
7
+ # always have a title
8
+ sections = [{:yield => :body_content_title, :fallback => page_title, :title => true}]
9
+
10
+ # append sections from this page.
11
+ @page.parts.inject(sections) do |s, part|
12
+ # we have some default yields, body_content_left and body_content_right
13
+ # these map to 'body' and 'side_body' fields in default Refinery.
14
+ section = {:fallback => part.body}
15
+ section[:yield] = case (title_symbol = part.title.to_s.gsub(/\ /, '').underscore.to_sym)
16
+ when :body then :body_content_left
17
+ when :side_body then :body_content_right
18
+ else title_symbol
19
+ end
20
+
21
+ # add section to the list unless we were specifically requested not to.
22
+ # otherwise, add css saying it's been removed.
23
+ unless (local_assigns[:hide_sections]||=[]).include?(section[:yield])
24
+ s << section
25
+ else
26
+ css << "no_#{section[:yield]}"
27
+ end
28
+ end unless @page.nil? or @page.parts.blank?
29
+
30
+ # Ensure that even without @page.parts we still have body_content_left and body_content_right
31
+ all_yields = sections.collect{|s| s[:yield]}
32
+ sections << {:yield => :body_content_left} unless all_yields.include?(:body_content_left)
33
+ sections << {:yield => :body_content_right} unless all_yields.include?(:body_content_right)
34
+ end
35
+
36
+ # you can add more sections to the list using something like this:
37
+ # sections |= [{:yield => :something_else, :fallback => another_method, :id => 'something'}]
38
+
39
+ sections.each do |section|
40
+ section[:html] = yield(section[:yield]) if section[:yield].present?
41
+
42
+ if section[:html].blank? and !local_assigns[:show_empty_sections] and
43
+ !local_assigns[:remove_automatic_sections] and section.keys.include?(:fallback) and
44
+ section[:fallback].present?
45
+ section[:html] = raw(section[:fallback])
46
+ end
47
+
48
+ dom_id = section[:id] || section[:yield]
49
+ if section[:html].present?
50
+ if section[:title]
51
+ section[:html] = "<h1 id='#{dom_id}'>#{section[:html]}</h1>"
52
+ else
53
+ section[:html] = "<section id='#{dom_id}'>#{section[:html]}</section>"
54
+ end
55
+ else
56
+ css << "no_#{dom_id}"
57
+ end
58
+ end
59
+ -%>
60
+ <section id='body_content'<%= " class='#{css.join(' ')}'" if css.present? %>>
61
+ <%= raw sections.map{|section| section[:html]}.join("\n") -%>
62
+ </section>
63
+ <%= render :partial => '/shared/draft_page_message' unless @page.nil? or @page.live? -%>
@@ -0,0 +1,3 @@
1
+ <aside class='page_not_live'>
2
+ <%= t('.not_live') %>
3
+ </aside>
@@ -0,0 +1,4 @@
1
+ <p>
2
+ <%= t('.copyright', :year => Time.now.year,
3
+ :site_name => RefinerySetting.find_or_set(:site_name, "Company Name")) %>
4
+ </p>
@@ -0,0 +1,8 @@
1
+ <% unless refinery_user? or
2
+ (page_code = RefinerySetting.find_or_set(:analytics_page_code, 'UA-xxxxxx-x').to_s.strip) =~ /^(UA-xxxxxx-x)?$/ -%>
3
+ <!-- asynchronous google analytics: mathiasbynens.be/notes/async-analytics-snippet -->
4
+ <script>var _gaq=[['_setAccount','<%= page_code %>'],['_trackPageview']];(function(d,t){
5
+ var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
6
+ g.async=1;g.src='//www.google-analytics.com/ga.js';s.parentNode.insertBefore(g,s)
7
+ }(document,'script'))</script>
8
+ <% end -%>
@@ -0,0 +1,42 @@
1
+ <%
2
+ if (yielded_head = yield(:head)).present?
3
+ logger.warn "\n-- DEPRECATION WARNING --"
4
+ logger.warn "The use of 'content_for :head' is DEPRECATED for the frontend layouts."
5
+ logger.warn "For stylesheets, use content_for :stylesheets"
6
+ logger.warn "For javascripts, use content_for :javascripts"
7
+ logger.warn "For meta tags, use content_for :meta"
8
+ logger.warn "This change is necessary so that we can deliver a performant experience for the user."
9
+ logger.warn "Called from: #{caller.detect{|c| c =~ %r{#{Rails.root.to_s}}}.inspect.to_s.split(':in').first}\n\n"
10
+ end
11
+ if (yielded_head_libraries = yield(:head)).present?
12
+ logger.warn "\n-- DEPRECATION WARNING --"
13
+ logger.warn "The use of 'content_for :head_libraries' is DEPRECATED for the frontend layouts."
14
+ logger.warn "Please use content_for :before_javascript_libraries or content_for :after_javascript_libraries instead."
15
+ logger.warn "This change is necessary so that we can deliver a performant experience for the user."
16
+ logger.warn "Called from: #{caller.detect{|c| c =~ %r{#{Rails.root.to_s}}}.inspect.to_s.split(':in').first}\n\n"
17
+ end
18
+ %>
19
+ <head>
20
+ <meta charset='<%= ::Refinery::Application.config.encoding %>' />
21
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
22
+ <title><%= browser_title(yield(:title)) %></title>
23
+ <%= raw "<meta name=\"description\" content=\"#{@meta.meta_description}\" />" if @meta.meta_description.present? -%>
24
+ <%= raw "<meta name=\"keywords\" content=\"#{@meta.meta_keywords}\">" if @meta.meta_keywords.present? -%>
25
+ <%= csrf_meta_tag if RefinerySetting.find_or_set(:authenticity_token_on_frontend, true)-%>
26
+ <%= yield :meta %>
27
+
28
+ <%= stylesheet_link_tag stylesheets_for_head(stylesheets||=%w(application formatting theme), theme ||= false),
29
+ :cache => ("cache/application" if Rails.root.writable? and
30
+ RefinerySetting.find_or_set(:use_resource_caching, true) and
31
+ request.env['HTTP_USER_AGENT'] !~ /MSIE/ and (theme ||= false).blank?) %>
32
+ <%= stylesheet_link_tag "home", :theme => theme if home_page? %>
33
+
34
+ <%= yield :stylesheets %>
35
+ <%= render :partial => '/shared/google_analytics' unless local_request? %>
36
+
37
+ <%= javascript_include_tag 'modernizr-min' %>
38
+
39
+ <% #TODO: REMOVE yielded_head and yielded_head_libraries and deprecation notice 0.9.9 <=> 1.0 %>
40
+ <%= yielded_head_libraries %>
41
+ <%= yielded_head %>
42
+ </head>
@@ -0,0 +1,8 @@
1
+ <h1 id='logo'>
2
+ <%= link_to RefinerySetting.find_or_set(:site_name, "Company Name"), root_path %>
3
+ </h1>
4
+ <%= render :partial => "/shared/menu",
5
+ :locals => {
6
+ :dom_id => 'menu',
7
+ :css => 'menu'
8
+ } -%>
@@ -0,0 +1,6 @@
1
+ <!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
2
+ <!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
3
+ <!--[if IE 7 ]> <html lang="en" class="no-js ie7"> <![endif]-->
4
+ <!--[if IE 8 ]> <html lang="en" class="no-js ie8"> <![endif]-->
5
+ <!--[if IE 9 ]> <html lang="en" class="no-js ie9"> <![endif]-->
6
+ <!--[if (gt IE 9)|!(IE)]><!--> <html lang="<%= ::I18n.locale %>" class="no-js"> <!--<![endif]-->
@@ -0,0 +1,63 @@
1
+ <% if RefinerySetting.find_or_set(:ie6_upgrade_message_enabled, true) -%>
2
+ <% unless admin? %>
3
+ <!--[if lte IE 6]>
4
+ <div id="ie6msg_wrapper">
5
+ <div id="ie6msg">
6
+ <h4>Did you know that your browser is out of date?</h4>
7
+ <div id='ie6message'>
8
+ <p>
9
+ To get the best possible experience using our website we recommend that you upgrade your browser to a newer version. The current version is
10
+ <a class="getie8" href="http://upgradeie.s3.amazonaws.com/eng/index.html">Internet Explorer 8</a>.
11
+ The upgrade is free. If you're using a PC at work you should contact your IT administrator.
12
+ </p>
13
+ <p>
14
+ If you want to you may also try some other popular and <strong>free</strong> Internet browsers like:<br/>
15
+ <a class="ie6expl" href="http://www.google.com/chrome" target='_blank'>Google Chrome</a>,
16
+ <a class="ie6expl" href="http://www.apple.com/safari/download/" target='_blank'>Safari</a>,
17
+ <a class="ie6expl" href="http://getfirefox.com" target='_blank'>Firefox</a> or
18
+ <a class="ie6expl" href="http://www.opera.com" target='_blank'>Opera</a>
19
+ </p>
20
+ </div>
21
+ </div>
22
+ </div>
23
+ <![endif]-->
24
+ <% else %>
25
+ <!--[if lte IE 8]>
26
+ <div id='upgrade_wrapper'>
27
+ <h2>Want to have a better experience with Refinery?</h2>
28
+ <p>
29
+ To get the best possible experience using Refinery, we recommend that you switch your web browser.
30
+ </p>
31
+ <p>
32
+ There are a number of web browsers available that will give you a better experience and they are all available <strong>free of charge</strong>. Installing a new web browser will not remove Internet Explorer which you will still be able to use when you need to.
33
+ </p>
34
+ <p>
35
+ <ul>
36
+ <li>
37
+ <a class="ie6expl" href="http://www.google.com/chrome" target='_blank'>Google Chrome</a>
38
+ </li>
39
+ <li>
40
+ <a class="ie6expl" href="http://www.apple.com/safari/download/" target='_blank'>Apple Safari</a>
41
+ </li>
42
+ <li>
43
+ <a class="ie6expl" href="http://getfirefox.com" target='_blank'>Mozilla Firefox</a>
44
+ </li>
45
+ <li>
46
+ <a class="ie6expl" href="http://www.opera.com" target='_blank'>Opera</a>
47
+ </li>
48
+ </ul>
49
+ </p>
50
+ </div>
51
+ <![endif]-->
52
+ <% content_for :javascripts do %>
53
+ <script>
54
+ $(document).ready(function() {
55
+ $('#flash.flash_message:has("#upgrade_wrapper") #flash_close').click(function(e) {
56
+ e.preventDefault();
57
+ $.get('<%= admin_disable_upgrade_message_path %>');
58
+ });
59
+ });
60
+ </script>
61
+ <% end %>
62
+ <% end %>
63
+ <% end -%>