thecore_ui_rails_admin 2.1.3 → 2.1.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/rails_admin/ra.widgets.coffee +233 -0
  3. data/app/assets/javascripts/thecore_ui_rails_admin/thecore_rails_admin.js +78 -0
  4. data/app/assets/stylesheets/thecore_ui_rails_admin/animate.css +3458 -0
  5. data/app/assets/stylesheets/thecore_ui_rails_admin/apexcharts.scss +7 -0
  6. data/app/assets/stylesheets/thecore_ui_rails_admin/common.scss +36 -0
  7. data/app/assets/stylesheets/thecore_ui_rails_admin/devise.scss +248 -0
  8. data/app/assets/stylesheets/thecore_ui_rails_admin/flashing.scss +28 -0
  9. data/app/assets/stylesheets/thecore_ui_rails_admin/mixins.scss +18 -0
  10. data/app/assets/stylesheets/thecore_ui_rails_admin/thecore.scss +25 -0
  11. data/app/assets/stylesheets/thecore_ui_rails_admin/thecore_rails_admin.scss +204 -0
  12. data/app/assets/stylesheets/thecore_ui_rails_admin/togglable-sidebar.scss +90 -0
  13. data/app/controllers/pages_controller.rb +43 -0
  14. data/app/helpers/devise_bootstrap_errors_helper.rb +20 -0
  15. data/app/helpers/thecore_helper.rb +54 -0
  16. data/app/views/layouts/rails_admin/_navigation.html.haml +13 -0
  17. data/app/views/layouts/rails_admin/_secondary_navigation.html.haml +3 -0
  18. data/app/views/layouts/rails_admin/_sidebar_navigation.html.haml +4 -0
  19. data/app/views/layouts/rails_admin/_user_navigation.html.haml +7 -0
  20. data/app/views/layouts/rails_admin/application.html.haml +59 -0
  21. data/app/views/layouts/rails_admin/pjax.html.haml +25 -0
  22. data/app/views/rails_admin/main/_card.html.haml +17 -0
  23. data/app/views/rails_admin/main/_modal_interaction.html.erb +53 -0
  24. data/app/views/rails_admin/main/dashboard.html.haml +43 -0
  25. data/app/views/rails_admin/main/index.html.haml +90 -0
  26. data/app/views/shared/_flash.html.erb +10 -0
  27. data/config/initializers/rails_admin.rb +73 -0
  28. data/config/initializers/thecore_concern.rb +130 -0
  29. data/config/initializers/thecore_ui_rails_admin_app_configs.rb +17 -0
  30. data/config/locales/en.index_cards.custom.yml +8 -0
  31. data/config/locales/en.main.yml +27 -0
  32. data/config/locales/en.rails_admin.yml +34 -0
  33. data/config/locales/en.rollincode.yml +5 -0
  34. data/config/locales/it.index_cards.custom.yml +20 -0
  35. data/config/locales/it.main.yml +27 -0
  36. data/config/locales/it.rails_admin.yml +4 -0
  37. data/config/locales/it.rollincode.yml +5 -0
  38. data/config/locales/thecore_settings.en.yml +31 -0
  39. data/config/locales/thecore_settings.it.yml +31 -0
  40. data/config/routes.rb +10 -0
  41. data/db/migrate/20161227101954_create_rails_admin_settings.rb +25 -0
  42. data/db/migrate/20161227101956_add_app_name.rb +5 -0
  43. data/lib/abilities/thecore_ui_rails_admin.rb +12 -0
  44. data/lib/concerns/rails_admin_requirements.rb +19 -0
  45. data/lib/concerns/thecore_rails_admin_bulk_delete_concern.rb +16 -0
  46. data/lib/concerns/thecore_rails_admin_export_concern.rb +16 -0
  47. data/lib/concerns/thecore_ui_rails_admin_permission.rb +32 -0
  48. data/lib/concerns/thecore_ui_rails_admin_role.rb +36 -0
  49. data/lib/concerns/thecore_ui_rails_admin_user.rb +75 -0
  50. data/lib/thecore_ui_rails_admin.rb +21 -3
  51. data/lib/thecore_ui_rails_admin/version.rb +1 -1
  52. metadata +147 -2
