thecore_ui_rails_admin 2.1.4 → 2.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/rails_admin/custom/ui.js +0 -14
  3. data/app/assets/stylesheets/animate.css +3458 -0
  4. data/app/assets/stylesheets/devise.scss +248 -0
  5. data/app/assets/stylesheets/mixins.scss +18 -0
  6. data/app/assets/stylesheets/rails_admin/{custom/flashing.scss → flashing.scss} +0 -0
  7. data/app/assets/stylesheets/rails_admin/{custom/theming.scss → theming.scss} +30 -16
  8. data/app/assets/stylesheets/rails_admin/{custom/togglable-sidebar.scss → togglable-sidebar.scss} +1 -27
  9. data/app/assets/stylesheets/thecore_rails_admin.scss +32 -0
  10. data/app/controllers/pages_controller.rb +43 -0
  11. data/config/initializers/rails_admin.rb +0 -4
  12. data/config/initializers/thecore_ui_rails_admin_app_configs.rb +12 -0
  13. data/lib/concerns/thecore_rails_admin_bulk_delete_concern.rb +16 -0
  14. data/lib/concerns/thecore_rails_admin_export_concern.rb +16 -0
  15. data/lib/concerns/thecore_ui_rails_admin_user.rb +94 -0
  16. data/lib/thecore_ui_rails_admin.rb +7 -2
  17. data/lib/thecore_ui_rails_admin/version.rb +1 -1
  18. metadata +56 -51
  19. data/app/assets/javascripts/rails_admin/custom/ckeditor_ajax.js.coffee +0 -7
  20. data/app/views/contact_mailer/contact_message.html.erb +0 -5
  21. data/app/views/devise/confirmations/new.html.erb +0 -16
  22. data/app/views/devise/mailer/confirmation_instructions.html.erb +0 -5
  23. data/app/views/devise/mailer/password_change.html.erb +0 -5
  24. data/app/views/devise/mailer/reset_password_instructions.html.erb +0 -8
  25. data/app/views/devise/mailer/unlock_instructions.html.erb +0 -7
  26. data/app/views/devise/menu/_login_items.html.erb +0 -7
  27. data/app/views/devise/passwords/edit.html.erb +0 -25
  28. data/app/views/devise/passwords/new.html.erb +0 -18
  29. data/app/views/devise/registrations/edit.html.erb +0 -45
  30. data/app/views/devise/registrations/new.html.erb +0 -29
  31. data/app/views/devise/sessions/new.html.erb +0 -28
  32. data/app/views/devise/shared/_links.html.erb +0 -25
  33. data/app/views/devise/unlocks/new.html.erb +0 -16
  34. data/app/views/home/index.html.erb +0 -5
  35. data/app/views/kaminari/_first_page.html.erb +0 -3
  36. data/app/views/kaminari/_gap.html.erb +0 -3
  37. data/app/views/kaminari/_last_page.html.erb +0 -3
  38. data/app/views/kaminari/_next_page.html.erb +0 -3
  39. data/app/views/kaminari/_page.html.erb +0 -9
  40. data/app/views/kaminari/_paginator.html.erb +0 -15
  41. data/app/views/kaminari/_prev_page.html.erb +0 -3
  42. data/app/views/layouts/_footer.html.erb +0 -3
  43. data/app/views/layouts/_messages.html.erb +0 -9
  44. data/app/views/layouts/_navigation.html.erb +0 -20
  45. data/app/views/layouts/_navigation_links.html.erb +0 -7
  46. data/app/views/layouts/mailer.html.erb +0 -6
  47. data/app/views/layouts/mailer.text.erb +0 -1
  48. data/app/views/layouts/thecore.html.erb +0 -42
  49. data/app/views/pages/contact.html.erb +0 -54
  50. data/app/views/pages/home.html.erb +0 -2
  51. data/app/views/pages/inside.html.erb +0 -4
  52. data/app/views/shared/_flash.html.erb +0 -10
  53. data/app/views/users/confirmations/new.html.erb +0 -16
  54. data/app/views/users/mailer/confirmation_instructions.html.erb +0 -5
  55. data/app/views/users/mailer/password_change.html.erb +0 -3
  56. data/app/views/users/mailer/reset_password_instructions.html.erb +0 -8
  57. data/app/views/users/mailer/unlock_instructions.html.erb +0 -7
  58. data/app/views/users/passwords/edit.html.erb +0 -19
  59. data/app/views/users/passwords/new.html.erb +0 -15
  60. data/app/views/users/registrations/edit.html.erb +0 -27
  61. data/app/views/users/registrations/new.html.erb +0 -17
  62. data/app/views/users/sessions/new.html.erb +0 -37
  63. data/app/views/users/shared/_links.html.erb +0 -26
  64. data/app/views/users/unlocks/new.html.erb +0 -16
@@ -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,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
+ }
@@ -1,20 +1,5 @@
1
- @import "selectize";
2
- @import "selectize.bootstrap3";
3
1
  @import "togglable-sidebar";
4
2
  @import "flashing";
5
- // Froala
6
- @import "froala_editor.min";
7
- @import "froala_style.min";
8
- // @import "font-awesome-sprockets";
9
- // @import 'font-awesome';
10
- // @import 'plugins/char_counter.min.css';
11
- // @import 'plugins/colors.min.css';
12
- // @import 'plugins/lists.min.css';
13
- // @import 'plugins/line_breaker.min.css';
14
- // @import 'plugins/special_characters.min.css';
15
-
16
- // @import 'rails_admin/bootstrap/_variables';
17
- // @import "rails_admin/bootstrap-datetimepicker-build";
18
3
 
