alchemy_cms 5.0.3 → 5.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/PULL_REQUEST_TEMPLATE.md +1 -1
- data/.github/workflows/stale.yml +1 -1
- data/.gitignore +1 -0
- data/CHANGELOG.md +66 -2
- data/CONTRIBUTING.md +2 -2
- data/Gemfile +1 -1
- data/README.md +1 -1
- data/alchemy_cms.gemspec +3 -3
- data/app/assets/images/alchemy/missing-image.svg +1 -0
- data/app/assets/javascripts/alchemy/admin.js +0 -1
- data/app/assets/javascripts/alchemy/alchemy.element_editors.js.coffee +1 -4
- data/app/assets/javascripts/alchemy/alchemy.preview.js.coffee +0 -3
- data/app/assets/javascripts/alchemy/alchemy.preview_window.js.coffee +29 -4
- data/app/assets/stylesheets/alchemy/_variables.scss +8 -0
- data/app/assets/stylesheets/alchemy/admin.scss +0 -1
- data/app/assets/stylesheets/alchemy/archive.scss +23 -17
- data/app/assets/stylesheets/alchemy/buttons.scss +26 -15
- data/app/assets/stylesheets/alchemy/elements.scss +58 -19
- data/app/assets/stylesheets/alchemy/errors.scss +1 -1
- data/app/assets/stylesheets/alchemy/frame.scss +0 -1
- data/app/assets/stylesheets/alchemy/hints.scss +2 -1
- data/app/assets/stylesheets/alchemy/navigation.scss +7 -10
- data/app/assets/stylesheets/alchemy/pagination.scss +1 -1
- data/app/assets/stylesheets/alchemy/search.scss +13 -3
- data/app/assets/stylesheets/alchemy/selects.scss +26 -20
- data/app/assets/stylesheets/alchemy/tables.scss +38 -9
- data/app/assets/stylesheets/alchemy/tags.scss +19 -31
- data/app/controllers/alchemy/admin/pages_controller.rb +58 -8
- data/app/controllers/alchemy/admin/pictures_controller.rb +13 -6
- data/app/controllers/alchemy/admin/resources_controller.rb +3 -3
- data/app/controllers/alchemy/pages_controller.rb +49 -14
- data/app/decorators/alchemy/element_editor.rb +1 -0
- data/app/helpers/alchemy/admin/base_helper.rb +0 -44
- data/app/helpers/alchemy/admin/navigation_helper.rb +2 -1
- data/app/models/alchemy/attachment.rb +20 -3
- data/app/models/alchemy/attachment/url.rb +40 -0
- data/app/models/alchemy/essence_picture.rb +3 -3
- data/app/models/alchemy/essence_picture_view.rb +5 -3
- data/app/models/alchemy/legacy_page_url.rb +1 -1
- data/app/models/alchemy/page.rb +24 -1
- data/app/models/alchemy/page/page_natures.rb +2 -0
- data/app/models/alchemy/page/url_path.rb +8 -6
- data/app/models/alchemy/picture.rb +58 -2
- data/app/models/alchemy/picture/calculations.rb +55 -0
- data/app/models/alchemy/picture/transformations.rb +5 -49
- data/app/models/alchemy/picture/url.rb +28 -77
- data/app/models/alchemy/picture_thumb.rb +57 -0
- data/app/models/alchemy/picture_thumb/create.rb +39 -0
- data/app/models/alchemy/picture_thumb/signature.rb +23 -0
- data/app/models/alchemy/picture_thumb/uid.rb +22 -0
- data/app/models/alchemy/picture_variant.rb +114 -0
- data/app/models/alchemy/site/layout.rb +30 -2
- data/app/views/alchemy/admin/attachments/show.html.erb +8 -8
- data/app/views/alchemy/admin/dashboard/index.html.erb +13 -16
- data/app/views/alchemy/admin/elements/_element_footer.html.erb +1 -1
- data/app/views/alchemy/admin/elements/publish.js.erb +1 -0
- data/app/views/alchemy/admin/essence_pictures/crop.html.erb +1 -1
- data/app/views/alchemy/admin/essence_pictures/edit.html.erb +2 -2
- data/app/views/alchemy/admin/layoutpages/edit.html.erb +4 -6
- data/app/views/alchemy/admin/pages/_create_language_form.html.erb +19 -29
- data/app/views/alchemy/admin/pages/_form.html.erb +4 -6
- data/app/views/alchemy/admin/pages/_new_page_form.html.erb +12 -2
- data/app/views/alchemy/admin/pages/_page_layout_filter.html.erb +29 -0
- data/app/views/alchemy/admin/pages/_table.html.erb +27 -0
- data/app/views/alchemy/admin/pages/_table_row.html.erb +107 -0
- data/app/views/alchemy/admin/pages/_toolbar.html.erb +77 -0
- data/app/views/alchemy/admin/pages/edit.html.erb +9 -1
- data/app/views/alchemy/admin/pages/index.html.erb +41 -74
- data/app/views/alchemy/admin/pages/list/_table.html.erb +31 -0
- data/app/views/alchemy/admin/pages/unlock.js.erb +2 -2
- data/app/views/alchemy/admin/pages/update.js.erb +19 -10
- data/app/views/alchemy/admin/partials/_remote_search_form.html.erb +14 -13
- data/app/views/alchemy/admin/partials/_search_form.html.erb +8 -8
- data/app/views/alchemy/admin/pictures/_archive.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_form.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/_picture.html.erb +3 -3
- data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/edit_multiple.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/index.html.erb +1 -1
- data/app/views/alchemy/admin/pictures/show.html.erb +3 -3
- data/app/views/alchemy/admin/resources/_filter_bar.html.erb +13 -11
- data/app/views/alchemy/admin/resources/_per_page_select.html.erb +3 -3
- data/app/views/alchemy/admin/resources/index.html.erb +4 -1
- data/app/views/alchemy/admin/tags/index.html.erb +14 -15
- data/app/views/alchemy/base/500.html.erb +11 -13
- data/app/views/alchemy/essences/_essence_file_view.html.erb +3 -3
- data/config/alchemy/config.yml +15 -11
- data/config/alchemy/modules.yml +12 -12
- data/config/locales/alchemy.en.yml +6 -4
- data/config/routes.rb +1 -1
- data/db/migrate/20200617110713_create_alchemy_picture_thumbs.rb +22 -0
- data/db/migrate/20200907111332_remove_tri_state_booleans.rb +33 -0
- data/lib/alchemy.rb +66 -0
- data/lib/alchemy/admin/preview_url.rb +2 -0
- data/lib/alchemy/auth_accessors.rb +12 -5
- data/lib/alchemy/config.rb +1 -3
- data/lib/alchemy/engine.rb +7 -6
- data/lib/alchemy/modules.rb +11 -1
- data/lib/alchemy/permissions.rb +1 -0
- data/lib/alchemy/test_support/factories/picture_factory.rb +0 -1
- data/lib/alchemy/test_support/factories/picture_thumb_factory.rb +12 -0
- data/lib/alchemy/test_support/integration_helpers.rb +0 -7
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy_cms.rb +2 -4
- data/lib/generators/alchemy/install/files/alchemy.en.yml +2 -2
- data/lib/generators/alchemy/install/templates/dragonfly.rb.tt +5 -5
- data/lib/tasks/alchemy/thumbnails.rake +37 -0
- data/vendor/assets/javascripts/jquery_plugins/select2.js +3729 -0
- data/vendor/assets/stylesheets/alchemy_admin/select2.scss +740 -0
- metadata +41 -31
- data/.github/workflows/greetings.yml +0 -13
- data/app/controllers/concerns/alchemy/locale_redirects.rb +0 -40
- data/app/controllers/concerns/alchemy/page_redirects.rb +0 -68
- data/lib/alchemy/userstamp.rb +0 -12
@@ -60,6 +60,7 @@
|
|
60
60
|
max-width: 85%;
|
61
61
|
margin-left: $default-margin;
|
62
62
|
text-overflow: ellipsis;
|
63
|
+
transition: color $transition-duration;
|
63
64
|
|
64
65
|
.has-hint & {
|
65
66
|
max-width: 80%;
|
@@ -73,7 +74,6 @@
|
|
73
74
|
|
74
75
|
.preview_text_element_name {
|
75
76
|
font-size: $small-font-size;
|
76
|
-
text-shadow: #efefef 1px 1px 1px;
|
77
77
|
font-weight: bold;
|
78
78
|
line-height: 15px;
|
79
79
|
}
|
@@ -106,6 +106,7 @@
|
|
106
106
|
height: 16px;
|
107
107
|
right: 8px;
|
108
108
|
top: 10px;
|
109
|
+
transition: none;
|
109
110
|
|
110
111
|
.error_icon {
|
111
112
|
float: left;
|
@@ -126,6 +127,32 @@
|
|
126
127
|
margin-bottom: 2*$default-margin;
|
127
128
|
transition: box-shadow $transition-duration;
|
128
129
|
|
130
|
+
&.hidden {
|
131
|
+
display: block;
|
132
|
+
border-style: dashed;
|
133
|
+
opacity: 0.5;
|
134
|
+
transition: opacity $transition-duration;
|
135
|
+
|
136
|
+
> .element-header {
|
137
|
+
background-color: transparent;
|
138
|
+
background-image: linear-gradient(
|
139
|
+
45deg,
|
140
|
+
$light-gray 25%,
|
141
|
+
$medium-gray 25%,
|
142
|
+
$medium-gray 50%,
|
143
|
+
$light-gray 50%,
|
144
|
+
$light-gray 75%,
|
145
|
+
$medium-gray 75%,
|
146
|
+
$medium-gray 100%
|
147
|
+
);
|
148
|
+
background-size: 28.28px 28.28px;
|
149
|
+
}
|
150
|
+
|
151
|
+
&:hover {
|
152
|
+
opacity: 1;
|
153
|
+
}
|
154
|
+
}
|
155
|
+
|
129
156
|
&.is-fixed {
|
130
157
|
border-width: 0;
|
131
158
|
border-radius: 0;
|
@@ -143,9 +170,17 @@
|
|
143
170
|
}
|
144
171
|
}
|
145
172
|
|
146
|
-
&.selected:not(.is-fixed) {
|
147
|
-
|
148
|
-
|
173
|
+
&.selected:not(.is-fixed), &:hover {
|
174
|
+
&:not(.hidden) {
|
175
|
+
box-shadow: 0 2px 8px rgba(#9b9b9b, 0.75);
|
176
|
+
}
|
177
|
+
}
|
178
|
+
|
179
|
+
&.selected:not(.is-fixed):not(.folded):not(.dirty):not(.hidden) {
|
180
|
+
> .element-header {
|
181
|
+
background-color: $element-header-active-bg-color;
|
182
|
+
color: $element-header-active-color;
|
183
|
+
}
|
149
184
|
}
|
150
185
|
|
151
186
|
&.folded {
|
@@ -221,21 +256,10 @@
|
|
221
256
|
}
|
222
257
|
}
|
223
258
|
|
224
|
-
.element_tools {
|
225
|
-
display: flex;
|
226
|
-
width: 100%;
|
227
|
-
justify-content: space-between;
|
228
|
-
margin-left: 0;
|
229
|
-
}
|
230
|
-
|
231
259
|
.element-content {
|
232
260
|
margin: 4px 8px;
|
233
261
|
}
|
234
262
|
|
235
|
-
.button_with_label {
|
236
|
-
margin: 0 4px;
|
237
|
-
}
|
238
|
-
|
239
263
|
.content_editor,
|
240
264
|
.picture_thumbnail {
|
241
265
|
width: 100%;
|
@@ -313,7 +337,18 @@
|
|
313
337
|
background-color: $element-header-bg-color;
|
314
338
|
@extend .disable-user-select;
|
315
339
|
cursor: pointer;
|
316
|
-
|
340
|
+
border-radius: $default-border-radius;
|
341
|
+
transition: background-color $transition-duration;
|
342
|
+
|
343
|
+
.expanded & {
|
344
|
+
border-bottom-left-radius: 0;
|
345
|
+
border-bottom-right-radius: 0;
|
346
|
+
}
|
347
|
+
|
348
|
+
.icon {
|
349
|
+
color: inherit;
|
350
|
+
transition: color $transition-duration;
|
351
|
+
}
|
317
352
|
|
318
353
|
>.hint-with-icon {
|
319
354
|
position: absolute;
|
@@ -338,10 +373,14 @@
|
|
338
373
|
padding: $default-padding 0;
|
339
374
|
height: $element-toolbar-height;
|
340
375
|
border-bottom: 1px solid $medium-gray;
|
376
|
+
}
|
341
377
|
|
342
|
-
|
343
|
-
|
344
|
-
|
378
|
+
.element_tools {
|
379
|
+
display: flex;
|
380
|
+
width: 100%;
|
381
|
+
|
382
|
+
.button_with_label {
|
383
|
+
margin: 0 2px;
|
345
384
|
}
|
346
385
|
}
|
347
386
|
|
@@ -27,7 +27,8 @@
|
|
27
27
|
|
28
28
|
> .hint-bubble {
|
29
29
|
visibility: hidden;
|
30
|
-
background: $
|
30
|
+
background-color: $hint-background-color;
|
31
|
+
color: $hint-text-color;
|
31
32
|
border-radius: $default-border-radius;
|
32
33
|
box-shadow: 0px 4px 8px rgba(0, 0, 0, .3);
|
33
34
|
position: absolute;
|
@@ -256,7 +256,7 @@
|
|
256
256
|
> a {
|
257
257
|
display: flex;
|
258
258
|
cursor: pointer;
|
259
|
-
padding:
|
259
|
+
padding-left: 2 * $default-padding;
|
260
260
|
|
261
261
|
&:focus {
|
262
262
|
@include default-focus-style($box-shadow: inset 0 0 0 2px $focus-color);
|
@@ -273,19 +273,16 @@
|
|
273
273
|
text-shadow: $text-shadow-light;
|
274
274
|
}
|
275
275
|
|
276
|
-
.page_language
|
277
|
-
display: inline-block;
|
278
|
-
color: $muted-text-color;
|
279
|
-
margin-right: 2px;
|
280
|
-
font-size: $small-font-size;
|
281
|
-
text-transform: uppercase;
|
282
|
-
}
|
283
|
-
|
276
|
+
.page_language,
|
284
277
|
.page_site {
|
285
278
|
display: inline-block;
|
286
279
|
color: $muted-text-color;
|
287
|
-
margin-right: $default-margin;
|
288
280
|
font-size: $small-font-size;
|
281
|
+
margin-right: $default-margin;
|
289
282
|
line-height: 31px;
|
290
283
|
}
|
284
|
+
|
285
|
+
.page_language {
|
286
|
+
text-transform: uppercase;
|
287
|
+
}
|
291
288
|
}
|
@@ -11,9 +11,19 @@
|
|
11
11
|
top: 9px;
|
12
12
|
}
|
13
13
|
|
14
|
-
|
15
|
-
|
14
|
+
button {
|
15
|
+
position: absolute;
|
16
|
+
top: 0;
|
17
|
+
left: 0;
|
18
|
+
width: 30px;
|
16
19
|
height: inherit;
|
20
|
+
appearance: none;
|
21
|
+
background-color: transparent;
|
22
|
+
border: 0 none;
|
23
|
+
border-radius: 0;
|
24
|
+
box-shadow: none;
|
25
|
+
margin: 0;
|
26
|
+
padding: 0;
|
17
27
|
}
|
18
28
|
}
|
19
29
|
|
@@ -44,7 +54,7 @@
|
|
44
54
|
|
45
55
|
.search_input_field {
|
46
56
|
width: 0;
|
47
|
-
height:
|
57
|
+
height: 100%;
|
48
58
|
border: none;
|
49
59
|
background-color: transparentize($form-field-background-color, 0.25);
|
50
60
|
transition:
|
@@ -1,15 +1,16 @@
|
|
1
|
-
|
1
|
+
@import "alchemy_admin/select2";
|
2
2
|
|
3
3
|
select {
|
4
4
|
@include button-defaults(
|
5
5
|
$background-color: $form-field-background-color,
|
6
6
|
$hover-color: $form-field-background-color,
|
7
7
|
$hover-border-color: darken($default-border-color, 10%),
|
8
|
-
$padding: 0 2
|
8
|
+
$padding: 0 2 * $default-padding,
|
9
9
|
$border: 1px solid $default-border-color,
|
10
10
|
$box-shadow: none,
|
11
11
|
$color: $text-color,
|
12
|
-
$margin: 0
|
12
|
+
$margin: 0
|
13
|
+
);
|
13
14
|
height: $form-field-height;
|
14
15
|
padding: 0.4em 0.6em;
|
15
16
|
max-width: 100%;
|
@@ -34,7 +35,8 @@ select {
|
|
34
35
|
$border: 1px solid $default-border-color,
|
35
36
|
$box-shadow: none,
|
36
37
|
$color: $text-color,
|
37
|
-
$margin: 0
|
38
|
+
$margin: 0
|
39
|
+
);
|
38
40
|
background-image: none;
|
39
41
|
display: block;
|
40
42
|
font-weight: normal;
|
@@ -76,15 +78,18 @@ select {
|
|
76
78
|
width: $medium-select-box-width;
|
77
79
|
}
|
78
80
|
|
79
|
-
&.
|
81
|
+
&.large {
|
82
|
+
width: $large-select-box-width;
|
83
|
+
}
|
80
84
|
|
81
|
-
|
85
|
+
&.select2-container-active {
|
86
|
+
.select2-choice,
|
87
|
+
.select2-choices {
|
82
88
|
@include default-focus-style($box-shadow: 0 0 0 1px $focus-color);
|
83
89
|
}
|
84
90
|
}
|
85
91
|
|
86
92
|
&.select2-container-disabled {
|
87
|
-
|
88
93
|
&:hover {
|
89
94
|
+ .with-hint > .hint-bubble {
|
90
95
|
@include hint-hover-style;
|
@@ -96,7 +101,8 @@ select {
|
|
96
101
|
top: 0;
|
97
102
|
}
|
98
103
|
|
99
|
-
.select2-choice,
|
104
|
+
.select2-choice,
|
105
|
+
.select2-choice:hover {
|
100
106
|
background-image: none;
|
101
107
|
background-color: $light-gray;
|
102
108
|
box-shadow: none;
|
@@ -106,7 +112,9 @@ select {
|
|
106
112
|
.select2-arrow {
|
107
113
|
border-color: $border-inset-color;
|
108
114
|
|
109
|
-
b {
|
115
|
+
b {
|
116
|
+
color: $border-inset-color;
|
117
|
+
}
|
110
118
|
}
|
111
119
|
}
|
112
120
|
}
|
@@ -140,7 +148,6 @@ select {
|
|
140
148
|
margin-top: 0 !important;
|
141
149
|
|
142
150
|
&.select2-container-active {
|
143
|
-
|
144
151
|
.select2-choices {
|
145
152
|
@include default-focus-style($box-shadow: 0 0 0 1px $focus-color);
|
146
153
|
}
|
@@ -212,7 +219,8 @@ select {
|
|
212
219
|
}
|
213
220
|
}
|
214
221
|
|
215
|
-
.select2-no-results,
|
222
|
+
.select2-no-results,
|
223
|
+
.select2-searching {
|
216
224
|
padding: 8px;
|
217
225
|
margin: 0;
|
218
226
|
}
|
@@ -233,41 +241,39 @@ select {
|
|
233
241
|
|
234
242
|
.select2-more-results,
|
235
243
|
.select2-ajax-error {
|
236
|
-
padding: 2
|
244
|
+
padding: 2 * $default-padding;
|
237
245
|
margin-bottom: 0;
|
238
246
|
}
|
239
247
|
}
|
240
248
|
|
241
|
-
.window_form,
|
242
|
-
|
249
|
+
.window_form,
|
250
|
+
#filter_bar {
|
243
251
|
.select2-container {
|
244
252
|
width: 100%;
|
245
253
|
}
|
246
254
|
}
|
247
255
|
|
248
256
|
.select_with_label {
|
249
|
-
margin: 0 3
|
257
|
+
margin: 0 3 * $default-margin;
|
250
258
|
display: inline-block;
|
251
259
|
vertical-align: middle;
|
252
260
|
|
253
261
|
label {
|
254
262
|
display: inline-block;
|
255
263
|
vertical-align: middle;
|
256
|
-
margin-right: 2
|
264
|
+
margin-right: 2 * $default-margin;
|
257
265
|
}
|
258
266
|
}
|
259
267
|
|
260
268
|
// overriding important of select2 default style for retina screens
|
261
269
|
@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
|
262
|
-
|
263
|
-
|
270
|
+
only screen and (min-resolution: 2dppx) {
|
264
271
|
#alchemy {
|
265
|
-
|
266
272
|
.select2-search input,
|
267
273
|
.select2-search-choice-close,
|
268
274
|
.select2-container .select2-choice abbr,
|
269
275
|
.select2-container .select2-choice .select2-arrow b {
|
270
|
-
|
276
|
+
background-image: none !important;
|
271
277
|
}
|
272
278
|
}
|
273
279
|
}
|
@@ -6,7 +6,8 @@ table {
|
|
6
6
|
width: 100%;
|
7
7
|
|
8
8
|
&.list .tools {
|
9
|
-
button,
|
9
|
+
button,
|
10
|
+
a {
|
10
11
|
display: inline-block;
|
11
12
|
width: 18px;
|
12
13
|
height: 18px;
|
@@ -22,8 +23,9 @@ table {
|
|
22
23
|
}
|
23
24
|
}
|
24
25
|
|
25
|
-
.list td,
|
26
|
-
|
26
|
+
.list td,
|
27
|
+
.list th {
|
28
|
+
padding: 2 * $default-padding;
|
27
29
|
vertical-align: top;
|
28
30
|
line-height: 18px;
|
29
31
|
border-right: 1px solid $medium-gray;
|
@@ -93,9 +95,10 @@ td.heading {
|
|
93
95
|
background-color: $table-row-hover-color;
|
94
96
|
}
|
95
97
|
|
96
|
-
td,
|
97
|
-
|
98
|
-
&.center,
|
98
|
+
td,
|
99
|
+
th {
|
100
|
+
&.center,
|
101
|
+
&.boolean {
|
99
102
|
text-align: center;
|
100
103
|
}
|
101
104
|
|
@@ -105,7 +108,6 @@ td, th {
|
|
105
108
|
}
|
106
109
|
|
107
110
|
td {
|
108
|
-
|
109
111
|
&.file_name {
|
110
112
|
word-break: break-all;
|
111
113
|
}
|
@@ -118,7 +120,8 @@ td {
|
|
118
120
|
width: 80px;
|
119
121
|
}
|
120
122
|
|
121
|
-
&.date,
|
123
|
+
&.date,
|
124
|
+
&.datetime {
|
122
125
|
width: 150px;
|
123
126
|
}
|
124
127
|
|
@@ -137,9 +140,35 @@ td {
|
|
137
140
|
&.rights {
|
138
141
|
width: 60px;
|
139
142
|
}
|
143
|
+
|
144
|
+
&.page_layout {
|
145
|
+
width: 160px;
|
146
|
+
}
|
147
|
+
|
148
|
+
&.status {
|
149
|
+
width: 80px;
|
150
|
+
|
151
|
+
.page_status {
|
152
|
+
margin: 0 $default-margin;
|
153
|
+
}
|
154
|
+
}
|
155
|
+
|
156
|
+
&.tags {
|
157
|
+
width: 180px;
|
158
|
+
|
159
|
+
.tag {
|
160
|
+
margin: 0;
|
161
|
+
padding: 0 2 + $default-padding;
|
162
|
+
|
163
|
+
&:before {
|
164
|
+
padding-right: $default-padding;
|
165
|
+
}
|
166
|
+
}
|
167
|
+
}
|
140
168
|
}
|
141
169
|
|
142
|
-
th.count,
|
170
|
+
th.count,
|
171
|
+
td.count {
|
143
172
|
width: 120px;
|
144
173
|
text-align: right;
|
145
174
|
padding-right: 16px;
|