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
File without changes
|
@@ -0,0 +1,9 @@
|
|
1
|
+
= simple_form_for :grid, url: list_backend_resources_url, method: :get, remote: true, html: { id: :grid_form, 'data-type' => :json } do |f|
|
2
|
+
= hidden_field_tag(:gridview, true)
|
3
|
+
= f.hidden_field(:descending, value: resource_grid.descending, class: 'desc-field')
|
4
|
+
= f.hidden_field(:order, value: resource_grid.order, class: 'order-field')
|
5
|
+
= f.hidden_field(:page, value: grid_options[:page], class: 'page-field')
|
6
|
+
|
7
|
+
%ul.align-right.menu.filters
|
8
|
+
= yield(f)
|
9
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
- options = local_assigns.reverse_merge({ order: true, columns: resource_grid_columns })
|
2
|
+
|
3
|
+
= render_data_grid do
|
4
|
+
%table.integral-grid.wice-grid.table-striped.hover
|
5
|
+
%thead
|
6
|
+
%tr
|
7
|
+
- resource_grid.html_columns(*options[:columns]).uniq { |col| col.name }.sort_by{ |item| options[:columns].index item.name }.each do |column|
|
8
|
+
%th{ class: datagrid_column_classes(resource_grid, column) }
|
9
|
+
- if column.supports_order? && options[:order]
|
10
|
+
%button{ data: { sort: column.name, desc: (!resource_grid.descending).to_s }}
|
11
|
+
= column.header
|
12
|
+
- else
|
13
|
+
= column.header
|
14
|
+
%tbody
|
15
|
+
- if resource_grid.assets.any?
|
16
|
+
= render partial: "#{self.controller._prefixes.first}/grid/row_content", collection: resource_grid.assets.decorate, layout: 'integral/backend/shared/grid/row_layout', as: :resource
|
17
|
+
- else
|
18
|
+
= render partial: 'integral/backend/shared/grid/empty'
|
19
|
+
|
20
|
+
= render partial: 'integral/backend/shared/grid/pagination', locals: { records: resource_grid.assets }
|
21
|
+
= icon('spinner', class: 'fa-pulse fa-3x fa-fw load-indicator')
|
File without changes
|
@@ -0,0 +1,8 @@
|
|
1
|
+
%tr.tr--clickable{ data: { href: backend_resource_url(resource), context_menu: "dropdown-pane-actions-page-#{resource.id}" }}
|
2
|
+
= yield
|
3
|
+
%td.actions
|
4
|
+
%button.button--action-pane{ 'data-toggle' => "dropdown-pane-actions-page-#{resource.id}" }
|
5
|
+
= icon('ellipsis-v')
|
6
|
+
.dropdown-pane.dropdown-pane--actions{ id: "dropdown-pane-actions-page-#{resource.id}", data: { dropdown: true, position: :bottom, alignment: :right, close_on_click: 'true' } }
|
7
|
+
%ul.menu.vertical
|
8
|
+
= render partial: "#{self.controller._prefixes.first}/grid/dropdown_actions", locals: { resource: resource }
|
@@ -2,6 +2,7 @@
|
|
2
2
|
= render partial: 'integral/backend/shared/record_selector/record', locals: { list_item: { image: '', title: '', subtitle: '' }}
|
3
3
|
|
4
4
|
- if collection.empty?
|
5
|
+
.grid-x
|
5
6
|
%p.text-center.no-records
|
6
7
|
= t('integral.backend.tables.no_data_available')
|
7
8
|
= image_tag image_path('integral/backend/data-unavailable.png')
|
@@ -10,18 +10,17 @@
|
|
10
10
|
.modal-content
|
11
11
|
.grid-x.grid-padding-x
|
12
12
|
.cell.medium-9
|
13
|
-
|
14
|
-
.top-bar
|
15
|
-
|
16
|
-
.filter.search
|
17
|
-
= text_field_tag :search, '', class: 'search-field', placeholder: 'Search..'
|
13
|
+
.top-bar
|
14
|
+
.top-bar-left
|
15
|
+
= form_tag search_path, method: :get, remote: true, format: :json , data: {'type' => 'json'} do
|
16
|
+
.filter.search= text_field_tag :search, '', class: 'search-field', placeholder: 'Search..'
|
18
17
|
= hidden_field_tag :page, '', class: 'page-field', value: 1
|
19
18
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
19
|
+
- if defined?(create_modal)
|
20
|
+
.top-bar-right
|
21
|
+
%button.button.create-button{ data: { 'target' => create_modal }}
|
22
|
+
= icon('cloud-upload')
|
23
|
+
= t('integral.actions.upload')
|
25
24
|
.loader.text-center
|
26
25
|
= icon('spinner', class: 'fa-pulse fa-3x fa-fw')
|
27
26
|
%span.sr-only Loading..
|
@@ -3,21 +3,20 @@
|
|
3
3
|
.grid-x
|
4
4
|
.cell.large-6
|
5
5
|
-# Left Column
|
6
|
-
.grid-x
|
6
|
+
.grid-x
|
7
7
|
.cell= render_card(:welcome)
|
8
8
|
- if Integral.blog_enabled? & Integral::Post.published.last.present?
|
9
9
|
.cell.medium-6.flex-container= render_card(:object, { title: t('.recent_post'), record: Integral::Post.published.last })
|
10
10
|
|
11
|
-
.cell.medium-6.flex-container= render_card(:recent_user_activity)
|
12
11
|
.cell.medium-6.flex-container= render_card(:object, { title: t('.recent_page'), record: Integral::Page.published.last })
|
12
|
+
.cell.xlarge-6.flex-container= render_card(:recent_user_activity)
|
13
13
|
.cell.large-6
|
14
14
|
-# Right Column
|
15
|
-
.grid-x
|
15
|
+
.grid-x
|
16
16
|
.cell= render_card(:recent_activity)
|
17
|
-
.cell= render_card(:at_a_glance
|
17
|
+
.cell= render_card(:at_a_glance)
|
18
18
|
.cell
|
19
19
|
.card
|
20
|
-
.
|
21
|
-
|
22
|
-
= render_line_chart(dataset_dashboard_last_week)
|
20
|
+
%h2= t('integral.backend.cards.last_week')
|
21
|
+
= render_line_chart(dataset_dashboard_last_week)
|
23
22
|
|
@@ -1,58 +1,46 @@
|
|
1
1
|
= simple_form_for [:backend, @resource], validate: true, html: { id: 'user_form', class: 'are-you-sure' } 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
5
|
.grid-y
|
6
|
-
.
|
7
|
-
|
8
|
-
.card-section
|
9
|
-
= f.input :name
|
10
|
-
.cell
|
11
|
-
.card
|
12
|
-
.card-section
|
13
|
-
= f.input :email
|
6
|
+
= f.input :name
|
7
|
+
= f.input :email
|
14
8
|
- if policy(current_user).manager?
|
15
9
|
.cell
|
16
10
|
.card
|
17
|
-
.
|
18
|
-
|
19
|
-
|
20
|
-
%
|
21
|
-
%
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
%
|
30
|
-
|
31
|
-
-
|
32
|
-
|
33
|
-
%
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
%td
|
11
|
+
- roles = Integral::Role.all.map { |role| [role.name, role.id ] }.to_h
|
12
|
+
= hidden_field_tag 'user[role_ids][]'
|
13
|
+
%table.table-striped.centered.js-table--user-roles
|
14
|
+
%thead
|
15
|
+
%th Role
|
16
|
+
%th Reader
|
17
|
+
%th Contributer
|
18
|
+
%th Editor
|
19
|
+
%th Manager
|
20
|
+
%tbody
|
21
|
+
- for object_name in ['Page', 'Post', 'List', 'Image', 'User']
|
22
|
+
%tr
|
23
|
+
%th= object_name
|
24
|
+
- for role_type in ['Reader', 'Contributer', 'Editor', 'Manager']
|
25
|
+
- if roles["#{object_name}#{role_type}"].present?
|
26
|
+
%td
|
27
|
+
%span.checkbox
|
28
|
+
= check_box_tag 'user[role_ids][]', roles["#{object_name}#{role_type}"], @resource.role_ids.include?(roles["#{object_name}#{role_type}"]), id: "#{object_name}#{role_type}", class: 'filled-in'
|
29
|
+
= label_tag "#{object_name}#{role_type}", ' '.html_safe
|
30
|
+
- else
|
31
|
+
%td
|
39
32
|
|
40
|
-
.cell.
|
33
|
+
.cell.medium-4.large-3
|
41
34
|
.grid-y
|
35
|
+
= f.input :notify_me
|
42
36
|
.cell
|
43
37
|
.card
|
44
|
-
.
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
= f.input :avatar, label: false
|
51
|
-
.cell
|
52
|
-
.card
|
53
|
-
.card-section
|
54
|
-
= f.input :locale, collection: Integral::User.available_locales, prompt: t('integral.backend.users.prompts.select_language'), include_blank: false
|
38
|
+
= f.label(:avatar)
|
39
|
+
- if @resource.avatar.present?
|
40
|
+
= image_tag @resource.avatar.url(:medium)
|
41
|
+
= f.input :avatar, as: :string, disabled: true, label: false
|
42
|
+
= f.input :avatar, label: false
|
43
|
+
= f.input :locale, collection: Integral::User.available_locales, prompt: t('integral.backend.users.prompts.select_language'), include_blank: false
|
55
44
|
|
56
|
-
.cell.
|
57
|
-
= f.button :button
|
45
|
+
.cell= f.button :button
|
58
46
|
|
@@ -0,0 +1,17 @@
|
|
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(Integral::Version).manager?
|
5
|
+
= link_to t('integral.actions.view_history'), activities_backend_resource_url(resource.id), icon: :history, wrapper: :li
|
6
|
+
- if policy(resource_klass).manager?
|
7
|
+
%li
|
8
|
+
- if resource.blocked?
|
9
|
+
= link_to unblock_backend_user_url(resource.id), method: :put, data: { confirm: t('integral.actions.confirmation.unblock') } do
|
10
|
+
= icon('unlock')
|
11
|
+
= t('integral.actions.unblock')
|
12
|
+
- else
|
13
|
+
= link_to block_backend_user_url(resource.id), method: :put, data: { confirm: t('integral.actions.confirmation.block') } do
|
14
|
+
= icon('ban')
|
15
|
+
= t('integral.actions.block')
|
16
|
+
- if policy(resource_klass).destroy?
|
17
|
+
= 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-x
|
5
|
-
.cell= render_card(:
|
6
|
-
.cell.
|
7
|
-
|
4
|
+
.grid-x
|
5
|
+
.cell= render_card(:recent_resources)
|
6
|
+
.cell.xlarge-6= render_card(:recent_user_activity)
|
7
|
+
.cell= render_card(:at_a_glance)
|
8
8
|
|
9
9
|
-# Right Column
|
10
10
|
.cell.large-6
|
11
|
-
.grid-x
|
11
|
+
.grid-x
|
12
12
|
.cell= render_card(:recent_activity)
|
@@ -1,18 +1,12 @@
|
|
1
1
|
.card.listing
|
2
|
-
.
|
3
|
-
|
4
|
-
|
5
|
-
.top-bar
|
6
|
-
.
|
7
|
-
|
8
|
-
|
9
|
-
=
|
10
|
-
|
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')
|
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 :status, collection: resource_klass.available_statuses, label: t('integral.records.attributes.status'), wrapper_html: { class: 'filter' }, input_html: { 'data-filter' => true }, required: false
|
10
|
+
%li= f.input :name, placeholder: t('integral.actions.search'), wrapper_html: { class: 'filter search' }, hint: false, label: false
|
14
11
|
|
15
|
-
|
16
|
-
%li= f.input :name, placeholder: t('integral.actions.search'), wrapper_html: { class: 'filter search' }, hint: false, label: false
|
17
|
-
|
18
|
-
= render partial: 'grid'
|
12
|
+
= render_resource_grid
|
@@ -20,7 +20,16 @@
|
|
20
20
|
%p
|
21
21
|
= icon('calendar')
|
22
22
|
= t('.member_since', start_date: l(@resource.created_at))
|
23
|
-
|
23
|
+
%p
|
24
|
+
= icon('user')
|
25
|
+
= t("integral.statuses.#{@resource.status}")
|
26
|
+
%p
|
27
|
+
- if @resource.notify_me?
|
28
|
+
= icon('bell')
|
29
|
+
= 'Notified about everything'
|
30
|
+
- else
|
31
|
+
= icon('bell-o')
|
32
|
+
= 'Notified about only things that have been subscribed too'
|
24
33
|
.roles
|
25
34
|
- @resource.roles.each do |role|
|
26
35
|
.label= role.label
|
@@ -1,5 +1,5 @@
|
|
1
|
-
= render_posts_as_json_ld(@posts
|
1
|
+
= render_posts_as_json_ld(@posts, title: @resource.title, url: category_path(@resource), description: @resource.description)
|
2
2
|
|
3
3
|
= render layout: 'integral/shared/blog/layout', locals: { title: @resource.title } do
|
4
|
-
= render partial: @posts
|
5
|
-
.center= will_paginate @posts, renderer: FoundationPagination::Rails
|
4
|
+
= render partial: @posts, cached: true
|
5
|
+
.center= will_paginate @posts, { renderer: FoundationPagination::Rails, params: { category_path: true } }
|
@@ -6,7 +6,7 @@
|
|
6
6
|
%span
|
7
7
|
= "#{t('integral.navigation.tags')}:"
|
8
8
|
- @post.tags_on(@post.tag_context).each do |tag|
|
9
|
-
%li= link_to tag.name, tag_url(tag)
|
9
|
+
%li= link_to tag.name, tag_url(tag.name)
|
10
10
|
.cell.medium-5.article-footer-actions
|
11
11
|
%button.button.secondary{ 'data-open' => 'share-modal' }= t('integral.actions.share')
|
12
12
|
%button.button{ 'data-open' => 'subscribe-modal' }= t('integral.actions.subscribe')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.cell.small-3.flex-container
|
2
2
|
.card.post-card
|
3
3
|
= link_to integral.post_url(post) do
|
4
|
-
= image_tag post.image(:medium), class: 'post-card-image'
|
4
|
+
= image_tag post.image(:medium), class: 'post-card-image', alt: post.title
|
5
5
|
.card-section
|
6
6
|
%h3= post.title
|
7
7
|
%p= post.description
|
@@ -2,7 +2,7 @@
|
|
2
2
|
.grid-x.grid-padding-x
|
3
3
|
.cell.small-4
|
4
4
|
= link_to integral.post_url(post) do
|
5
|
-
= image_tag post.image
|
5
|
+
= image_tag post.image, alt: post.title
|
6
6
|
.cell.small-8.horizontal-post-body
|
7
7
|
%h3= link_to post.title, integral.post_url(post)
|
8
8
|
%p.show-for-medium= post.description
|
@@ -9,7 +9,7 @@
|
|
9
9
|
%h1
|
10
10
|
= @post.title
|
11
11
|
- if user_signed_in?
|
12
|
-
%span.label.entity-status{ class: @post.
|
12
|
+
%span.label.entity-status{ class: @post.draft? ? 'warning' : '' }= @post.status
|
13
13
|
%span.small= link_to 'Edit', integral.edit_backend_post_url(@post.id), class: "button medium", data: { 'turbolinks' => 'false' }
|
14
14
|
.grid-x
|
15
15
|
.cell.medium-8
|
@@ -1,7 +1,7 @@
|
|
1
1
|
.grid-x.list-item
|
2
2
|
.cell.small-3.image
|
3
3
|
= link_to url do
|
4
|
-
= image_tag image, class: 'thumbnail' unless image.empty? #TODO: Should thumbnail be here?
|
4
|
+
= image_tag image, alt: title, class: 'thumbnail' unless image.empty? #TODO: Should thumbnail be here?
|
5
5
|
.cell.small-9.data
|
6
6
|
= link_to title, url
|
7
7
|
%ul.list-unstyled.piped-list
|
@@ -38,9 +38,28 @@
|
|
38
38
|
= link_to main_app.root_path, class: 'button clear' do
|
39
39
|
= icon('eye')
|
40
40
|
= t('integral.actions.view_main_site')
|
41
|
+
%li
|
42
|
+
%button.button-notifications-dropdown{ type: 'button', data: { toggle: 'notifications-dropdown'}}
|
43
|
+
- if current_user.notifications.unread.any?
|
44
|
+
= icon('circle')
|
45
|
+
= icon('bell-o')
|
46
|
+
- else
|
47
|
+
= icon('bell-o')
|
48
|
+
#notifications-dropdown.dropdown-pane.dropdown-pane--notifications{ data: { notifications: true, load_more_url: current_user.multiple_page_notifications? ? notifications_backend_user_url(current_user, page: 2) : '', dropdown: true, hover: 'true', 'hover-pane' => 'true', 'v-offset' => '35', 'hover-delay' => 50 }}
|
49
|
+
.section.text-center
|
50
|
+
%span.title
|
51
|
+
= current_user.notifications.unread.count
|
52
|
+
Unread
|
53
|
+
%span.subtitle User Notifications
|
54
|
+
.section
|
55
|
+
%ul.menu.vertical.notification-list
|
56
|
+
= render recent_user_notifications.decorate, cached: true
|
57
|
+
- if current_user.multiple_page_notifications?
|
58
|
+
%p.notification-list-loader.js-loader--notifications
|
59
|
+
= icon('spinner', class: 'fa-pulse fa-fw')
|
41
60
|
%li
|
42
61
|
%button.button.clear.avatar{ type: 'button', data: { toggle: 'profile-dropdown'}}= image_tag(current_user.avatar.url(:thumbnail), class: 'avatar')
|
43
|
-
#profile-dropdown.dropdown-pane{ data: { dropdown: true, hover: 'true', 'hover-pane'=> 'true', 'v-offset'=> '35', 'hover-delay'=> 50 }}
|
62
|
+
#profile-dropdown.dropdown-pane.dropdown-pane--profile{ data: { dropdown: true, hover: 'true', 'hover-pane'=> 'true', 'v-offset'=> '35', 'hover-delay'=> 50 }}
|
44
63
|
.section
|
45
64
|
= image_tag(current_user.avatar.url(:thumbnail), class: 'avatar')
|
46
65
|
%span.name= current_user.name
|
@@ -51,10 +70,10 @@
|
|
51
70
|
= link_to backend_account_url do
|
52
71
|
= icon('user')
|
53
72
|
%span= t('integral.navigation.profile')
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
73
|
+
%li
|
74
|
+
= link_to edit_backend_user_url(current_user.id) do
|
75
|
+
= icon('cog')
|
76
|
+
%span= t('integral.actions.edit_profile')
|
58
77
|
%hr
|
59
78
|
= link_to t('integral.actions.log_out'), destroy_user_session_path, method: :delete, class: 'button hollow'
|
60
79
|
|
@@ -1,30 +1 @@
|
|
1
|
-
%ul.menu.vertical
|
2
|
-
- if policy(Integral::Page).create?
|
3
|
-
%li
|
4
|
-
= link_to new_backend_page_url do
|
5
|
-
= icon('file-text-o')
|
6
|
-
%span= t('integral.navigation.page')
|
7
|
-
|
8
|
-
- if policy(Integral::Post).create? && Integral.blog_enabled?
|
9
|
-
%li
|
10
|
-
= link_to new_backend_post_url do
|
11
|
-
= icon('rss')
|
12
|
-
%span= t('integral.navigation.post')
|
13
|
-
|
14
|
-
- if policy(Integral::Image).create?
|
15
|
-
%li
|
16
|
-
= link_to new_backend_img_url do
|
17
|
-
= icon('picture-o')
|
18
|
-
%span= t('integral.navigation.image')
|
19
|
-
|
20
|
-
- if policy(Integral::List).create?
|
21
|
-
%li
|
22
|
-
= link_to new_backend_list_url do
|
23
|
-
= icon('list')
|
24
|
-
%span= t('integral.navigation.list')
|
25
|
-
- if policy(current_user).create?
|
26
|
-
%li
|
27
|
-
= link_to new_backend_user_url do
|
28
|
-
= icon('user')
|
29
|
-
%span= t('integral.navigation.user')
|
30
|
-
|
1
|
+
%ul.menu.vertical= render_create_menu
|