cd2_catton_cms 1.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Rakefile +37 -0
- data/app/assets/config/c_manifest.js +2 -0
- data/app/assets/images/c/drag_handle.gif +0 -0
- data/app/assets/images/c/login_background.jpg +0 -0
- data/app/assets/images/c/main_application/hero.jpg +0 -0
- data/app/assets/images/c/main_application/search.png +0 -0
- data/app/assets/images/c/placeholder_product_image.png +0 -0
- data/app/assets/images/c/select_arrow_down_blk.png +0 -0
- data/app/assets/images/c/small_icon.png +0 -0
- data/app/assets/images/c/vendor/chosen-sprite.png +0 -0
- data/app/assets/javascripts/c/application.js +59 -0
- data/app/assets/javascripts/c/change_tag.js +49 -0
- data/app/assets/javascripts/c/chosen.js +2 -0
- data/app/assets/javascripts/c/confirm_delete.js +55 -0
- data/app/assets/javascripts/c/draggable_tree.js +223 -0
- data/app/assets/javascripts/c/dropzone_init.js +98 -0
- data/app/assets/javascripts/c/fake_table.js +87 -0
- data/app/assets/javascripts/c/master_form2/collection.js +180 -0
- data/app/assets/javascripts/c/master_form2/eu_cookie.js +1 -0
- data/app/assets/javascripts/c/master_form2/jrecord.js +116 -0
- data/app/assets/javascripts/c/master_form2/master_form.coffee +4 -0
- data/app/assets/javascripts/c/split_buttons.js.erb +15 -0
- data/app/assets/javascripts/c/things_to_be_done.js +138 -0
- data/app/assets/javascripts/c/unloadevent.js +35 -0
- data/app/assets/stylesheets/c/_core.sass +237 -0
- data/app/assets/stylesheets/c/_engine.sass +4 -0
- data/app/assets/stylesheets/c/_variables.sass +32 -0
- data/app/assets/stylesheets/c/_vendor.sass +6 -0
- data/app/assets/stylesheets/c/application/checkout/_cart.sass +85 -0
- data/app/assets/stylesheets/c/application/checkout/_checkout.sass +87 -0
- data/app/assets/stylesheets/c/application/elements/buttons.sass +34 -0
- data/app/assets/stylesheets/c/application/elements/forms.sass +135 -0
- data/app/assets/stylesheets/c/application/elements/shadows.sass +23 -0
- data/app/assets/stylesheets/c/application/partials/_breadcrumbs.sass +10 -0
- data/app/assets/stylesheets/c/application/partials/_categories_sidebars/_1.sass +53 -0
- data/app/assets/stylesheets/c/application/partials/_categories_sidebars/_2.sass +77 -0
- data/app/assets/stylesheets/c/application/partials/_footer.sass +43 -0
- data/app/assets/stylesheets/c/application/partials/_header.sass +317 -0
- data/app/assets/stylesheets/c/engine/_draggable_trees.sass +68 -0
- data/app/assets/stylesheets/c/engine/_form_pages.sass +153 -0
- data/app/assets/stylesheets/c/engine/_header_bar.sass +29 -0
- data/app/assets/stylesheets/c/engine/_index_header.sass +17 -0
- data/app/assets/stylesheets/c/engine/_layout.sass +15 -0
- data/app/assets/stylesheets/c/engine/_login.sass +38 -0
- data/app/assets/stylesheets/c/engine/_navbar.sass +19 -0
- data/app/assets/stylesheets/c/engine/_pagination.sass +16 -0
- data/app/assets/stylesheets/c/engine/_settings.sass +5 -0
- data/app/assets/stylesheets/c/engine/_sidebar.sass +20 -0
- data/app/assets/stylesheets/c/engine/_tables.sass +76 -0
- data/app/assets/stylesheets/c/engine/flash_messages.sass +2 -0
- data/app/assets/stylesheets/c/print_application.sass +167 -0
- data/app/assets/stylesheets/c/vendor/_flex_mixins.scss +394 -0
- data/app/assets/stylesheets/c/vendor/_normalize.sass +340 -0
- data/app/controllers/c/admin/blogs_controller.rb +57 -0
- data/app/controllers/c/admin/devise/passwords_controller.rb +5 -0
- data/app/controllers/c/admin/devise/sessions_controller.rb +5 -0
- data/app/controllers/c/admin/documents_controller.rb +50 -0
- data/app/controllers/c/admin/enquiries_controller.rb +22 -0
- data/app/controllers/c/admin/images_controller.rb +21 -0
- data/app/controllers/c/admin/locations_controller.rb +63 -0
- data/app/controllers/c/admin/menu_items_controller.rb +49 -0
- data/app/controllers/c/admin/pages_controller.rb +94 -0
- data/app/controllers/c/admin/projects_controller.rb +55 -0
- data/app/controllers/c/admin/redirects_controller.rb +55 -0
- data/app/controllers/c/admin/roles_controller.rb +49 -0
- data/app/controllers/c/admin/slides_controller.rb +50 -0
- data/app/controllers/c/admin/slideshows_controller.rb +34 -0
- data/app/controllers/c/admin/team_members_controller.rb +61 -0
- data/app/controllers/c/admin/testimonials_controller.rb +43 -0
- data/app/controllers/c/admin/users_controller.rb +51 -0
- data/app/controllers/c/admin_controller.rb +43 -0
- data/app/controllers/c/application_controller.rb +15 -0
- data/app/controllers/c/errors_controller.rb +12 -0
- data/app/controllers/c/front/devise/passwords_controller.rb +6 -0
- data/app/controllers/c/front/devise/registrations_controller.rb +32 -0
- data/app/controllers/c/front/devise/sessions_controller.rb +27 -0
- data/app/controllers/c/front/mailchimp_controller.rb +32 -0
- data/app/controllers/c/front_controller.rb +7 -0
- data/app/controllers/c/front_end/blogs_controller.rb +21 -0
- data/app/controllers/c/front_end/enquiries_controller.rb +32 -0
- data/app/controllers/c/front_end/pages_controller.rb +19 -0
- data/app/controllers/c/main_application_controller.rb +22 -0
- data/app/helpers/c/application_helper.rb +51 -0
- data/app/helpers/c/blogs_helper.rb +113 -0
- data/app/helpers/c/c_form_builder.rb +43 -0
- data/app/helpers/c/link_to_helper.rb +25 -0
- data/app/helpers/c/navigation_helper.rb +28 -0
- data/app/helpers/c/pages_helper.rb +27 -0
- data/app/helpers/c/storefront_helper.rb +63 -0
- data/app/mailers/c/application_mailer.rb +7 -0
- data/app/mailers/c/enquiries_mailer.rb +10 -0
- data/app/models/c/ability.rb +21 -0
- data/app/models/c/application_record.rb +6 -0
- data/app/models/c/author_record.rb +13 -0
- data/app/models/c/blog.rb +43 -0
- data/app/models/c/document.rb +17 -0
- data/app/models/c/enquiry.rb +95 -0
- data/app/models/c/image.rb +11 -0
- data/app/models/c/location.rb +18 -0
- data/app/models/c/menu_item.rb +35 -0
- data/app/models/c/non_delete.rb +10 -0
- data/app/models/c/page.rb +48 -0
- data/app/models/c/page_info.rb +16 -0
- data/app/models/c/permission.rb +9 -0
- data/app/models/c/permission_subject.rb +12 -0
- data/app/models/c/project.rb +20 -0
- data/app/models/c/redirect.rb +33 -0
- data/app/models/c/role.rb +18 -0
- data/app/models/c/slide.rb +16 -0
- data/app/models/c/slideshow.rb +23 -0
- data/app/models/c/team_member.rb +33 -0
- data/app/models/c/testimonial.rb +42 -0
- data/app/models/c/user.rb +42 -0
- data/app/models/c/user_role.rb +7 -0
- data/app/models/c/weight.rb +10 -0
- data/app/models/concerns/c/authorable.rb +18 -0
- data/app/models/concerns/c/documentable.rb +18 -0
- data/app/models/concerns/c/imageable.rb +49 -0
- data/app/models/concerns/c/non_deletable.rb +30 -0
- data/app/models/concerns/c/orderable.rb +30 -0
- data/app/models/concerns/c/previewable.rb +20 -0
- data/app/models/concerns/c/site_page.rb +89 -0
- data/app/uploaders/c/file_uploader.rb +9 -0
- data/app/uploaders/c/image_uploader.rb +39 -0
- data/app/views/c/admin/_background_jobs_dropdown.html.haml +18 -0
- data/app/views/c/admin/_bread_crumbs.html.haml +7 -0
- data/app/views/c/admin/_ebay_categories.html.haml +20 -0
- data/app/views/c/admin/_flash_messages.html.haml +5 -0
- data/app/views/c/admin/_header_bar.html.haml +18 -0
- data/app/views/c/admin/_index_table.html.haml +113 -0
- data/app/views/c/admin/_index_table_data.html.haml +17 -0
- data/app/views/c/admin/_navigation_bar.html.haml +1 -0
- data/app/views/c/admin/_preview_image.html.haml +2 -0
- data/app/views/c/admin/_preview_upload.html.haml +18 -0
- data/app/views/c/admin/_seo.html.haml +11 -0
- data/app/views/c/admin/_side_menu.html.haml +26 -0
- data/app/views/c/admin/_uploaded_images_new.html.haml +13 -0
- data/app/views/c/admin/blogs/_form.html.haml +58 -0
- data/app/views/c/admin/blogs/index.html.haml +9 -0
- data/app/views/c/admin/confirm_destroy.html.haml +6 -0
- data/app/views/c/admin/confirm_mass_destroy.html.haml +10 -0
- data/app/views/c/admin/documents/_form.html.haml +8 -0
- data/app/views/c/admin/documents/index.html.haml +9 -0
- data/app/views/c/admin/edit.html.haml +15 -0
- data/app/views/c/admin/enquiries/index.html.haml +14 -0
- data/app/views/c/admin/locations/_form.html.haml +58 -0
- data/app/views/c/admin/locations/index.html.haml +9 -0
- data/app/views/c/admin/menu_items/_form.html.haml +44 -0
- data/app/views/c/admin/menu_items/_menu_item_list_item.html.haml +10 -0
- data/app/views/c/admin/menu_items/index.html.haml +10 -0
- data/app/views/c/admin/new.html.haml +8 -0
- data/app/views/c/admin/pages/_form.html.haml +93 -0
- data/app/views/c/admin/pages/_page_list_item.html.haml +10 -0
- data/app/views/c/admin/pages/dashboard.html.erb +0 -0
- data/app/views/c/admin/pages/index.html.haml +11 -0
- data/app/views/c/admin/projects/_form.html.haml +46 -0
- data/app/views/c/admin/projects/index.html.haml +9 -0
- data/app/views/c/admin/quick_edit.js.erb +6 -0
- data/app/views/c/admin/redirects/_form.html.haml +14 -0
- data/app/views/c/admin/redirects/index.html.haml +9 -0
- data/app/views/c/admin/reload_images.js.erb +2 -0
- data/app/views/c/admin/roles/_form.html.haml +42 -0
- data/app/views/c/admin/roles/index.html.haml +17 -0
- data/app/views/c/admin/set_preview_image.js.erb +1 -0
- data/app/views/c/admin/show.html.haml +1 -0
- data/app/views/c/admin/slides/_form.html.haml +19 -0
- data/app/views/c/admin/slideshows/_form.html.haml +25 -0
- data/app/views/c/admin/slideshows/index.html.haml +8 -0
- data/app/views/c/admin/team_members/_form.html.haml +20 -0
- data/app/views/c/admin/team_members/index.html.haml +10 -0
- data/app/views/c/admin/testimonials/_form.html.haml +13 -0
- data/app/views/c/admin/testimonials/index.html.haml +8 -0
- data/app/views/c/admin/users/_form.html.haml +17 -0
- data/app/views/c/admin/users/index.html.haml +12 -0
- data/app/views/c/enquiries_mailer/new_enquiry.html.haml +14 -0
- data/app/views/c/enquiries_mailer/new_enquiry.text.haml +9 -0
- data/app/views/c/errors/404.html.haml +5 -0
- data/app/views/c/errors/500.html.haml +5 -0
- data/app/views/c/front/application/_category_item.html.haml +2 -0
- data/app/views/c/front/application/_menu_item.html.haml +4 -0
- data/app/views/c/front/application/_sales_highlight.html.haml +1 -0
- data/app/views/c/front/application/_slide.html.haml +6 -0
- data/app/views/c/front/blogs/_archive_filter_month.html.haml +2 -0
- data/app/views/c/front/blogs/_archive_filter_year.html.haml +1 -0
- data/app/views/c/front/blogs/_menu_item.html.haml +2 -0
- data/app/views/c/front_end/enquiries/new.html.haml +23 -0
- data/app/views/c/front_end/enquiries/thanks.html.haml +5 -0
- data/app/views/c/front_end/pages/_sales_highlight.html.haml +7 -0
- data/app/views/c/front_end/pages/about.html.haml +8 -0
- data/app/views/c/front_end/pages/home.html.haml +19 -0
- data/app/views/c/front_end/pages/search.html.haml +16 -0
- data/app/views/c/front_end/pages/show.html.haml +7 -0
- data/app/views/c/front_end/pages/sitemap.xml.builder +25 -0
- data/app/views/c/mailchimp/_signup_newsletter.html.haml +4 -0
- data/app/views/c/main_application/_application_bar.html.haml +22 -0
- data/app/views/c/main_application/_breadcrumbs.html.haml +7 -0
- data/app/views/c/main_application/_contact_info.html.haml +5 -0
- data/app/views/c/main_application/_footer.html.haml +49 -0
- data/app/views/c/main_application/_front_head_tags.html.haml +3 -0
- data/app/views/c/main_application/_header.html.haml +55 -0
- data/app/views/c/main_application/_site_search.html.haml +3 -0
- data/app/views/c/main_application/_yield.html.haml +5 -0
- data/app/views/devise/confirmations/new.html.erb +16 -0
- data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/devise/mailer/password_change.html.erb +3 -0
- data/app/views/devise/mailer/reset_password_instructions.html.erb +8 -0
- data/app/views/devise/mailer/unlock_instructions.html.erb +7 -0
- data/app/views/devise/passwords/edit.html.haml +26 -0
- data/app/views/devise/passwords/new.html.haml +14 -0
- data/app/views/devise/registrations/edit.html.haml +40 -0
- data/app/views/devise/registrations/new.html.haml +24 -0
- data/app/views/devise/sessions/new.html.haml +20 -0
- data/app/views/devise/shared/_links.html.erb +25 -0
- data/app/views/devise/unlocks/new.html.erb +16 -0
- data/app/views/layouts/c/application.html.haml +18 -0
- data/app/views/layouts/c/cms_login_layout.html.haml +18 -0
- data/app/views/layouts/c/mailer.html.erb +245 -0
- data/app/views/layouts/c/mailer.text.erb +3 -0
- data/app/views/layouts/c/main_application.html.haml +13 -0
- data/config/environment.rb +0 -0
- data/config/initializers/carrierwave.rb +18 -0
- data/config/initializers/devise.rb +283 -0
- data/config/initializers/rack_profiler.rb +8 -0
- data/config/locales/devise.en.yml +62 -0
- data/config/locales/en.yml +17 -0
- data/config/routes.rb +150 -0
- data/db/migrate/20160819000000_migrate_schema.rb +273 -0
- data/db/seed_data/countries.txt +227 -0
- data/lib/c/engine.rb +38 -0
- data/lib/c/version.rb +4 -0
- data/lib/cd2_catton_cms.rb +51 -0
- data/lib/tasks/c_tasks.rake +28 -0
- data/spec/dummy/Gemfile +4 -0
- data/spec/dummy/Gemfile.lock +20 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/config/manifest.js +5 -0
- data/spec/dummy/app/assets/images/placeholder.png +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +26 -0
- data/spec/dummy/app/assets/javascripts/cable.js +13 -0
- data/spec/dummy/app/assets/javascripts/pages.coffee +3 -0
- data/spec/dummy/app/assets/stylesheets/application.sass +13 -0
- data/spec/dummy/app/assets/stylesheets/c/application.sass +2 -0
- data/spec/dummy/app/controllers/application_controller.rb +10 -0
- data/spec/dummy/app/controllers/blogs_controller.rb +11 -0
- data/spec/dummy/app/controllers/pages_controller.rb +13 -0
- data/spec/dummy/app/models/application_record.rb +4 -0
- data/spec/dummy/app/models/page.rb +3 -0
- data/spec/dummy/bin/bundle +4 -0
- data/spec/dummy/bin/rails +5 -0
- data/spec/dummy/bin/rake +5 -0
- data/spec/dummy/bin/setup +35 -0
- data/spec/dummy/bin/update +30 -0
- data/spec/dummy/config/application.rb +17 -0
- data/spec/dummy/config/boot.rb +6 -0
- data/spec/dummy/config/cable.yml +9 -0
- data/spec/dummy/config/database.travis.yml +3 -0
- data/spec/dummy/config/database.yml +85 -0
- data/spec/dummy/config/environment.rb +6 -0
- data/spec/dummy/config/environments/development.rb +61 -0
- data/spec/dummy/config/environments/production.rb +87 -0
- data/spec/dummy/config/environments/test.rb +43 -0
- data/spec/dummy/config/initializers/application_controller_renderer.rb +7 -0
- data/spec/dummy/config/initializers/assets.rb +21 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +8 -0
- data/spec/dummy/config/initializers/carrierwave.rb +15 -0
- data/spec/dummy/config/initializers/commercity.rb +4 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +6 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +5 -0
- data/spec/dummy/config/initializers/inflections.rb +17 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/new_framework_defaults.rb +25 -0
- data/spec/dummy/config/initializers/session_store.rb +4 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +15 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/puma.rb +48 -0
- data/spec/dummy/config/routes.rb +4 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/config/sidekiq.yml +6 -0
- data/spec/dummy/config/spring.rb +7 -0
- data/spec/dummy/config.ru +5 -0
- data/spec/dummy/db/schema.rb +1110 -0
- data/spec/dummy/lib/tasks/reprocess_images.rake +12 -0
- data/spec/dummy/lib/tasks/reset_all.rake +44 -0
- data/spec/dummy/lib/tasks/seeds/seed_blogs.rake +8 -0
- data/spec/dummy/lib/tasks/seeds/seed_pages.rake +24 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/spec/dummy/public/apple-touch-icon.png +0 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/seed/highlight1.png +0 -0
- data/spec/dummy/seed/highlight2.png +0 -0
- data/spec/dummy/seed/images/1/main.jpg +0 -0
- data/spec/dummy/seed/images/1/thumb.JPG +0 -0
- data/spec/dummy/seed/images/1/thumb2.jpg +0 -0
- data/spec/dummy/seed/images/2/main.jpeg +0 -0
- data/spec/dummy/seed/images/2/thumb.JPG +0 -0
- data/spec/dummy/seed/images/2/thumb2.JPG +0 -0
- data/spec/dummy/spec/models/redirect_spec.rb +57 -0
- data/spec/dummy/spec/support/factory_girl.rb +8 -0
- data/spec/dummy/spec/support/seed/images/product_image.png +0 -0
- data/spec/rails_helper.rb +49 -0
- data/spec/spec_helper.rb +52 -0
- metadata +734 -0
@@ -0,0 +1,20 @@
|
|
1
|
+
- if check == "check"
|
2
|
+
- if !cats.nil?
|
3
|
+
- i = 1
|
4
|
+
- cats.each do |cat|
|
5
|
+
- if cats.last == cat
|
6
|
+
.field{data: i}
|
7
|
+
= select_tag :ebay_category, options_for_select(cat.self_and_siblings.pluck(:category_name, :id), selected: cat.id), {class: save_name, name: save_name}
|
8
|
+
- if cat.children.any?
|
9
|
+
= select_tag :ebay_category, options_for_select(cat.children.pluck(:category_name, :id)), {class: save_name, name: save_name, prompt: "-- Please select --"}
|
10
|
+
- else
|
11
|
+
.field{data: i}
|
12
|
+
= select_tag :ebay_category, options_for_select(cat.self_and_siblings.pluck(:category_name, :id), selected: cat.id)
|
13
|
+
- i += 1
|
14
|
+
- else
|
15
|
+
.field{data: 1}
|
16
|
+
= select_tag :ebay_category, options_for_select(C::EbayCategory.roots.pluck(:category_name, :id)), {class: save_name, name: save_name, prompt: "-- Please select --"}
|
17
|
+
- if check == "get"
|
18
|
+
- if !ebay_cat.children.empty?
|
19
|
+
.field{data: i}
|
20
|
+
= select_tag :ebay_category, options_for_select(ebay_cat.children.pluck(:category_name, :id)), prompt: "-- Please select --"
|
@@ -0,0 +1,18 @@
|
|
1
|
+
.header-bar.no-wrap.gs
|
2
|
+
|
3
|
+
.header-bar__toggle
|
4
|
+
= fa_icon('bars')
|
5
|
+
|
6
|
+
.g-1.header-bar__logo
|
7
|
+
.logo.logo--light
|
8
|
+
.g-1.header-bar__version-info.align-right.g-gutter--right
|
9
|
+
= Gem.loaded_specs["cd2_catton_cms"].version.to_s
|
10
|
+
="(#{`git log --pretty=format:'%h' -n 1`})"
|
11
|
+
|
12
|
+
.header-bar__user
|
13
|
+
.user_info
|
14
|
+
%span
|
15
|
+
Signed in as
|
16
|
+
= current_user.name
|
17
|
+
\-
|
18
|
+
%b= link_to 'Log out', destroy_user_session_path, method: :delete
|
@@ -0,0 +1,113 @@
|
|
1
|
+
.index-table
|
2
|
+
.index-table__content.shadow-4dp
|
3
|
+
// Generated tables using JSON
|
4
|
+
|
5
|
+
- bulk_path = url_for(action: :bulk_actions) rescue ''
|
6
|
+
|
7
|
+
|
8
|
+
.filter_panel.hidden
|
9
|
+
|
10
|
+
- index_data.except(:ROW_CLASS).keys.each_with_index do |key, i|
|
11
|
+
- if index_data[key][:filter]
|
12
|
+
.filter.hidden{class: "filter_#{i}"}
|
13
|
+
= search_form_for @q do |f|
|
14
|
+
= f.collection_select index_data[key][:filter][:name], instance_eval { eval index_data[key][:filter][:collection] }, index_data[key][:filter][:display], index_data[key][:filter][:display], include_blank: true
|
15
|
+
= link_to 'Show none', request.query_parameters.merge(q: {"#{index_data[key][:filter][:name].gsub('_eq', '_null')}": 1})
|
16
|
+
= submit_tag :search
|
17
|
+
|
18
|
+
= form_tag bulk_path do
|
19
|
+
#index_table__wrapper{class: ('bulk_actions_container' if bulk_actions)}
|
20
|
+
- if bulk_actions
|
21
|
+
.bulk_actions_panel.hidden.shadow-8dp
|
22
|
+
%h4 Select Bulk Action
|
23
|
+
.gs
|
24
|
+
.g-3
|
25
|
+
= select_tag :bulk_actions, options_for_select(bulk_actions)
|
26
|
+
.g-1.g-gutter
|
27
|
+
= submit_tag 'Submit', class: 'btn'
|
28
|
+
%table.index_table{class: ('sortable_table' if sortable)}
|
29
|
+
%thead
|
30
|
+
- if sortable
|
31
|
+
%th.sort_column
|
32
|
+
- if bulk_actions
|
33
|
+
%th= check_box_tag :select_all
|
34
|
+
- index_data.except(:ROW_CLASS).keys.each_with_index do |key, i|
|
35
|
+
|
36
|
+
%th.no-wrap{class: "column_#{i}"}
|
37
|
+
- unless key[0] == '_'
|
38
|
+
- if (sort = index_data[key][:sort])
|
39
|
+
= sort_link @q, sort, raw(key.to_s)
|
40
|
+
|
41
|
+
|
42
|
+
- else
|
43
|
+
= key
|
44
|
+
- if index_data[key][:filter]
|
45
|
+
= link_to fa_icon('filter'), 'javascript:void(0)', class: 'filter_toggle', data: {filter: "filter_#{i}"}
|
46
|
+
|
47
|
+
|
48
|
+
%tbody{'index_data-sort' => sortable}
|
49
|
+
- collection.each do |object|
|
50
|
+
|
51
|
+
- begin
|
52
|
+
- if row_klass = index_data[:ROW_CLASS]
|
53
|
+
|
54
|
+
- if row_klass[:toggle]
|
55
|
+
|
56
|
+
- result = object.instance_eval { eval row_klass[:toggle][:condition] }
|
57
|
+
|
58
|
+
- if result
|
59
|
+
- row_klass = row_klass[:toggle][:true]
|
60
|
+
- elsif result.nil?
|
61
|
+
- row_klass = row_klass[:toggle][:nil]
|
62
|
+
- else
|
63
|
+
- row_klass = row_klass[:toggle][:false]
|
64
|
+
- else
|
65
|
+
- row_klass = row_klass[:text]
|
66
|
+
|
67
|
+
%tr{id: "#{controller_name.singularize}_#{object.id}", class: "#{row_klass} object_#{object.id}", data: {columns: index_data.except(:ROW_CLASS).values.count}}
|
68
|
+
- if sortable
|
69
|
+
%td.sort_handle
|
70
|
+
= fa_icon('ellipsis-v')
|
71
|
+
- if bulk_actions
|
72
|
+
%td.check_box_column.narrow= check_box_tag "#{controller_name.singularize}[]", object.id
|
73
|
+
|
74
|
+
- index_data.except(:ROW_CLASS).values.each_with_index do |value, i|
|
75
|
+
|
76
|
+
- if klass = value[:class]
|
77
|
+
- if klass[:toggle]
|
78
|
+
|
79
|
+
- result = object.instance_eval { eval klass[:toggle][:condition] }
|
80
|
+
- if result
|
81
|
+
- klass = klass[:toggle][:true]
|
82
|
+
- elsif result.nil?
|
83
|
+
- klass = klass[:toggle][:nil]
|
84
|
+
- else
|
85
|
+
- klass = klass[:toggle][:false]
|
86
|
+
|
87
|
+
%td{class: "column_#{i} #{'narrow' if (value[:image])} #{klass if klass}"}
|
88
|
+
- unless value[:condition] && object.instance_eval { eval value[:condition] }
|
89
|
+
|
90
|
+
- if value[:toggle]
|
91
|
+
- if object.instance_eval { eval value[:toggle][:condition] }
|
92
|
+
- value = value[:toggle][:true]
|
93
|
+
- else
|
94
|
+
- value = value[:toggle][:false]
|
95
|
+
|
96
|
+
|
97
|
+
- if (link = value[:link])
|
98
|
+
- unless object.instance_eval { eval link[:options] } == [nil]
|
99
|
+
= link_to object.instance_eval { eval link[:options] }, remote: link[:remote], method: link[:method], data: link[:data] do
|
100
|
+
= link[:name][:call] ? raw(object.instance_eval { eval link[:name][:call] }) : link[:name][:text]
|
101
|
+
|
102
|
+
- elsif price = value[:price]
|
103
|
+
= humanized_money_with_symbol object.instance_eval { eval price[:call] }
|
104
|
+
|
105
|
+
- elsif (link = value[:image])
|
106
|
+
= image_tag object.instance_eval { eval value[:image] }, class: 'table_image'
|
107
|
+
|
108
|
+
- elsif icon = value[:icon]
|
109
|
+
= fa_icon(icon)
|
110
|
+
|
111
|
+
- else
|
112
|
+
= raw(value[:call] ? object.instance_eval { eval value[:call] } : value[:text])
|
113
|
+
- rescue
|
@@ -0,0 +1,17 @@
|
|
1
|
+
- unless value[:condition] && object.instance_eval { eval value[:condition] }
|
2
|
+
- if (link = value[:link])
|
3
|
+
- unless object.instance_eval { eval link[:options] } == [nil]
|
4
|
+
= link_to object.instance_eval { eval link[:options] } do
|
5
|
+
= link[:name][:call] ? raw(object.instance_eval { eval link[:name][:call] }) : link[:name][:text]
|
6
|
+
|
7
|
+
- elsif price = value[:price]
|
8
|
+
= humanized_money_with_symbol object.instance_eval { eval price[:call] }
|
9
|
+
|
10
|
+
- elsif (link = value[:image])
|
11
|
+
= image_tag object.instance_eval { eval value[:image] }
|
12
|
+
|
13
|
+
- elsif icon = value[:icon]
|
14
|
+
= fa_icon(icon)
|
15
|
+
|
16
|
+
- else
|
17
|
+
= value[:call] ? object.instance_eval { eval value[:call] } : value[:text]
|
@@ -0,0 +1 @@
|
|
1
|
+
// This is a stub view - overwrite it to place a navigation bar in when necessary
|
@@ -0,0 +1,18 @@
|
|
1
|
+
-# this partial renders a dropzone upload bucket and a preview image/body form
|
2
|
+
.columns
|
3
|
+
.columns__main_form
|
4
|
+
.dropzone{class: "#{model_type}", data: {"#{model_type}-id": "#{obj.id}"}}
|
5
|
+
%label.panel_description Drag + Drop or click here to upload all of your images here!
|
6
|
+
|
7
|
+
#images_container.reorderable
|
8
|
+
= render 'uploaded_images_new', obj: obj, model_name: model_name
|
9
|
+
|
10
|
+
.columns__narrow_form
|
11
|
+
%h4 Set Preview image
|
12
|
+
%p Drag an image into the box
|
13
|
+
#preview_image__wrapper
|
14
|
+
#preview_drag__target
|
15
|
+
= render 'preview_image', obj: obj
|
16
|
+
#preview_body_container
|
17
|
+
%h4 Preview Body
|
18
|
+
= f.text_area :preview_body
|
@@ -0,0 +1,11 @@
|
|
1
|
+
.field
|
2
|
+
= f.label :url_alias
|
3
|
+
= f.text_field :url_alias
|
4
|
+
|
5
|
+
= f.fields_for :page_info do |ff|
|
6
|
+
.field
|
7
|
+
= ff.label :title, 'Page Title'
|
8
|
+
= ff.text_field :title, data: {length_min: 0, length_max: 64}
|
9
|
+
.field
|
10
|
+
= ff.label :meta_description
|
11
|
+
= ff.text_area :meta_description, data: {length_min: 0, length_max: 160}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
.sidebar
|
2
|
+
|
3
|
+
.sidebar__group
|
4
|
+
= link_to raw("Dashboard #{fa_icon('pie-chart')}"), c.root_path
|
5
|
+
= link_to raw("Homepage #{fa_icon('home')}"), front_end_root_path
|
6
|
+
|
7
|
+
|
8
|
+
.sidebar__group
|
9
|
+
%p.sidebar_heading Content
|
10
|
+
= link_to 'Pages', c.pages_path if C.content_sections.include?(:pages)
|
11
|
+
= link_to 'Testimonials', c.testimonials_path if C.content_sections.include?(:testimonials)
|
12
|
+
= link_to 'Projects', c.projects_path if C.content_sections.include?(:projects)
|
13
|
+
= link_to 'Locations', c.locations_path if C.content_sections.include?(:locations)
|
14
|
+
= link_to 'Blogs', c.blogs_path if C.content_sections.include?(:blogs)
|
15
|
+
= link_to 'Slideshows', c.slideshows_path if C.content_sections.include?(:slideshows)
|
16
|
+
= link_to 'Meet The Team', c.team_members_path if C.content_sections.include?(:team)
|
17
|
+
= link_to 'Sales Highlights', c.sales_highlights_path if C.commerce
|
18
|
+
= link_to 'Navigation', c.menu_items_path
|
19
|
+
|
20
|
+
.sidebar__group
|
21
|
+
%p.sidebar_heading Resources
|
22
|
+
= link_to 'Documents', c.documents_path
|
23
|
+
|
24
|
+
- if current_user.cd2admin
|
25
|
+
.sidebar__group
|
26
|
+
= link_to 'Users', c.users_path
|
@@ -0,0 +1,13 @@
|
|
1
|
+
- obj.images.ordered.each do |image|
|
2
|
+
%label.fields_for.image_preview
|
3
|
+
.sort_handle= fa_icon('ellipsis-v')
|
4
|
+
.image_container.draggable
|
5
|
+
= hidden_field_tag "#{model_name}[images_attributes][#{image.id - 1}][id]", image.id
|
6
|
+
= hidden_field_tag "#{model_name}[images_attributes][#{image.id - 1}][weight]", image.weight, class: 'order_field'
|
7
|
+
= image_tag (image.image.preview), data: {"image-id": "#{image.id}"}
|
8
|
+
.image_info_alt
|
9
|
+
= label_tag 'Alt'
|
10
|
+
= text_field_tag "#{model_name}[images_attributes][#{image.id - 1}][alt]", image.alt
|
11
|
+
.image_info_caption
|
12
|
+
= label_tag 'Caption'
|
13
|
+
= text_field_tag "#{model_name}[images_attributes][#{image.id - 1}][caption]", image.caption
|
@@ -0,0 +1,58 @@
|
|
1
|
+
= form_for @blog do |f|
|
2
|
+
= f.error_messages
|
3
|
+
= tabs do
|
4
|
+
|
5
|
+
= tab :content do
|
6
|
+
.field
|
7
|
+
= f.label :name
|
8
|
+
= f.text_field :name
|
9
|
+
|
10
|
+
.field
|
11
|
+
= f.label :body
|
12
|
+
= f.tiny_mce_text_area :body
|
13
|
+
|
14
|
+
= tab :seo, 'SEO' do
|
15
|
+
= render 'c/admin/seo', f: f
|
16
|
+
|
17
|
+
= tab :media do
|
18
|
+
.reorderable
|
19
|
+
= f.fields_for :images, f.object.images.sort_by(&:weight) do |f|
|
20
|
+
.fields_for.columns{class: ('not_persisted' if f.object.image_cache.present?)}
|
21
|
+
= f.hidden_field :image_cache
|
22
|
+
= f.hidden_field :weight, class: 'order_field'
|
23
|
+
.column
|
24
|
+
.sort_handle= fa_icon('ellipsis-v')
|
25
|
+
|
26
|
+
.column
|
27
|
+
.image_preview
|
28
|
+
= image_tag f.object.image.preview
|
29
|
+
.column
|
30
|
+
.field
|
31
|
+
= f.label :alt
|
32
|
+
= f.text_field :alt
|
33
|
+
.column
|
34
|
+
.field
|
35
|
+
= f.label :caption
|
36
|
+
= f.text_field :caption
|
37
|
+
.column
|
38
|
+
.field
|
39
|
+
= f.label :_destroy, 'Delete Image?'
|
40
|
+
= f.check_box :_destroy, class: '_destroy'
|
41
|
+
|
42
|
+
= f.label :new_images
|
43
|
+
- if @blog.new_record?
|
44
|
+
= f.file_field :new_images, multiple: true
|
45
|
+
- else
|
46
|
+
= f.file_field :new_images, multiple: true, data: {auto_submit: :upload}
|
47
|
+
-# = button_tag 'Upload', name: :commit, value: :upload
|
48
|
+
|
49
|
+
= tab :publish do
|
50
|
+
.field
|
51
|
+
= f.label :published do
|
52
|
+
= f.check_box :published
|
53
|
+
%span Publish Page
|
54
|
+
|
55
|
+
|
56
|
+
.actions.form-page__actions
|
57
|
+
= f.submit class: 'btn'
|
58
|
+
= link_to_delete 'Delete', @blog, redirection: blogs_path, class: 'btn btn--secondary' unless @blog.new_record?
|
@@ -0,0 +1,10 @@
|
|
1
|
+
= form_tag mass_destroy_customers_path do
|
2
|
+
%h2 Are you sure you want to delete these #{controller_name.humanize.pluralize.downcase}?
|
3
|
+
%ul
|
4
|
+
- @objects.each do |object|
|
5
|
+
%li= object.name
|
6
|
+
%p
|
7
|
+
= hidden_field_tag :ids, params[:ids]
|
8
|
+
= submit_tag "delete"
|
9
|
+
or
|
10
|
+
= link_to "cancel", action: :index
|
@@ -0,0 +1,8 @@
|
|
1
|
+
.form-page--narrow
|
2
|
+
= form_tag bulk_upload_documents_path, multipart: true do
|
3
|
+
.field
|
4
|
+
= file_field_tag :new_documents, multiple: true, name: "documents[attachments][][attachment]"
|
5
|
+
.actions
|
6
|
+
= submit_tag 'Upload', class: 'btn'
|
7
|
+
|
8
|
+
-# TODO: Add delete action to this
|
@@ -0,0 +1,9 @@
|
|
1
|
+
- provide :title, 'Documents'
|
2
|
+
|
3
|
+
.index-header
|
4
|
+
%h1= pluralize(@documents.count, 'Document')
|
5
|
+
= link_to '+ Upload Document', new_document_path, class: 'btn btn--small'
|
6
|
+
%p
|
7
|
+
This is the list of files currently on your site. You can add additional files as storage and reference.
|
8
|
+
|
9
|
+
= index_table @documents, C::Document::INDEX_TABLE
|
@@ -0,0 +1,15 @@
|
|
1
|
+
|
2
|
+
- provide :title, "Edit #{controller_name.classify}"
|
3
|
+
- navigation_add controller_name.titleize, [controller_name]
|
4
|
+
|
5
|
+
.form-page
|
6
|
+
.form-page__intro
|
7
|
+
- begin
|
8
|
+
%h1
|
9
|
+
#{controller_name.gsub('_', ' ').singularize.titleize}:
|
10
|
+
= instance_variable_get("@#{controller_name.singularize}").name
|
11
|
+
- rescue
|
12
|
+
%h1= "Edit #{controller_name.gsub('_', ' ').singularize.titleize}"
|
13
|
+
|
14
|
+
|
15
|
+
= render 'form'
|
@@ -0,0 +1,14 @@
|
|
1
|
+
- provide :title, 'Enquiries'
|
2
|
+
|
3
|
+
.index-header.gs
|
4
|
+
.g-3.g-gutter--right
|
5
|
+
%h1= pluralize(@enquiries.count, 'Enquiry')
|
6
|
+
%p
|
7
|
+
All the enquiries made through the contact form on your site.
|
8
|
+
.g-1.g-gutter
|
9
|
+
= search_form_for @q do |f|
|
10
|
+
.gs
|
11
|
+
.g-3= f.search_field :name_or_email_cont, placeholder: 'Search'
|
12
|
+
.g-1.g-gutter--narrow= submit_tag 'Search', class: 'btn btn--system'
|
13
|
+
|
14
|
+
= index_table @enquiries, C::Enquiry::INDEX_TABLE
|
@@ -0,0 +1,58 @@
|
|
1
|
+
= form_for @location do |f|
|
2
|
+
= f.error_messages
|
3
|
+
= tabs do
|
4
|
+
|
5
|
+
= tab :content do
|
6
|
+
.field
|
7
|
+
= f.label :name
|
8
|
+
= f.text_field :name
|
9
|
+
|
10
|
+
.field
|
11
|
+
= f.label :body
|
12
|
+
= f.text_area :body, class: 'ckeditor'
|
13
|
+
|
14
|
+
= tab :seo, 'SEO' do
|
15
|
+
= render 'c/admin/seo', f: f
|
16
|
+
|
17
|
+
= tab :media do
|
18
|
+
.reorderable
|
19
|
+
= f.fields_for :images, f.object.images.sort_by(&:weight) do |f|
|
20
|
+
.fields_for.columns{class: ('not_persisted' if f.object.image_cache.present?)}
|
21
|
+
= f.hidden_field :image_cache
|
22
|
+
= f.hidden_field :weight, class: 'order_field'
|
23
|
+
.column
|
24
|
+
.sort_handle= fa_icon('ellipsis-v')
|
25
|
+
|
26
|
+
.column
|
27
|
+
.image_preview
|
28
|
+
= image_tag f.object.image.preview
|
29
|
+
.column
|
30
|
+
.field
|
31
|
+
= f.label :alt
|
32
|
+
= f.text_field :alt
|
33
|
+
.column
|
34
|
+
.field
|
35
|
+
= f.label :caption
|
36
|
+
= f.text_field :caption
|
37
|
+
.column
|
38
|
+
.field
|
39
|
+
= f.label :_destroy, 'Delete Image?'
|
40
|
+
= f.check_box :_destroy, class: '_destroy'
|
41
|
+
|
42
|
+
= f.label :new_images
|
43
|
+
- if @location.new_record?
|
44
|
+
= f.file_field :new_images, multiple: true
|
45
|
+
- else
|
46
|
+
= f.file_field :new_images, multiple: true, data: {auto_submit: :upload}
|
47
|
+
= button_tag 'Upload', name: :commit, value: :upload
|
48
|
+
|
49
|
+
= tab :publish do
|
50
|
+
.field
|
51
|
+
= f.label :published do
|
52
|
+
= f.check_box :published
|
53
|
+
%span Publish Page
|
54
|
+
|
55
|
+
|
56
|
+
.actions.form-page__actions
|
57
|
+
= f.submit class: 'btn'
|
58
|
+
= link_to_delete 'Delete', @location, redirection: locations_path, class: 'btn btn--secondary' unless @location.new_record?
|
@@ -0,0 +1,9 @@
|
|
1
|
+
- provide :title, 'Locations'
|
2
|
+
|
3
|
+
.index-header
|
4
|
+
%h1= pluralize(@locations.count, 'Location')
|
5
|
+
= link_to '+ Create Location', new_location_path, class: 'btn btn--small'
|
6
|
+
%p
|
7
|
+
Display individual branch and location information
|
8
|
+
|
9
|
+
= index_table @locations, C::Location::INDEX_TABLE
|
@@ -0,0 +1,44 @@
|
|
1
|
+
= form_for @menu_item do |f|
|
2
|
+
= f.error_messages
|
3
|
+
.gs
|
4
|
+
.fixed-form-panel
|
5
|
+
.field
|
6
|
+
= f.label :name, placeholder: 'Menu Item name'
|
7
|
+
= f.text_field :name
|
8
|
+
|
9
|
+
.field
|
10
|
+
= f.label :link
|
11
|
+
= f.text_field :link
|
12
|
+
|
13
|
+
.field
|
14
|
+
= f.label :target
|
15
|
+
= f.select :target, [:blank, :self, :parent, :top], include_blank: '-- Select --'
|
16
|
+
|
17
|
+
.field
|
18
|
+
= f.label :parent_id
|
19
|
+
= f.select :parent_id, C::MenuItem.depth_select_options(@menu_item), include_blank: '-- Select Menu Item --'
|
20
|
+
|
21
|
+
.field
|
22
|
+
= f.label :page_id, 'Page (Note this overrides the link above)'
|
23
|
+
= f.collection_select :page_id, C::Page.all, :id, :name, include_blank: true
|
24
|
+
|
25
|
+
|
26
|
+
.g-1
|
27
|
+
= tabs do
|
28
|
+
= tab '?' do
|
29
|
+
%h3 New Menu Item
|
30
|
+
%p Create a new menu item using this form:
|
31
|
+
%ul
|
32
|
+
%li
|
33
|
+
%b Name -
|
34
|
+
The name of your menu item
|
35
|
+
%li
|
36
|
+
%b Link -
|
37
|
+
The path you want your menu link to goto
|
38
|
+
%li
|
39
|
+
%b Parent
|
40
|
+
Select where in a hierachy you want your menu item to appear
|
41
|
+
|
42
|
+
.actions.form-page__actions
|
43
|
+
= f.submit class: 'btn'
|
44
|
+
= link_to_delete 'Delete', @menu_item, class: 'btn btn--secondary' unless @menu_item.new_record?
|
@@ -0,0 +1,10 @@
|
|
1
|
+
- menu_items.each do |menu_item, children|
|
2
|
+
.draggable_tree_container{data: {draggable: '.draggable_tree_move_handle:first', draggable_tree_id_field: 'menu-item-id', menu_item_id: menu_item.id}}
|
3
|
+
= check_box_tag "hide_children_#{menu_item.id}", nil, false, class: 'hide_children hidden'
|
4
|
+
.draggable_tree_row
|
5
|
+
.draggable_tree_move_handle
|
6
|
+
.draggable_tree_collapse_handle= label_tag "hide_children_#{menu_item.id}", fa_icon('chevron-down')
|
7
|
+
= link_to "#{menu_item.name} (#{menu_item.machine_name})", [:edit, menu_item], class: 'draggable_tree_link'
|
8
|
+
= "- #{menu_item.link}"
|
9
|
+
.draggable_tree_children
|
10
|
+
= render 'menu_item_list_item', menu_items: children
|
@@ -0,0 +1,10 @@
|
|
1
|
+
- provide :title, 'Navigation'
|
2
|
+
|
3
|
+
.index-header
|
4
|
+
%h1= pluralize(C::MenuItem.count, 'Menu Item')
|
5
|
+
= link_to '+ Create Menu Item', new_menu_item_path, class: 'btn btn--small'
|
6
|
+
%p
|
7
|
+
This is the navigation of your site. Reorder and change the level of a move menu items by dragging them.
|
8
|
+
|
9
|
+
.draggable_tree_list_container.draggable_tree_children{data: {reorder_url: update_order_menu_items_path}}
|
10
|
+
= render 'menu_item_list_item', menu_items: @menu_items
|
@@ -0,0 +1,93 @@
|
|
1
|
+
= form_for @page do |f|
|
2
|
+
= f.error_messages
|
3
|
+
= tabs do
|
4
|
+
|
5
|
+
= tab :content do
|
6
|
+
.field
|
7
|
+
= f.label :name
|
8
|
+
= f.text_field :name
|
9
|
+
|
10
|
+
.field
|
11
|
+
= f.label :body
|
12
|
+
= f.tiny_mce_text_area :body
|
13
|
+
|
14
|
+
.field
|
15
|
+
= f.label :preview_body
|
16
|
+
= f.text_area :preview_body
|
17
|
+
|
18
|
+
= tab :seo, 'SEO' do
|
19
|
+
= render 'c/admin/seo', f: f
|
20
|
+
|
21
|
+
= tab :media do
|
22
|
+
|
23
|
+
-# = render 'preview_upload', model_type: :pages, model_name: :page, obj: @page, f: f
|
24
|
+
|
25
|
+
.reorderable
|
26
|
+
= f.fields_for :images, f.object.images.sort_by(&:weight) do |f|
|
27
|
+
.fields_for.columns{class: ('not_persisted' if f.object.image_cache.present?)}
|
28
|
+
= f.hidden_field :image_cache
|
29
|
+
= f.hidden_field :weight, class: 'order_field'
|
30
|
+
.column
|
31
|
+
.sort_handle= fa_icon('ellipsis-v')
|
32
|
+
|
33
|
+
.column
|
34
|
+
.image_preview
|
35
|
+
= image_tag f.object.image.preview
|
36
|
+
.column
|
37
|
+
.field
|
38
|
+
= f.label :alt
|
39
|
+
= f.text_field :alt
|
40
|
+
.column
|
41
|
+
.field
|
42
|
+
= f.label :caption
|
43
|
+
= f.text_field :caption
|
44
|
+
.column
|
45
|
+
.field
|
46
|
+
= f.label :featured_image, 'Feature Image?'
|
47
|
+
= f.check_box :featured_image
|
48
|
+
.column
|
49
|
+
.field
|
50
|
+
= f.label :preview_image, 'Preview Image?'
|
51
|
+
= f.check_box :preview_image
|
52
|
+
.column
|
53
|
+
.field
|
54
|
+
= f.label :_destroy, 'Delete Image?'
|
55
|
+
= f.check_box :_destroy, class: '_destroy'
|
56
|
+
|
57
|
+
= f.label :new_images
|
58
|
+
- if @page.new_record?
|
59
|
+
= f.file_field :new_images, multiple: true
|
60
|
+
- else
|
61
|
+
= f.file_field :new_images, multiple: true, data: {auto_submit: :upload}
|
62
|
+
-# = button_tag 'Upload', name: :commit, value: :upload
|
63
|
+
|
64
|
+
= tab :documents do
|
65
|
+
#main_form.two_panel_form
|
66
|
+
#summary_form_panel
|
67
|
+
.field.file_upload
|
68
|
+
= f.label :new_documents
|
69
|
+
= f.file_field :new_documents, multiple: true
|
70
|
+
= button_tag 'Upload Files', name: :document_upload, class: 'btn btn--secondary'
|
71
|
+
#uploaded_documents_panel.full_form
|
72
|
+
%table.index_table
|
73
|
+
%tr
|
74
|
+
%th.prime_column Name
|
75
|
+
%th Url
|
76
|
+
%th.icon_column Delete?
|
77
|
+
= f.fields_for :documents do |ff|
|
78
|
+
%tr
|
79
|
+
%td= ff.text_field :name
|
80
|
+
%td= link_to ff.object.document, ff.object.document.url, target: :_blank
|
81
|
+
%td
|
82
|
+
= ff.check_box :_destroy, class: '_destroy'
|
83
|
+
|
84
|
+
= tab :publish do
|
85
|
+
.field
|
86
|
+
= f.label :published do
|
87
|
+
= f.check_box :published
|
88
|
+
%span Publish Page
|
89
|
+
|
90
|
+
|
91
|
+
.actions.form-page__actions
|
92
|
+
= f.submit class: 'btn'
|
93
|
+
= link_to_delete 'Delete', @page, redirection: pages_path, class: 'btn btn--secondary' unless @page.new_record? || @page.protected
|
@@ -0,0 +1,10 @@
|
|
1
|
+
- pages.each do |page, children|
|
2
|
+
.draggable_tree_container{data: {draggable: '.draggable_tree_move_handle:first', draggable_tree_id_field: 'page-id', page_id: page.id}}
|
3
|
+
= check_box_tag "hide_children_#{page.id}", nil, false, class: 'hide_children hidden'
|
4
|
+
.draggable_tree_row
|
5
|
+
.draggable_tree_move_handle
|
6
|
+
.draggable_tree_collapse_handle= label_tag "hide_children_#{page.id}", fa_icon('chevron-down')
|
7
|
+
= link_to page.name, [:edit, page], class: 'draggable_tree_link'
|
8
|
+
|
9
|
+
.draggable_tree_children
|
10
|
+
= render 'page_list_item', pages: children
|
File without changes
|