integral 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -30
- data/Rakefile +1 -1
- data/app/assets/images/integral/defaults/no_image_available.jpg +0 -0
- data/app/assets/javascripts/integral/backend.js +102 -11
- data/app/assets/javascripts/integral/frontend.js +37 -0
- data/app/assets/javascripts/integral/support/confirm_modal.coffee +2 -2
- data/app/assets/javascripts/integral/support/gallery.coffee +71 -54
- data/app/assets/javascripts/integral/support/lib/lazysizes.js +755 -0
- data/app/assets/javascripts/integral/support/lib/materialize-tags.js +49 -44
- data/app/assets/javascripts/integral/support/ls.instagram.js +57 -0
- data/app/assets/javascripts/integral/support/ls.twitter.js +66 -0
- data/app/assets/javascripts/integral/support/record_selector.coffee +1 -1
- data/app/assets/javascripts/integral/support/remote_form.coffee +5 -2
- data/app/assets/stylesheets/integral/backend.sass +2 -1
- data/app/assets/stylesheets/integral/backend/_foundation_settings.scss +3 -4
- data/app/assets/stylesheets/integral/backend/dashboard-layout.scss +4 -1
- data/app/assets/stylesheets/integral/backend/materialize-tags.sass +1 -1
- data/app/assets/stylesheets/integral/backend/modules/timeline.scss +214 -0
- data/app/assets/stylesheets/integral/backend/shared.sass +80 -11
- data/app/assets/stylesheets/integral/frontend.scss +45 -0
- data/app/assets/stylesheets/integral/frontend/_foundation_settings.scss +2 -2
- data/app/assets/stylesheets/integral/frontend/blog.sass +155 -142
- data/app/assets/stylesheets/integral/frontend/layout.sass +3 -3
- data/app/assets/stylesheets/integral/frontend/modules/article-footer.scss +55 -0
- data/app/assets/stylesheets/integral/frontend/modules/article.scss +34 -0
- data/app/assets/stylesheets/integral/frontend/modules/horizontal-post.scss +44 -0
- data/app/assets/stylesheets/integral/frontend/modules/inline-articles.scss +23 -0
- data/app/assets/stylesheets/integral/frontend/modules/latest-post.scss +37 -0
- data/app/assets/stylesheets/integral/frontend/modules/list-widget.scss +50 -0
- data/app/assets/stylesheets/integral/frontend/modules/piped-list.scss +33 -0
- data/app/assets/stylesheets/integral/frontend/modules/post-tags.scss +19 -0
- data/app/assets/stylesheets/integral/frontend/modules/scroll-container.scss +9 -0
- data/app/assets/stylesheets/integral/frontend/modules/sidebar-articles.scss +42 -0
- data/app/assets/stylesheets/integral/frontend/modules/sidebar-tags.scss +6 -0
- data/app/assets/stylesheets/integral/frontend/modules/sidebar-widget.scss +47 -0
- data/app/assets/stylesheets/integral/frontend/modules/vertical-post.scss +31 -0
- data/app/assets/stylesheets/integral/frontend/share_modal.sass +0 -5
- data/app/assets/stylesheets/integral/support/gallery.sass +8 -0
- data/app/assets/stylesheets/integral/support/media-query-indicator.sass +6 -0
- data/app/controllers/integral/application_controller.rb +7 -1
- data/app/controllers/integral/backend/activities_controller.rb +13 -2
- data/app/controllers/integral/backend/base_controller.rb +60 -7
- data/app/controllers/integral/backend/categories_controller.rb +49 -0
- data/app/controllers/integral/backend/pages_controller.rb +7 -2
- data/app/controllers/integral/backend/posts_controller.rb +8 -3
- data/app/controllers/integral/backend/static_pages_controller.rb +4 -0
- data/app/controllers/integral/backend/users_controller.rb +13 -7
- data/app/controllers/integral/categories_controller.rb +31 -0
- data/app/controllers/integral/pages_controller.rb +1 -1
- data/app/controllers/integral/posts_controller.rb +5 -3
- data/app/decorators/integral/category_decorator.rb +30 -0
- data/app/decorators/integral/category_version_decorator.rb +7 -0
- data/app/decorators/integral/image_version_decorator.rb +7 -0
- data/app/decorators/integral/list_decorator.rb +1 -1
- data/app/decorators/integral/list_version_decorator.rb +7 -0
- data/app/decorators/integral/page_version_decorator.rb +7 -0
- data/app/decorators/integral/post_decorator.rb +9 -1
- data/app/decorators/integral/post_version_decorator.rb +7 -0
- data/app/decorators/integral/user_decorator.rb +1 -1
- data/app/decorators/integral/user_version_decorator.rb +7 -0
- data/app/decorators/integral/version_decorator.rb +51 -12
- data/app/helpers/integral/backend/base_helper.rb +56 -2
- data/app/helpers/integral/blog_helper.rb +21 -4
- data/app/jobs/integral/webhook/delivery_job.rb +37 -0
- data/app/mailers/integral/contact_mailer.rb +4 -1
- data/app/models/concerns/integral/lazy_contentable.rb +54 -0
- data/app/models/concerns/integral/webhook/delivery.rb +30 -0
- data/app/models/concerns/integral/webhook/observable.rb +23 -0
- data/app/models/integral/category.rb +20 -0
- data/app/models/integral/category_version.rb +8 -0
- data/app/models/integral/list_item.rb +1 -2
- data/app/models/integral/page.rb +18 -3
- data/app/models/integral/post.rb +28 -1
- data/app/models/integral/version.rb +2 -2
- data/app/models/integral/webhook/endpoint.rb +40 -0
- data/app/models/integral/webhook/event.rb +20 -0
- data/app/policies/integral/base_policy.rb +1 -0
- data/app/policies/integral/category_policy.rb +9 -0
- data/app/serializers/integral/post_serializer.rb +24 -0
- data/app/uploaders/integral/avatar_uploader.rb +1 -1
- data/app/views/integral/backend/activities/_activity.haml +21 -0
- data/app/views/integral/backend/activities/_grid.haml +1 -2
- data/app/views/integral/backend/activities/shared/_grid.haml +3 -2
- data/app/views/integral/backend/activities/shared/{_listing.haml → index.haml} +1 -0
- data/app/views/integral/backend/activities/shared/{_log.haml → show.haml} +0 -0
- data/app/views/integral/backend/categories/_modal.haml +25 -0
- data/app/views/integral/backend/lists/_child_fields.haml +1 -1
- data/app/views/integral/backend/lists/_item_container.haml +1 -1
- data/app/views/integral/backend/lists/_item_modal.haml +1 -1
- data/app/views/integral/backend/lists/_list_item_fields.haml +1 -1
- data/app/views/integral/backend/pages/_form.haml +1 -4
- data/app/views/integral/backend/pages/_grid.haml +34 -9
- data/app/views/integral/backend/pages/edit.haml +9 -3
- data/app/views/integral/backend/pages/index.haml +11 -21
- data/app/views/integral/backend/pages/list.haml +22 -0
- data/app/views/integral/backend/pages/show.haml +48 -0
- data/app/views/integral/backend/posts/_form.haml +8 -6
- data/app/views/integral/backend/posts/_grid.haml +33 -7
- data/app/views/integral/backend/posts/index.haml +13 -19
- data/app/views/integral/backend/posts/list.haml +20 -0
- data/app/views/integral/backend/posts/show.haml +54 -0
- data/app/views/integral/backend/shared/_activity_modal.haml +13 -0
- data/app/views/integral/backend/shared/cards/_categories.haml +34 -0
- data/app/views/integral/backend/{static_pages/_card.haml → shared/cards/_object.haml} +0 -0
- data/app/views/integral/backend/shared/cards/_recent_activity.haml +20 -0
- data/app/views/integral/backend/shared/cards/_recent_pages.haml +19 -0
- data/app/views/integral/backend/shared/cards/_recent_posts.haml +18 -0
- data/app/views/integral/backend/shared/cards/_recent_user_activity.haml +1 -0
- data/app/views/integral/backend/shared/cards/_recent_users.haml +19 -0
- data/app/views/integral/backend/shared/cards/_top_post_authors.haml +19 -0
- data/app/views/integral/backend/shared/record_selector/_record.haml +6 -4
- data/app/views/integral/backend/static_pages/dashboard.haml +13 -11
- data/app/views/integral/backend/users/_grid.haml +24 -7
- data/app/views/integral/backend/users/index.haml +11 -17
- data/app/views/integral/backend/users/list.haml +18 -0
- data/app/views/integral/backend/users/show.haml +5 -11
- data/app/views/integral/categories/show.haml +5 -0
- data/app/views/integral/posts/_article_footer.haml +17 -0
- data/app/views/integral/posts/_card.haml +11 -0
- data/app/views/integral/posts/_latest_post.haml +8 -0
- data/app/views/integral/posts/_most_read_section.haml +8 -0
- data/app/views/integral/posts/_post.haml +11 -0
- data/app/views/integral/posts/_similar_posts.haml +5 -0
- data/app/views/integral/posts/index.haml +6 -5
- data/app/views/integral/posts/templates/default.haml +34 -33
- data/app/views/integral/shared/_subscribe_modal.haml +14 -0
- data/app/views/integral/shared/blog/_categories.haml +15 -0
- data/app/views/integral/shared/blog/_layout.haml +9 -0
- data/app/views/integral/shared/blog/_sidebar.haml +10 -0
- data/app/views/integral/shared/gallery/_placeholder.haml +1 -1
- data/app/views/integral/shared/gallery/_slide.haml +2 -2
- data/app/views/integral/shared/gallery/gallery.haml +5 -2
- data/app/views/integral/shared/sidebar/_item.haml +8 -0
- data/app/views/integral/shared/sidebar/_newsletter_signup.haml +7 -0
- data/app/views/integral/shared/sidebar/_popular_posts.haml +7 -0
- data/app/views/integral/shared/sidebar/_popular_tags.haml +7 -0
- data/app/views/integral/shared/sidebar/_recent_posts.haml +7 -0
- data/app/views/integral/tags/index.haml +2 -2
- data/app/views/integral/tags/show.haml +3 -6
- data/app/views/layouts/integral/backend.html.haml +3 -0
- data/app/views/layouts/integral/backend/_main_menu_items.haml +10 -0
- data/app/views/layouts/integral/frontend.html.haml +3 -3
- data/config/locales/en.yml +52 -49
- data/db/migrate/20190414172018_create_webhook_endpoints.rb +10 -0
- data/db/migrate/20190929191412_add_integral_post_categories.rb +13 -0
- data/db/migrate/20191203090008_add_image_to_integral_categories.rb +6 -0
- data/db/migrate/20200401210442_create_category_versions.rb +20 -0
- data/db/seeds.rb +3 -1
- data/lib/generators/integral/assets_generator.rb +2 -2
- data/lib/generators/integral/install_generator.rb +1 -1
- data/lib/generators/integral/views_generator.rb +1 -1
- data/lib/generators/templates/integral.rb +5 -0
- data/lib/integral.rb +3 -30
- data/lib/integral/acts_as_listable.rb +2 -2
- data/lib/integral/chart_renderer/base.rb +2 -0
- data/lib/integral/content_renderer.rb +2 -2
- data/lib/integral/engine.rb +2 -2
- data/lib/integral/grids/activities_grid.rb +15 -1
- data/lib/integral/list_item_renderer.rb +4 -2
- data/lib/integral/list_renderer.rb +1 -0
- data/lib/integral/middleware/page_router.rb +15 -6
- data/lib/integral/router.rb +19 -3
- data/lib/integral/version.rb +1 -1
- data/lib/integral/widgets/swiper_list.rb +3 -2
- data/public/images/integral/demo/continous-integration.png +0 -0
- data/public/images/integral/demo/foundation-frontend-framework.jpg +0 -0
- data/public/images/integral/demo/heroku.png +0 -0
- data/public/images/integral/demo/integral-cms-without-hassle.jpg +0 -0
- data/public/images/integral/demo/integral-features-activity-tracking.jpg +0 -0
- data/public/images/integral/demo/integral-features-contact-form.png +0 -0
- data/public/images/integral/demo/integral-features-design.jpg +0 -0
- data/public/images/integral/demo/integral-features-dynamic-pages.jpg +0 -0
- data/public/images/integral/demo/integral-features-image-management.jpg +0 -0
- data/public/images/integral/demo/integral-features-integrated-blog.jpg +0 -0
- data/public/images/integral/demo/integral-features-list-management.jpg +0 -0
- data/public/images/integral/demo/integral-features-seo-ready.jpg +0 -0
- data/public/images/integral/demo/integral-features-user-management.jpg +0 -0
- data/public/images/integral/demo/integral-presentation.png +0 -0
- data/spec/factories.rb +15 -7
- metadata +110 -98
- data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/copywidget.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/editwidget.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/hidpi/copywidget.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/hidpi/editwidget.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/hidpi/removewidget.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/hidpi/widget.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/removewidget.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/integral-card/icons/widget.png +0 -0
- data/app/assets/javascripts/ckeditor/plugins/integral-card/plugin.js +0 -86
- data/app/assets/javascripts/ckeditor/plugins/integralrecentposts/dialogs/integralrecentposts.js +0 -40
- data/app/assets/javascripts/ckeditor/plugins/integralrecentposts/plugin.js +0 -32
- data/app/assets/javascripts/ckeditor/plugins/numericinput/LICENSE.md +0 -363
- data/app/assets/javascripts/ckeditor/plugins/numericinput/README.md +0 -16
- data/app/assets/javascripts/ckeditor/plugins/numericinput/plugin.js +0 -354
- data/app/assets/stylesheets/integral/frontend.sass +0 -25
- data/app/views/integral/backend/pages/activities.haml +0 -2
- data/app/views/integral/backend/pages/activity.haml +0 -1
- data/app/views/integral/backend/posts/activities.haml +0 -3
- data/app/views/integral/backend/posts/activity.haml +0 -1
- data/app/views/integral/posts/_collection.haml +0 -4
- data/app/views/integral/posts/_item.haml +0 -16
- data/app/views/integral/shared/_blog_layout.haml +0 -15
- data/app/views/integral/shared/_blog_sidebar.haml +0 -49
- data/lib/integral/slack_bot.rb +0 -45
@@ -1,4 +1,4 @@
|
|
1
|
-
= render layout: 'integral/backend/shared/grid', locals: { grid: grid, options: { columns: [:date, :user, :action, :object, :instance, :
|
1
|
+
= render layout: 'integral/backend/shared/grid', locals: { grid: grid, options: { columns: [:date, :user, :action, :object, :instance, :actions] }} do
|
2
2
|
- if grid.assets.any?
|
3
3
|
- grid.assets.decorate.each do |activity|
|
4
4
|
%tr
|
@@ -15,7 +15,6 @@
|
|
15
15
|
%td
|
16
16
|
= link_to activity.item_url do
|
17
17
|
= activity.item_title
|
18
|
-
%td= activity.attributes_changed
|
19
18
|
%td.actions
|
20
19
|
= link_to activity.url do
|
21
20
|
= icon('eye')
|
@@ -1,5 +1,5 @@
|
|
1
1
|
= render_data_grid do
|
2
|
-
= render layout: 'integral/backend/shared/grid', locals: { grid: grid, options: { columns: [:date, :user, :action, :
|
2
|
+
= render layout: 'integral/backend/shared/grid', locals: { grid: grid, options: { columns: [:date, :user, :action, :actions], order: true }} do |grid|
|
3
3
|
- if grid.assets.any?
|
4
4
|
- grid.assets.decorate.each do |activity|
|
5
5
|
%tr
|
@@ -12,7 +12,8 @@
|
|
12
12
|
= activity.whodunnit.name
|
13
13
|
%td
|
14
14
|
%span.label= activity.event
|
15
|
-
|
15
|
+
-# Currently not possible to show this as changeset isn't available in the query resultset for performance reasons - One possible solution would be to create a Grid class for each Version - rather than unioning all the tables it only includes it's own
|
16
|
+
-# %td= activity.attributes_changed
|
16
17
|
%td.actions
|
17
18
|
= link_to activity.url do
|
18
19
|
= icon('eye')
|
File without changes
|
@@ -0,0 +1,25 @@
|
|
1
|
+
:ruby
|
2
|
+
category ||= Integral::Category.new
|
3
|
+
modal_id ||= 'new_category_modal'
|
4
|
+
slug_id = "category_title_#{(Time.now.to_f * 1000).to_i}"
|
5
|
+
|
6
|
+
.reveal{ data: { 'reveal' => true, 'multiple-opened' => 'true' }, id: modal_id }
|
7
|
+
%button.close-button{ type: 'button', data: { close: '' }, aria: { label: "Close" }}
|
8
|
+
%span{ aria: { hidden: 'true' } } ×
|
9
|
+
= simple_form_for [:backend, category], validate: true, remote: true, html: { class: 'remote-form' } do |f|
|
10
|
+
.modal-header
|
11
|
+
%h4= title
|
12
|
+
.modal-content.padded
|
13
|
+
= f.input :title, wrapper_html: { class: 'alternative' }, input_html: { id: slug_id }
|
14
|
+
= f.input :slug, wrapper_html: { class: 'alternative' }, input_html: { data: { slugify: "##{slug_id}" } }
|
15
|
+
= f.input :description, as: :text, wrapper_html: { class: 'alternative' }
|
16
|
+
%hr
|
17
|
+
%h2= t('integral.records.attributes.featured_image')
|
18
|
+
.grid-x
|
19
|
+
.cell.medium-6
|
20
|
+
= render partial: 'integral/backend/shared/image_preview', locals: { f:f, image_attr: :image }
|
21
|
+
|
22
|
+
.modal-footer
|
23
|
+
= f.button :button, class: 'button'
|
24
|
+
|
25
|
+
|
@@ -10,7 +10,7 @@
|
|
10
10
|
= icon('list', class: 'identifier')
|
11
11
|
.data
|
12
12
|
%span.title= formatted_item.title
|
13
|
-
%span.url=
|
13
|
+
%span.url= formatted_item.url
|
14
14
|
.actions
|
15
15
|
= icon('edit', class: 'action', 'data-open' => "list-item-modal-#{f.object.id}", class: 'modal-trigger')
|
16
16
|
|
@@ -10,7 +10,7 @@
|
|
10
10
|
= icon('list', class: 'identifier')
|
11
11
|
.data
|
12
12
|
%span.title= formatted_item.title
|
13
|
-
%span.url=
|
13
|
+
%span.url= formatted_item.url
|
14
14
|
.actions
|
15
15
|
= icon('edit', class: 'action', 'data-open' => "list-item-modal-#{f.object.id}", class: 'modal-trigger')
|
16
16
|
|
@@ -11,7 +11,7 @@
|
|
11
11
|
= icon('list', class: 'identifier')
|
12
12
|
.data
|
13
13
|
%span.title= formatted_item.title
|
14
|
-
%span.url=
|
14
|
+
%span.url= formatted_item.url
|
15
15
|
.actions
|
16
16
|
= icon('edit', 'data-open' => "list-item-modal-#{f.object.id}", class: 'modal-trigger')
|
17
17
|
|
@@ -18,7 +18,7 @@
|
|
18
18
|
.cell
|
19
19
|
.card
|
20
20
|
.card-section
|
21
|
-
= f.input :body, as: :ckeditor, input_html: { id: 'resource_body_editor', ckeditor: { language: current_user.locale }, data: { 'ckeditor-class' => @resource.template } }
|
21
|
+
= f.input :body, as: :ckeditor, input_html: { value: @resource.editor_body, id: 'resource_body_editor', ckeditor: { language: current_user.locale }, data: { 'ckeditor-class' => @resource.template } }
|
22
22
|
|
23
23
|
.cell.small-12.medium-4.large-3
|
24
24
|
.grid-y
|
@@ -47,6 +47,3 @@
|
|
47
47
|
|
48
48
|
.cell.small-12
|
49
49
|
= f.button :button
|
50
|
-
|
51
|
-
.record-image
|
52
|
-
= render partial: 'integral/backend/shared/image_selector'
|
@@ -2,20 +2,45 @@
|
|
2
2
|
= render layout: 'integral/backend/shared/grid', locals: { grid: @grid, options: { columns: [:title, :path, :status, :updated_at, :actions], order: true }} do |grid|
|
3
3
|
- if grid.assets.any?
|
4
4
|
- grid.assets.decorate.each do |record|
|
5
|
-
%tr
|
5
|
+
%tr.tr--clickable{ data: { href: backend_page_url(record.id), context_menu: "dropdown-pane-actions-page-#{record.id}" }}
|
6
6
|
%td= record.title.truncate(30)
|
7
7
|
%td= record.path
|
8
8
|
%td
|
9
9
|
%span.label= t("integral.records.status.#{record.status}")
|
10
10
|
%td= l(record.updated_at, format: :long)
|
11
11
|
%td.actions
|
12
|
-
|
13
|
-
= icon('
|
14
|
-
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
12
|
+
%button.button--action-pane{ 'data-toggle' => "dropdown-pane-actions-page-#{record.id}" }
|
13
|
+
= icon('ellipsis-v')
|
14
|
+
.dropdown-pane.dropdown-pane--actions{ id: "dropdown-pane-actions-page-#{record.id}", data: { dropdown: true, position: :bottom, alignment: :right, close_on_click: 'true' } }
|
15
|
+
%ul.menu.vertical
|
16
|
+
- if policy(Integral::Page).update?
|
17
|
+
%li
|
18
|
+
= link_to edit_backend_page_url(record.id) do
|
19
|
+
= icon('edit')
|
20
|
+
= t('integral.actions.edit')
|
21
|
+
- unless record.archived?
|
22
|
+
%li
|
23
|
+
= link_to record.path do
|
24
|
+
= icon('eye')
|
25
|
+
= t('integral.actions.view_on_site')
|
26
|
+
%li
|
27
|
+
= link_to backend_page_url(record.id), target: :blank do
|
28
|
+
= icon('external-link')
|
29
|
+
= t('integral.actions.open_in_new_tab')
|
30
|
+
- if policy(Integral::Page).duplicate?
|
31
|
+
%li
|
32
|
+
= link_to duplicate_backend_page_url(record.id), method: :post, data: { confirm: t('integral.actions.confirmation.clone') } do
|
33
|
+
= icon('clone')
|
34
|
+
= t('integral.actions.clone')
|
35
|
+
- if policy(Integral::Version).manager?
|
36
|
+
%li
|
37
|
+
= link_to activities_backend_page_url(record.id) do
|
38
|
+
= icon('history')
|
39
|
+
= t('integral.actions.view_history')
|
40
|
+
- if policy(Integral::Page).destroy?
|
41
|
+
%li
|
42
|
+
= link_to backend_page_url(record.id), method: :delete, data: { confirm: t('integral.actions.confirmation.deletion') } do
|
43
|
+
= icon('remove')
|
44
|
+
= t('integral.actions.delete')
|
20
45
|
- else
|
21
46
|
= render partial: 'integral/backend/shared/empty_grid'
|
@@ -3,9 +3,15 @@
|
|
3
3
|
= content_for :actionbar do
|
4
4
|
%ul.menu.horizontal
|
5
5
|
%li
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
- if @resource.archived?
|
7
|
+
%button.button.white.disabled{ data: { tooltip: true, click_open: 'false' }, title: 'Archived pages cannot be viewed' }
|
8
|
+
= icon('eye')
|
9
|
+
= t('integral.actions.view_on_site')
|
10
|
+
- else
|
11
|
+
= link_to @resource.path, class: 'button white' do
|
12
|
+
= icon('eye')
|
13
|
+
= t('integral.actions.view_on_site')
|
14
|
+
|
9
15
|
- if policy(Integral::Page).duplicate?
|
10
16
|
%li
|
11
17
|
= link_to duplicate_backend_page_url(@resource.id), class: 'button white', method: :post, data: { confirm: t('integral.actions.confirmation.clone') } do
|
@@ -1,22 +1,12 @@
|
|
1
|
-
.
|
2
|
-
|
3
|
-
|
4
|
-
-
|
5
|
-
=
|
1
|
+
.grid-x.grid-padding-x
|
2
|
+
-# Left Column
|
3
|
+
.cell.large-6
|
4
|
+
.grid-x.grid-padding-x
|
5
|
+
.cell= render_card(:recent_pages)
|
6
|
+
.cell= render_card(:at_a_glance, { dataset: dataset_at_a_glance_pages })
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
.
|
12
|
-
= simple_form_for :grid, url: backend_pages_url, method: :get, remote: true, html: { id: :grid_form, 'data-type' => :json } do |f|
|
13
|
-
= hidden_field_tag(:gridview, true)
|
14
|
-
= f.hidden_field(:descending, value: @grid.descending, class: 'desc-field')
|
15
|
-
= f.hidden_field(:order, value: @grid.order, class: 'order-field')
|
16
|
-
= f.hidden_field(:page, value: grid_options[:page], class: 'page-field')
|
17
|
-
|
18
|
-
%ul.align-right.menu.filters
|
19
|
-
%li= f.input :status, collection: Integral::Page.available_statuses, label: t('integral.records.attributes.status'), wrapper_html: { class: 'filter' }, input_html: { 'data-filter' => true }, required: false
|
20
|
-
%li= f.input :title, placeholder: t('integral.actions.search'), wrapper_html: { class: 'filter search' }, hint: false, label: false
|
21
|
-
|
22
|
-
= render partial: 'grid'
|
8
|
+
-# Right Column
|
9
|
+
.cell.large-6
|
10
|
+
.grid-x.grid-padding-x
|
11
|
+
.cell= render_card(:recent_activity)
|
12
|
+
.cell.large-6= render_card(:recent_user_activity)
|
@@ -0,0 +1,22 @@
|
|
1
|
+
.card.listing
|
2
|
+
.card-section
|
3
|
+
%h2.show-for-small-only= page_title
|
4
|
+
- if policy(Integral::Page).create?
|
5
|
+
= link_to t('integral.actions.create'), new_backend_page_url, class: 'button hollow show-for-small-only create'
|
6
|
+
|
7
|
+
.top-bar
|
8
|
+
- if policy(Integral::Page).create?
|
9
|
+
.top-bar-left.hide-for-small-only
|
10
|
+
= link_to t('integral.actions.create'), new_backend_page_url, class: 'button hollow'
|
11
|
+
.top-bar-right
|
12
|
+
= simple_form_for :grid, url: list_backend_pages_url, method: :get, remote: true, html: { id: :grid_form, 'data-type' => :json } do |f|
|
13
|
+
= hidden_field_tag(:gridview, true)
|
14
|
+
= f.hidden_field(:descending, value: @grid.descending, class: 'desc-field')
|
15
|
+
= f.hidden_field(:order, value: @grid.order, class: 'order-field')
|
16
|
+
= f.hidden_field(:page, value: grid_options[:page], class: 'page-field')
|
17
|
+
|
18
|
+
%ul.align-right.menu.filters
|
19
|
+
%li= f.input :status, collection: Integral::Page.available_statuses, label: t('integral.records.attributes.status'), wrapper_html: { class: 'filter' }, input_html: { 'data-filter' => true }, required: false
|
20
|
+
%li= f.input :title, placeholder: t('integral.actions.search'), wrapper_html: { class: 'filter search' }, hint: false, label: false
|
21
|
+
|
22
|
+
= render partial: 'grid'
|
@@ -0,0 +1,48 @@
|
|
1
|
+
= content_for :title, @resource.title
|
2
|
+
|
3
|
+
.grid-x
|
4
|
+
.cell.large-6
|
5
|
+
-# Left Column
|
6
|
+
.grid-x.grid-padding-x
|
7
|
+
.cell
|
8
|
+
.card
|
9
|
+
.card-section
|
10
|
+
%h2= @resource.title
|
11
|
+
%p.subtitle= @resource.description
|
12
|
+
%hr
|
13
|
+
|
14
|
+
.grid-x.actions
|
15
|
+
.cell.xlarge-8.xxlarge-6
|
16
|
+
.grid-x.small-up-2
|
17
|
+
- unless @resource.archived?
|
18
|
+
.cell
|
19
|
+
= link_to @resource.path do
|
20
|
+
= icon('eye')
|
21
|
+
= t('integral.actions.view_on_site')
|
22
|
+
- if policy(Integral::Page).manager?
|
23
|
+
.cell
|
24
|
+
= link_to edit_backend_page_url(@resource.id) do
|
25
|
+
= icon('edit')
|
26
|
+
= t('integral.actions.edit')
|
27
|
+
- if policy(Integral::Page).duplicate?
|
28
|
+
.cell
|
29
|
+
= link_to duplicate_backend_page_url(@resource.id), method: :post, data: { confirm: t('integral.actions.confirmation.clone') } do
|
30
|
+
= icon('clone')
|
31
|
+
= t('integral.actions.clone')
|
32
|
+
- if policy(Integral::Page).manager?
|
33
|
+
.cell
|
34
|
+
= link_to backend_page_url(@resource.id), method: :delete, data: { confirm: t('integral.actions.confirmation.deletion') } do
|
35
|
+
= icon('remove')
|
36
|
+
= t('integral.actions.delete')
|
37
|
+
- if policy(Integral::Version).manager?
|
38
|
+
.cell
|
39
|
+
= link_to activities_backend_page_url(@resource.id) do
|
40
|
+
= icon('history')
|
41
|
+
= t('integral.actions.view_history')
|
42
|
+
|
43
|
+
.cell.medium-6.flex-container= render_card(:object, { title: 'Essentials', record: @resource })
|
44
|
+
.cell.medium-6.flex-container= render_card(:recent_user_activity)
|
45
|
+
.cell.large-6
|
46
|
+
-# Right Column
|
47
|
+
.grid-x.grid-padding-x
|
48
|
+
.cell= render_card(:recent_activity)
|
@@ -18,7 +18,7 @@
|
|
18
18
|
.cell
|
19
19
|
.card
|
20
20
|
.card-section
|
21
|
-
= f.input :body, as: :ckeditor, input_html: { id: 'resource_body_editor', ckeditor: { language: current_user.locale }, data: { 'ckeditor-class' => 'integral-post' } }
|
21
|
+
= f.input :body, as: :ckeditor, input_html: { value: @resource.editor_body, id: 'resource_body_editor', ckeditor: { language: current_user.locale }, data: { 'ckeditor-class' => 'integral-post' } }
|
22
22
|
|
23
23
|
.cell.small-12.medium-3
|
24
24
|
.grid-y
|
@@ -31,13 +31,18 @@
|
|
31
31
|
= f.collection_radio_buttons :status, Integral::Post.statuses.map{ |status| [status.first, I18n.t("integral.records.status.#{status.first}")] }, :first, :last
|
32
32
|
%hr.dark
|
33
33
|
= f.button :button if f.object.persisted?
|
34
|
+
.cell
|
35
|
+
.card
|
36
|
+
.card-section
|
37
|
+
%h2= t('integral.records.attributes.category')
|
38
|
+
%hr.dark
|
39
|
+
= f.input :category_id, collection: Integral::Category.all.map{ |category| [category.title, category.id] }, label: false
|
34
40
|
.cell
|
35
41
|
.card.initial-overflow
|
36
42
|
.card-section
|
37
43
|
%h2= t('integral.records.attributes.tags')
|
38
44
|
%hr.dark
|
39
|
-
= f.input :tag_list, label: false, input_html: { value: @resource.tag_list_on(@resource.tag_context).join(','), data: {
|
40
|
-
%label.small Seperate tags with spaces
|
45
|
+
= f.input :tag_list, label: false, input_html: { value: @resource.tag_list_on(@resource.tag_context).join(','), data: { suggest_tags: true, suggest_tags_typeahead: Integral::Post.tag_counts.collect(&:name).join(' ') } }
|
41
46
|
.cell
|
42
47
|
.card
|
43
48
|
.card-section
|
@@ -56,6 +61,3 @@
|
|
56
61
|
%p.help-text This is displayed when sharing socially, leave blank to fallback to the featured image.
|
57
62
|
.cell.small-12
|
58
63
|
= f.button :button
|
59
|
-
|
60
|
-
.record-image
|
61
|
-
= render partial: 'integral/backend/shared/image_selector'
|
@@ -2,7 +2,7 @@
|
|
2
2
|
= render layout: 'integral/backend/shared/grid', locals: { grid: @grid, options: { columns: [:title, :user, :status, :view_count, :updated_at, :actions], order: true }} do |grid|
|
3
3
|
- if grid.assets.any?
|
4
4
|
- grid.assets.decorate.each do |record|
|
5
|
-
%tr
|
5
|
+
%tr.tr--clickable{ data: { href: backend_post_url(record.id), context_menu: "dropdown-pane-actions-post-#{record.id}" }}
|
6
6
|
%td= record.title.truncate(30)
|
7
7
|
%td
|
8
8
|
- if record.user.present?
|
@@ -15,11 +15,37 @@
|
|
15
15
|
%td= number_with_delimiter(record.view_count)
|
16
16
|
%td= l(record.updated_at, format: :long)
|
17
17
|
%td.actions
|
18
|
-
|
19
|
-
= icon('
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
18
|
+
%button.button--action-pane{ 'data-toggle' => "dropdown-pane-actions-post-#{record.id}" }
|
19
|
+
= icon('ellipsis-v')
|
20
|
+
.dropdown-pane.dropdown-pane--actions{ id: "dropdown-pane-actions-post-#{record.id}", data: { dropdown: true, position: :bottom, alignment: :right, close_on_click: 'true' } }
|
21
|
+
%ul.menu.vertical
|
22
|
+
- if policy(Integral::Post).manager?
|
23
|
+
%li
|
24
|
+
= link_to edit_backend_post_url(record.id) do
|
25
|
+
= icon('edit')
|
26
|
+
= t('integral.actions.edit')
|
27
|
+
%li
|
28
|
+
= link_to post_url(record) do
|
29
|
+
= icon('eye')
|
30
|
+
= t('integral.actions.view_on_site')
|
31
|
+
%li
|
32
|
+
= link_to backend_post_url(record.id), target: :blank do
|
33
|
+
= icon('external-link')
|
34
|
+
= t('integral.actions.open_in_new_tab')
|
35
|
+
- if policy(Integral::Post).duplicate?
|
36
|
+
%li
|
37
|
+
= link_to duplicate_backend_post_url(record.id), method: :post, data: { confirm: t('integral.actions.confirmation.clone') } do
|
38
|
+
= icon('clone')
|
39
|
+
= t('integral.actions.clone')
|
40
|
+
- if policy(Integral::Version).manager?
|
41
|
+
%li
|
42
|
+
= link_to activities_backend_post_url(record.id) do
|
43
|
+
= icon('history')
|
44
|
+
= t('integral.actions.view_history')
|
45
|
+
- if policy(Integral::Post).manager?
|
46
|
+
%li
|
47
|
+
= link_to backend_post_url(record.id), method: :delete, data: { confirm: t('integral.actions.confirmation.deletion') } do
|
48
|
+
= icon('remove')
|
49
|
+
= t('integral.actions.delete')
|
24
50
|
- else
|
25
51
|
= render partial: 'integral/backend/shared/empty_grid'
|
@@ -1,20 +1,14 @@
|
|
1
|
-
.
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
.
|
7
|
-
|
8
|
-
.top-bar-right
|
9
|
-
= simple_form_for :grid, url: backend_posts_url, method: :get, remote: true, html: { id: :grid_form, 'data-type' => :json } do |f|
|
10
|
-
= hidden_field_tag(:gridview, true)
|
11
|
-
= f.hidden_field(:descending, value: @grid.descending, class: 'desc-field')
|
12
|
-
= f.hidden_field(:order, value: @grid.order, class: 'order-field')
|
13
|
-
= f.hidden_field(:page, value: grid_options[:page], class: 'page-field')
|
1
|
+
.grid-x.grid-padding-x
|
2
|
+
-# Left Column
|
3
|
+
.cell.large-6
|
4
|
+
.grid-x.grid-padding-x
|
5
|
+
.cell= render_card(:recent_posts)
|
6
|
+
.cell= render_card(:categories)
|
7
|
+
.cell= render_card(:at_a_glance, { dataset: dataset_at_a_glance_posts })
|
14
8
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
9
|
+
-# Right Column
|
10
|
+
.cell.large-6
|
11
|
+
.grid-x.grid-padding-x
|
12
|
+
.cell= render_card(:recent_activity)
|
13
|
+
.cell.large-6= render_card(:recent_user_activity)
|
14
|
+
.cell.large-6= render_card(:top_post_authors)
|
@@ -0,0 +1,20 @@
|
|
1
|
+
.card.listing
|
2
|
+
.card-section
|
3
|
+
%h2.show-for-small-only= page_title
|
4
|
+
= link_to t('integral.actions.create'), new_backend_post_url, class: 'button hollow show-for-small-only create'
|
5
|
+
.top-bar
|
6
|
+
.top-bar-left.hide-for-small-only
|
7
|
+
= link_to t('integral.actions.create'), new_backend_post_url, class: 'button hollow'
|
8
|
+
.top-bar-right
|
9
|
+
= simple_form_for :grid, url: list_backend_posts_url, method: :get, remote: true, html: { id: :grid_form, 'data-type' => :json } do |f|
|
10
|
+
= hidden_field_tag(:gridview, true)
|
11
|
+
= f.hidden_field(:descending, value: @grid.descending, class: 'desc-field')
|
12
|
+
= f.hidden_field(:order, value: @grid.order, class: 'order-field')
|
13
|
+
= f.hidden_field(:page, value: grid_options[:page], class: 'page-field')
|
14
|
+
|
15
|
+
%ul.align-right.menu.filters
|
16
|
+
%li= f.input :user, collection: Integral::User.all, label: t('integral.records.attributes.user'), wrapper_html: { class: 'filter' }, input_html: { 'data-filter' => true }, required: false
|
17
|
+
%li= f.input :status, collection: Integral::Post.available_statuses, label: t('integral.records.attributes.status'), wrapper_html: { class: 'filter' }, input_html: { 'data-filter' => true }, required: false
|
18
|
+
%li= f.input :title, placeholder: t('integral.actions.search'), wrapper_html: { class: 'filter search' }, hint: false, label: false
|
19
|
+
|
20
|
+
= render partial: 'grid'
|