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
@@ -0,0 +1,150 @@
|
|
1
|
+
.dropdown-pane--notifications {
|
2
|
+
width: 340px;
|
3
|
+
padding: 0;
|
4
|
+
padding-bottom: .5rem;
|
5
|
+
&:before {
|
6
|
+
content: ' ';
|
7
|
+
width: 2.5em;
|
8
|
+
height: 1.5em;
|
9
|
+
border-radius: 0 0 0.5em 0;
|
10
|
+
background: linear-gradient(-45deg, #1b8ecf 50%, transparent 50%);
|
11
|
+
position: absolute;
|
12
|
+
margin: 0;
|
13
|
+
right: 0.5em;
|
14
|
+
transform: rotate(225deg) skewX(8deg) skewY(8deg);
|
15
|
+
}
|
16
|
+
&:after {
|
17
|
+
content: ' ';
|
18
|
+
position: absolute;
|
19
|
+
right: 0;
|
20
|
+
top: -2.2em;
|
21
|
+
height: 2.2em;
|
22
|
+
width: 70%;
|
23
|
+
}
|
24
|
+
hr {
|
25
|
+
margin: .5rem 0;
|
26
|
+
}
|
27
|
+
ul {
|
28
|
+
li {
|
29
|
+
// &:last-of-type {
|
30
|
+
// margin-bottom: 0 !important;
|
31
|
+
// }
|
32
|
+
a {
|
33
|
+
padding: 0;
|
34
|
+
}
|
35
|
+
}
|
36
|
+
}
|
37
|
+
|
38
|
+
.section {
|
39
|
+
padding: .5rem 0;
|
40
|
+
&:last-of-type {
|
41
|
+
max-height: 225px;
|
42
|
+
overflow: scroll;
|
43
|
+
}
|
44
|
+
&:first-of-type {
|
45
|
+
border-radius: 5px 5px 0 0;
|
46
|
+
background-color: $primary-color;
|
47
|
+
color: $white;
|
48
|
+
.title {
|
49
|
+
font-size: 1.3em;
|
50
|
+
display: block;
|
51
|
+
}
|
52
|
+
.subtitle {
|
53
|
+
font-size: 0.85em;
|
54
|
+
display: block;
|
55
|
+
}
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
59
|
+
|
60
|
+
.notification-list {
|
61
|
+
&::before {
|
62
|
+
background: $light-gray;
|
63
|
+
content: '';
|
64
|
+
height: 100%;
|
65
|
+
left: 1rem;
|
66
|
+
position: absolute;
|
67
|
+
top: 0;
|
68
|
+
width: 2px;
|
69
|
+
}
|
70
|
+
&-loader {
|
71
|
+
padding: .5rem 0;
|
72
|
+
text-align: center;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
76
|
+
|
77
|
+
.notification {
|
78
|
+
position: relative;
|
79
|
+
padding: .4rem 0;
|
80
|
+
margin: 0 !important;
|
81
|
+
|
82
|
+
&.unread {
|
83
|
+
background-color: transparentize($primary-color, 0.95);
|
84
|
+
|
85
|
+
.notification-icon {
|
86
|
+
background-color: $primary-color;
|
87
|
+
}
|
88
|
+
}
|
89
|
+
|
90
|
+
&-icon {
|
91
|
+
background: $light-gray;
|
92
|
+
border-radius: 50%;
|
93
|
+
height: 6px;
|
94
|
+
width: 6px;
|
95
|
+
left: 1rem;
|
96
|
+
top: 15px;
|
97
|
+
margin-left: -2px;
|
98
|
+
overflow: hidden;
|
99
|
+
position: absolute;
|
100
|
+
|
101
|
+
i {
|
102
|
+
width: 100%;
|
103
|
+
font-size: 1.25rem;
|
104
|
+
color: $white;
|
105
|
+
position: absolute;
|
106
|
+
top: 50%;
|
107
|
+
transform: translateY(-50%);
|
108
|
+
text-align: center;
|
109
|
+
}
|
110
|
+
|
111
|
+
&.unread {
|
112
|
+
background: $primary-color;
|
113
|
+
}
|
114
|
+
}
|
115
|
+
|
116
|
+
&-content {
|
117
|
+
padding-left: 2rem;
|
118
|
+
padding-right: 1rem;
|
119
|
+
}
|
120
|
+
|
121
|
+
&-title {
|
122
|
+
display: block;
|
123
|
+
font-size: .9rem;
|
124
|
+
}
|
125
|
+
&-action {
|
126
|
+
text-transform: uppercase;
|
127
|
+
color: $primary-color;
|
128
|
+
font-size: .6rem;
|
129
|
+
padding-bottom: 5px;
|
130
|
+
}
|
131
|
+
|
132
|
+
&-created-at {
|
133
|
+
color: $dark-gray;
|
134
|
+
font-size: .8rem;
|
135
|
+
}
|
136
|
+
|
137
|
+
&-whodunnit {
|
138
|
+
display: block;
|
139
|
+
font-size: .8rem;
|
140
|
+
opacity: .5;
|
141
|
+
&:hover {
|
142
|
+
opacity: 1;
|
143
|
+
}
|
144
|
+
img {
|
145
|
+
width: 15px;
|
146
|
+
height: 15px;
|
147
|
+
}
|
148
|
+
}
|
149
|
+
}
|
150
|
+
|
@@ -0,0 +1,59 @@
|
|
1
|
+
.dropdown-pane--profile {
|
2
|
+
padding: 0;
|
3
|
+
&:before {
|
4
|
+
content: ' ';
|
5
|
+
width: 2.5em;
|
6
|
+
height: 1.5em;
|
7
|
+
border-radius: 0 0 0.5em 0;
|
8
|
+
background: linear-gradient(-45deg, #1b8ecf 50%, transparent 50%);
|
9
|
+
position: absolute;
|
10
|
+
margin: 0;
|
11
|
+
right: 0.5em;
|
12
|
+
transform: rotate(225deg) skewX(8deg) skewY(8deg);
|
13
|
+
}
|
14
|
+
&:after {
|
15
|
+
content: ' ';
|
16
|
+
position: absolute;
|
17
|
+
right: 0;
|
18
|
+
top: -2.2em;
|
19
|
+
height: 2.2em;
|
20
|
+
width: 70%;
|
21
|
+
}
|
22
|
+
.section {
|
23
|
+
padding: 1.5em 1.2em;
|
24
|
+
&:first-of-type {
|
25
|
+
border-radius: 5px 5px 0 0;
|
26
|
+
background-color: $primary-color;
|
27
|
+
color: $white;
|
28
|
+
.avatar {
|
29
|
+
float: left;
|
30
|
+
margin-right: 1em;
|
31
|
+
width: 60px;
|
32
|
+
height: 60px;
|
33
|
+
}
|
34
|
+
.name {
|
35
|
+
font-size: 1.3em
|
36
|
+
}
|
37
|
+
.email {
|
38
|
+
font-size: 0.85em
|
39
|
+
}
|
40
|
+
}
|
41
|
+
&:last-of-type {
|
42
|
+
.menu a {
|
43
|
+
padding-left: 0;
|
44
|
+
color: $secondary-color;
|
45
|
+
&:hover {
|
46
|
+
color: $primary-color;
|
47
|
+
}
|
48
|
+
i {
|
49
|
+
width: 30px;
|
50
|
+
text-align: center;
|
51
|
+
}
|
52
|
+
}
|
53
|
+
.button {
|
54
|
+
display: inline-block;
|
55
|
+
padding: 0.8em 2em;
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
@@ -47,6 +47,8 @@
|
|
47
47
|
|
48
48
|
.button
|
49
49
|
padding: 0.7em 1.5em
|
50
|
+
&.has-tip
|
51
|
+
cursor: pointer
|
50
52
|
&.primary
|
51
53
|
color: $white
|
52
54
|
&.white
|
@@ -54,7 +56,6 @@
|
|
54
56
|
background-color: $white
|
55
57
|
color: $primary-color
|
56
58
|
font-size: .8rem
|
57
|
-
margin: .5rem 0
|
58
59
|
&:hover
|
59
60
|
box-shadow: $card-shadow
|
60
61
|
color: $secondary-color
|
@@ -71,12 +72,16 @@ span.label.clear
|
|
71
72
|
input:disabled, input[readonly], textarea:disabled, textarea[readonly]
|
72
73
|
border: none
|
73
74
|
|
75
|
+
input[type='text'], textarea, select
|
76
|
+
margin-bottom: 0
|
77
|
+
|
74
78
|
input[readonly].datepicker
|
75
79
|
border: solid 0.5px #d4dfef
|
76
80
|
background-color: transparent
|
77
81
|
cursor: pointer
|
78
82
|
|
79
83
|
.input.alternative
|
84
|
+
margin-bottom: 0.75rem
|
80
85
|
label
|
81
86
|
font-size: .9rem
|
82
87
|
margin-bottom: 0
|
@@ -88,8 +93,8 @@ input[readonly].datepicker
|
|
88
93
|
> select, > textarea, > input[type=text], > input[type=url], > input[type=number]
|
89
94
|
border-radius: 0
|
90
95
|
-webkit-appearance: none
|
96
|
+
margin-bottom: 0
|
91
97
|
&.has-error
|
92
|
-
margin-bottom: 0
|
93
98
|
color: $alert-color
|
94
99
|
border-color: $alert-color
|
95
100
|
background-color: transparentize($alert-color, 0.9)
|
@@ -100,6 +105,8 @@ input[readonly].datepicker
|
|
100
105
|
margin: .5em 0
|
101
106
|
font-size: .9rem
|
102
107
|
color: $alert-color
|
108
|
+
.help-text
|
109
|
+
margin-top: 5px
|
103
110
|
|
104
111
|
ul.accordion
|
105
112
|
background-color: transparent
|
@@ -292,11 +299,14 @@ ul.tabs
|
|
292
299
|
font-size: .75rem
|
293
300
|
|
294
301
|
.record-selector.reveal
|
302
|
+
.create-button
|
303
|
+
margin-bottom: 0
|
295
304
|
.loader
|
296
305
|
margin: 3rem 0
|
297
306
|
color: $primary-color
|
298
307
|
.top-bar
|
299
308
|
margin-top: 1em
|
309
|
+
margin-bottom: 1rem
|
300
310
|
.filter.search
|
301
311
|
max-width: 16em
|
302
312
|
input
|
@@ -371,6 +381,8 @@ ul.tabs
|
|
371
381
|
.card.list-management
|
372
382
|
.top-bar
|
373
383
|
@include top-bar-unstack
|
384
|
+
.input.alternative
|
385
|
+
margin-bottom: 0
|
374
386
|
.top-bar-right .input.alternative
|
375
387
|
display: flex
|
376
388
|
align-items: center
|
@@ -485,6 +497,10 @@ ul.tabs
|
|
485
497
|
|
486
498
|
|
487
499
|
/** Forms **/
|
500
|
+
.input
|
501
|
+
.form-error
|
502
|
+
margin: 0
|
503
|
+
|
488
504
|
.field-with-errors
|
489
505
|
> input, > textarea, > select
|
490
506
|
@include form-input-error
|
@@ -536,6 +552,12 @@ p.help-text
|
|
536
552
|
&.collection_radio_buttons
|
537
553
|
font-size: 0.7em
|
538
554
|
color: $body-font-color-secondary
|
555
|
+
|
556
|
+
.radio_buttons .radio label
|
557
|
+
font-size: 1rem
|
558
|
+
color: $body-font-color-secondary
|
559
|
+
margin-bottom: 0
|
560
|
+
|
539
561
|
// Filters
|
540
562
|
.filter.search
|
541
563
|
position: relative
|
@@ -761,6 +783,7 @@ table
|
|
761
783
|
transform: rotate(-135deg)
|
762
784
|
|
763
785
|
.help-text
|
786
|
+
margin-top: 5px
|
764
787
|
margin-bottom: 0
|
765
788
|
|
766
789
|
.card-action-title
|
@@ -837,3 +860,19 @@ table
|
|
837
860
|
|
838
861
|
.tr--clickable
|
839
862
|
cursor: pointer
|
863
|
+
|
864
|
+
.grid-x
|
865
|
+
> .cell
|
866
|
+
@include xy-cell-gutters($gutter-type: padding) //($gutters, $gutter-type, $gutter-position, $breakpoint, $vertical)
|
867
|
+
|
868
|
+
.grid-y, .grid-x
|
869
|
+
> .input, > .image-select
|
870
|
+
@include card-container($card-background, $card-font-color, $card-margin-bottom, $card-border, $card-border-radius, $card-shadow)
|
871
|
+
@include card-section
|
872
|
+
overflow: initial
|
873
|
+
|
874
|
+
.card
|
875
|
+
@include card-section
|
876
|
+
|
877
|
+
.card-unpadded
|
878
|
+
@include card-container($card-background, $card-font-color, $card-margin-bottom, $card-border, $card-border-radius, $card-shadow)
|
@@ -64,3 +64,13 @@ main
|
|
64
64
|
button
|
65
65
|
margin-top: 1rem
|
66
66
|
|
67
|
+
#admin-bar
|
68
|
+
@include top-bar-unstack
|
69
|
+
background-color: $white
|
70
|
+
z-index: 1000
|
71
|
+
position: relative
|
72
|
+
@include breakpoint(small down)
|
73
|
+
padding-left: 0
|
74
|
+
padding-right: 0
|
75
|
+
.menu
|
76
|
+
background-color: $white
|
@@ -1,10 +1,10 @@
|
|
1
1
|
/** Indicator used to display to developer what media query is currently active
|
2
2
|
*
|
3
|
-
* Red: Small
|
4
|
-
* Orange: Medium
|
5
|
-
* Green: Large
|
3
|
+
* Red: Small screens
|
4
|
+
* Orange: Medium screens
|
5
|
+
* Green: Large screens
|
6
6
|
* Blue: Xlarge Screens
|
7
|
-
* Black: XXlarge and above
|
7
|
+
* Black: XXlarge screens and above
|
8
8
|
*/
|
9
9
|
.query-indicator
|
10
10
|
display: block
|
@@ -3,45 +3,35 @@ module Integral
|
|
3
3
|
# Activity management
|
4
4
|
class ActivitiesController < BaseController
|
5
5
|
before_action :authorize_with_klass, except: [:widget]
|
6
|
-
before_action -> { set_grid }
|
7
6
|
|
8
7
|
def widget
|
9
|
-
activities = cast_activities(
|
8
|
+
activities = cast_activities(resource_grid.assets.where.not(whodunnit: nil).limit(10))
|
10
9
|
last_created_at = activities.last.created_at.utc if activities.present?
|
11
10
|
|
12
11
|
render json: { content: render_to_string(partial: 'integral/backend/activities/activity', collection: activities), last_created_at: last_created_at }
|
13
12
|
end
|
14
13
|
|
15
|
-
# POST /grid
|
16
|
-
# AJAX grid for activities
|
17
|
-
# TODO: Could move this grid action into index action and respond different if json request
|
18
|
-
def grid
|
19
|
-
render json: { content: render_to_string(partial: 'integral/backend/activities/grid',
|
20
|
-
locals: { grid: @grid }) }
|
21
|
-
end
|
22
|
-
|
23
14
|
# GET /
|
24
15
|
# Lists all activities
|
25
|
-
def index
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
# /admin/posts/:id/activity -> Specific Page activity
|
34
|
-
#
|
35
|
-
# etc
|
36
|
-
#
|
37
|
-
# # GET /activity:id
|
38
|
-
# # View an Activity
|
39
|
-
# def show
|
40
|
-
# @activity = Integral::Version.find(params[:id])
|
41
|
-
# end
|
16
|
+
def index
|
17
|
+
respond_to do |format|
|
18
|
+
format.html
|
19
|
+
format.json do
|
20
|
+
render json: { content: render_to_string(partial: "integral/backend/shared/grid/grid") }
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
42
24
|
|
43
25
|
private
|
44
26
|
|
27
|
+
def list_backend_resources_url
|
28
|
+
backend_activities_url
|
29
|
+
end
|
30
|
+
|
31
|
+
def backend_resource_url(resource)
|
32
|
+
resource.url
|
33
|
+
end
|
34
|
+
|
45
35
|
def set_breadcrumbs
|
46
36
|
add_breadcrumb I18n.t('integral.breadcrumbs.dashboard'), :backend_dashboard_url
|
47
37
|
add_breadcrumb I18n.t('integral.breadcrumbs.activity'), :backend_activities_url
|
@@ -61,6 +51,10 @@ module Integral
|
|
61
51
|
{ 'order' => 'date', 'page' => 1, descending: true }.merge(grid_params)
|
62
52
|
end
|
63
53
|
helper_method :grid_options
|
54
|
+
|
55
|
+
def render_default_action_bar?
|
56
|
+
false
|
57
|
+
end
|
64
58
|
end
|
65
59
|
end
|
66
60
|
end
|