dust-cms 0.0.05

Sign up to get free protection for your applications and to get access to all the features.
Files changed (294) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.md +3 -0
  3. data/Rakefile +5 -0
  4. data/app/assets/images/admin/blank.png +0 -0
  5. data/app/assets/images/admin/dust-letterpress.png +0 -0
  6. data/app/assets/images/admin/main-back.png +0 -0
  7. data/app/assets/images/admin/ui/delete-icon.png +0 -0
  8. data/app/assets/images/admin/ui/edit-icon.png +0 -0
  9. data/app/assets/images/admin/ui/handle.png +0 -0
  10. data/app/assets/images/admin/ui/icons.png +0 -0
  11. data/app/assets/images/admin/ui/index-icon.png +0 -0
  12. data/app/assets/images/admin/ui/new-icon.png +0 -0
  13. data/app/assets/images/entypo/entypo.eot +0 -0
  14. data/app/assets/images/entypo/entypo.svg +13 -0
  15. data/app/assets/images/entypo/entypo.ttf +0 -0
  16. data/app/assets/images/entypo/entypo.woff +0 -0
  17. data/app/assets/images/entypo-social/entypo-social.eot +0 -0
  18. data/app/assets/images/entypo-social/entypo-social.svg +13 -0
  19. data/app/assets/images/entypo-social/entypo-social.ttf +0 -0
  20. data/app/assets/images/entypo-social/entypo-social.woff +0 -0
  21. data/app/assets/images/fancybox/blank.gif +0 -0
  22. data/app/assets/images/fancybox/fancy_close.png +0 -0
  23. data/app/assets/images/fancybox/fancy_loading.png +0 -0
  24. data/app/assets/images/fancybox/fancy_nav_left.png +0 -0
  25. data/app/assets/images/fancybox/fancy_nav_right.png +0 -0
  26. data/app/assets/images/fancybox/fancy_shadow_e.png +0 -0
  27. data/app/assets/images/fancybox/fancy_shadow_n.png +0 -0
  28. data/app/assets/images/fancybox/fancy_shadow_ne.png +0 -0
  29. data/app/assets/images/fancybox/fancy_shadow_nw.png +0 -0
  30. data/app/assets/images/fancybox/fancy_shadow_s.png +0 -0
  31. data/app/assets/images/fancybox/fancy_shadow_se.png +0 -0
  32. data/app/assets/images/fancybox/fancy_shadow_sw.png +0 -0
  33. data/app/assets/images/fancybox/fancy_shadow_w.png +0 -0
  34. data/app/assets/images/fancybox/fancy_title_left.png +0 -0
  35. data/app/assets/images/fancybox/fancy_title_main.png +0 -0
  36. data/app/assets/images/fancybox/fancy_title_over.png +0 -0
  37. data/app/assets/images/fancybox/fancy_title_right.png +0 -0
  38. data/app/assets/images/fancybox/fancybox-x.png +0 -0
  39. data/app/assets/images/fancybox/fancybox-y.png +0 -0
  40. data/app/assets/images/fancybox/fancybox.png +0 -0
  41. data/app/assets/javascripts/cms/dust/defaults.js.coffee +31 -0
  42. data/app/assets/javascripts/cms/dust/gallery/photo.js.coffee +1 -0
  43. data/app/assets/javascripts/cms/dust/gallery/photo_view.js.coffee +21 -0
  44. data/app/assets/javascripts/cms/dust/gallery/photos.js.coffee +6 -0
  45. data/app/assets/javascripts/cms/dust/gallery/photos_view.js.coffee +12 -0
  46. data/app/assets/javascripts/cms/dust/gallery/router.js.coffee +14 -0
  47. data/app/assets/javascripts/cms/dust/gallery.js.coffee +31 -0
  48. data/app/assets/javascripts/cms/dust/nav.js.coffee +21 -0
  49. data/app/assets/javascripts/cms/dust/sections.js.coffee +21 -0
  50. data/app/assets/javascripts/cms/dust/sortables.js.coffee +64 -0
  51. data/app/assets/javascripts/cms/dust/window.js.coffee +11 -0
  52. data/app/assets/javascripts/cms/dust.js.coffee +19 -0
  53. data/app/assets/javascripts/cms/lib/backbone.js +42 -0
  54. data/app/assets/javascripts/cms/lib/fineuploader-3.0.js +71 -0
  55. data/app/assets/javascripts/cms/lib/handlebars.js +1920 -0
  56. data/app/assets/javascripts/cms/lib/spin.js +2 -0
  57. data/app/assets/javascripts/cms/lib/underscore.js +1 -0
  58. data/app/assets/javascripts/cms.js +14 -0
  59. data/app/assets/javascripts/core/jquery.form.js +785 -0
  60. data/app/assets/javascripts/core/jquery.html5.js +29 -0
  61. data/app/assets/javascripts/core/jquery.mousewheel-3.0.2.pack.js +13 -0
  62. data/app/assets/javascripts/core/jquery.placeholder.min.js +11 -0
  63. data/app/assets/javascripts/core/nestedsortables.js +429 -0
  64. data/app/assets/javascripts/core/serializelist.js +66 -0
  65. data/app/assets/javascripts/core/tipTip.js +21 -0
  66. data/app/assets/javascripts/core.js +4 -0
  67. data/app/assets/javascripts/front_end/application-main.js.coffee +27 -0
  68. data/app/assets/javascripts/front_end/map.js +34 -0
  69. data/app/assets/javascripts/front_end/video.js +4569 -0
  70. data/app/assets/javascripts/front_end.js +18 -0
  71. data/app/assets/stylesheets/cms/flash_messages.css.scss +17 -0
  72. data/app/assets/stylesheets/cms/footer.css.scss +12 -0
  73. data/app/assets/stylesheets/cms/forms.css.scss +67 -0
  74. data/app/assets/stylesheets/cms/gallery.css.scss +21 -0
  75. data/app/assets/stylesheets/cms/icons.css.scss +123 -0
  76. data/app/assets/stylesheets/cms/jquery-ui.custom.scss +6 -0
  77. data/app/assets/stylesheets/cms/layout.css.scss +162 -0
  78. data/app/assets/stylesheets/cms/lib/grid.css.scss +116 -0
  79. data/app/assets/stylesheets/cms/lib/mixins.css.scss +20 -0
  80. data/app/assets/stylesheets/cms/login.scss +12 -0
  81. data/app/assets/stylesheets/cms/main.old +155 -0
  82. data/app/assets/stylesheets/cms/nav.css.scss +73 -0
  83. data/app/assets/stylesheets/cms/sections.scss +17 -0
  84. data/app/assets/stylesheets/cms/sortables.scss +20 -0
  85. data/app/assets/stylesheets/cms.css.scss +30 -0
  86. data/app/assets/stylesheets/core/app/defaults.css.scss +556 -0
  87. data/app/assets/stylesheets/core/plugins/PIE.htc +96 -0
  88. data/app/assets/stylesheets/core/plugins/jquery-ui-1.8.5.custom.old +572 -0
  89. data/app/assets/stylesheets/core/plugins/jquery.fancybox-1.3.1.css +364 -0
  90. data/app/assets/stylesheets/core/plugins/skeleton.css +155 -0
  91. data/app/assets/stylesheets/core/plugins/tipTip.css +115 -0
  92. data/app/assets/stylesheets/core/plugins/uploadify.css +25 -0
  93. data/app/assets/stylesheets/core/reset/reset.css +211 -0
  94. data/app/assets/stylesheets/core/reset/text.css +86 -0
  95. data/app/assets/stylesheets/core.css.scss +14 -0
  96. data/app/assets/stylesheets/front_end/app/just-delete-me-and-start-over.css.scss +70 -0
  97. data/app/assets/stylesheets/front_end.css +14 -0
  98. data/app/controllers/authentication_controller.rb +30 -0
  99. data/app/controllers/dust/blocks_controller.rb +49 -0
  100. data/app/controllers/dust/contacts_controller.rb +89 -0
  101. data/app/controllers/dust/dashboard_controller.rb +26 -0
  102. data/app/controllers/dust/gallery/albums_controller.rb +49 -0
  103. data/app/controllers/dust/gallery/api/photos_controller.rb +28 -0
  104. data/app/controllers/dust/gallery/photos_controller.rb +47 -0
  105. data/app/controllers/dust/menu_items_controller.rb +51 -0
  106. data/app/controllers/dust/menus_controller.rb +47 -0
  107. data/app/controllers/dust/pages_controller.rb +52 -0
  108. data/app/controllers/dust/password_resets_controller.rb +48 -0
  109. data/app/controllers/dust/posts_controller.rb +47 -0
  110. data/app/controllers/dust/roles_controller.rb +47 -0
  111. data/app/controllers/dust/sessions_controller.rb +29 -0
  112. data/app/controllers/dust/site_wides_controller.rb +28 -0
  113. data/app/controllers/dust/sortable_controller.rb +17 -0
  114. data/app/controllers/dust/users_controller.rb +52 -0
  115. data/app/controllers/front_end/page_controller.rb +27 -0
  116. data/app/controllers/front_end/post_controller.rb +14 -0
  117. data/app/controllers/front_end/sitemap_controller.rb +11 -0
  118. data/app/controllers/front_end_controller.rb +18 -0
  119. data/app/helpers/error_messages_helper.rb +23 -0
  120. data/app/helpers/exceptions.rb +4 -0
  121. data/app/helpers/layout_helper.rb +28 -0
  122. data/app/helpers/misc_helper.rb +29 -0
  123. data/app/helpers/region_helper.rb +32 -0
  124. data/app/mailers/post_office.rb +39 -0
  125. data/app/models/ckeditor/asset.rb +7 -0
  126. data/app/models/ckeditor/attachment_file.rb +7 -0
  127. data/app/models/ckeditor/picture.rb +7 -0
  128. data/app/models/dust/block.rb +114 -0
  129. data/app/models/dust/builder/page.rb +84 -0
  130. data/app/models/dust/builder/site_wide.rb +50 -0
  131. data/app/models/dust/contact.rb +34 -0
  132. data/app/models/dust/gallery/album.rb +14 -0
  133. data/app/models/dust/gallery/photo.rb +23 -0
  134. data/app/models/dust/handlebar.rb +59 -0
  135. data/app/models/dust/map.rb +21 -0
  136. data/app/models/dust/menu/item_dependency.rb +66 -0
  137. data/app/models/dust/menu.rb +11 -0
  138. data/app/models/dust/menu_item.rb +64 -0
  139. data/app/models/dust/page.rb +52 -0
  140. data/app/models/dust/post.rb +39 -0
  141. data/app/models/dust/role.rb +9 -0
  142. data/app/models/dust/section.rb +11 -0
  143. data/app/models/dust/session.rb +28 -0
  144. data/app/models/dust/site_wide.rb +41 -0
  145. data/app/models/dust/sort.rb +52 -0
  146. data/app/models/dust/sortable_item.rb +21 -0
  147. data/app/models/dust/user.rb +49 -0
  148. data/app/uploaders/ckeditor_attachment_file_uploader.rb +42 -0
  149. data/app/uploaders/ckeditor_picture_uploader.rb +53 -0
  150. data/app/uploaders/gallery_photo_uploader.rb +52 -0
  151. data/app/uploaders/image_uploader.rb +51 -0
  152. data/app/uploaders/slide_image_uploader.rb +51 -0
  153. data/app/views/dust/blocks/_block.html.haml +20 -0
  154. data/app/views/dust/blocks/_form.html.haml +50 -0
  155. data/app/views/dust/blocks/_normal_block_content.html.haml +1 -0
  156. data/app/views/dust/blocks/_search.html.haml +4 -0
  157. data/app/views/dust/blocks/edit.html.haml +4 -0
  158. data/app/views/dust/blocks/index.html.haml +16 -0
  159. data/app/views/dust/blocks/new.html.haml +3 -0
  160. data/app/views/dust/contacts/_form.html.haml +37 -0
  161. data/app/views/dust/contacts/_import_csv.html.haml +8 -0
  162. data/app/views/dust/contacts/_instance.html.haml +13 -0
  163. data/app/views/dust/contacts/_search.html.haml +4 -0
  164. data/app/views/dust/contacts/edit.html.haml +2 -0
  165. data/app/views/dust/contacts/index.html.haml +17 -0
  166. data/app/views/dust/contacts/index.json.haml +6 -0
  167. data/app/views/dust/contacts/new.html.haml +3 -0
  168. data/app/views/dust/dashboard/_options.html.haml +6 -0
  169. data/app/views/dust/dashboard/show.html.haml +33 -0
  170. data/app/views/dust/dashboard/update.html.haml +6 -0
  171. data/app/views/dust/gallery/albums/_form.html.haml +52 -0
  172. data/app/views/dust/gallery/albums/_photo.html.haml +12 -0
  173. data/app/views/dust/gallery/albums/edit.html.haml +3 -0
  174. data/app/views/dust/gallery/albums/index.html.haml +18 -0
  175. data/app/views/dust/gallery/albums/new.html.haml +4 -0
  176. data/app/views/dust/gallery/albums/show.html.haml +2 -0
  177. data/app/views/dust/gallery/photos/_form.html.haml +26 -0
  178. data/app/views/dust/gallery/photos/edit.html.haml +3 -0
  179. data/app/views/dust/gallery/photos/index.html.haml +18 -0
  180. data/app/views/dust/gallery/photos/new.html.haml +4 -0
  181. data/app/views/dust/gallery/photos/show.json.jbuilder +5 -0
  182. data/app/views/dust/menu_items/_form.html.haml +24 -0
  183. data/app/views/dust/menu_items/_roots.html.haml +3 -0
  184. data/app/views/dust/menu_items/_search.html.haml +4 -0
  185. data/app/views/dust/menu_items/_tree.html.haml +11 -0
  186. data/app/views/dust/menu_items/edit.html.haml +2 -0
  187. data/app/views/dust/menu_items/index.html.haml +19 -0
  188. data/app/views/dust/menu_items/new.html.haml +2 -0
  189. data/app/views/dust/menus/_form.html.haml +39 -0
  190. data/app/views/dust/menus/edit.html.haml +3 -0
  191. data/app/views/dust/menus/index.html.haml +18 -0
  192. data/app/views/dust/menus/new.html.haml +4 -0
  193. data/app/views/dust/menus/show.html.haml +2 -0
  194. data/app/views/dust/pages/_form.html.haml +68 -0
  195. data/app/views/dust/pages/_search.html.haml +4 -0
  196. data/app/views/dust/pages/edit.html.haml +3 -0
  197. data/app/views/dust/pages/index.html.haml +16 -0
  198. data/app/views/dust/pages/new.html.haml +3 -0
  199. data/app/views/dust/password_resets/edit.html.haml +6 -0
  200. data/app/views/dust/password_resets/new.html.haml +10 -0
  201. data/app/views/dust/posts/_form.html.haml +39 -0
  202. data/app/views/dust/posts/edit.html.haml +3 -0
  203. data/app/views/dust/posts/index.html.haml +18 -0
  204. data/app/views/dust/posts/new.html.haml +4 -0
  205. data/app/views/dust/posts/show.html.haml +2 -0
  206. data/app/views/dust/roles/_form.html.haml +11 -0
  207. data/app/views/dust/roles/edit.html.haml +2 -0
  208. data/app/views/dust/roles/index.html.haml +14 -0
  209. data/app/views/dust/roles/new.html.haml +2 -0
  210. data/app/views/dust/sessions/_form.html.haml +18 -0
  211. data/app/views/dust/sessions/new.html.haml +2 -0
  212. data/app/views/dust/site_wides/new.html.haml +19 -0
  213. data/app/views/dust/slides/_form.html.haml +26 -0
  214. data/app/views/dust/slides/_search.html.haml +4 -0
  215. data/app/views/dust/slides/_slideshow.html.haml +12 -0
  216. data/app/views/dust/slides/edit.html.haml +5 -0
  217. data/app/views/dust/slides/index.html.haml +25 -0
  218. data/app/views/dust/slides/index.js.haml +2 -0
  219. data/app/views/dust/slides/new.html.haml +6 -0
  220. data/app/views/dust/slides/show.html.haml +15 -0
  221. data/app/views/dust/sortable/sort.js.coffee +10 -0
  222. data/app/views/dust/users/_form.html.haml +27 -0
  223. data/app/views/dust/users/_search.html.haml +4 -0
  224. data/app/views/dust/users/_user_bar.html.haml +10 -0
  225. data/app/views/dust/users/dashboard.html.haml +40 -0
  226. data/app/views/dust/users/edit.html.haml +2 -0
  227. data/app/views/dust/users/index.html.haml +16 -0
  228. data/app/views/dust/users/new.html.haml +2 -0
  229. data/app/views/front_end/page/_admin.html.haml +6 -0
  230. data/app/views/front_end/page/search.html.haml +9 -0
  231. data/app/views/front_end/page/show.html.haml +8 -0
  232. data/app/views/front_end/post/_admin.html.haml +7 -0
  233. data/app/views/front_end/post/show.html.haml +12 -0
  234. data/app/views/front_end/sitemap/index.html.haml +4 -0
  235. data/app/views/front_end/sitemap/index.xml.haml +9 -0
  236. data/app/views/layouts/app_partials/_analytics.html.haml +11 -0
  237. data/app/views/layouts/app_partials/_application_tree.html.haml +6 -0
  238. data/app/views/layouts/cms.html.haml +52 -0
  239. data/app/views/layouts/cms_partials/_nav.html.haml +5 -0
  240. data/app/views/layouts/front_end.html.haml +22 -0
  241. data/app/views/layouts/sessions.html.haml +19 -0
  242. data/app/views/post_office/contact_confirmation.html.haml +7 -0
  243. data/app/views/post_office/contact_request.html.haml +24 -0
  244. data/app/views/post_office/password_reset_instructions.html.haml +6 -0
  245. data/app/views/widgets/_contact_form.html.haml +20 -0
  246. data/app/views/widgets/_map.html.haml +16 -0
  247. data/app/views/widgets/_quick_contact_form.html.haml +10 -0
  248. data/app/views/widgets/_site_map.html.haml +7 -0
  249. data/app/views/widgets/_site_menu.html.haml +10 -0
  250. data/app/views/widgets/_slider.html.haml +0 -0
  251. data/app/views/widgets/_user_login.html.haml +13 -0
  252. data/app/views/widgets/galleries/_archive.html.haml +1 -0
  253. data/app/views/widgets/galleries/_show.html.haml +0 -0
  254. data/app/views/widgets/posts/_index.html.haml +1 -0
  255. data/app/views/widgets/posts/_show.html.haml +0 -0
  256. data/config/authorization_rules.rb +23 -0
  257. data/config/generators/templates/haml/scaffold/_form.html.haml +19 -0
  258. data/config/generators/templates/haml/scaffold/edit.html.haml +3 -0
  259. data/config/generators/templates/haml/scaffold/index.html.haml +18 -0
  260. data/config/generators/templates/haml/scaffold/new.html.haml +4 -0
  261. data/config/generators/templates/haml/scaffold/show.html.haml +2 -0
  262. data/config/generators/templates/rails/scaffold_controller/controller.rb +51 -0
  263. data/config/initializers/app_string_io.rb +12 -0
  264. data/config/initializers/ckeditor.rb +18 -0
  265. data/config/initializers/client_side_validations.rb +13 -0
  266. data/config/initializers/dust_config.rb +22 -0
  267. data/config/initializers/dust_core_reloader.rb +11 -0
  268. data/config/initializers/sorcery.rb +398 -0
  269. data/config/initializers/wrap_parameters.rb +14 -0
  270. data/config/routes.rb +55 -0
  271. data/db/migrate/20101206025845_create_roles.rb +11 -0
  272. data/db/migrate/20110217212357_create_ckeditor_assets.rb +31 -0
  273. data/db/migrate/20110218000640_create_pages.rb +15 -0
  274. data/db/migrate/20110218000641_create_sections.rb +15 -0
  275. data/db/migrate/20110218002220_create_contacts.rb +22 -0
  276. data/db/migrate/20110218020608_create_menu_items.rb +21 -0
  277. data/db/migrate/20110507014158_create_blocks.rb +23 -0
  278. data/db/migrate/20121106195938_sorcery_core.rb +17 -0
  279. data/db/migrate/20121106195939_sorcery_remember_me.rb +15 -0
  280. data/db/migrate/20121106195940_sorcery_reset_password.rb +17 -0
  281. data/db/migrate/20121106195941_sorcery_activity_logging.rb +17 -0
  282. data/db/migrate/20121106200754_sorcery_user_activation.rb +17 -0
  283. data/db/migrate/20130220044031_create_site_wides.rb +11 -0
  284. data/db/migrate/20130220051658_create_menus.rb +11 -0
  285. data/db/migrate/20130223030136_create_albums.rb +13 -0
  286. data/db/migrate/20130223040911_create_photos.rb +15 -0
  287. data/db/migrate/20130223044553_create_posts.rb +15 -0
  288. data/lib/dust/engine.rb +18 -0
  289. data/lib/dust/utils.rb +14 -0
  290. data/lib/dust/version.rb +3 -0
  291. data/lib/dust-cms.rb +53 -0
  292. data/lib/tasks/dust_tasks.rake +51 -0
  293. data/lib/tasks/seed.rb +46 -0
  294. metadata +613 -0
