dust-cms 0.0.05
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.md +3 -0
- data/Rakefile +5 -0
- data/app/assets/images/admin/blank.png +0 -0
- data/app/assets/images/admin/dust-letterpress.png +0 -0
- data/app/assets/images/admin/main-back.png +0 -0
- data/app/assets/images/admin/ui/delete-icon.png +0 -0
- data/app/assets/images/admin/ui/edit-icon.png +0 -0
- data/app/assets/images/admin/ui/handle.png +0 -0
- data/app/assets/images/admin/ui/icons.png +0 -0
- data/app/assets/images/admin/ui/index-icon.png +0 -0
- data/app/assets/images/admin/ui/new-icon.png +0 -0
- data/app/assets/images/entypo/entypo.eot +0 -0
- data/app/assets/images/entypo/entypo.svg +13 -0
- data/app/assets/images/entypo/entypo.ttf +0 -0
- data/app/assets/images/entypo/entypo.woff +0 -0
- data/app/assets/images/entypo-social/entypo-social.eot +0 -0
- data/app/assets/images/entypo-social/entypo-social.svg +13 -0
- data/app/assets/images/entypo-social/entypo-social.ttf +0 -0
- data/app/assets/images/entypo-social/entypo-social.woff +0 -0
- data/app/assets/images/fancybox/blank.gif +0 -0
- data/app/assets/images/fancybox/fancy_close.png +0 -0
- data/app/assets/images/fancybox/fancy_loading.png +0 -0
- data/app/assets/images/fancybox/fancy_nav_left.png +0 -0
- data/app/assets/images/fancybox/fancy_nav_right.png +0 -0
- data/app/assets/images/fancybox/fancy_shadow_e.png +0 -0
- data/app/assets/images/fancybox/fancy_shadow_n.png +0 -0
- data/app/assets/images/fancybox/fancy_shadow_ne.png +0 -0
- data/app/assets/images/fancybox/fancy_shadow_nw.png +0 -0
- data/app/assets/images/fancybox/fancy_shadow_s.png +0 -0
- data/app/assets/images/fancybox/fancy_shadow_se.png +0 -0
- data/app/assets/images/fancybox/fancy_shadow_sw.png +0 -0
- data/app/assets/images/fancybox/fancy_shadow_w.png +0 -0
- data/app/assets/images/fancybox/fancy_title_left.png +0 -0
- data/app/assets/images/fancybox/fancy_title_main.png +0 -0
- data/app/assets/images/fancybox/fancy_title_over.png +0 -0
- data/app/assets/images/fancybox/fancy_title_right.png +0 -0
- data/app/assets/images/fancybox/fancybox-x.png +0 -0
- data/app/assets/images/fancybox/fancybox-y.png +0 -0
- data/app/assets/images/fancybox/fancybox.png +0 -0
- data/app/assets/javascripts/cms/dust/defaults.js.coffee +31 -0
- data/app/assets/javascripts/cms/dust/gallery/photo.js.coffee +1 -0
- data/app/assets/javascripts/cms/dust/gallery/photo_view.js.coffee +21 -0
- data/app/assets/javascripts/cms/dust/gallery/photos.js.coffee +6 -0
- data/app/assets/javascripts/cms/dust/gallery/photos_view.js.coffee +12 -0
- data/app/assets/javascripts/cms/dust/gallery/router.js.coffee +14 -0
- data/app/assets/javascripts/cms/dust/gallery.js.coffee +31 -0
- data/app/assets/javascripts/cms/dust/nav.js.coffee +21 -0
- data/app/assets/javascripts/cms/dust/sections.js.coffee +21 -0
- data/app/assets/javascripts/cms/dust/sortables.js.coffee +64 -0
- data/app/assets/javascripts/cms/dust/window.js.coffee +11 -0
- data/app/assets/javascripts/cms/dust.js.coffee +19 -0
- data/app/assets/javascripts/cms/lib/backbone.js +42 -0
- data/app/assets/javascripts/cms/lib/fineuploader-3.0.js +71 -0
- data/app/assets/javascripts/cms/lib/handlebars.js +1920 -0
- data/app/assets/javascripts/cms/lib/spin.js +2 -0
- data/app/assets/javascripts/cms/lib/underscore.js +1 -0
- data/app/assets/javascripts/cms.js +14 -0
- data/app/assets/javascripts/core/jquery.form.js +785 -0
- data/app/assets/javascripts/core/jquery.html5.js +29 -0
- data/app/assets/javascripts/core/jquery.mousewheel-3.0.2.pack.js +13 -0
- data/app/assets/javascripts/core/jquery.placeholder.min.js +11 -0
- data/app/assets/javascripts/core/nestedsortables.js +429 -0
- data/app/assets/javascripts/core/serializelist.js +66 -0
- data/app/assets/javascripts/core/tipTip.js +21 -0
- data/app/assets/javascripts/core.js +4 -0
- data/app/assets/javascripts/front_end/application-main.js.coffee +27 -0
- data/app/assets/javascripts/front_end/map.js +34 -0
- data/app/assets/javascripts/front_end/video.js +4569 -0
- data/app/assets/javascripts/front_end.js +18 -0
- data/app/assets/stylesheets/cms/flash_messages.css.scss +17 -0
- data/app/assets/stylesheets/cms/footer.css.scss +12 -0
- data/app/assets/stylesheets/cms/forms.css.scss +67 -0
- data/app/assets/stylesheets/cms/gallery.css.scss +21 -0
- data/app/assets/stylesheets/cms/icons.css.scss +123 -0
- data/app/assets/stylesheets/cms/jquery-ui.custom.scss +6 -0
- data/app/assets/stylesheets/cms/layout.css.scss +162 -0
- data/app/assets/stylesheets/cms/lib/grid.css.scss +116 -0
- data/app/assets/stylesheets/cms/lib/mixins.css.scss +20 -0
- data/app/assets/stylesheets/cms/login.scss +12 -0
- data/app/assets/stylesheets/cms/main.old +155 -0
- data/app/assets/stylesheets/cms/nav.css.scss +73 -0
- data/app/assets/stylesheets/cms/sections.scss +17 -0
- data/app/assets/stylesheets/cms/sortables.scss +20 -0
- data/app/assets/stylesheets/cms.css.scss +30 -0
- data/app/assets/stylesheets/core/app/defaults.css.scss +556 -0
- data/app/assets/stylesheets/core/plugins/PIE.htc +96 -0
- data/app/assets/stylesheets/core/plugins/jquery-ui-1.8.5.custom.old +572 -0
- data/app/assets/stylesheets/core/plugins/jquery.fancybox-1.3.1.css +364 -0
- data/app/assets/stylesheets/core/plugins/skeleton.css +155 -0
- data/app/assets/stylesheets/core/plugins/tipTip.css +115 -0
- data/app/assets/stylesheets/core/plugins/uploadify.css +25 -0
- data/app/assets/stylesheets/core/reset/reset.css +211 -0
- data/app/assets/stylesheets/core/reset/text.css +86 -0
- data/app/assets/stylesheets/core.css.scss +14 -0
- data/app/assets/stylesheets/front_end/app/just-delete-me-and-start-over.css.scss +70 -0
- data/app/assets/stylesheets/front_end.css +14 -0
- data/app/controllers/authentication_controller.rb +30 -0
- data/app/controllers/dust/blocks_controller.rb +49 -0
- data/app/controllers/dust/contacts_controller.rb +89 -0
- data/app/controllers/dust/dashboard_controller.rb +26 -0
- data/app/controllers/dust/gallery/albums_controller.rb +49 -0
- data/app/controllers/dust/gallery/api/photos_controller.rb +28 -0
- data/app/controllers/dust/gallery/photos_controller.rb +47 -0
- data/app/controllers/dust/menu_items_controller.rb +51 -0
- data/app/controllers/dust/menus_controller.rb +47 -0
- data/app/controllers/dust/pages_controller.rb +52 -0
- data/app/controllers/dust/password_resets_controller.rb +48 -0
- data/app/controllers/dust/posts_controller.rb +47 -0
- data/app/controllers/dust/roles_controller.rb +47 -0
- data/app/controllers/dust/sessions_controller.rb +29 -0
- data/app/controllers/dust/site_wides_controller.rb +28 -0
- data/app/controllers/dust/sortable_controller.rb +17 -0
- data/app/controllers/dust/users_controller.rb +52 -0
- data/app/controllers/front_end/page_controller.rb +27 -0
- data/app/controllers/front_end/post_controller.rb +14 -0
- data/app/controllers/front_end/sitemap_controller.rb +11 -0
- data/app/controllers/front_end_controller.rb +18 -0
- data/app/helpers/error_messages_helper.rb +23 -0
- data/app/helpers/exceptions.rb +4 -0
- data/app/helpers/layout_helper.rb +28 -0
- data/app/helpers/misc_helper.rb +29 -0
- data/app/helpers/region_helper.rb +32 -0
- data/app/mailers/post_office.rb +39 -0
- data/app/models/ckeditor/asset.rb +7 -0
- data/app/models/ckeditor/attachment_file.rb +7 -0
- data/app/models/ckeditor/picture.rb +7 -0
- data/app/models/dust/block.rb +114 -0
- data/app/models/dust/builder/page.rb +84 -0
- data/app/models/dust/builder/site_wide.rb +50 -0
- data/app/models/dust/contact.rb +34 -0
- data/app/models/dust/gallery/album.rb +14 -0
- data/app/models/dust/gallery/photo.rb +23 -0
- data/app/models/dust/handlebar.rb +59 -0
- data/app/models/dust/map.rb +21 -0
- data/app/models/dust/menu/item_dependency.rb +66 -0
- data/app/models/dust/menu.rb +11 -0
- data/app/models/dust/menu_item.rb +64 -0
- data/app/models/dust/page.rb +52 -0
- data/app/models/dust/post.rb +39 -0
- data/app/models/dust/role.rb +9 -0
- data/app/models/dust/section.rb +11 -0
- data/app/models/dust/session.rb +28 -0
- data/app/models/dust/site_wide.rb +41 -0
- data/app/models/dust/sort.rb +52 -0
- data/app/models/dust/sortable_item.rb +21 -0
- data/app/models/dust/user.rb +49 -0
- data/app/uploaders/ckeditor_attachment_file_uploader.rb +42 -0
- data/app/uploaders/ckeditor_picture_uploader.rb +53 -0
- data/app/uploaders/gallery_photo_uploader.rb +52 -0
- data/app/uploaders/image_uploader.rb +51 -0
- data/app/uploaders/slide_image_uploader.rb +51 -0
- data/app/views/dust/blocks/_block.html.haml +20 -0
- data/app/views/dust/blocks/_form.html.haml +50 -0
- data/app/views/dust/blocks/_normal_block_content.html.haml +1 -0
- data/app/views/dust/blocks/_search.html.haml +4 -0
- data/app/views/dust/blocks/edit.html.haml +4 -0
- data/app/views/dust/blocks/index.html.haml +16 -0
- data/app/views/dust/blocks/new.html.haml +3 -0
- data/app/views/dust/contacts/_form.html.haml +37 -0
- data/app/views/dust/contacts/_import_csv.html.haml +8 -0
- data/app/views/dust/contacts/_instance.html.haml +13 -0
- data/app/views/dust/contacts/_search.html.haml +4 -0
- data/app/views/dust/contacts/edit.html.haml +2 -0
- data/app/views/dust/contacts/index.html.haml +17 -0
- data/app/views/dust/contacts/index.json.haml +6 -0
- data/app/views/dust/contacts/new.html.haml +3 -0
- data/app/views/dust/dashboard/_options.html.haml +6 -0
- data/app/views/dust/dashboard/show.html.haml +33 -0
- data/app/views/dust/dashboard/update.html.haml +6 -0
- data/app/views/dust/gallery/albums/_form.html.haml +52 -0
- data/app/views/dust/gallery/albums/_photo.html.haml +12 -0
- data/app/views/dust/gallery/albums/edit.html.haml +3 -0
- data/app/views/dust/gallery/albums/index.html.haml +18 -0
- data/app/views/dust/gallery/albums/new.html.haml +4 -0
- data/app/views/dust/gallery/albums/show.html.haml +2 -0
- data/app/views/dust/gallery/photos/_form.html.haml +26 -0
- data/app/views/dust/gallery/photos/edit.html.haml +3 -0
- data/app/views/dust/gallery/photos/index.html.haml +18 -0
- data/app/views/dust/gallery/photos/new.html.haml +4 -0
- data/app/views/dust/gallery/photos/show.json.jbuilder +5 -0
- data/app/views/dust/menu_items/_form.html.haml +24 -0
- data/app/views/dust/menu_items/_roots.html.haml +3 -0
- data/app/views/dust/menu_items/_search.html.haml +4 -0
- data/app/views/dust/menu_items/_tree.html.haml +11 -0
- data/app/views/dust/menu_items/edit.html.haml +2 -0
- data/app/views/dust/menu_items/index.html.haml +19 -0
- data/app/views/dust/menu_items/new.html.haml +2 -0
- data/app/views/dust/menus/_form.html.haml +39 -0
- data/app/views/dust/menus/edit.html.haml +3 -0
- data/app/views/dust/menus/index.html.haml +18 -0
- data/app/views/dust/menus/new.html.haml +4 -0
- data/app/views/dust/menus/show.html.haml +2 -0
- data/app/views/dust/pages/_form.html.haml +68 -0
- data/app/views/dust/pages/_search.html.haml +4 -0
- data/app/views/dust/pages/edit.html.haml +3 -0
- data/app/views/dust/pages/index.html.haml +16 -0
- data/app/views/dust/pages/new.html.haml +3 -0
- data/app/views/dust/password_resets/edit.html.haml +6 -0
- data/app/views/dust/password_resets/new.html.haml +10 -0
- data/app/views/dust/posts/_form.html.haml +39 -0
- data/app/views/dust/posts/edit.html.haml +3 -0
- data/app/views/dust/posts/index.html.haml +18 -0
- data/app/views/dust/posts/new.html.haml +4 -0
- data/app/views/dust/posts/show.html.haml +2 -0
- data/app/views/dust/roles/_form.html.haml +11 -0
- data/app/views/dust/roles/edit.html.haml +2 -0
- data/app/views/dust/roles/index.html.haml +14 -0
- data/app/views/dust/roles/new.html.haml +2 -0
- data/app/views/dust/sessions/_form.html.haml +18 -0
- data/app/views/dust/sessions/new.html.haml +2 -0
- data/app/views/dust/site_wides/new.html.haml +19 -0
- data/app/views/dust/slides/_form.html.haml +26 -0
- data/app/views/dust/slides/_search.html.haml +4 -0
- data/app/views/dust/slides/_slideshow.html.haml +12 -0
- data/app/views/dust/slides/edit.html.haml +5 -0
- data/app/views/dust/slides/index.html.haml +25 -0
- data/app/views/dust/slides/index.js.haml +2 -0
- data/app/views/dust/slides/new.html.haml +6 -0
- data/app/views/dust/slides/show.html.haml +15 -0
- data/app/views/dust/sortable/sort.js.coffee +10 -0
- data/app/views/dust/users/_form.html.haml +27 -0
- data/app/views/dust/users/_search.html.haml +4 -0
- data/app/views/dust/users/_user_bar.html.haml +10 -0
- data/app/views/dust/users/dashboard.html.haml +40 -0
- data/app/views/dust/users/edit.html.haml +2 -0
- data/app/views/dust/users/index.html.haml +16 -0
- data/app/views/dust/users/new.html.haml +2 -0
- data/app/views/front_end/page/_admin.html.haml +6 -0
- data/app/views/front_end/page/search.html.haml +9 -0
- data/app/views/front_end/page/show.html.haml +8 -0
- data/app/views/front_end/post/_admin.html.haml +7 -0
- data/app/views/front_end/post/show.html.haml +12 -0
- data/app/views/front_end/sitemap/index.html.haml +4 -0
- data/app/views/front_end/sitemap/index.xml.haml +9 -0
- data/app/views/layouts/app_partials/_analytics.html.haml +11 -0
- data/app/views/layouts/app_partials/_application_tree.html.haml +6 -0
- data/app/views/layouts/cms.html.haml +52 -0
- data/app/views/layouts/cms_partials/_nav.html.haml +5 -0
- data/app/views/layouts/front_end.html.haml +22 -0
- data/app/views/layouts/sessions.html.haml +19 -0
- data/app/views/post_office/contact_confirmation.html.haml +7 -0
- data/app/views/post_office/contact_request.html.haml +24 -0
- data/app/views/post_office/password_reset_instructions.html.haml +6 -0
- data/app/views/widgets/_contact_form.html.haml +20 -0
- data/app/views/widgets/_map.html.haml +16 -0
- data/app/views/widgets/_quick_contact_form.html.haml +10 -0
- data/app/views/widgets/_site_map.html.haml +7 -0
- data/app/views/widgets/_site_menu.html.haml +10 -0
- data/app/views/widgets/_slider.html.haml +0 -0
- data/app/views/widgets/_user_login.html.haml +13 -0
- data/app/views/widgets/galleries/_archive.html.haml +1 -0
- data/app/views/widgets/galleries/_show.html.haml +0 -0
- data/app/views/widgets/posts/_index.html.haml +1 -0
- data/app/views/widgets/posts/_show.html.haml +0 -0
- data/config/authorization_rules.rb +23 -0
- data/config/generators/templates/haml/scaffold/_form.html.haml +19 -0
- data/config/generators/templates/haml/scaffold/edit.html.haml +3 -0
- data/config/generators/templates/haml/scaffold/index.html.haml +18 -0
- data/config/generators/templates/haml/scaffold/new.html.haml +4 -0
- data/config/generators/templates/haml/scaffold/show.html.haml +2 -0
- data/config/generators/templates/rails/scaffold_controller/controller.rb +51 -0
- data/config/initializers/app_string_io.rb +12 -0
- data/config/initializers/ckeditor.rb +18 -0
- data/config/initializers/client_side_validations.rb +13 -0
- data/config/initializers/dust_config.rb +22 -0
- data/config/initializers/dust_core_reloader.rb +11 -0
- data/config/initializers/sorcery.rb +398 -0
- data/config/initializers/wrap_parameters.rb +14 -0
- data/config/routes.rb +55 -0
- data/db/migrate/20101206025845_create_roles.rb +11 -0
- data/db/migrate/20110217212357_create_ckeditor_assets.rb +31 -0
- data/db/migrate/20110218000640_create_pages.rb +15 -0
- data/db/migrate/20110218000641_create_sections.rb +15 -0
- data/db/migrate/20110218002220_create_contacts.rb +22 -0
- data/db/migrate/20110218020608_create_menu_items.rb +21 -0
- data/db/migrate/20110507014158_create_blocks.rb +23 -0
- data/db/migrate/20121106195938_sorcery_core.rb +17 -0
- data/db/migrate/20121106195939_sorcery_remember_me.rb +15 -0
- data/db/migrate/20121106195940_sorcery_reset_password.rb +17 -0
- data/db/migrate/20121106195941_sorcery_activity_logging.rb +17 -0
- data/db/migrate/20121106200754_sorcery_user_activation.rb +17 -0
- data/db/migrate/20130220044031_create_site_wides.rb +11 -0
- data/db/migrate/20130220051658_create_menus.rb +11 -0
- data/db/migrate/20130223030136_create_albums.rb +13 -0
- data/db/migrate/20130223040911_create_photos.rb +15 -0
- data/db/migrate/20130223044553_create_posts.rb +15 -0
- data/lib/dust/engine.rb +18 -0
- data/lib/dust/utils.rb +14 -0
- data/lib/dust/version.rb +3 -0
- data/lib/dust-cms.rb +53 -0
- data/lib/tasks/dust_tasks.rake +51 -0
- data/lib/tasks/seed.rb +46 -0
- metadata +613 -0
@@ -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,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,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,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,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,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,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,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,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,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,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,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 %>
|