caseadilla 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +18 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +33 -0
- data/Rakefile +1 -0
- data/app/assets/fonts/caseadilla/glyphicons-halflings-regular.eot +0 -0
- data/app/assets/fonts/caseadilla/glyphicons-halflings-regular.svg +229 -0
- data/app/assets/fonts/caseadilla/glyphicons-halflings-regular.ttf +0 -0
- data/app/assets/fonts/caseadilla/glyphicons-halflings-regular.woff +0 -0
- data/app/assets/images/caseadilla/caseadilla.png +0 -0
- data/app/assets/javascripts/caseadilla/bootstrap.js +2114 -0
- data/app/assets/javascripts/caseadilla/bootstrap3-wysihtml5.js +521 -0
- data/app/assets/javascripts/caseadilla/caseadilla.js +51 -0
- data/app/assets/javascripts/caseadilla/html5shiv.js +8 -0
- data/app/assets/javascripts/caseadilla/wysihtml5-0.3.0.min.js +261 -0
- data/app/assets/stylesheets/caseadilla/bootstrap-glyphicons.css.scss +2 -0
- data/app/assets/stylesheets/caseadilla/bootstrap-theme.css +442 -0
- data/app/assets/stylesheets/caseadilla/bootstrap-wysihtml5.css +102 -0
- data/app/assets/stylesheets/caseadilla/bootstrap.css +6203 -0
- data/app/assets/stylesheets/caseadilla/caseadilla-bootstrap-overrides.css.scss +80 -0
- data/app/assets/stylesheets/caseadilla/caseadilla.scss +270 -0
- data/app/assets/stylesheets/caseadilla/login.css.scss +81 -0
- data/app/controllers/caseadilla/caseadilla_controller.rb +57 -0
- data/app/controllers/caseadilla/caseadilla_user_sessions_controller.rb +36 -0
- data/app/controllers/caseadilla/password_resets_controller.rb +64 -0
- data/app/controllers/caseadilla/roles_controller.rb +65 -0
- data/app/controllers/caseadilla/users_controller.rb +118 -0
- data/app/helpers/caseadilla/caseadilla_helper.rb +262 -0
- data/app/mailers/caseadilla/caseadilla_notification.rb +39 -0
- data/app/views/caseadilla/caseadilla/blank.html.erb +12 -0
- data/app/views/caseadilla/caseadilla_notification/generate_new_password.erb +12 -0
- data/app/views/caseadilla/caseadilla_notification/new_user_information.erb +12 -0
- data/app/views/caseadilla/caseadilla_notification/password_reset_instructions.erb +11 -0
- data/app/views/caseadilla/caseadilla_user_sessions/new.html.erb +39 -0
- data/app/views/caseadilla/roles/_form.html.erb +11 -0
- data/app/views/caseadilla/roles/_table.html.erb +28 -0
- data/app/views/caseadilla/roles/index.html.erb +15 -0
- data/app/views/caseadilla/roles/new.html.erb +18 -0
- data/app/views/caseadilla/roles/show.html.erb +18 -0
- data/app/views/caseadilla/users/index.html.erb +37 -0
- data/app/views/caseadilla/users/new.html.erb +50 -0
- data/app/views/caseadilla/users/show.html.erb +39 -0
- data/app/views/layouts/caseadilla_auth.html.erb +36 -0
- data/app/views/layouts/caseadilla_main.html.erb +119 -0
- data/caseadilla.gemspec +49 -0
- data/config/initializers/will_paginate.rb +40 -0
- data/config/routes.rb +23 -0
- data/lib/caseadilla.rb +14 -0
- data/lib/caseadilla/engine.rb +35 -0
- data/lib/caseadilla/version.rb +3 -0
- data/lib/generators/caseadilla/install/install_generator.rb +154 -0
- data/lib/generators/caseadilla/install/templates/app/assets/javascripts/caseadilla/custom.js +2 -0
- data/lib/generators/caseadilla/install/templates/app/assets/stylesheets/caseadilla/custom.css.scss +2 -0
- data/lib/generators/caseadilla/install/templates/app/helpers/caseadilla/config_helper.rb +45 -0
- data/lib/generators/caseadilla/install/templates/app/models/user.rb +24 -0
- data/lib/generators/caseadilla/install/templates/app/views/caseadilla/layouts/_tab_navigation.html.erb +2 -0
- data/lib/generators/caseadilla/install/templates/app/views/caseadilla/layouts/_top_navigation.html.erb +4 -0
- data/lib/generators/caseadilla/install/templates/public/robots.txt +5 -0
- data/lib/generators/caseadilla/install/templates/steak/config/initializers/caseadilla.rb +8 -0
- data/lib/generators/caseadilla/install/templates/steak/db/migrate/add_name_to_users.rb +9 -0
- data/lib/generators/caseadilla/install/templates/veggie/config/initializers/caseadilla.rb +8 -0
- data/lib/generators/caseadilla/scaffold/scaffold_generator.rb +111 -0
- data/lib/generators/caseadilla/scaffold/templates/controller.rb +72 -0
- data/lib/generators/caseadilla/scaffold/templates/migration.rb +13 -0
- data/lib/generators/caseadilla/scaffold/templates/model.rb +3 -0
- data/lib/generators/caseadilla/scaffold/templates/views/_form.html.erb +12 -0
- data/lib/generators/caseadilla/scaffold/templates/views/_table.html.erb +19 -0
- data/lib/generators/caseadilla/scaffold/templates/views/index.html.erb +15 -0
- data/lib/generators/caseadilla/scaffold/templates/views/new.html.erb +18 -0
- data/lib/generators/caseadilla/scaffold/templates/views/show.html.erb +18 -0
- data/lib/railties/tasks.rake +32 -0
- metadata +231 -0
@@ -0,0 +1,80 @@
|
|
1
|
+
/* BOOTSTRAP OVERRIDES */
|
2
|
+
|
3
|
+
.alert {
|
4
|
+
line-height: 22px;
|
5
|
+
padding: 10px 15px 10px 15px;
|
6
|
+
}
|
7
|
+
|
8
|
+
.alert-dismissible {
|
9
|
+
padding-right: 35px;
|
10
|
+
}
|
11
|
+
|
12
|
+
.navbar-toggle {
|
13
|
+
top: 54px;
|
14
|
+
left: 15px;
|
15
|
+
}
|
16
|
+
|
17
|
+
.navbar-brand {
|
18
|
+
padding-top: 10px;
|
19
|
+
padding-bottom: 25px;
|
20
|
+
}
|
21
|
+
|
22
|
+
.navbar-nav > li > a:hover,
|
23
|
+
.navbar-nav > li > a:focus {
|
24
|
+
color: #000000;
|
25
|
+
border: 1px solid #cdcdcd;
|
26
|
+
padding: 14px 9px 14px 9px;
|
27
|
+
}
|
28
|
+
|
29
|
+
.navbar-nav > .active > a,
|
30
|
+
.navbar-nav > .active > a:hover,
|
31
|
+
.navbar-nav > .active > a:focus {
|
32
|
+
color: #000000;
|
33
|
+
border: 0px;
|
34
|
+
padding: 15px 10px 15px 10px;
|
35
|
+
}
|
36
|
+
|
37
|
+
.navbar-nav > li > a {
|
38
|
+
color: #555555;
|
39
|
+
padding: 15px 10px 15px 10px;
|
40
|
+
margin: 3px 0px 3px 0px;
|
41
|
+
border-radius: 6px;
|
42
|
+
}
|
43
|
+
|
44
|
+
.pagination {
|
45
|
+
margin: 10px 0px 0px 0px;
|
46
|
+
}
|
47
|
+
|
48
|
+
@media screen and (min-width: 768px) {
|
49
|
+
|
50
|
+
.navbar-brand {
|
51
|
+
padding-top: 5px;
|
52
|
+
padding-bottom: 5px;
|
53
|
+
margin-left: 1px;
|
54
|
+
}
|
55
|
+
|
56
|
+
.navbar-nav {
|
57
|
+
margin-top: 15px;
|
58
|
+
margin-bottom: 15px;
|
59
|
+
}
|
60
|
+
|
61
|
+
.navbar-nav > li > a:hover,
|
62
|
+
.navbar-nav > li > a:focus {
|
63
|
+
border: 1px solid #cdcdcd;
|
64
|
+
padding: 4px 9px 4px 9px;
|
65
|
+
}
|
66
|
+
|
67
|
+
.navbar-nav > .active > a,
|
68
|
+
.navbar-nav > .active > a:hover,
|
69
|
+
.navbar-nav > .active > a:focus {
|
70
|
+
border: 0px;
|
71
|
+
padding: 5px 10px 5px 10px;
|
72
|
+
}
|
73
|
+
|
74
|
+
.navbar-nav > li > a {
|
75
|
+
padding: 5px 10px 5px 10px;
|
76
|
+
margin: 5px 5px 5px 5px;
|
77
|
+
border-radius: 6px;
|
78
|
+
}
|
79
|
+
|
80
|
+
}
|
@@ -0,0 +1,270 @@
|
|
1
|
+
/*
|
2
|
+
*= require ./bootstrap.css
|
3
|
+
*= require ./bootstrap-glyphicons.css
|
4
|
+
*= require ./caseadilla-bootstrap-overrides.css
|
5
|
+
*= require ./bootstrap-wysihtml5.css
|
6
|
+
*/
|
7
|
+
|
8
|
+
/* Caseadilla LAYOUT */
|
9
|
+
|
10
|
+
@media (min-width: 992px){
|
11
|
+
|
12
|
+
#left-column {
|
13
|
+
float: left;
|
14
|
+
}
|
15
|
+
|
16
|
+
#right-column {
|
17
|
+
float: right;
|
18
|
+
}
|
19
|
+
|
20
|
+
}
|
21
|
+
|
22
|
+
/* Caseadilla NAVIGATION BAR */
|
23
|
+
|
24
|
+
.caseadilla-tab-separator {
|
25
|
+
display: none;
|
26
|
+
}
|
27
|
+
|
28
|
+
@media (min-width: 768px){
|
29
|
+
.caseadilla-tab-separator {
|
30
|
+
display: block;
|
31
|
+
float: left;
|
32
|
+
width: 9px;
|
33
|
+
height: 12px;
|
34
|
+
border-right: 1px solid #cdcdcd;
|
35
|
+
margin-right: 10px;
|
36
|
+
margin-top: 15px;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
#user-info {
|
41
|
+
font-size: 12px;
|
42
|
+
padding-top: 10px;
|
43
|
+
height: auto;
|
44
|
+
}
|
45
|
+
|
46
|
+
#user-info ul {
|
47
|
+
list-style: none;
|
48
|
+
float: right;
|
49
|
+
}
|
50
|
+
|
51
|
+
#user-info li {
|
52
|
+
float: left;
|
53
|
+
border-right: 1px solid #ddd;
|
54
|
+
padding: 3px 8px 3px 8px;
|
55
|
+
margin: 0;
|
56
|
+
color: #888;
|
57
|
+
}
|
58
|
+
|
59
|
+
#user-info li.last-item {
|
60
|
+
border-right: none;
|
61
|
+
}
|
62
|
+
|
63
|
+
#user-info li a {
|
64
|
+
color: #555;
|
65
|
+
text-decoration: none;
|
66
|
+
}
|
67
|
+
|
68
|
+
#user-info li a:hover {
|
69
|
+
color: #000;
|
70
|
+
border-bottom: 1px solid #000;
|
71
|
+
}
|
72
|
+
|
73
|
+
#user-info li.signout:hover {
|
74
|
+
border-radius: 6px;
|
75
|
+
background-color: #da0404;
|
76
|
+
}
|
77
|
+
|
78
|
+
#user-info li.signout a:hover {
|
79
|
+
color: #eee;
|
80
|
+
border-bottom: none;
|
81
|
+
}
|
82
|
+
|
83
|
+
#user-info li.signout:hover a {
|
84
|
+
color: #eee;
|
85
|
+
}
|
86
|
+
|
87
|
+
/* Caseadilla CONTENT GENERAL */
|
88
|
+
|
89
|
+
.password-checkbox {
|
90
|
+
margin-bottom: 15px;
|
91
|
+
}
|
92
|
+
|
93
|
+
small.pagination-details {
|
94
|
+
font-size: 0.5em;
|
95
|
+
}
|
96
|
+
|
97
|
+
div#content {
|
98
|
+
margin-bottom: 20px;
|
99
|
+
}
|
100
|
+
|
101
|
+
#content h2 {
|
102
|
+
font-size: 20px;
|
103
|
+
font-weight: bold;
|
104
|
+
color: #111;
|
105
|
+
border-bottom: 2px solid #eee;
|
106
|
+
padding: 0 0 10px 0;
|
107
|
+
margin: 0 0 15px 0;
|
108
|
+
position: relative;
|
109
|
+
line-height: 26px;
|
110
|
+
}
|
111
|
+
|
112
|
+
.content-bottom-padding {
|
113
|
+
padding-bottom: 20px;
|
114
|
+
}
|
115
|
+
|
116
|
+
footer p {
|
117
|
+
font-size: 10px;
|
118
|
+
text-align: right;
|
119
|
+
color: #ccc;
|
120
|
+
}
|
121
|
+
|
122
|
+
footer p a {
|
123
|
+
color: #ccc;
|
124
|
+
}
|
125
|
+
|
126
|
+
footer p a:hover {
|
127
|
+
color: #aaa;
|
128
|
+
}
|
129
|
+
|
130
|
+
.icon {
|
131
|
+
position: relative;
|
132
|
+
top: 1px;
|
133
|
+
float: left;
|
134
|
+
height: 14px;
|
135
|
+
width: 14px;
|
136
|
+
margin-right: 5px;
|
137
|
+
font-size: 14px;
|
138
|
+
padding: 0px;
|
139
|
+
vertical-align: baseline;
|
140
|
+
}
|
141
|
+
|
142
|
+
/* Caseadilla TABLES */
|
143
|
+
|
144
|
+
#content .table {
|
145
|
+
border-collapse: collapse;
|
146
|
+
width: 100%;
|
147
|
+
font-size: 12px;
|
148
|
+
border-bottom: 2px solid #ccc;
|
149
|
+
}
|
150
|
+
|
151
|
+
#content .table .center {
|
152
|
+
text-align: center;
|
153
|
+
}
|
154
|
+
|
155
|
+
#content .table .icon {
|
156
|
+
width: 16px;
|
157
|
+
}
|
158
|
+
|
159
|
+
#content .table thead {
|
160
|
+
border-bottom: 2px solid #ccc;
|
161
|
+
}
|
162
|
+
|
163
|
+
#content .table th div.table-header-icon {
|
164
|
+
display: inline-block;
|
165
|
+
margin-left: 5px;
|
166
|
+
width: 12px;
|
167
|
+
height: 12px;
|
168
|
+
color: #555;
|
169
|
+
position: relative;
|
170
|
+
top: 1px;
|
171
|
+
}
|
172
|
+
|
173
|
+
#content .table td {
|
174
|
+
padding: 0px;
|
175
|
+
font-size: 12px;
|
176
|
+
margin: 0px;
|
177
|
+
line-height: 18px;
|
178
|
+
}
|
179
|
+
|
180
|
+
#content .table td a {
|
181
|
+
display: block;
|
182
|
+
color: #333;
|
183
|
+
text-decoration: none;
|
184
|
+
padding: 15px 10px 15px 10px;
|
185
|
+
}
|
186
|
+
|
187
|
+
#content .table td .no-link {
|
188
|
+
display: block;
|
189
|
+
color: #333;
|
190
|
+
padding: 15px 10px 15px 10px;
|
191
|
+
}
|
192
|
+
|
193
|
+
.iconRow {
|
194
|
+
height: 16px;
|
195
|
+
width: 16px;
|
196
|
+
padding: 2px;
|
197
|
+
font-size: 12px;
|
198
|
+
}
|
199
|
+
|
200
|
+
#content .table td.locked {
|
201
|
+
width: 30px;
|
202
|
+
padding: 13px 10px 0px 10px;
|
203
|
+
}
|
204
|
+
|
205
|
+
#content .table td.delete {
|
206
|
+
width: 30px;
|
207
|
+
}
|
208
|
+
|
209
|
+
#content .table td.delete:hover .iconRow {
|
210
|
+
border-radius: 4px;
|
211
|
+
background-color: #da0404;
|
212
|
+
color: #ffffff;
|
213
|
+
}
|
214
|
+
|
215
|
+
#content .table td.delete a {
|
216
|
+
padding: 13px 10px 0px 10px;
|
217
|
+
}
|
218
|
+
|
219
|
+
#content .submits {
|
220
|
+
width: 100%;
|
221
|
+
text-align: right;
|
222
|
+
border-radius: 4px;
|
223
|
+
font-size: 12px;
|
224
|
+
padding: 10px 10px;
|
225
|
+
background-color: #eee;
|
226
|
+
margin-bottom: 30px;
|
227
|
+
}
|
228
|
+
|
229
|
+
/* Caseadilla FORMS */
|
230
|
+
|
231
|
+
label.control-label small {
|
232
|
+
font-weight: normal;
|
233
|
+
color: #666;
|
234
|
+
margin-left: 5px;
|
235
|
+
font-size: 0.8em;
|
236
|
+
}
|
237
|
+
|
238
|
+
.caseadilla-date-select select {
|
239
|
+
width: 28%;
|
240
|
+
display: inline-block;
|
241
|
+
margin-left: 2%;
|
242
|
+
margin-right: 2%
|
243
|
+
}
|
244
|
+
|
245
|
+
.caseadilla-time-select select {
|
246
|
+
width: 44%;
|
247
|
+
display: inline-block;
|
248
|
+
margin-left: 2%;
|
249
|
+
margin-right: 2%
|
250
|
+
}
|
251
|
+
|
252
|
+
.caseadilla-datetime-select select {
|
253
|
+
width: 27%;
|
254
|
+
display: inline-block;
|
255
|
+
margin-left: 2%;
|
256
|
+
margin-right: 2%;
|
257
|
+
margin-bottom: 20px;
|
258
|
+
}
|
259
|
+
|
260
|
+
ul.wysihtml5-toolbar ul.dropdown-menu {
|
261
|
+
top: 84px;
|
262
|
+
left: 5px;
|
263
|
+
}
|
264
|
+
|
265
|
+
@media (min-width: 992px){
|
266
|
+
div.col-lg-12 .caseadilla-datetime-select select {
|
267
|
+
width: 14%;
|
268
|
+
margin-bottom: 0px;
|
269
|
+
}
|
270
|
+
}
|
@@ -0,0 +1,81 @@
|
|
1
|
+
/*
|
2
|
+
*= require ./bootstrap.css
|
3
|
+
*= require ./bootstrap-glyphicons.css
|
4
|
+
*= require ./caseadilla-bootstrap-overrides.css
|
5
|
+
*/
|
6
|
+
|
7
|
+
body {
|
8
|
+
padding-top: 0px;
|
9
|
+
padding-bottom: 0px;
|
10
|
+
}
|
11
|
+
|
12
|
+
.container-narrow {
|
13
|
+
margin: 0 auto;
|
14
|
+
max-width: 400px;
|
15
|
+
}
|
16
|
+
|
17
|
+
.alert {
|
18
|
+
text-align: center;
|
19
|
+
}
|
20
|
+
|
21
|
+
.brand {
|
22
|
+
margin-top: 20px;
|
23
|
+
margin-bottom: 40px;
|
24
|
+
}
|
25
|
+
|
26
|
+
.form-group .checkbox-inline label {
|
27
|
+
margin-top: 5px;
|
28
|
+
margin-bottom: 20px;
|
29
|
+
font-weight: normal;
|
30
|
+
}
|
31
|
+
|
32
|
+
.form-group .checkbox-inline input[type="checkbox"] {
|
33
|
+
margin-top: 1px;
|
34
|
+
}
|
35
|
+
|
36
|
+
.form-group input {
|
37
|
+
text-align: center;
|
38
|
+
}
|
39
|
+
|
40
|
+
form#new_user input.btn-large {
|
41
|
+
background-color: rgb(220, 120, 40);
|
42
|
+
border-color: rgb(175, 92, 32);
|
43
|
+
}
|
44
|
+
|
45
|
+
.jumbotron {
|
46
|
+
padding: 20px;
|
47
|
+
margin-bottom: 20px;
|
48
|
+
font-size: 14px;
|
49
|
+
line-height: 1;
|
50
|
+
background-color: #eeeeee;
|
51
|
+
text-align: center;
|
52
|
+
border-bottom: 1px solid #e5e5e5;
|
53
|
+
}
|
54
|
+
|
55
|
+
footer p {
|
56
|
+
font-size: 13px;
|
57
|
+
text-align: center;
|
58
|
+
color: #888;
|
59
|
+
}
|
60
|
+
|
61
|
+
footer p a {
|
62
|
+
color: #555;
|
63
|
+
}
|
64
|
+
|
65
|
+
footer p a:hover {
|
66
|
+
color: #000;
|
67
|
+
text-decoration: none;
|
68
|
+
}
|
69
|
+
|
70
|
+
@media screen and (min-width: 768px) {
|
71
|
+
.jumbotron {
|
72
|
+
border-bottom: 0;
|
73
|
+
padding: 20px;
|
74
|
+
border-radius: 6px;
|
75
|
+
}
|
76
|
+
|
77
|
+
body {
|
78
|
+
padding-top: 40px;
|
79
|
+
padding-bottom: 20px;
|
80
|
+
}
|
81
|
+
}
|
@@ -0,0 +1,57 @@
|
|
1
|
+
module Caseadilla
|
2
|
+
class CaseadillaController < ApplicationController
|
3
|
+
|
4
|
+
require 'caseadilla/caseadilla_helper'
|
5
|
+
include Caseadilla::CaseadillaHelper
|
6
|
+
|
7
|
+
require 'caseadilla/config_helper'
|
8
|
+
include Caseadilla::ConfigHelper
|
9
|
+
|
10
|
+
layout 'caseadilla_main'
|
11
|
+
|
12
|
+
# before_filter :set_time_zone
|
13
|
+
before_action :require_sign_in
|
14
|
+
|
15
|
+
ActionView::Base.field_error_proc = proc { |input, instance| "#{input}".html_safe }
|
16
|
+
|
17
|
+
def index
|
18
|
+
redirect_to caseadilla_config_dashboard_url
|
19
|
+
end
|
20
|
+
|
21
|
+
def blank
|
22
|
+
@caseadilla_page_title = "Welcome"
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def steak?
|
28
|
+
return false unless Caseadilla::Engine.flavor = :steak
|
29
|
+
end
|
30
|
+
|
31
|
+
def chicken?
|
32
|
+
return false unless Caseadilla::Engine.flavor = :chicken
|
33
|
+
end
|
34
|
+
|
35
|
+
def veggie?
|
36
|
+
return false unless Caseadilla::Engine.flavor = :veggie
|
37
|
+
end
|
38
|
+
|
39
|
+
# def set_time_zone
|
40
|
+
# Time.zone = current_user.time_zone if current_user
|
41
|
+
# end
|
42
|
+
|
43
|
+
def redirect_back_or_default(default)
|
44
|
+
redirect_to(session[:return_to] || default)
|
45
|
+
session[:return_to] = nil
|
46
|
+
end
|
47
|
+
|
48
|
+
def sort_order(default)
|
49
|
+
"#{(params[:c] || default.to_s).gsub(/[\s;'\"]/,'')} #{'ASC' if params[:d] == 'up'} #{'DESC' if params[:d] == 'down'}"
|
50
|
+
end
|
51
|
+
|
52
|
+
def require_sign_in
|
53
|
+
redirect_to caseadilla_sign_in_path unless user_signed_in?
|
54
|
+
end
|
55
|
+
|
56
|
+
end
|
57
|
+
end
|