@@ -0,0 +1,7 @@
1
+ .apexcharts-menu-item {
2
+ color: black
3
+ }
4
+ .apexcharts-tooltip {
5
+ background: #f3f3f3;
6
+ color: orange;
7
+ }
@@ -0,0 +1,36 @@
1
+ body {
2
+ height: 100vh;
3
+ // background: linear-gradient(-20deg, #09b7b9 30%, #1c51a4 100%);
4
+ background-color: rgb(59, 78, 89);
5
+ }
6
+
7
+ .jumbotron {
8
+ background-color: rgb(59, 78, 89);
9
+ }
10
+
11
+ .vertical-center {
12
+ min-height: 100%;
13
+ /* Fallback for browsers do NOT support vh unit */
14
+ min-height: 100vh;
15
+ /* These two lines are counted as one :-) */
16
+ display: flex;
17
+ align-items: center;
18
+ }
19
+
20
+ #up-arrow {
21
+ bottom: -2em;
22
+ margin-right: auto;
23
+ margin-left: auto;
24
+ opacity: 0.2;
25
+ filter: alpha(opacity=20);
26
+ /* For IE8 and earlier */
27
+ }
28
+
29
+ .fa-pencil:before,
30
+ .icon-pencil:before {
31
+ content: "\f044";
32
+ }
33
+
34
+ #new_user div.actions input.btn.btn-warning {
35
+ width: 100%;
36
+ }
@@ -0,0 +1,248 @@
1
+ $primary: #1c2c41;
2
+ $secondary: #304158;
3
+ $light: #47566c;
4
+ $blue: #0C457D;
5
+ $grey: #706f6f;
6
+ $tertiary: #81C784;
7
+
8
+ .devise {
9
+ font-family: 'Raleway', sans-serif;
10
+ height: 100vh;
11
+ .container-fluid-admin {
12
+ height: 100vh;
13
+ }
14
+
15
+ .container-fluid-devise {
16
+ height: 100vh;
17
+ overflow: auto;
18
+ }
19
+ }
20
+
21
+ .bckg-dark {
22
+ // background: linear-gradient(-20deg, #09b7b9 30%, #1c51a4 100%);
23
+ background-color: rgb(59, 78, 89);
24
+ }
25
+
26
+ .bckg-login {
27
+ }
28
+
29
+ .logo {
30
+ display: inline-block;
31
+ margin: 0 auto;
32
+ width: 130px;
33
+ }
34
+
35
+ .app-logo {
36
+ margin: 50px 0 25px;
37
+ width: 70%;
38
+ }
39
+
40
+ .bckg-dark-light {
41
+ background: $secondary;
42
+ }
43
+
44
+ .bckg-blue {
45
+ background: $blue;
46
+ }
47
+
48
+ .centered {
49
+ left: 50%;
50
+ position: fixed;
51
+ top: 50%;
52
+ transform: translate(-50%, -50%);
53
+ }
54
+
55
+ .login-form-user {
56
+ width: 25%;
57
+ color: #fff;
58
+ margin: 0 auto;
59
+ margin-bottom: 25px;
60
+
61
+ .content-width {
62
+ width: 90%;
63
+ padding-top: 1px;
64
+ padding-bottom: 1px;
65
+ }
66
+
67
+ .lost_id {
68
+ color: #fff;
69
+ margin-bottom: 15px;
70
+ display: block;
71
+ font-size: .9em;
72
+ width: 90%;
73
+ }
74
+
75
+ .form-actions {
76
+ display: inline-block;
77
+ width: 90%;
78
+ margin-bottom: 10px;
79
+ .col-sm-6 {
80
+ padding: 0;
81
+ }
82
+ input {
83
+ float: left;
84
+ .label {
85
+ float: left;
86
+ }
87
+ }
88
+ input[type="checkbox"] {
89
+ margin-top: 0;
90
+ }
91
+ .input-group {
92
+ float: left;
93
+ }
94
+ .checkbox {
95
+ margin: 0;
96
+ margin-top: 10px;
97
+ float: left;
98
+ label {
99
+ font-size: .8em;
100
+ }
101
+ }
102
+ }
103
+ form {
104
+ margin-top: 30px;
105
+ }
106
+ .input-group {
107
+ width: 90%;
108
+ margin-bottom: 15px;
109
+ }
110
+ input {
111
+ border: 0;
112
+ }
113
+ input[type="submit"] {
114
+ background: $grey;
115
+ border: 0;
116
+ border-radius: 0;
117
+ cursor: pointer;
118
+ float: right;
119
+ color: white;
120
+ width:100%;
121
+ }
122
+ h2 {
123
+ background: $grey;
124
+ display: block;
125
+ padding: 10px 15px;
126
+ text-align: left;
127
+ font-size: 1.3em;
128
+ }
129
+ }
130
+
131
+ .login-form {
132
+ color: #fff;
133
+ width: 30%;
134
+
135
+ .links-form {
136
+ a {
137
+ color: $light;
138
+ text-decoration: none;
139
+ &:hover {
140
+ color: $light;
141
+ }
142
+ }
143
+ }
144
+
145
+ i {
146
+ font-size: 1.5em;
147
+ }
148
+
149
+ .form-control {
150
+ box-shadow: none;
151
+ }
152
+
153
+ .input-group {
154
+ margin-bottom: 20px;
155
+ }
156
+
157
+ h2 {
158
+ margin-top: 15px;
159
+ margin-bottom: 50px;
160
+ }
161
+
162
+ .content {
163
+ padding: 35px;
164
+ }
165
+
166
+ .content-login {
167
+ padding: inherit;
168
+ }
169
+
170
+ .input-group-addon {
171
+ border-radius: 0;
172
+ padding-bottom: 15px;
173
+ }
174
+
175
+ input[type="submit"] {
176
+ cursor: pointer;
177
+ background: $tertiary;
178
+ color: #fff;
179
+ border-radius: 3px;
180
+ border: 0;
181
+ display: block;
182
+ padding: 15px;
183
+ margin-bottom: 45px;
184
+ margin-top: 55px;
185
+ width: 100%;
186
+ &:hover {
187
+ background: darken($tertiary, 5%);
188
+ }
189
+ }
190
+
191
+ input[type="text"], input[type="email"], input[type="password"] {
192
+ background-color: transparent;
193
+ border: 0;
194
+ border-bottom: 1px solid $light;
195
+ color: #fff;
196
+ margin-top: 15px;
197
+ padding-bottom: 15px;
198
+ }
199
+
200
+ .input-group-addon {
201
+ background-color: transparent;
202
+ border: 0;
203
+ border-bottom: 1px solid $light;
204
+ color: #fff;
205
+ margin-top: 15px;
206
+ padding-bottom: 15px;
207
+ padding-top: 12px;
208
+ }
209
+ }
210
+
211
+ /* Small devices (tablets, 768px and up) */
212
+ @media (min-width: 768px) {
213
+ .login-form-user {
214
+ width: 45%;
215
+ }
216
+ }
217
+
218
+ /* Medium devices (desktops, 992px and up) */
219
+ @media (min-width: 992px) {
220
+ .login-form-user {
221
+ width: 45%;
222
+ }
223
+ }
224
+
225
+ /* Large devices (large desktops, 1200px and up) */
226
+ @media (min-width: 1200px) {
227
+ .login-form-user {
228
+ width: 26%;
229
+ input[type="submit"] {
230
+ width: 100%;
231
+ }
232
+ }
233
+ .app-logo {
234
+ margin: 50px 0 25px;
235
+ }
236
+ }
237
+
238
+ @media (min-width: 1600px) {
239
+ .login-form-user {
240
+ width: 15%;
241
+ input[type="submit"] {
242
+ width: 100%;
243
+ }
244
+ }
245
+ .app-logo {
246
+ margin: 50px 0 25px;
247
+ }
248
+ }
@@ -0,0 +1,28 @@
1
+ .flash {
2
+ -moz-animation: flash 1s ease-out;
3
+ -moz-animation-iteration-count: 1;
4
+
5
+ -webkit-animation: flash 1s ease-out;
6
+ -webkit-animation-iteration-count: 1;
7
+
8
+ -ms-animation: flash 1s ease-out;
9
+ -ms-animation-iteration-count: 1;
10
+ }
11
+
12
+ @-webkit-keyframes flash {
13
+ 0% { background-color: none; }
14
+ 50% { background-color: #fbf8b2; }
15
+ 100% { background-color: none; }
16
+ }
17
+
18
+ @-moz-keyframes flash {
19
+ 0% { background-color: none; }
20
+ 50% { background-color: #fbf8b2; }
21
+ 100% { background-color: none; }
22
+ }
23
+
24
+ @-ms-keyframes flash {
25
+ 0% { background-color: none; }
26
+ 50% { background-color: #fbf8b2; }
27
+ 100% { background-color: none; }
28
+ }
@@ -0,0 +1,18 @@
1
+ @mixin transition($time) {
2
+ -webkit-transition: all $time ease-in;
3
+ -moz-transition: all $time ease-in;
4
+ -o-transition: all $time ease-in;
5
+ transition: all $time ease-in;
6
+ }
7
+
8
+ @mixin lol() {
9
+ .row {
10
+ display: table;
11
+ }
12
+
13
+ [class*="col-"] {
14
+ float: none;
15
+ display: table-cell;
16
+ vertical-align: top;
17
+ }
18
+ }
@@ -0,0 +1,25 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any styles
10
+ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
+ * file per style scope.
12
+ *
13
+ *= required _colors
14
+
15
+ *= require_self
16
+ */
17
+ @import "jquery-ui";
18
+ @import "jquery-ui/dialog";
19
+ @import 'bootstrap-sprockets';
20
+ @import 'bootstrap';
21
+ @import 'common';
22
+ @import 'devise';
23
+ @import 'animate';
24
+ @import 'mixins';
25
+ @import 'apexcharts';
@@ -0,0 +1,204 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any styles
10
+ * defined in the other CSS/SCSS files in this directory. It is generally better to create a new
11
+ * file per style scope.
12
+ *
13
+ *= required _colors
14
+ *= require thecore_ui_commons/thecore
15
+ *= require rails_admin/rails_admin
16
+ *= require rails_admin_selectize/index
17
+ *= require_self
18
+ */
19
+ @import 'thecore';
20
+ @import 'thecore_ui_commons/thecore';
21
+ @import "togglable-sidebar";
22
+ @import "flashing";
23
+ @import 'common';
24
+
25
+ $RAprimary: #1c2c41;
26
+ $RAgreen: #37BC9B;
27
+ $RAblue: #3BAFDA;
28
+ $RAred: #E9573F;
29
+ $RAyellow: #F6BB42;
30
+
31
+ .page-header.dashboard {
32
+ border-color: $RAprimary;
33
+ }
34
+
35
+ .breadcrumb {
36
+ background: $RAblue;
37
+ .false a, .false:before {
38
+ color: darken($RAblue, 30%) !important;
39
+ }
40
+ .active, .active:before {
41
+ color: #FFF;
42
+ }
43
+ }
44
+
45
+ .table-striped {
46
+ border-top-color: $RAblue;
47
+ .links ul li {
48
+ padding-right: 0;
49
+ a {
50
+ border-radius: 50%;
51
+ }
52
+ }
53
+ }
54
+
55
+ .content {
56
+ margin: 0px 0 15px 0;
57
+ padding: 8px;
58
+ background: rgb(59, 78, 89);
59
+ &.dashboard {
60
+ background: rgb(59, 78, 89);
61
+ }
62
+ .page-header {
63
+ display: none;
64
+ }
65
+ }
66
+
67
+ a.delete {
68
+ color: #FFF;
69
+ }
70
+
71
+ .box {
72
+ padding: 15px;
73
+ margin-bottom: 30px;
74
+ border: 1px solid $RAprimary;
75
+ position: relative;
76
+ min-height: 170px;
77
+ transition: all 0.3s ease;
78
+ color: rgba(255,255,255,0.7);
79
+ overflow: hidden;
80
+ &:hover, &:focus {
81
+ border-color: #FFF;
82
+ .icon-bg {
83
+ transform: scale(1.5) rotate(20deg);
84
+ }
85
+ }
86
+ p {
87
+ min-height: 30px;
88
+ font-size: 15px;
89
+ font-weight: 600;
90
+ a.btn {
91
+ border-radius: 3px;
92
+ color: rgba(255,255,255,0.7) !important;
93
+ display: inline-block;
94
+ margin-bottom: 0;
95
+ font-weight: normal;
96
+ text-align: center;
97
+ vertical-align: middle;
98
+ cursor: pointer;
99
+ background-color: rgba(0, 0, 0, 0.19);
100
+ border: 1px solid transparent;
101
+ white-space: nowrap;
102
+ padding: 6px 12px;
103
+ font-size: 14px;
104
+ line-height: 1.42857143;
105
+ border-radius: 4px;
106
+ -webkit-user-select: none;
107
+ -moz-user-select: none;
108
+ -ms-user-select: none;
109
+ user-select: none;
110
+ }
111
+ }
112
+ strong {
113
+ font-size: 36px;
114
+ font-weight: 600;
115
+ }
116
+ .icon-bg {
117
+ position: absolute;
118
+ right: 0;
119
+ bottom: 0;
120
+ font-size: 100px;
121
+ color: #000;
122
+ opacity: 0.08;
123
+ filter: alpha(opacity=8);
124
+ transition: all 1s ease;
125
+ }
126
+ &.bg-info {
127
+ background-color: $RAblue;
128
+ }
129
+ &.bg-success {
130
+ background-color: $RAgreen;
131
+ }
132
+ &.bg-warning {
133
+ background-color: $RAyellow;
134
+ }
135
+ &.bg-danger {
136
+ background-color: $RAred;
137
+ }
138
+ &.bg-clear {
139
+ background-color: rgb(204, 255, 204);
140
+ }
141
+ }
142
+
143
+ /* User sign in and sign forms. */
144
+ .border-form-div {
145
+ max-width: 300px;
146
+ padding: 19px 29px 29px;
147
+ margin: 0 auto 20px;
148
+ background-color: #fff;
149
+ border: 1px solid #e5e5e5;
150
+ -webkit-border-radius: 5px;
151
+ -moz-border-radius: 5px;
152
+ border-radius: 5px;
153
+ -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
154
+ -moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
155
+ box-shadow: 0 1px 2px rgba(0,0,0,.05);
156
+ }
157
+ .border-form-div .form-signin-heading,
158
+ .border-form-div .checkbox {
159
+ margin-bottom: 10px;
160
+ }
161
+ .border-form-div input[type="text"],
162
+ .border-form-div input[type="email"],
163
+ .border-form-div input[type="password"] {
164
+ font-size: 16px;
165
+ height: auto;
166
+ margin-bottom: 15px;
167
+ padding: 7px 9px;
168
+ }
169
+
170
+ #sidebar-collapse {
171
+ background-color: transparent;
172
+ background-image: none;
173
+ border: 1px solid transparent;
174
+ color: #888;
175
+ }
176
+ #sidebar-collapse:focus {
177
+ outline: 0;
178
+ }
179
+ #sidebar-collapse:hover {
180
+ color: white;
181
+ }
182
+
183
+ .exit-button {
184
+ padding-top: 9px;
185
+ padding-bottom: 9px;
186
+ margin-top: 8px;
187
+ margin-bottom: 8px;
188
+ margin-right: 7px;
189
+ }
190
+
191
+ #app-name {
192
+ font-size: 2em;
193
+ color: #888;
194
+ font-family: 'Raleway', sans-serif;
195
+ word-wrap: normal;
196
+ }
197
+ #app-name:hover {
198
+ color: white;
199
+ text-decoration: none;
200
+ }
201
+
202
+ body.rails_admin {
203
+ padding-top: 0px;
204
+ }