@@ -0,0 +1,5 @@
1
+ - if defined?(Dust::Application)
2
+ - title "Edit Slide"
3
+ - heading "Edit Slide"
4
+
5
+ = render 'form'
@@ -0,0 +1,25 @@
1
+ - title "Slides"
2
+
3
+
4
+ .button_bar
5
+ = render :partial => 'search'
6
+ = link_to 'Order Slides', manage_slides_path, :class => 'ordernav tip', :id => "order_slides", :title => "ReOrder Slides"
7
+ = link_to 'New Slide', new_slide_path, :class => 'newfile tip', :title => "New Slide"
8
+
9
+
10
+ %ul#slides
11
+ - @slides.each do |slide|
12
+ %li.item{:id => "#{slide.id}"}
13
+ .ui-widget.ui-helper-clearfix{:style => 'float:right'}
14
+ = link_to '', edit_slide_path(slide), :class => 'ui-icon ui-icon-pencil edit tip', :title => "Edit This Item"
15
+ = link_to '', slide, :confirm => 'Are you sure?', :method => :delete, :class => 'ui-icon ui-icon-close destroy tip', :title => "Destroy This Item"
16
+ .handle{:style => "float:left; padding:0 10px;"}
17
+ = image_tag slide.image.url(:thumb)
18
+ %h3= link_to "Slide #{slide.id}", slide
19
+ %p
20
+ = link_to "Preview Slide", slide.image.url, :id => 'single_image'
21
+ %br/
22
+ %br/
23
+
24
+
25
+ = javascript_include_tag "nivo-serialize", "nivo-dragsort", "nivo-admin"
@@ -0,0 +1,2 @@
1
+ alert("Reorder Complete");
2
+
@@ -0,0 +1,6 @@
1
+ - if defined?(Dust::Application)
2
+ - title "New Slide"
3
+ - heading "New Slide"
4
+
5
+ = render 'form'
6
+
@@ -0,0 +1,15 @@
1
+ - if defined?(Dust::Application)
2
+ - title "Slide"
3
+
4
+ .item
5
+ .ui-widget.ui-helper-clearfix{:style => "float:right"}
6
+ =link_to '', edit_slide_path(@slide), :class => 'ui-icon ui-icon-pencil edit tip', :title => "Edit This Item"
7
+ =link_to "", @slide, :confirm => 'Are you sure?', :method => :delete, :class => 'ui-icon ui-icon-close destroy tip', :title => "Destroy This Item"
8
+ %p
9
+ = link_to image_tag(@slide.image_url(:thumb)), @slide, :class => 'remote_iframe'
10
+ %p
11
+ %strong Url:
12
+ = @slide.url
13
+ %p
14
+ %strong Active:
15
+ = @slide.active
@@ -0,0 +1,10 @@
1
+ <%- flash.each do |name, msg| %>
2
+ Dust.notice = $('<div class="flash_<%= name %>"></div>')
3
+ Dust.notice.html('<%= escape_javascript(flash.discard(name.to_sym)) %>')
4
+
5
+ $('#header-wrap').after(Dust.notice[0])
6
+ $(Dust.notice[0]).delay(2000).fadeOut ()->
7
+ $(Dust.notice).remove()
8
+ <%- end %>
9
+
10
+
@@ -0,0 +1,27 @@
1
+ - require_password ||= false
2
+
3
+ .sub-header
4
+ .button-bar.clearfix
5
+ = render 'search'
6
+ .admin-links
7
+ = link_to 'all users', dust_users_path, :class => "border"
8
+ = link_to 'delete user', @user, :confim => 'Are you sure?', :method => :delete if @user.id
9
+
10
+
11
+ .content-wrapper
12
+ = form_for @user, :validate => true do |f|
13
+ .item
14
+ = f.label :username
15
+ = f.text_field :username, :class => 'field'
16
+ = f.label :email
17
+ = f.text_field :email, :class => 'field'
18
+ = f.label :password
19
+ = f.password_field :password, validate: require_password, :class => 'field', value: nil
20
+ = f.label :password_confirmation
21
+ = f.password_field :password_confirmation, validate: require_password, :class => 'field'
22
+ - if permitted_to? :manage, :users
23
+ .item
24
+ = f.label :role, "Select Role"
25
+ = f.collection_select :role_id, Dust::Role.all(:order => 'name'), :id, :name, {:include_blank => true}
26
+ .item
27
+ = f.submit "Submit"
@@ -0,0 +1,4 @@
1
+ #searchbox
2
+ = form_tag dust_users_path, :method => 'get' do
3
+ = text_field_tag :search, params[:search], :class => "input-text", :placeholder => 'Search Users'
4
+ = image_submit_tag "admin/blank.png", :class => "image-submit"
@@ -0,0 +1,10 @@
1
+ - if permitted_to? :manage, :pages
2
+ #user_nav.logged_in
3
+ = link_to "Dashboard", dust_dashboard_path
4
+ |
5
+ \#{link_to "Edit Profile", edit_dust_user_path(current_user.id)}
6
+ |
7
+ \#{link_to "Logout", dust_logout_path}
8
+ - else
9
+ #user_nav.logged_out
10
+ = link_to "Login", dust_login_path
@@ -0,0 +1,40 @@
1
+ - title "User"
2
+ - content_for :left do
3
+ = render 'user'
4
+ - content_for :head do
5
+ %script{:charset => "utf-8", :type => "text/javascript"}
6
+ $(document).ready(function() {
7
+ new Highcharts.Chart({
8
+ chart: {
9
+ renderTo: "contacts_chart"
10
+ },
11
+ title: {
12
+ text: "Website Activity By Day"
13
+ },
14
+ xAxis: {
15
+ type: "datetime"
16
+ },
17
+ yAxis: {
18
+ title: {
19
+ text: "Total Submissions"
20
+ }
21
+ },
22
+ tooltip: {
23
+ formatter: function() {
24
+ return Highcharts.dateFormat("%B %e, %Y", this.x) + ': ' +
25
+ Highcharts.numberFormat(this.y, 0) + " Submissions";
26
+ }
27
+ },
28
+ series: [
29
+ {
30
+ name: "Contact Requests",
31
+ pointInterval: <haml:loud> 1.day * 1000 </haml:loud>,
32
+ pointStart: <haml:loud> 1.week.ago.to_i * 1000 </haml:loud>,
33
+ data: <haml:loud> (1.week.ago.to_date..Date.today).map { |date| Contact.total_on(date).count }.inspect </haml:loud>
34
+ }
35
+ ]
36
+ });
37
+ });
38
+ .item
39
+ %p Welcome to the administration section of your website. From here, you can view, edit and delete any page in your website, add a new page to your website or modify your list of keywords. Along with many other features. Have Fun!
40
+ #contacts_chart{:style => " height:300px;"}
@@ -0,0 +1,2 @@
1
+ - title "Edit User"
2
+ = render :partial => 'form'
@@ -0,0 +1,16 @@
1
+ - title "Users"
2
+
3
+ .sub-header
4
+ .button-bar.clearfix
5
+ = render :partial => 'search'
6
+ .admin-links
7
+ = link_to 'new user', new_dust_user_path, :class => 'newfile tip', :title => "New User"
8
+
9
+ .content-wrapper
10
+ = will_paginate @users
11
+ - for user in @users
12
+ .index-item
13
+ .clearfix{:style => "float:right"}
14
+ = link_to "", user, :confirm => 'Are you sure?', :method => :delete, :class => 'destroy tip', :title => "Destroy This Item"
15
+ = link_to user.username, edit_dust_user_path(user), :class => 'ui-icon ui-icon-pencil edit tip', :title => "Edit This Item"
16
+ = will_paginate @users
@@ -0,0 +1,2 @@
1
+ - title "New User"
2
+ = render :partial => 'form'
@@ -0,0 +1,6 @@
1
+ #page-edit
2
+ - if (!@page.nil?) && permitted_to?(:manage, :pages)
3
+ .edit-link
4
+ = link_to new_icon("Block"), new_dust_block_path(:show => @page.match_path, :return => request.fullpath), :class => 'to-admin'
5
+ = link_to edit_icon("Page"), edit_dust_page_path(@page), :class => 'to-admin'
6
+ = link_to index_icon("Pages"), dust_pages_path, :class => 'to-admin'
@@ -0,0 +1,9 @@
1
+ %h1 Search Results
2
+ #results
3
+ - if @results.blank?
4
+ %p Sorry, no results found.
5
+ - @results.each do |result|
6
+ %h3= result.title
7
+ %p
8
+ = truncate strip_tags(result.body), :length => 100, :separator => ' '
9
+ = link_to "Read More", "#{result.url_list.last}\##{result.title.parameterize}"
@@ -0,0 +1,8 @@
1
+ - title @page.meta_title
2
+ - description @page.create_description
3
+
4
+ - content_for :admin do
5
+ = render :partial => 'front_end/page/admin'
6
+
7
+ - @page.sections.each do |section|
8
+ = render_region section.title.parameterize, section.classes
@@ -0,0 +1,7 @@
1
+ #page-edit
2
+ - if (!@post.nil?) && permitted_to?(:manage, :dust_pages)
3
+ .edit-link
4
+ = link_to new_icon("Block"), new_dust_block_path(:show => @post.match_path, :return => request.fullpath), :class => 'to-admin'
5
+ = link_to edit_icon("Post"), edit_dust_post_path(@post), :class => 'to-admin'
6
+ = link_to index_icon("Posts"), dust_posts_path, :class => 'to-admin'
7
+
@@ -0,0 +1,12 @@
1
+ -#- title @page.meta_title
2
+ -#- description @page.create_description
3
+
4
+ - content_for :admin do
5
+ = render :partial => 'front_end/post/admin'
6
+
7
+ = render_region "content-default", "post-body" do
8
+ .five.columns
9
+ = raw @post.body
10
+ .seven.columns
11
+ = image_tag @post.file.url
12
+
@@ -0,0 +1,4 @@
1
+ %ul
2
+ - @menu_items.each do |menu_item|
3
+ %li
4
+ = link_to menu_item.title, menu_item.url
@@ -0,0 +1,9 @@
1
+ - base_url = "http://#{request.host_with_port}"
2
+ !!! XML
3
+ %urlset{:xmlns => "http://www.sitemaps.org/schemas/sitemap/0.9"}
4
+ - for menu_item in @menu_items
5
+ %url
6
+ %loc #{base_url}#{menu_item.url}
7
+ %lastmod= @latest.updated_at
8
+ %changefreq monthly
9
+ %priority 0.5
@@ -0,0 +1,11 @@
1
+ / asynchronous analytics code; change UA-XXXXX-X to your own code
2
+ / this can also be placed in the <head> if you want page views to be tracked quicker
3
+ :javascript
4
+ var _gaq = [['_setAccount', 'UA-31668531-1'], ['_trackPageview']];
5
+ (function(d, t) {
6
+ var g = d.createElement(t),
7
+ s = d.getElementsByTagName(t)[0];
8
+ g.async = true;
9
+ g.src = ('https:' == location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
10
+ s.parentNode.insertBefore(g, s);
11
+ })(document, 'script');
@@ -0,0 +1,6 @@
1
+ = content_tag :li, :id => dom_id(root).gsub("_", "-"), :class => "menu-item #{'active' if root.is_active?(request.fullpath)}" do
2
+ = link_to root.title, root.url, root.html_options?(request.fullpath)
3
+ = content_tag :ul, :class => 'children' do
4
+ - root.children.each do |child|
5
+ = render :partial => "layouts/app_partials/application_tree", :locals => {:root => child } if child.active
6
+ - end unless root.leaf?
@@ -0,0 +1,52 @@
1
+ !!!
2
+ %html
3
+ %head
4
+ %title= h(yield(:title) || "Dust CMS")
5
+
6
+ %meta{:charset => "utf-8"}/
7
+ %meta{:content => "width=device-width,minimum-scale=1,maximum-scale=1", :name => "viewport"}/
8
+ %meta{:content => "width", :name => "MobileOptimized"}/
9
+ %meta{:content => "true", :name => "HandheldFriendly"}/
10
+ %meta{:content => "yes", :name => "apple-mobile-web-app-capable"}/
11
+
12
+ = stylesheet_link_tag 'cms'
13
+ = javascript_tag "var AUTH_TOKEN = #{form_authenticity_token.inspect};" if protect_against_forgery?
14
+ = javascript_include_tag 'cms'
15
+ = csrf_meta_tag
16
+ = yield(:head)
17
+ %body
18
+ #nav
19
+ .section-wrap
20
+ .item.section
21
+ .mega-icon.global
22
+ .label
23
+ Admin
24
+ %ul.sub-nav.global-nav
25
+ %li.item.link
26
+ = link_to 'Home', root_url
27
+ %li.item.link
28
+ = link_to 'Dashboard', dust_dashboard_path
29
+ %li.item.link
30
+ = link_to "Log Out", dust_logout_path
31
+ .section-wrap
32
+ .item.section
33
+ .mega-icon.settings
34
+ .label
35
+ Settings
36
+ %ul.sub-nav.settings-nav
37
+ = render :partial => 'layouts/cms_partials/nav'
38
+ = yield(:right)
39
+ .main-wrap
40
+ .wrapper
41
+ #header-wrap.clearfix
42
+ .header-inner.clearfix
43
+ - if show_title?
44
+ %h1= h yield(:title)
45
+ .header-content.clearfix
46
+ = yield(:header)
47
+ - flash.each do |name, msg|
48
+ = content_tag :div, msg, :class => "flash_#{name}"
49
+ = yield
50
+ #footer-wrap
51
+ #footer
52
+ dust cms
@@ -0,0 +1,5 @@
1
+ - @admin_nav = Dust::Menu.find 2
2
+ - @admin_nav.active_items.each do |item|
3
+ -#- if permitted_to? :manage, item.controller_name.to_sym
4
+ %li.item.link
5
+ = link_to item.title, item.url #if permitted_to? :manage, item.controller_name.to_sym
@@ -0,0 +1,22 @@
1
+ !!! 5
2
+ %html{ :class => content_classes }
3
+ %head
4
+ %title= h(yield(:title) || @site_data.site_info.site_url)
5
+ %meta{:content => (yield(:description) || @site_data.site_info.default_description), :name => "description"}/
6
+ = stylesheet_link_tag 'front_end', 'application'
7
+ = csrf_meta_tag
8
+ = yield(:head)
9
+ %body
10
+ - flash.each do |name, msg|
11
+ = content_tag :div, msg, :id => "flash_#{name}"
12
+ #container
13
+ - Dust.config.regions.each do |region|
14
+ = render_region region
15
+ - if Dust.config.insert_yield_after == region
16
+ = yield
17
+ = render :partial => 'dust/users/user_bar'
18
+ = yield :admin
19
+
20
+ = javascript_include_tag 'front_end', 'application'
21
+ = yield(:js)
22
+ = render :partial => 'layouts/app_partials/analytics'
@@ -0,0 +1,19 @@
1
+ !!! Strict
2
+ %html{:xmlns => "http://www.w3.org/1999/xhtml"}
3
+ %head
4
+
5
+ %meta{:charset => "utf-8"}/
6
+ %meta{:content => "width=device-width,minimum-scale=1,maximum-scale=1", :name => "viewport"}/
7
+ %meta{:content => "width", :name => "MobileOptimized"}/
8
+ %meta{:content => "true", :name => "HandheldFriendly"}/
9
+ %meta{:content => "yes", :name => "apple-mobile-web-app-capable"}/
10
+
11
+ %title= h(yield(:title) || "Dust")
12
+ = stylesheet_link_tag 'cms'
13
+ = javascript_include_tag 'cms'
14
+ = yield(:head)
15
+ %body
16
+ .wrapper.login
17
+ - flash.each do |name, msg|
18
+ = content_tag :div, msg, :id => "flash_#{name}"
19
+ = yield
@@ -0,0 +1,7 @@
1
+ !!!
2
+ %html{:style => " text-align:center;"}
3
+ %body
4
+ %p
5
+ = @contact.name
6
+ ,
7
+ %p Thank you for contacting #{Dust.site_wides.site_info.site_url}!
@@ -0,0 +1,24 @@
1
+ !!!
2
+ %html
3
+ %body
4
+ %p
5
+ %strong Name:
6
+ = h @contact.name
7
+ %p
8
+ %strong Address:
9
+ = h @contact.address
10
+ %p
11
+ %strong City:
12
+ = h @contact.city
13
+ %p
14
+ %strong State:
15
+ = h @contact.state
16
+ %p
17
+ %strong Email:
18
+ = h @contact.email
19
+ %p
20
+ %strong Phone Number:
21
+ = h @contact.phone unless @contact.phone.nil?
22
+ %p{:class => "woah"}
23
+ %strong Message:
24
+ = h @contact.message
@@ -0,0 +1,6 @@
1
+ %h1 Password Reset Instructions
2
+ %p
3
+ A request to reset your password has been made. If you did not make
4
+ this request, simply ignore this email. If you did make this
5
+ request, please follow the link below.
6
+ = link_to "Reset Password!", @edit_password_reset_url
@@ -0,0 +1,20 @@
1
+ - @contact = Dust::Contact.new
2
+ = form_for @contact, :validate => true do |f|
3
+ = f.error_messages
4
+ .item
5
+ = f.label :name
6
+ %br/
7
+ = f.text_field :name, :class => 'field'
8
+ .item
9
+ = f.label :email
10
+ %br/
11
+ = f.text_field :email, :class => 'field'
12
+ .item
13
+ = f.label :phone
14
+ %br/
15
+ = f.text_field :phone, :class => 'field'
16
+ .item
17
+ = f.label :message
18
+ %br/
19
+ = f.text_area :message, :class => 'field', :style => "height:128px;"
20
+ .item= f.submit "Submit"
@@ -0,0 +1,16 @@
1
+ = content_for :head do
2
+ = GMap.header
3
+ = @page.map.to_html
4
+
5
+ .contact_page_content
6
+ = raw(block.body)
7
+ #google_map
8
+ = render "maps/map", :map => Map.new({:address => "719 Washington Avenue, Racine, WI 53403", :content => "<div>719 Washington Avenue<br /> Racine, WI 53403</div>", :width => 420, :height => 272 })
9
+ %p{:class => "driving-directions"}
10
+ Enter your address below to get driving directions.
11
+ = form_tag("http://maps.google.com/maps", :enctype => "application/x-www-form-urlencoded", :method => "get", :target =>"_blank") do
12
+ = hidden_field_tag "daddr", "719 Washington Avenue, Racine, WI 53403"
13
+ = hidden_field_tag "hl", "en"
14
+ .short-form
15
+ = text_field_tag 'saddr', nil, :name => "saddr", :class => "field short-form-field", :size => 20
16
+ = submit_tag "Go", :class => "short-form-button"
@@ -0,0 +1,10 @@
1
+ - @contact = Dust::Contact.new
2
+ = form_for @contact, :validate => true do |f|
3
+ = f.error_messages
4
+ .item
5
+ = f.text_field :name, :placeholder => 'name'
6
+ .item
7
+ = f.text_field :email, :placeholder => 'email'
8
+ .item
9
+ = f.text_area :message, :placeholder => 'message'
10
+ .item= f.submit "Send Now!"
@@ -0,0 +1,7 @@
1
+ %h2= block.title if !block.show_title
2
+ %ul.tree
3
+ - @application_menu_items.each do |item|
4
+ = render 'layouts/app_partials/application_tree', :root => item
5
+ - if logged_in?
6
+ .edit-link
7
+ = link_to edit_icon("Menu"), "/menu-manage", :class => "to-admin"
@@ -0,0 +1,10 @@
1
+ - @menu = Dust::Menu.find(1)
2
+ - @application_menu_items = @menu.menu_items.roots
3
+
4
+ %nav
5
+ %ul#tree
6
+ - @application_menu_items.each do |item|
7
+ = render 'layouts/app_partials/application_tree', :root => item
8
+ - if permitted_to? :manage, :menu
9
+ .edit-link
10
+ = link_to edit_icon("Menu"), edit_dust_menu_path(@menu), :class => "to-admin"
File without changes
@@ -0,0 +1,13 @@
1
+ - @user_session = Dust::UserSession.new
2
+
3
+ = raw(block.front_end_content)
4
+ = form_for @user_session do |f|
5
+ = f.error_messages
6
+ .item
7
+ = f.text_field :username, :class => 'field', placeholder: "Name"
8
+ .item
9
+ = f.password_field :password, :class => 'field', placeholder: "Password"
10
+
11
+ .action= f.submit 'Login'
12
+ .action Forgot your password? #{link_to "Reset It!", new_password_reset_path}
13
+ .action New? #{link_to "Apply for membership!", "place-an-order"}
@@ -0,0 +1 @@
1
+ Hi There
File without changes
@@ -0,0 +1 @@
1
+ Hi There
File without changes
@@ -0,0 +1,23 @@
1
+ authorization do
2
+ role :admin do
3
+ has_omnipotence
4
+ end
5
+ end
6
+
7
+ privileges do
8
+ privilege :manage do
9
+ includes :index, :show, :new, :create, :edit, :update, :destroy, :sort
10
+ end
11
+
12
+ privilege :view do
13
+ includes :index, :show, :dashboard
14
+ end
15
+
16
+ privilege :alter do
17
+ includes :edit, :update, :show
18
+ end
19
+
20
+ privilege :make do
21
+ includes :new, :create
22
+ end
23
+ end
@@ -0,0 +1,19 @@
1
+
2
+ .form-wrap.clearfix
3
+
4
+ = simple_form_for @<%= singular_table_name %> do |f|
5
+ = f.error_messages
6
+
7
+ .fields-full
8
+ .sub-header.clearfix
9
+ .button-bar.clearfix
10
+ -#= render :partial => 'search'
11
+ .admin-links
12
+ = link_to 'all <%= human_name.pluralize %>', <%= plural_table_name %>_path, :class => 'border'
13
+ = link_to "delete <%= singular_table_name %>", @<%= singular_table_name %>, :confirm => 'Are you sure?', :method => :delete
14
+ .content-wrapper
15
+ <% for attribute in attributes -%>
16
+ = f.input :<%= attribute.name %>
17
+ <% end -%>
18
+ .actions
19
+ = f.button :submit
@@ -0,0 +1,3 @@
1
+ - title "Edit <%= singular_table_name %>"
2
+
3
+ = render 'form'
@@ -0,0 +1,18 @@
1
+ - title "<%= human_name %>"
2
+
3
+ .sub-header
4
+ .button-bar.clearfix
5
+ -#= render :partial => 'search'
6
+ .admin-links
7
+ = link_to 'new <%= singular_table_name %>', new_<%= singular_table_name %>_path, :class => 'newfile tip', :title => "New <%= human_name %>"
8
+
9
+ .content-wrapper
10
+ -#= will_paginate @<%= plural_table_name %>
11
+
12
+ - @<%= plural_table_name %>.each do |<%= singular_table_name %>|
13
+ .index-item
14
+ .clearfix{:style => "float:right"}
15
+ = link_to "", <%= singular_table_name %>, :confirm => 'Are you sure?', :method => :delete, :class => 'ui-icon ui-icon-close destroy tip', :title => "Destroy This Item"
16
+ = link_to <%= singular_table_name %>.<%= attributes.first.name %>.try('capitalize'), edit_<%= singular_table_name %>_path(<%= singular_table_name %>), :class => ' edit tip', :title => "Edit This Item"
17
+
18
+ -#= will_paginate @<%= plural_table_name %>
@@ -0,0 +1,4 @@
1
+ - title "New <%= singular_table_name %>"
2
+
3
+ = render 'form'
4
+