19
4
  $RAprimary: #1c2c41;
20
5
  $RAgreen: #37BC9B;
@@ -23,7 +8,36 @@ $RAred: #E9573F;
23
8
  $RAyellow: #F6BB42;
24
9
 
25
10
  body {
26
- background: rgb(59, 78, 89);
11
+ height: 100vh;
12
+ // background: linear-gradient(-20deg, #09b7b9 30%, #1c51a4 100%);
13
+ background-color: rgb(59, 78, 89);
14
+ }
15
+
16
+ .jumbotron {
17
+ background-color: rgb(59, 78, 89);
18
+ }
19
+
20
+ .vertical-center {
21
+ min-height: 100%;
22
+ /* Fallback for browsers do NOT support vh unit */
23
+ min-height: 100vh;
24
+ /* These two lines are counted as one :-) */
25
+ display: flex;
26
+ align-items: center;
27
+ }
28
+
29
+ #up-arrow {
30
+ bottom: -2em;
31
+ margin-right: auto;
32
+ margin-left: auto;
33
+ opacity: 0.2;
34
+ filter: alpha(opacity=20);
35
+ /* For IE8 and earlier */
36
+ }
37
+
38
+ .fa-pencil:before,
39
+ .icon-pencil:before {
40
+ content: "\f044";
27
41
  }
28
42
 
29
43
  .page-header.dashboard {
@@ -83,30 +83,4 @@
83
83
 
84
84
  body.rails_admin .sidebar-nav {
85
85
  top: 0px;
86
- }
87
- // @media(min-width:768px) {
88
- // #wrapper {
89
- // padding-left: 250px;
90
- // }
91
- // #wrapper.toggled {
92
- // padding-left: 0;
93
- // }
94
- // #sidebar-wrapper {
95
- // width: 250px;
96
- // z-index: 10000;
97
- // }
98
- // #wrapper.toggled #sidebar-wrapper {
99
- // width: 0;
100
- // z-index: 10000;
101
- // }
102
- // #page-content-wrapper {
103
- // padding: 20px;
104
- // position: absolute;
105
- // z-index: 20000;
106
- // }
107
- // #wrapper.toggled #page-content-wrapper {
108
- // position: absolute;
109
- // margin-right: 0;
110
- // z-index: 20000;
111
- // }
112
- // }
86
+ }
@@ -0,0 +1,32 @@
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_tree .
16
+ *= require_self
17
+ */
18
+ @import "jquery-ui";
19
+ @import "jquery-ui/dialog";
20
+ @import 'bootstrap-sprockets';
21
+ @import 'bootstrap';
22
+ @import "rails_admin/theming";
23
+ @import 'devise';
24
+ @import 'animate';
25
+ @import 'mixins';
26
+
27
+ #new_user {
28
+ background-color: red;
29
+ }
30
+ body {
31
+ background-color: green;
32
+ }
@@ -0,0 +1,43 @@
1
+ class PagesController < ApplicationController
2
+ before_action :authenticate_user!, only: [
3
+ :inside, :contact
4
+ ]
5
+
6
+ # So the static link navigation can be set runtime (yes it's an hack
7
+ # since I have to set this dynamically at runtime, using a class
8
+ # continously re-evaluated)
9
+ RailsAdmin.config do |config|
10
+ config.navigation_static_label = I18n.t('admin.links.label')
11
+ end
12
+
13
+ def home
14
+ end
15
+
16
+ def inside
17
+ end
18
+
19
+
20
+ def email
21
+ @name = params[:name]
22
+ @email = params[:email]
23
+ @message = params[:message]
24
+
25
+ if @name.blank?
26
+ flash[:alert] = "Please enter your name before sending your message. Thank you."
27
+ render :contact
28
+ elsif @email.blank? || @email.scan(/\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i).size < 1
29
+ flash[:alert] = "You must provide a valid email address before sending your message. Thank you."
30
+ render :contact
31
+ elsif @message.blank? || @message.length < 10
32
+ flash[:alert] = "Your message is empty. Requires at least 10 characters. Nothing to send."
33
+ render :contact
34
+ elsif @message.scan(/<a href=/).size > 0 || @message.scan(/\[url=/).size > 0 || @message.scan(/\[link=/).size > 0 || @message.scan(/http:\/\//).size > 0
35
+ flash[:alert] = "You can't send links. Thank you for your understanding."
36
+ render :contact
37
+ else
38
+ ContactMailer.contact_message(@name,@email,@message).deliver_now
39
+ redirect_to root_path, notice: "Your message was sent. Thank you."
40
+ end
41
+ end
42
+
43
+ end
@@ -1,9 +1,5 @@
1
1
  require 'rails_admin'
2
2
 
3
- require "thecore_actions"
4
-
5
- include TheCoreActions
6
-
7
3
  RailsAdmin.config do |config|
8
4
  # config.main_app_name = Proc.new { |controller|
9
5
  # [(Settings.app_name rescue (ENV["APP_NAME"] || "TheCore App")), "#{controller.params[:action].try(:titleize)} (#{Time.zone.now.to_s(:time)})"]