thecore_ui_rails_admin 3.0.14 → 3.0.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/devise/sessions.js +2 -0
- data/app/assets/javascripts/rails_admin/custom/ui.js +33 -1
- data/app/assets/stylesheets/devise/custom/sessions.scss +160 -0
- data/app/assets/stylesheets/devise/custom/thecore/sessions.scss +0 -0
- data/app/assets/stylesheets/rails_admin/custom/dashboard.scss +150 -0
- data/app/assets/stylesheets/rails_admin/custom/theming.scss +49 -0
- data/app/views/rails_admin/main/_dashboard_block.html.erb +25 -0
- data/app/views/rails_admin/main/dashboard.html.erb +18 -0
- data/config/initializers/assets.rb +2 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d48c04b42300e653636097808d6a3d4721480015ebaea0292a82f39af1d6d8ed
|
4
|
+
data.tar.gz: 0a0f496e99f43270f600b47534dd4e412048988a747f91a9a98b7174e6906a66
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e9eaeabe87645879913b323513fba2f5e99df09fb4c6419131d9ea3599d559fb019ad3e52a3030be80e1dddf6f1e751816896e2d6c3e80359c01d529f605c03
|
7
|
+
data.tar.gz: 066cc9590e129784e1fc93d6d4fb0bd24ed1e33f303323927ceb614bb7b69468bc0be310270af24b80de8dfd1e2655861ac5c1b46eb97dac8ba5c22442e28257
|
@@ -4,7 +4,7 @@
|
|
4
4
|
//= require 'thecore_ui_commons'
|
5
5
|
//= require 'rails_admin/custom/thecore/ui'
|
6
6
|
|
7
|
-
const adjustIframe = function(obj) {
|
7
|
+
const adjustIframe = function (obj) {
|
8
8
|
console.log("Resizing");
|
9
9
|
obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
|
10
10
|
};
|
@@ -27,3 +27,35 @@ $(document).on('turbo:load', function (event) {
|
|
27
27
|
})
|
28
28
|
console.log(" - Hash:", currentURL.hash);
|
29
29
|
});
|
30
|
+
|
31
|
+
const sidepanel = "body > div.container-fluid > div > div.col-sm-3.col-md-2.flex-wrap.p-0"
|
32
|
+
const mainpanel = "body > div.container-fluid > div > div.col-sm-9.col-sm-offset-3.col-md-10.col-md-offset-2";
|
33
|
+
|
34
|
+
// JavaScript functions to open the sidebar
|
35
|
+
function sideOpen() {
|
36
|
+
/* Sidebar takes 25% of the total width
|
37
|
+
of main container in open state */
|
38
|
+
document.querySelector(
|
39
|
+
sidepanel).style.width = "16.66666667%";
|
40
|
+
|
41
|
+
document.querySelector(
|
42
|
+
mainpanel).style.width = "83.33333333%";
|
43
|
+
document.querySelector(
|
44
|
+
sidepanel).style.display = "block";
|
45
|
+
// document.querySelector(
|
46
|
+
// "openNav").style.display = "none";
|
47
|
+
}
|
48
|
+
// JavaScript functions to close the sidebar
|
49
|
+
function sideClose() {
|
50
|
+
// Sidebar takes 0% of the total width
|
51
|
+
// of main container in open state
|
52
|
+
document.querySelector(
|
53
|
+
mainpanel).style.marginLeft = "0%";
|
54
|
+
document.querySelector(
|
55
|
+
mainpanel).style.width = "100%";
|
56
|
+
// Visibility is hidden
|
57
|
+
document.querySelector(
|
58
|
+
sidepanel).style.display = "none";
|
59
|
+
// document.querySelector(
|
60
|
+
// "openNav").style.display = "inline-block";
|
61
|
+
}
|
@@ -0,0 +1,160 @@
|
|
1
|
+
@import 'thecore_ui_commons/variables';
|
2
|
+
|
3
|
+
body {
|
4
|
+
background: none;
|
5
|
+
background-color:$primary;
|
6
|
+
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
|
7
|
+
}
|
8
|
+
|
9
|
+
form.new_user {
|
10
|
+
display: flex;
|
11
|
+
flex-direction: column;
|
12
|
+
}
|
13
|
+
|
14
|
+
label {
|
15
|
+
|
16
|
+
&[for=user_email],
|
17
|
+
&[for=user_password],
|
18
|
+
&+br {
|
19
|
+
display: none;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
.contained {
|
24
|
+
flex-direction: row;
|
25
|
+
height: 55vh;
|
26
|
+
width: 85vw;
|
27
|
+
border: 2px solid lightgrey;
|
28
|
+
border-radius: 2em;
|
29
|
+
padding: 0px;
|
30
|
+
background-color: white !important;
|
31
|
+
max-width: 1136px;
|
32
|
+
|
33
|
+
.field,
|
34
|
+
.actions {
|
35
|
+
width: 70%;
|
36
|
+
|
37
|
+
input {
|
38
|
+
box-sizing: border-box;
|
39
|
+
|
40
|
+
&:focus {
|
41
|
+
border-color: $primary!important;
|
42
|
+
outline: 0;
|
43
|
+
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba($primary, 0.6)!important;
|
44
|
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba($primary, 0.6)!important;
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
#user_email,
|
49
|
+
#user_password,
|
50
|
+
input[type=submit] {
|
51
|
+
width: 100%;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
input[type=submit] {
|
56
|
+
border-radius: 2em;
|
57
|
+
}
|
58
|
+
|
59
|
+
.logos,
|
60
|
+
.new_user {
|
61
|
+
display: flex;
|
62
|
+
flex-direction: column;
|
63
|
+
align-items: center;
|
64
|
+
justify-content: center;
|
65
|
+
flex-basis: 50%;
|
66
|
+
flex-grow: 0;
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
.supplier {
|
71
|
+
display: flex;
|
72
|
+
align-items: center;
|
73
|
+
justify-content: center;
|
74
|
+
flex-direction: row;
|
75
|
+
background-color: #fff;
|
76
|
+
border-top-left-radius: 15px;
|
77
|
+
border-top-right-radius: 15px;
|
78
|
+
border-top: 1px solid lightgray;
|
79
|
+
position: absolute;
|
80
|
+
bottom: 0px;
|
81
|
+
left: 0px;
|
82
|
+
right: 0px;
|
83
|
+
height: 3em;
|
84
|
+
color: gray;
|
85
|
+
|
86
|
+
.supplier-image {
|
87
|
+
height: 98%;
|
88
|
+
margin-right: 1em;
|
89
|
+
}
|
90
|
+
}
|
91
|
+
|
92
|
+
|
93
|
+
// Copy rails_Admin style for alerts
|
94
|
+
|
95
|
+
.alert {
|
96
|
+
padding: 1rem 1rem;
|
97
|
+
margin-bottom: 1rem;
|
98
|
+
border: 1px solid transparent;
|
99
|
+
}
|
100
|
+
|
101
|
+
.alert-dismissible {
|
102
|
+
padding-right: 3rem;
|
103
|
+
}
|
104
|
+
|
105
|
+
.alert-dismissible .btn-close {
|
106
|
+
position: absolute;
|
107
|
+
top: 0;
|
108
|
+
right: 0;
|
109
|
+
z-index: 2;
|
110
|
+
padding: 1.25rem 1rem;
|
111
|
+
}
|
112
|
+
|
113
|
+
button:not(:disabled),
|
114
|
+
[type="button"]:not(:disabled),
|
115
|
+
[type="reset"]:not(:disabled),
|
116
|
+
[type="submit"]:not(:disabled) {
|
117
|
+
cursor: pointer;
|
118
|
+
}
|
119
|
+
|
120
|
+
$x_icon: "data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e";
|
121
|
+
|
122
|
+
.btn-close {
|
123
|
+
box-sizing: content-box;
|
124
|
+
width: 1em;
|
125
|
+
height: 1em;
|
126
|
+
padding: 0.25em 0.25em;
|
127
|
+
color: #000;
|
128
|
+
background: transparent url($x_icon) center/1em auto no-repeat;
|
129
|
+
border: 0;
|
130
|
+
border-radius: 0.25rem;
|
131
|
+
opacity: 0.5;
|
132
|
+
}
|
133
|
+
|
134
|
+
#main-menu-app-logo {
|
135
|
+
width: 20vw;
|
136
|
+
max-width: 300px;
|
137
|
+
}
|
138
|
+
|
139
|
+
@media screen and (max-width: 992px) {
|
140
|
+
.contained {
|
141
|
+
flex-direction: column;
|
142
|
+
}
|
143
|
+
|
144
|
+
#main-menu-app-logo {
|
145
|
+
height: 100%;
|
146
|
+
width: auto;
|
147
|
+
}
|
148
|
+
|
149
|
+
.contained .logos,
|
150
|
+
.contained .new_user {
|
151
|
+
flex-basis: auto;
|
152
|
+
flex-grow: auto;
|
153
|
+
}
|
154
|
+
|
155
|
+
form.new_user {
|
156
|
+
width: 70%;
|
157
|
+
}
|
158
|
+
}
|
159
|
+
|
160
|
+
@import 'devise/custom/thecore/sessions'
|
File without changes
|
@@ -0,0 +1,150 @@
|
|
1
|
+
@import 'thecore_ui_commons/variables';
|
2
|
+
|
3
|
+
// Dashboard
|
4
|
+
.box {
|
5
|
+
color: inherit;
|
6
|
+
}
|
7
|
+
|
8
|
+
.box {
|
9
|
+
border-radius: 1em;
|
10
|
+
display: block;
|
11
|
+
padding: 15px;
|
12
|
+
margin-bottom: 30px;
|
13
|
+
border: 1px solid $element-border;
|
14
|
+
position: relative;
|
15
|
+
min-height: 15em;
|
16
|
+
transition: all 0.3s ease;
|
17
|
+
background-color: lighten($element, 25%);
|
18
|
+
color: $element-text;
|
19
|
+
overflow: hidden;
|
20
|
+
|
21
|
+
&:hover,
|
22
|
+
&:focus {
|
23
|
+
border-color: $shadows;
|
24
|
+
|
25
|
+
.icon-bg {
|
26
|
+
transform: scale(1.5) rotate(20deg);
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
p {
|
31
|
+
min-height: 30px;
|
32
|
+
font-size: 15px;
|
33
|
+
font-weight: 600;
|
34
|
+
|
35
|
+
a.btn {
|
36
|
+
border-radius: 3px;
|
37
|
+
color: rgba($text-highlight, 0.7) !important;
|
38
|
+
display: inline-block;
|
39
|
+
margin-bottom: 0;
|
40
|
+
font-weight: normal;
|
41
|
+
text-align: center;
|
42
|
+
vertical-align: middle;
|
43
|
+
cursor: pointer;
|
44
|
+
background-color: rgba($shadows, 0.19);
|
45
|
+
border: 1px solid transparent;
|
46
|
+
white-space: nowrap;
|
47
|
+
padding: 6px 12px;
|
48
|
+
font-size: 14px;
|
49
|
+
line-height: 1.42857143;
|
50
|
+
border-radius: 4px;
|
51
|
+
-webkit-user-select: none;
|
52
|
+
-moz-user-select: none;
|
53
|
+
-ms-user-select: none;
|
54
|
+
user-select: none;
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
strong.count {
|
59
|
+
font-size: 10em;
|
60
|
+
font-weight: 600;
|
61
|
+
}
|
62
|
+
|
63
|
+
p.model,
|
64
|
+
strong.count {
|
65
|
+
color: $element-text;
|
66
|
+
|
67
|
+
&:hover {
|
68
|
+
color: $element-text-highlight;
|
69
|
+
}
|
70
|
+
}
|
71
|
+
|
72
|
+
.icon-bg {
|
73
|
+
position: absolute;
|
74
|
+
right: 0;
|
75
|
+
bottom: 0;
|
76
|
+
font-size: 15em;
|
77
|
+
color: $element-text;
|
78
|
+
opacity: 0.20;
|
79
|
+
filter: alpha(opacity=20);
|
80
|
+
transition: all 1s ease;
|
81
|
+
}
|
82
|
+
|
83
|
+
&.bg-info {
|
84
|
+
background-color: $info;
|
85
|
+
}
|
86
|
+
|
87
|
+
&.bg-success {
|
88
|
+
background-color: $success;
|
89
|
+
}
|
90
|
+
|
91
|
+
&.bg-warning {
|
92
|
+
background-color: $warning;
|
93
|
+
}
|
94
|
+
|
95
|
+
&.bg-danger {
|
96
|
+
background-color: $danger;
|
97
|
+
}
|
98
|
+
|
99
|
+
&.bg-clear {
|
100
|
+
background-color: $neutral;
|
101
|
+
}
|
102
|
+
}
|
103
|
+
|
104
|
+
.box,
|
105
|
+
#bulk_form .panel:nth-of-type(1),
|
106
|
+
#bulk_form .panel {
|
107
|
+
border: none;
|
108
|
+
border-radius: 2em;
|
109
|
+
}
|
110
|
+
|
111
|
+
.box:hover .icon-block {
|
112
|
+
transform: scale(1.2) rotate(20deg);
|
113
|
+
}
|
114
|
+
|
115
|
+
.box.first {
|
116
|
+
color: #fad23c !important;
|
117
|
+
}
|
118
|
+
|
119
|
+
.box.second {
|
120
|
+
color: #e68c00 !important;
|
121
|
+
}
|
122
|
+
|
123
|
+
.box.third {
|
124
|
+
color: #c82823 !important;
|
125
|
+
}
|
126
|
+
|
127
|
+
.box.fourth {
|
128
|
+
color: #a02319 !important;
|
129
|
+
}
|
130
|
+
|
131
|
+
.box p.model,
|
132
|
+
.box strong.count {
|
133
|
+
color: inherit !important;
|
134
|
+
}
|
135
|
+
|
136
|
+
.box .text-center p.model {
|
137
|
+
text-transform: uppercase;
|
138
|
+
font-size: x-large;
|
139
|
+
font-weight: bold;
|
140
|
+
}
|
141
|
+
|
142
|
+
.box .text-center i.icon-block {
|
143
|
+
font-size: 8em;
|
144
|
+
transition: all .5s ease;
|
145
|
+
}
|
146
|
+
|
147
|
+
.dashboard-element {
|
148
|
+
padding-right: 15px !important;
|
149
|
+
padding-left: 15px !important;
|
150
|
+
}
|
@@ -18,5 +18,54 @@
|
|
18
18
|
@import 'rails_admin/custom/variables';
|
19
19
|
@import 'rails_admin/custom/mixins';
|
20
20
|
@import 'thecore_ui_commons/alerts';
|
21
|
+
@import 'rails_admin/custom/dashboard';
|
22
|
+
|
23
|
+
header h1,
|
24
|
+
.nav li[class$="_root_link"] {
|
25
|
+
display: none;
|
26
|
+
}
|
27
|
+
|
28
|
+
header.py-2.m-2.border-bottom {
|
29
|
+
border-bottom: none !important;
|
30
|
+
}
|
31
|
+
|
32
|
+
.breadcrumb {
|
33
|
+
background-color: $primary;
|
34
|
+
text-transform: uppercase;
|
35
|
+
color: $body-bg !important;
|
36
|
+
border-radius: 2em;
|
37
|
+
padding: 8px 15px;
|
38
|
+
margin-bottom: 20px;
|
39
|
+
list-style: none;
|
40
|
+
|
41
|
+
.breadcrumb-item {
|
42
|
+
|
43
|
+
a,
|
44
|
+
&.active,
|
45
|
+
&+.breadcrumb-item::before {
|
46
|
+
color: white !important;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
51
|
+
.card.bg-light {
|
52
|
+
background-color: $body-bg !important;
|
53
|
+
border:none!important;
|
54
|
+
}
|
55
|
+
|
56
|
+
input, select, textarea {
|
57
|
+
&.form-control, &.form-check-input {
|
58
|
+
background-color: $background!important;
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
body > div.container-fluid > div > div.col-sm-3.col-md-2.flex-wrap.p-0,
|
63
|
+
body > div.container-fluid > div > div.col-sm-9.col-sm-offset-3.col-md-10.col-md-offset-2 {
|
64
|
+
-webkit-transition: all 1s ease-in-out;
|
65
|
+
-moz-transition: all 1s ease-in-out;
|
66
|
+
-o-transition: all 1s ease-in-out;
|
67
|
+
-ms-transition: all 1s ease-in-out;
|
68
|
+
transition: all 1s ease-in-out;
|
69
|
+
}
|
21
70
|
|
22
71
|
@import 'rails_admin/custom/thecore/theming';
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<% colors = [ :first, :second, :third, :fourth ] %>
|
2
|
+
<% index = 0 %>
|
3
|
+
<% allowed_models = Settings.models_in_dashboard %>
|
4
|
+
<% allowed_models_cleaned = allowed_models.split.join.split(",") %>
|
5
|
+
<% @abstract_models.each do |abstract_model| %>
|
6
|
+
<% if allowed_models.blank? || allowed_models_cleaned.include?(abstract_model.model_name) %>
|
7
|
+
<% index_path = index_path(model_name: abstract_model.to_param) %>
|
8
|
+
<% if authorized?(:index, abstract_model) %>
|
9
|
+
<% if index == colors.length %>
|
10
|
+
<% index = 0 %>
|
11
|
+
<% end %>
|
12
|
+
<div class="col-sm-4 dashboard-element">
|
13
|
+
<a class="box pjax <%= colors[index] %>" href="<%= index_path %>">
|
14
|
+
<div class="text-center">
|
15
|
+
<p class="model">
|
16
|
+
<%= abstract_model.config.label_plural %>
|
17
|
+
</p>
|
18
|
+
<i class="icon-block <%= abstract_model.config.navigation_icon.present? ? abstract_model.config.navigation_icon : 'file' %>"></i>
|
19
|
+
</div>
|
20
|
+
</a>
|
21
|
+
</div>
|
22
|
+
<% index += 1 %>
|
23
|
+
<% end %>
|
24
|
+
<% end %>
|
25
|
+
<% end %>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<% # Instruct javascript to skip toolbar or breadcrumb %>
|
2
|
+
<span class="hide-toolbar"></span>
|
3
|
+
<% # =render partial: 'rails_admin/main/dashboard_analytics' %>
|
4
|
+
<% if @abstract_models %>
|
5
|
+
<div class="row">
|
6
|
+
<%= render partial: 'rails_admin/main/dashboard_block' %>
|
7
|
+
</div>
|
8
|
+
<% end %>
|
9
|
+
<% if @auditing_adapter && authorized?(:history_index) %>
|
10
|
+
<div class="block" id="block-tables">
|
11
|
+
<div class="content">
|
12
|
+
<h2>
|
13
|
+
<%= t("admin.actions.history_index.menu") %>
|
14
|
+
</h2>
|
15
|
+
<%= render partial: 'rails_admin/main/dashboard_history' %>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
<% end %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thecore_ui_rails_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriele Tassoni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02-
|
11
|
+
date: 2023-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thecore_ui_commons
|
@@ -63,9 +63,13 @@ files:
|
|
63
63
|
- README.md
|
64
64
|
- Rakefile
|
65
65
|
- app/assets/config/thecore_ui_rails_admin_manifest.js
|
66
|
+
- app/assets/javascripts/devise/sessions.js
|
66
67
|
- app/assets/javascripts/rails_admin/custom/thecore/ui.js
|
67
68
|
- app/assets/javascripts/rails_admin/custom/ui.js
|
68
69
|
- app/assets/javascripts/selectize.min.js
|
70
|
+
- app/assets/stylesheets/devise/custom/sessions.scss
|
71
|
+
- app/assets/stylesheets/devise/custom/thecore/sessions.scss
|
72
|
+
- app/assets/stylesheets/rails_admin/custom/dashboard.scss
|
69
73
|
- app/assets/stylesheets/rails_admin/custom/mixins.scss
|
70
74
|
- app/assets/stylesheets/rails_admin/custom/thecore/mixins.scss
|
71
75
|
- app/assets/stylesheets/rails_admin/custom/thecore/selectize.default.min.scss
|
@@ -73,7 +77,9 @@ files:
|
|
73
77
|
- app/assets/stylesheets/rails_admin/custom/thecore/variables.scss
|
74
78
|
- app/assets/stylesheets/rails_admin/custom/theming.scss
|
75
79
|
- app/assets/stylesheets/rails_admin/custom/variables.scss
|
80
|
+
- app/views/rails_admin/main/_dashboard_block.html.erb
|
76
81
|
- app/views/rails_admin/main/active_job_monitor.html.erb
|
82
|
+
- app/views/rails_admin/main/dashboard.html.erb
|
77
83
|
- config/initializers/abilities.rb
|
78
84
|
- config/initializers/add_to_db_migrations.rb
|
79
85
|
- config/initializers/after_initialize.rb
|