integral 1.4.0 → 1.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +4 -3
- data/app/assets/javascripts/integral/backend.js +86 -2
- data/app/assets/javascripts/integral/support/character_counter.js +13 -8
- data/app/assets/javascripts/integral/support/list.coffee +1 -0
- data/app/assets/javascripts/integral/support/record_selector.coffee +2 -0
- data/app/assets/javascripts/integral/support/slug_generator.coffee +1 -0
- data/app/assets/stylesheets/integral/backend.sass +34 -23
- data/app/assets/stylesheets/integral/backend/_foundation_settings.scss +2 -2
- data/app/assets/stylesheets/integral/backend/dashboard-layout.scss +27 -63
- data/app/assets/stylesheets/integral/backend/devise.sass +2 -3
- data/app/assets/stylesheets/integral/backend/materialize-tags.sass +1 -0
- data/app/assets/stylesheets/integral/backend/modules/dropdown_pane_notifications.scss +150 -0
- data/app/assets/stylesheets/integral/backend/modules/dropdown_pane_profile.scss +59 -0
- data/app/assets/stylesheets/integral/backend/shared.sass +41 -2
- data/app/assets/stylesheets/integral/frontend/layout.sass +10 -0
- data/app/assets/stylesheets/integral/support/media-query-indicator.sass +4 -4
- data/app/controllers/integral/backend/activities_controller.rb +21 -27
- data/app/controllers/integral/backend/base_controller.rb +87 -37
- data/app/controllers/integral/backend/images_controller.rb +26 -8
- data/app/controllers/integral/backend/lists_controller.rb +2 -14
- data/app/controllers/integral/backend/notification_subscriptions_controller.rb +23 -0
- data/app/controllers/integral/backend/pages_controller.rb +0 -4
- data/app/controllers/integral/backend/posts_controller.rb +0 -4
- data/app/controllers/integral/backend/settings_controller.rb +4 -0
- data/app/controllers/integral/backend/static_pages_controller.rb +6 -0
- data/app/controllers/integral/backend/users_controller.rb +43 -24
- data/app/controllers/integral/blog_controller.rb +12 -0
- data/app/controllers/integral/categories_controller.rb +17 -3
- data/app/controllers/integral/tags_controller.rb +5 -2
- data/app/decorators/integral/base_decorator.rb +16 -0
- data/app/decorators/integral/image_decorator.rb +2 -2
- data/app/decorators/integral/list_decorator.rb +1 -13
- data/app/decorators/integral/notification/notification_decorator.rb +74 -0
- data/app/decorators/integral/page_decorator.rb +1 -13
- data/app/decorators/integral/post_decorator.rb +1 -2
- data/app/decorators/integral/user_decorator.rb +1 -13
- data/app/decorators/integral/version_decorator.rb +8 -4
- data/app/helpers/integral/backend/base_helper.rb +97 -31
- data/app/jobs/integral/application_job.rb +1 -0
- data/app/jobs/integral/newsletter_signup_job.rb +0 -2
- data/app/mailers/integral/devise_mailer.rb +6 -0
- data/app/models/concerns/integral/notification/subscribable.rb +67 -0
- data/app/models/integral/application_record.rb +9 -0
- data/app/models/integral/category.rb +9 -0
- data/app/models/integral/image.rb +40 -3
- data/app/models/integral/list.rb +10 -2
- data/app/models/integral/list_item.rb +14 -14
- data/app/models/integral/list_item_connection.rb +6 -0
- data/app/models/integral/notification/notification.rb +28 -0
- data/app/models/integral/notification/subscription.rb +14 -0
- data/app/models/integral/page.rb +15 -8
- data/app/models/integral/post.rb +11 -13
- data/app/models/integral/user.rb +45 -2
- data/app/policies/integral/base_policy.rb +7 -12
- data/app/policies/integral/page_policy.rb +1 -0
- data/app/policies/integral/version_policy.rb +0 -8
- data/app/views/devise/invitations/edit.haml +1 -4
- data/app/views/devise/mailer/invitation_instructions.inky-haml +20 -0
- data/app/views/integral/backend/activities/grid/_dropdown_actions.haml +1 -0
- data/app/views/integral/backend/activities/grid/_row_content.haml +13 -0
- data/app/views/integral/backend/activities/index.haml +7 -13
- data/app/views/integral/backend/activities/shared/_grid.haml +35 -20
- data/app/views/integral/backend/activities/shared/index.haml +12 -12
- data/app/views/integral/backend/activities/shared/show.haml +7 -7
- data/app/views/integral/backend/activities/show.haml +1 -1
- data/app/views/integral/backend/categories/_modal.haml +2 -3
- data/app/views/integral/backend/images/_form.haml +13 -25
- data/app/views/integral/backend/images/edit.haml +1 -9
- data/app/views/integral/backend/images/grid/_dropdown_actions.haml +5 -0
- data/app/views/integral/backend/images/grid/_row_content.haml +5 -0
- data/app/views/integral/backend/images/index.haml +11 -17
- data/app/views/integral/backend/images/list.haml +11 -0
- data/app/views/integral/backend/images/show.haml +26 -0
- data/app/views/integral/backend/lists/_form.haml +6 -19
- data/app/views/integral/backend/lists/_item_modal.haml +3 -3
- data/app/views/integral/backend/lists/_manager.haml +11 -13
- data/app/views/integral/backend/lists/edit.haml +6 -20
- data/app/views/integral/backend/lists/grid/_dropdown_actions.haml +9 -0
- data/app/views/integral/backend/lists/grid/_row_content.haml +3 -0
- data/app/views/integral/backend/lists/index.haml +11 -17
- data/app/views/integral/backend/lists/list.haml +11 -0
- data/app/views/integral/backend/lists/show.haml +30 -0
- data/app/views/integral/backend/notifications/_notification.haml +21 -0
- data/app/views/integral/backend/pages/_form.haml +19 -43
- data/app/views/integral/backend/pages/edit.haml +4 -12
- data/app/views/integral/backend/pages/grid/_dropdown_actions.haml +11 -0
- data/app/views/integral/backend/pages/grid/_row_content.haml +5 -0
- data/app/views/integral/backend/pages/index.haml +6 -6
- data/app/views/integral/backend/pages/list.haml +12 -19
- data/app/views/integral/backend/pages/show.haml +19 -35
- data/app/views/integral/backend/posts/_form.haml +18 -56
- data/app/views/integral/backend/posts/edit.haml +4 -14
- data/app/views/integral/backend/posts/grid/_dropdown_actions.haml +10 -0
- data/app/views/integral/backend/posts/grid/_row_content.haml +6 -0
- data/app/views/integral/backend/posts/index.haml +6 -6
- data/app/views/integral/backend/posts/list.haml +11 -18
- data/app/views/integral/backend/posts/new.haml +0 -1
- data/app/views/integral/backend/posts/show.haml +18 -41
- data/app/views/integral/backend/shared/_breadcrumbs.haml +7 -4
- data/app/views/integral/backend/shared/_image_preview.haml +10 -3
- data/app/views/integral/backend/shared/_image_selector.haml +1 -1
- data/app/views/integral/backend/shared/_notification_subscription_toggle.haml +22 -0
- data/app/views/integral/backend/shared/action_bar/_index.haml +9 -0
- data/app/views/integral/backend/shared/action_bar/_show.haml +3 -0
- data/app/views/integral/backend/shared/cards/_at_a_glance.haml +3 -3
- data/app/views/integral/backend/shared/cards/_categories.haml +27 -28
- data/app/views/integral/backend/shared/cards/_object.haml +1 -1
- data/app/views/integral/backend/shared/cards/_recent_activity.haml +12 -12
- data/app/views/integral/backend/shared/cards/_recent_resources.haml +17 -0
- data/app/views/integral/backend/shared/cards/_top_post_authors.haml +14 -15
- data/app/views/integral/backend/shared/cards/_welcome.haml +24 -25
- data/app/views/integral/backend/shared/{_empty_grid.haml → grid/_empty.haml} +0 -0
- data/app/views/integral/backend/shared/grid/_form.haml +9 -0
- data/app/views/integral/backend/shared/grid/_grid.haml +21 -0
- data/app/views/integral/backend/shared/{_pagination.haml → grid/_pagination.haml} +0 -0
- data/app/views/integral/backend/shared/grid/_row_layout.haml +8 -0
- data/app/views/integral/backend/shared/record_selector/_collection.haml +1 -0
- data/app/views/integral/backend/shared/record_selector/_modal.haml +9 -10
- data/app/views/integral/backend/static_pages/dashboard.haml +6 -7
- data/app/views/integral/backend/users/_form.haml +34 -46
- data/app/views/integral/backend/users/grid/_dropdown_actions.haml +17 -0
- data/app/views/integral/backend/users/grid/_row_content.haml +8 -0
- data/app/views/integral/backend/users/index.haml +6 -6
- data/app/views/integral/backend/users/list.haml +10 -16
- data/app/views/integral/backend/users/show.haml +10 -1
- data/app/views/integral/categories/show.haml +3 -3
- data/app/views/integral/posts/_article_footer.haml +1 -1
- data/app/views/integral/posts/_card.haml +1 -1
- data/app/views/integral/posts/_most_read_section.haml +1 -1
- data/app/views/integral/posts/_post.haml +1 -1
- data/app/views/integral/posts/templates/default.haml +1 -1
- data/app/views/integral/shared/sidebar/_item.haml +1 -1
- data/app/views/layouts/integral/backend.html.haml +24 -5
- data/app/views/layouts/integral/backend/_create_dropdown.haml +1 -30
- data/app/views/layouts/integral/backend/_main_menu_items.haml +1 -101
- data/config/initializers/devise.rb +1 -1
- data/config/locales/en.yml +60 -2
- data/config/routes.rb +2 -0
- data/db/migrate/20200407022636_create_integral_notifications.rb +25 -0
- data/db/migrate/20200421223602_add_status_to_integral_users.rb +5 -0
- data/db/seeds.rb +15 -11
- data/lib/integral.rb +1 -0
- data/lib/integral/acts_as_integral.rb +115 -0
- data/lib/integral/acts_as_listable.rb +1 -1
- data/lib/integral/engine.rb +9 -0
- data/lib/integral/grids/activities_grid.rb +0 -1
- data/lib/integral/grids/lists_grid.rb +1 -0
- data/lib/integral/grids/posts_grid.rb +5 -1
- data/lib/integral/grids/users_grid.rb +5 -0
- data/lib/integral/list_renderer.rb +5 -1
- data/lib/integral/router.rb +20 -4
- data/lib/integral/version.rb +1 -1
- data/spec/factories.rb +15 -1
- metadata +45 -39
- data/app/decorators/integral/category_version_decorator.rb +0 -7
- data/app/decorators/integral/image_version_decorator.rb +0 -7
- data/app/decorators/integral/list_version_decorator.rb +0 -7
- data/app/decorators/integral/page_version_decorator.rb +0 -7
- data/app/decorators/integral/post_version_decorator.rb +0 -7
- data/app/decorators/integral/user_version_decorator.rb +0 -7
- data/app/views/devise/mailer/invitation_instructions.html.erb +0 -13
- data/app/views/integral/backend/activities/_grid.haml +0 -22
- data/app/views/integral/backend/images/_grid.haml +0 -16
- data/app/views/integral/backend/lists/_grid.haml +0 -14
- data/app/views/integral/backend/pages/_grid.haml +0 -46
- data/app/views/integral/backend/posts/_grid.haml +0 -51
- data/app/views/integral/backend/shared/_grid.haml +0 -18
- data/app/views/integral/backend/shared/cards/_recent_pages.haml +0 -19
- data/app/views/integral/backend/shared/cards/_recent_posts.haml +0 -18
- data/app/views/integral/backend/shared/cards/_recent_users.haml +0 -19
- data/app/views/integral/backend/users/_grid.haml +0 -36
@@ -23,15 +23,15 @@
|
|
23
23
|
Override defaults
|
24
24
|
= icon('chevron-down')
|
25
25
|
.cell
|
26
|
-
= f.input :title, wrapper_html: { class: 'alternative' }, input_html: { class: formatted_item.title_required? ? 'title-field required' : 'title-field' }
|
26
|
+
= f.input :title, wrapper_html: { class: 'alternative' }, input_html: { 'data-character-counter' => 'true', class: formatted_item.title_required? ? 'title-field required' : 'title-field' }
|
27
27
|
.cell.medium-8.link-attribute{ class: f.object.basic? || !f.object.persisted? ? 'hide' : '' }
|
28
28
|
= f.input :url, wrapper_html: { class: "alternative" }, input_html: { class: 'url-field' }
|
29
29
|
.cell.medium-4.link-attribute.align-self-middle.flex-container{ class: f.object.basic? || !f.object.persisted? ? 'hide' : '' }
|
30
30
|
= f.input :target, as: :boolean, checked_value: '_blank', unchecked_value: '_self', input_html: { class: 'target-field' }, wrapper_html: { class: 'alternative' }
|
31
31
|
.cell
|
32
|
-
= f.input :subtitle, wrapper_html: { class: 'alternative' }, as: :string
|
32
|
+
= f.input :subtitle, input_html: { 'data-character-counter' => 'true' }, wrapper_html: { class: 'alternative' }, as: :string
|
33
33
|
.cell.medium-8
|
34
|
-
= f.input :description, wrapper_html: { class: 'alternative' }, as: :string, hint: false
|
34
|
+
= f.input :description, input_html: { 'data-character-counter' => 'true' }, wrapper_html: { class: 'alternative' }, as: :string, hint: false
|
35
35
|
.cell.medium-4
|
36
36
|
= f.input :image_id, as: :hidden, input_html: { class: 'image-field', data: { image_present: formatted_item.non_object_image?, fallback_image: formatted_item.fallback_image } }
|
37
37
|
.image-preview.center
|
@@ -1,14 +1,12 @@
|
|
1
1
|
.card.list-management
|
2
|
-
.
|
3
|
-
.top-bar
|
4
|
-
.
|
5
|
-
|
6
|
-
.
|
7
|
-
|
8
|
-
#list-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
= f
|
13
|
-
= render 'list_item_fields', f: list_item
|
14
|
-
|
2
|
+
.top-bar
|
3
|
+
.top-bar-left
|
4
|
+
= f.input :children, wrapper_html: { class: 'alternative' }, disabled: locked
|
5
|
+
.top-bar-right
|
6
|
+
= f.input :list_item_limit, wrapper_html: { class: 'alternative' }, disabled: locked
|
7
|
+
#list-items.sortable
|
8
|
+
= link_to_add_association f, :list_items, 'data-association-insertion-method' => 'after', id: 'top-add-list-button', 'data-association-insertion-node' => '#top-add-list-button', force_non_association_create: true do
|
9
|
+
.add-list-item
|
10
|
+
= icon('plus')
|
11
|
+
= f.simple_fields_for :list_items do |list_item|
|
12
|
+
= render 'list_item_fields', f: list_item
|
@@ -1,35 +1,21 @@
|
|
1
1
|
= content_for :actionbar do
|
2
2
|
%ul.menu.horizontal
|
3
3
|
- if policy(Integral::List).duplicate?
|
4
|
-
|
5
|
-
= link_to duplicate_backend_list_url(@resource.id), class: 'button white', method: :post, data: { confirm: t('integral.actions.confirmation.clone') } do
|
6
|
-
= icon('history')
|
7
|
-
= t('integral.actions.clone')
|
8
|
-
|
9
|
-
-# - if policy(Integral::Version).manager?
|
10
|
-
-# %li
|
11
|
-
-# = link_to activities_backend_list_url(@resource.id), class: 'button white' do
|
12
|
-
-# = icon('history')
|
13
|
-
-# = t('integral.navigation.activity')
|
4
|
+
= link_to t('integral.actions.clone'), duplicate_backend_list_url(@resource.id), class: 'button white', method: :post, data: { confirm: t('integral.actions.confirmation.clone') }, icon: :history, wrapper: :li
|
14
5
|
|
15
6
|
= simple_form_for [:backend, @resource], validate: true, html: { class: 'are-you-sure', 'data-confirm-dirty-form' => true, 'data-list-item-limit' => @resource.list_item_limit, id: :list_form } do |f|
|
16
7
|
= f.input :lock_version, as: :hidden
|
17
|
-
.grid-x
|
8
|
+
.grid-x
|
18
9
|
.cell.medium-6.flex-container
|
19
|
-
.card
|
20
|
-
.card-section
|
21
|
-
= f.input :title, hint: false, disabled: f.object.locked?
|
10
|
+
.card= f.input :title, hint: false, disabled: f.object.locked?
|
22
11
|
.cell.medium-6.flex-container
|
23
|
-
.card
|
24
|
-
.card-section
|
25
|
-
= f.input :description, hint: false, disabled: f.object.locked?
|
12
|
+
.card= f.input :description, hint: false, disabled: f.object.locked?
|
26
13
|
.cell
|
27
14
|
= render partial: 'integral/backend/lists/manager', locals: { f: f, locked: f.object.locked? }
|
28
|
-
.cell
|
29
|
-
= f.button :button
|
15
|
+
.cell= f.button :button
|
30
16
|
|
31
17
|
-# Image Selector
|
32
|
-
= render partial: 'integral/backend/shared/record_selector/modal', locals: { search_path:
|
18
|
+
= render partial: 'integral/backend/shared/record_selector/modal', locals: { search_path: list_backend_img_index_path, title: t('integral.prompts.select_image'), name: 'Image', create_modal: '#new_image_modal', initialize: true }
|
33
19
|
= render partial: 'integral/backend/images/create_modal'
|
34
20
|
|
35
21
|
- Integral::ActsAsListable.objects.each do |listable|
|
@@ -0,0 +1,9 @@
|
|
1
|
+
- if policy(resource_klass).update?
|
2
|
+
= link_to t('integral.actions.edit'), edit_backend_resource_url(resource.id), icon: :edit, wrapper: :li
|
3
|
+
= link_to t('integral.actions.open_in_new_tab'), backend_resource_url(resource.id), target: :blank, icon: 'external-link', wrapper: :li
|
4
|
+
- if policy(resource_klass).duplicate?
|
5
|
+
= link_to t('integral.actions.clone'), duplicate_backend_resource_url(resource.id), method: :post, data: { confirm: t('integral.actions.confirmation.clone') }, icon: :clone, wrapper: :li
|
6
|
+
-# - if policy(Integral::Version).manager?
|
7
|
+
-# = link_to t('integral.actions.view_history'), activities_backend_resource_url(resource.id), icon: :history, wrapper: :li
|
8
|
+
- if policy(resource_klass).destroy?
|
9
|
+
= link_to t('integral.actions.delete'), backend_resource_url(resource.id), method: :delete, data: { confirm: t('integral.actions.confirmation.deletion') }, icon: :remove, wrapper: :li
|
@@ -1,18 +1,12 @@
|
|
1
|
-
.
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
.
|
7
|
-
= link_to t('integral.actions.create'), new_backend_list_url, class: 'button hollow'
|
8
|
-
.top-bar-right
|
9
|
-
= simple_form_for :grid, url: backend_lists_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
|
2
|
+
-# Left Column
|
3
|
+
.cell.large-6
|
4
|
+
.grid-y
|
5
|
+
.cell= render_card(:recent_resources)
|
6
|
+
.cell= render_card(:at_a_glance)
|
14
7
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
8
|
+
-# Right Column
|
9
|
+
.cell.large-6
|
10
|
+
.grid-y
|
11
|
+
.cell= render_card(:recent_activity)
|
12
|
+
.cell.xlarge-6= render_card(:recent_user_activity)
|
@@ -0,0 +1,11 @@
|
|
1
|
+
.card.listing
|
2
|
+
%h2.show-for-small-only= page_title
|
3
|
+
= link_to t('integral.actions.create'), new_backend_resource_url, class: 'button hollow show-for-small-only create'
|
4
|
+
.top-bar
|
5
|
+
.top-bar-left.hide-for-small-only
|
6
|
+
= link_to t('integral.actions.create'), new_backend_resource_url, class: 'button hollow'
|
7
|
+
.top-bar-right
|
8
|
+
= render_resource_grid_form do |f|
|
9
|
+
%li= f.input :title, placeholder: t('integral.actions.search'), wrapper_html: { class: 'filter search' }, hint: false, label: false
|
10
|
+
|
11
|
+
= render_resource_grid
|
@@ -0,0 +1,30 @@
|
|
1
|
+
= content_for :title, @resource.title
|
2
|
+
|
3
|
+
.grid-x
|
4
|
+
.cell.large-6
|
5
|
+
-# Left Column
|
6
|
+
.grid-x
|
7
|
+
.cell
|
8
|
+
.card
|
9
|
+
%h2= @resource.title
|
10
|
+
%p.subtitle= @resource.description
|
11
|
+
%hr
|
12
|
+
|
13
|
+
.grid-x.actions
|
14
|
+
.cell.xlarge-8.xxlarge-6
|
15
|
+
.grid-x.small-up-2
|
16
|
+
- if policy(resource_klass).manager?
|
17
|
+
= link_to t('integral.actions.edit'), edit_backend_resource_url(@resource.id), icon: :edit, wrapper: :cell
|
18
|
+
- if policy(resource_klass).duplicate?
|
19
|
+
= link_to t('integral.actions.clone'), duplicate_backend_resource_url(@resource.id), method: :post, data: { confirm: t('integral.actions.confirmation.clone') }, icon: :clone, wrapper: :cell
|
20
|
+
- if policy(resource_klass).manager?
|
21
|
+
= link_to t('integral.actions.delete'), backend_resource_url(@resource.id), method: :delete, data: { confirm: t('integral.actions.confirmation.deletion') }, icon: :remove, wrapper: :cell
|
22
|
+
-# - if policy(Integral::Version).manager?
|
23
|
+
-# = link_to t('integral.actions.view_history'), activities_backend_resource_url(@resource.id), icon: :history, wrapper: :cell
|
24
|
+
|
25
|
+
-# .cell.medium-6.flex-container= render_card(:object, { title: 'Essentials', record: @resource })
|
26
|
+
.cell.xlarge-6.flex-container= render_card(:recent_user_activity)
|
27
|
+
.cell.large-6
|
28
|
+
-# Right Column
|
29
|
+
.grid-x
|
30
|
+
.cell= render_card(:recent_activity)
|
@@ -0,0 +1,21 @@
|
|
1
|
+
%li.notification{ class: notification.unread? ? 'unread' : '', data: { notification_read_url: notification.unread? ? read_notification_backend_user_url(current_user, notification_id: notification.id) : nil, notification_id: notification.id }}
|
2
|
+
.notification-icon
|
3
|
+
-#= icon('home')
|
4
|
+
.notification-content
|
5
|
+
.align-justify.flex-container
|
6
|
+
%span.notification-action
|
7
|
+
= notification.model_name
|
8
|
+
= notification.action_verb
|
9
|
+
%span.notification-whodunnit
|
10
|
+
- if notification.whodunnit.present?
|
11
|
+
= link_to notification.whodunnit_url do
|
12
|
+
= image_tag notification.whodunnit_avatar_url, class: :avatar
|
13
|
+
%span= notification.whodunnit_name.truncate(30)
|
14
|
+
- else
|
15
|
+
= image_tag notification.whodunnit_avatar_url, class: :avatar
|
16
|
+
%span= notification.whodunnit_name.truncate(30)
|
17
|
+
.align-justify.flex-container
|
18
|
+
= link_to notification.item_url, class: 'notification-title' do
|
19
|
+
= notification.item_title.truncate(40)
|
20
|
+
%span.notification-created-at= time_ago_in_words(notification.created_at, scope: 'datetime.distance_in_words.short')
|
21
|
+
|
@@ -1,49 +1,25 @@
|
|
1
1
|
= simple_form_for [:backend, @resource], validate: true, html: { id: 'resource_form', class: 'are-you-sure', 'data-confirm-dirty-form' => true } do |f|
|
2
2
|
= f.input :lock_version, as: :hidden
|
3
|
-
.grid-x
|
4
|
-
.cell.
|
3
|
+
.grid-x
|
4
|
+
.cell.medium-8.large-9
|
5
|
+
-# Left Column
|
5
6
|
.grid-y
|
6
|
-
.
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
.cell
|
11
|
-
.card
|
12
|
-
.card-section
|
13
|
-
= f.input :description
|
14
|
-
.cell
|
15
|
-
.card
|
16
|
-
.card-section
|
17
|
-
= f.input :path, disabled: current_policy.unpermitted_attribute?(:path)
|
18
|
-
.cell
|
19
|
-
.card
|
20
|
-
.card-section
|
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 } }
|
7
|
+
= f.input :title
|
8
|
+
= f.input :description
|
9
|
+
= f.input :path
|
10
|
+
= f.input :body, as: :ckeditor, input_html: { id: 'resource_body_editor', value: @resource.editor_body, data: { 'ckeditor-class' => @resource.template } }
|
22
11
|
|
23
|
-
.cell.
|
12
|
+
.cell.medium-4.large-3
|
13
|
+
-# Right Column
|
24
14
|
.grid-y
|
25
|
-
.
|
26
|
-
.
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
.cell
|
35
|
-
.card
|
36
|
-
.card-section
|
37
|
-
= f.input :template, collection: Integral::Page.available_templates, prompt: t('integral.backend.pages.prompts.choose_template'), include_blank: false
|
38
|
-
.cell
|
39
|
-
.card
|
40
|
-
.card-section
|
41
|
-
= f.association :parent, collection: @resource.available_parents.map {|p| [p.title, p.id]}, include_blank: true
|
42
|
-
.cell
|
43
|
-
.card.initial-overflow
|
44
|
-
.card-section
|
45
|
-
%h2= t('integral.records.attributes.image')
|
46
|
-
= render partial: 'integral/backend/shared/image_preview', locals: { f:f, image_attr: :image }
|
15
|
+
.input
|
16
|
+
%h2= t('integral.records.attributes.status')
|
17
|
+
%hr.dark
|
18
|
+
.radios= f.collection_radio_buttons :status, Integral::Page.available_statuses, :last, :first, include_hidden: false
|
19
|
+
%hr.dark
|
20
|
+
= f.button :button if f.object.persisted?
|
21
|
+
= f.input :template, collection: Integral::Page.available_templates, prompt: t('integral.backend.pages.prompts.choose_template'), include_blank: false
|
22
|
+
= f.association :parent, collection: @resource.available_parents.map {|p| [p.title, p.id]}, include_blank: true
|
23
|
+
= render partial: 'integral/backend/shared/image_preview', locals: { f:f }
|
47
24
|
|
48
|
-
.cell.
|
49
|
-
= f.button :button
|
25
|
+
.cell= f.button :button
|
@@ -8,19 +8,11 @@
|
|
8
8
|
= icon('eye')
|
9
9
|
= t('integral.actions.view_on_site')
|
10
10
|
- else
|
11
|
-
= link_to @resource.path, class: 'button white'
|
12
|
-
= icon('eye')
|
13
|
-
= t('integral.actions.view_on_site')
|
11
|
+
= link_to t('integral.actions.view_on_site'), @resource.path, class: 'button white', icon: :eye
|
14
12
|
|
15
|
-
- if policy(
|
16
|
-
|
17
|
-
= link_to duplicate_backend_page_url(@resource.id), class: 'button white', method: :post, data: { confirm: t('integral.actions.confirmation.clone') } do
|
18
|
-
= icon('history')
|
19
|
-
= t('integral.actions.clone')
|
13
|
+
- if policy(resource_klass).duplicate?
|
14
|
+
= link_to t('integral.actions.clone'), duplicate_backend_resource_url(@resource.id), class: 'button white', method: :post, data: { confirm: t('integral.actions.confirmation.clone') }, icon: :history, wrapper: :li
|
20
15
|
- if policy(Integral::Version).manager?
|
21
|
-
|
22
|
-
= link_to activities_backend_page_url(@resource.id), class: 'button white' do
|
23
|
-
= icon('history')
|
24
|
-
= t('integral.navigation.activity')
|
16
|
+
= link_to t('integral.navigation.activity'), activities_backend_resource_url(@resource.id), class: 'button white', icon: :history, wrapper: :li
|
25
17
|
|
26
18
|
= render 'form'
|
@@ -0,0 +1,11 @@
|
|
1
|
+
- if policy(resource_klass).update?
|
2
|
+
= link_to t('integral.actions.edit'), edit_backend_resource_url(resource.id), icon: :edit, wrapper: :li
|
3
|
+
- unless resource.archived?
|
4
|
+
= link_to t('integral.actions.view_on_site'), resource.path, icon: :eye, wrapper: :li
|
5
|
+
= link_to t('integral.actions.open_in_new_tab'), backend_resource_url(resource.id), target: :blank, icon: 'external-link', wrapper: :li
|
6
|
+
- if policy(resource_klass).duplicate?
|
7
|
+
= link_to t('integral.actions.clone'), duplicate_backend_resource_url(resource.id), method: :post, data: { confirm: t('integral.actions.confirmation.clone') }, icon: :clone, wrapper: :li
|
8
|
+
- if policy(Integral::Version).manager?
|
9
|
+
= link_to t('integral.actions.view_history'), activities_backend_resource_url(resource.id), icon: :history, wrapper: :li
|
10
|
+
- if policy(resource_klass).destroy?
|
11
|
+
= link_to t('integral.actions.delete'), backend_resource_url(resource.id), method: :delete, data: { confirm: t('integral.actions.confirmation.deletion') }, icon: :remove, wrapper: :li
|
@@ -1,12 +1,12 @@
|
|
1
|
-
.grid-x
|
1
|
+
.grid-x
|
2
2
|
-# Left Column
|
3
3
|
.cell.large-6
|
4
|
-
.grid-
|
5
|
-
.cell= render_card(:
|
6
|
-
.cell= render_card(:at_a_glance
|
4
|
+
.grid-y
|
5
|
+
.cell= render_card(:recent_resources)
|
6
|
+
.cell= render_card(:at_a_glance)
|
7
7
|
|
8
8
|
-# Right Column
|
9
9
|
.cell.large-6
|
10
|
-
.grid-
|
10
|
+
.grid-y
|
11
11
|
.cell= render_card(:recent_activity)
|
12
|
-
.cell.
|
12
|
+
.cell.xlarge-6= render_card(:recent_user_activity)
|
@@ -1,22 +1,15 @@
|
|
1
1
|
.card.listing
|
2
|
-
.
|
3
|
-
|
4
|
-
|
5
|
-
= link_to t('integral.actions.create'), new_backend_page_url, class: 'button hollow show-for-small-only create'
|
2
|
+
%h2.show-for-small-only= page_title
|
3
|
+
- if policy(resource_klass).create?
|
4
|
+
= link_to t('integral.actions.create'), new_backend_resource_url, class: 'button hollow show-for-small-only create'
|
6
5
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
= f.hidden_field(:order, value: @grid.order, class: 'order-field')
|
16
|
-
= f.hidden_field(:page, value: grid_options[:page], class: 'page-field')
|
6
|
+
.top-bar
|
7
|
+
- if policy(resource_klass).create?
|
8
|
+
.top-bar-left.hide-for-small-only
|
9
|
+
= link_to t('integral.actions.create'), new_backend_resource_url, class: 'button hollow'
|
10
|
+
.top-bar-right
|
11
|
+
= render_resource_grid_form do |f|
|
12
|
+
%li= f.input :status, collection: resource_klass.available_statuses, label: t('integral.records.attributes.status'), wrapper_html: { class: 'filter' }, input_html: { 'data-filter' => true }, required: false
|
13
|
+
%li= f.input :title, placeholder: t('integral.actions.search'), wrapper_html: { class: 'filter search' }, hint: false, label: false
|
17
14
|
|
18
|
-
|
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'
|
15
|
+
= render_resource_grid
|
@@ -3,46 +3,30 @@
|
|
3
3
|
.grid-x
|
4
4
|
.cell.large-6
|
5
5
|
-# Left Column
|
6
|
-
.grid-x
|
6
|
+
.grid-x
|
7
7
|
.cell
|
8
8
|
.card
|
9
|
-
.
|
10
|
-
|
11
|
-
|
12
|
-
%hr
|
9
|
+
%h2= @resource.title
|
10
|
+
%p.subtitle= @resource.description
|
11
|
+
%hr
|
13
12
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
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')
|
13
|
+
.grid-x.actions
|
14
|
+
.cell.xlarge-8.xxlarge-6
|
15
|
+
.grid-x.small-up-2
|
16
|
+
- unless @resource.archived?
|
17
|
+
= link_to t('integral.actions.view_on_site'), @resource.path, icon: :eye, wrapper: :cell
|
18
|
+
- if policy(resource_klass).manager?
|
19
|
+
= link_to t('integral.actions.edit'), edit_backend_resource_url(@resource.id), icon: :edit, wrapper: :cell
|
20
|
+
- if policy(resource_klass).duplicate?
|
21
|
+
= link_to t('integral.actions.clone'), duplicate_backend_resource_url(@resource.id), method: :post, data: { confirm: t('integral.actions.confirmation.clone') }, icon: :clone, wrapper: :cell
|
22
|
+
- if policy(resource_klass).manager?
|
23
|
+
= link_to t('integral.actions.delete'), backend_resource_url(@resource.id), method: :delete, data: { confirm: t('integral.actions.confirmation.deletion') }, icon: :remove, wrapper: :cell
|
24
|
+
- if policy(Integral::Version).manager?
|
25
|
+
= link_to t('integral.actions.view_history'), activities_backend_resource_url(@resource.id), icon: :history, wrapper: :cell
|
42
26
|
|
43
27
|
.cell.medium-6.flex-container= render_card(:object, { title: 'Essentials', record: @resource })
|
44
|
-
.cell.
|
28
|
+
.cell.xlarge-6.flex-container= render_card(:recent_user_activity)
|
45
29
|
.cell.large-6
|
46
30
|
-# Right Column
|
47
|
-
.grid-x
|
31
|
+
.grid-x
|
48
32
|
.cell= render_card(:recent_activity)
|
@@ -1,63 +1,25 @@
|
|
1
1
|
= simple_form_for [:backend, @resource], validate: true, html: { id: 'resource_form', class: 'are-you-sure', 'data-confirm-dirty-form' => true } do |f|
|
2
2
|
= f.input :lock_version, as: :hidden
|
3
|
-
.grid-x
|
4
|
-
.cell.
|
3
|
+
.grid-x
|
4
|
+
.cell.medium-9
|
5
5
|
.grid-y
|
6
|
-
.
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
.cell
|
11
|
-
.card
|
12
|
-
.card-section
|
13
|
-
= f.input :description
|
14
|
-
.cell
|
15
|
-
.card
|
16
|
-
.card-section
|
17
|
-
= f.input :slug, input_html: { data: { slugify: '#resource_title' }}
|
18
|
-
.cell
|
19
|
-
.card
|
20
|
-
.card-section
|
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' } }
|
6
|
+
= f.input :title, input_html: { id: 'resource_title' }
|
7
|
+
= f.input :description
|
8
|
+
= f.input :slug, input_html: { data: { slugify: '#resource_title' }}
|
9
|
+
= 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
10
|
|
23
|
-
.cell.
|
11
|
+
.cell.medium-3
|
24
12
|
.grid-y
|
25
13
|
.cell
|
26
14
|
.card
|
27
|
-
.
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
.
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
%hr.dark
|
39
|
-
= f.input :category_id, collection: Integral::Category.all.map{ |category| [category.title, category.id] }, label: false
|
40
|
-
.cell
|
41
|
-
.card.initial-overflow
|
42
|
-
.card-section
|
43
|
-
%h2= t('integral.records.attributes.tags')
|
44
|
-
%hr.dark
|
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(' ') } }
|
46
|
-
.cell
|
47
|
-
.card
|
48
|
-
.card-section
|
49
|
-
= f.association :user
|
50
|
-
.cell
|
51
|
-
.card.initial-overflow
|
52
|
-
.card-section
|
53
|
-
%h2= t('integral.records.attributes.featured_image')
|
54
|
-
= render partial: 'integral/backend/shared/image_preview', locals: { f:f, image_attr: :image }
|
55
|
-
.cell
|
56
|
-
.card.initial-overflow
|
57
|
-
.card-section
|
58
|
-
%h2= t('integral.records.attributes.preview_image')
|
59
|
-
= render partial: 'integral/backend/shared/image_preview', locals: { f:f, image_attr: :preview_image }
|
60
|
-
%br
|
61
|
-
%p.help-text This is displayed when sharing socially, leave blank to fallback to the featured image.
|
62
|
-
.cell.small-12
|
63
|
-
= f.button :button
|
15
|
+
= f.label(:status)
|
16
|
+
%hr.dark
|
17
|
+
.radios= f.collection_radio_buttons :status, resource_klass.available_statuses, :last, :first
|
18
|
+
%hr.dark
|
19
|
+
= f.button :button if f.object.persisted?
|
20
|
+
= f.input :category_id, collection: Integral::Category.all.map{ |category| [category.title, category.id] }, include_blank: false
|
21
|
+
= f.input :tag_list, input_html: { value: @resource.tag_list_on(@resource.tag_context).join(','), data: { suggest_tags: true, suggest_tags_typeahead: resource_klass.tags_on('published').map(&:name).join(' ') } }
|
22
|
+
= f.association :user
|
23
|
+
= render partial: 'integral/backend/shared/image_preview', locals: { f:f }
|
24
|
+
= render partial: 'integral/backend/shared/image_preview', locals: { f:f, attribute: :preview_image, help_text: 'This is displayed when sharing socially, leave blank to fallback to the featured image.' }
|
25
|
+
.cell= f.button :button
|