grandstand 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/MIT-LICENSE +20 -0
- data/README +7 -0
- data/Rakefile +44 -0
- data/VERSION +1 -0
- data/app/controllers/admin/galleries_controller.rb +52 -0
- data/app/controllers/admin/images_controller.rb +68 -0
- data/app/controllers/admin/main_controller.rb +36 -0
- data/app/controllers/admin/pages_controller.rb +51 -0
- data/app/controllers/admin/posts_controller.rb +48 -0
- data/app/controllers/admin/sessions_controller.rb +41 -0
- data/app/controllers/admin/templates_controller.rb +6 -0
- data/app/controllers/admin/users_controller.rb +48 -0
- data/app/controllers/galleries_controller.rb +5 -0
- data/app/controllers/pages_controller.rb +5 -0
- data/app/controllers/posts_controller.rb +5 -0
- data/app/helpers/admin/main_helper.rb +31 -0
- data/app/helpers/admin/pages_helper.rb +2 -0
- data/app/helpers/admin/posts_helper.rb +2 -0
- data/app/helpers/admin/sessions_helper.rb +2 -0
- data/app/helpers/admin/templates_helper.rb +2 -0
- data/app/helpers/admin/users_helper.rb +2 -0
- data/app/helpers/pages_helper.rb +2 -0
- data/app/helpers/posts_helper.rb +2 -0
- data/app/helpers/site_helper.rb +2 -0
- data/app/models/gallery.rb +22 -0
- data/app/models/image.rb +61 -0
- data/app/models/page.rb +45 -0
- data/app/models/page_section.rb +6 -0
- data/app/models/post.rb +27 -0
- data/app/models/template.rb +33 -0
- data/app/models/user.rb +68 -0
- data/app/stylesheets/_buttons.less +76 -0
- data/app/stylesheets/_dialogs.less +85 -0
- data/app/stylesheets/application.less +238 -0
- data/app/stylesheets/global.less +435 -0
- data/app/stylesheets/login.less +30 -0
- data/app/stylesheets/wysiwyg.less +96 -0
- data/app/views/admin/galleries/_form.html.erb +11 -0
- data/app/views/admin/galleries/_gallery.html.erb +16 -0
- data/app/views/admin/galleries/_list.html.erb +17 -0
- data/app/views/admin/galleries/delete.html.erb +8 -0
- data/app/views/admin/galleries/edit.html.erb +8 -0
- data/app/views/admin/galleries/editor.html.erb +13 -0
- data/app/views/admin/galleries/editor_with_images.html.erb +19 -0
- data/app/views/admin/galleries/index.html.erb +13 -0
- data/app/views/admin/galleries/new.html.erb +8 -0
- data/app/views/admin/galleries/show.html.erb +15 -0
- data/app/views/admin/images/_form.html.erb +11 -0
- data/app/views/admin/images/delete.html.erb +8 -0
- data/app/views/admin/images/edit.html.erb +8 -0
- data/app/views/admin/images/new.html.erb +8 -0
- data/app/views/admin/images/upload.html.erb +11 -0
- data/app/views/admin/main/index.html.erb +10 -0
- data/app/views/admin/pages/_form.html.erb +33 -0
- data/app/views/admin/pages/_left.html.erb +3 -0
- data/app/views/admin/pages/_row.html.erb +9 -0
- data/app/views/admin/pages/delete.html.erb +8 -0
- data/app/views/admin/pages/edit.html.erb +8 -0
- data/app/views/admin/pages/index.html.erb +20 -0
- data/app/views/admin/pages/new.html.erb +8 -0
- data/app/views/admin/pages/show.html.erb +3 -0
- data/app/views/admin/posts/_form.html.erb +29 -0
- data/app/views/admin/posts/_left.html.erb +3 -0
- data/app/views/admin/posts/_list.html.erb +22 -0
- data/app/views/admin/posts/delete.html.erb +9 -0
- data/app/views/admin/posts/edit.html.erb +10 -0
- data/app/views/admin/posts/index.html.erb +10 -0
- data/app/views/admin/posts/new.html.erb +10 -0
- data/app/views/admin/posts/show.html.erb +4 -0
- data/app/views/admin/sessions/forgot.html.erb +8 -0
- data/app/views/admin/sessions/show.html.erb +12 -0
- data/app/views/admin/shared/_flash.html.erb +3 -0
- data/app/views/admin/users/_form.html.erb +16 -0
- data/app/views/admin/users/_left.html.erb +3 -0
- data/app/views/admin/users/delete.html.erb +10 -0
- data/app/views/admin/users/edit.html.erb +8 -0
- data/app/views/admin/users/index.html.erb +22 -0
- data/app/views/admin/users/new.html.erb +8 -0
- data/app/views/admin/users/show.html.erb +12 -0
- data/app/views/galleries/index.html.erb +0 -0
- data/app/views/galleries/show.html.erb +12 -0
- data/app/views/layouts/admin.html.erb +80 -0
- data/app/views/layouts/admin_login.html.erb +17 -0
- data/app/views/layouts/admin_xhr.html.erb +3 -0
- data/app/views/pages/show.html.erb +8 -0
- data/app/views/posts/show.html.erb +3 -0
- data/app/views/shared/404.html.erb +5 -0
- data/app/views/shared/gallery.html +14 -0
- data/app/views/shared/image.html +1 -0
- data/app/views/shared/page.html +0 -0
- data/app/views/shared/post.html +3 -0
- data/grandstand.gemspec +189 -0
- data/lib/grandstand/application.rb +50 -0
- data/lib/grandstand/controller/development.rb +15 -0
- data/lib/grandstand/controller.rb +104 -0
- data/lib/grandstand/helper.rb +117 -0
- data/lib/grandstand/routes.rb +59 -0
- data/lib/grandstand/session.rb +25 -0
- data/lib/grandstand.rb +27 -0
- data/public/.DS_Store +0 -0
- data/public/admin/.DS_Store +0 -0
- data/public/admin/images/.DS_Store +0 -0
- data/public/admin/images/background-input.gif +0 -0
- data/public/admin/images/background-progress-bar.png +0 -0
- data/public/admin/images/background-progress-complete.gif +0 -0
- data/public/admin/images/background-progress.gif +0 -0
- data/public/admin/images/icons/.DS_Store +0 -0
- data/public/admin/images/icons/add.png +0 -0
- data/public/admin/images/icons/collapse.png +0 -0
- data/public/admin/images/icons/delete.png +0 -0
- data/public/admin/images/icons/edit.png +0 -0
- data/public/admin/images/icons/editor/bold.png +0 -0
- data/public/admin/images/icons/editor/gallery.png +0 -0
- data/public/admin/images/icons/editor/image-center.png +0 -0
- data/public/admin/images/icons/editor/image-left.png +0 -0
- data/public/admin/images/icons/editor/image-right.png +0 -0
- data/public/admin/images/icons/editor/image.png +0 -0
- data/public/admin/images/icons/editor/italic.png +0 -0
- data/public/admin/images/icons/editor/ordered-list.png +0 -0
- data/public/admin/images/icons/editor/quote.png +0 -0
- data/public/admin/images/icons/editor/source.png +0 -0
- data/public/admin/images/icons/editor/strikethrough.png +0 -0
- data/public/admin/images/icons/editor/underline.png +0 -0
- data/public/admin/images/icons/editor/unordered-list.png +0 -0
- data/public/admin/images/icons/error.png +0 -0
- data/public/admin/images/icons/expand.png +0 -0
- data/public/admin/images/icons/galleries.png +0 -0
- data/public/admin/images/icons/gallery.png +0 -0
- data/public/admin/images/icons/image.png +0 -0
- data/public/admin/images/icons/okay.png +0 -0
- data/public/admin/images/icons/pages.png +0 -0
- data/public/admin/images/icons/posts.png +0 -0
- data/public/admin/images/icons/upload.png +0 -0
- data/public/admin/images/icons/users.png +0 -0
- data/public/admin/images/logo.png +0 -0
- data/public/admin/images/spinner-dark.gif +0 -0
- data/public/admin/images/uploader.swf +0 -0
- data/public/admin/javascripts/application.js +231 -0
- data/public/admin/javascripts/jquery.js +404 -0
- data/public/admin/javascripts/mustache.js +324 -0
- data/public/admin/javascripts/selection.js +280 -0
- data/public/admin/javascripts/string.js +264 -0
- data/public/admin/javascripts/wysiwyg.js +335 -0
- data/public/admin/stylesheets/application.css +1 -0
- data/public/admin/stylesheets/global.css +1 -0
- data/public/admin/stylesheets/login.css +1 -0
- data/public/admin/stylesheets/wysiwyg-content.css +20 -0
- data/public/admin/stylesheets/wysiwyg.css +1 -0
- data/vendor/cache/more-0.1.1.gem +0 -0
- metadata +216 -0
@@ -0,0 +1,435 @@
|
|
1
|
+
/*
|
2
|
+
global.less contains the styling for rendering the admin UI in any context, assuming
|
3
|
+
it lives somewhere underneath a .admin item. This will allow you to take global UI
|
4
|
+
elements and apply them externally or internally - whatever you feel like.
|
5
|
+
*/
|
6
|
+
@import url('_buttons');
|
7
|
+
|
8
|
+
body, html {
|
9
|
+
min-height:100%;
|
10
|
+
}
|
11
|
+
|
12
|
+
body.admin {
|
13
|
+
background-color:#fff;
|
14
|
+
background-image:-moz-linear-gradient(top, #fff, #eee);
|
15
|
+
background-image:-webkit-gradient(linear, left top, left bottom, from(#fff), to(#eee));
|
16
|
+
font:12px Arial, sans-serif;
|
17
|
+
margin:0;
|
18
|
+
padding:0;
|
19
|
+
}
|
20
|
+
|
21
|
+
.admin {
|
22
|
+
/* HTML Tags (excluding form input elements) */
|
23
|
+
a {
|
24
|
+
cursor:pointer;
|
25
|
+
text-decoration:none;
|
26
|
+
}
|
27
|
+
|
28
|
+
a img {
|
29
|
+
border-width:0;
|
30
|
+
}
|
31
|
+
|
32
|
+
form {
|
33
|
+
label {
|
34
|
+
color:#666;
|
35
|
+
display:block;
|
36
|
+
font:bold 12px Arial;
|
37
|
+
margin-bottom:3px;
|
38
|
+
}
|
39
|
+
|
40
|
+
.field {
|
41
|
+
margin:0;
|
42
|
+
padding:10px 5px;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
h1, h2 {
|
47
|
+
font-family:'Calibiri', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
48
|
+
|
49
|
+
.button {
|
50
|
+
margin-left:10px;
|
51
|
+
vertical-align:center;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
h1 {
|
56
|
+
margin:0 0 10px 0;
|
57
|
+
font-size:16pt;
|
58
|
+
}
|
59
|
+
|
60
|
+
h2 {
|
61
|
+
margin:0 0 5px 0;
|
62
|
+
font-size:14pt;
|
63
|
+
}
|
64
|
+
|
65
|
+
table {
|
66
|
+
border-collapse:collapse;
|
67
|
+
border-spacing:0;
|
68
|
+
width:100%;
|
69
|
+
}
|
70
|
+
|
71
|
+
table {
|
72
|
+
tbody, tr {
|
73
|
+
width:100%;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
|
78
|
+
/* Tag-specific classes */
|
79
|
+
select.error {
|
80
|
+
border:1px solid #f00;
|
81
|
+
}
|
82
|
+
|
83
|
+
select.multiple {
|
84
|
+
min-height:55px;
|
85
|
+
min-width:150px;
|
86
|
+
}
|
87
|
+
|
88
|
+
select.small {
|
89
|
+
width:50px;
|
90
|
+
}
|
91
|
+
|
92
|
+
textarea.small {
|
93
|
+
height:32px;
|
94
|
+
width:180px;
|
95
|
+
}
|
96
|
+
|
97
|
+
textarea.wysiwyg {
|
98
|
+
display:block;
|
99
|
+
height:400px;
|
100
|
+
width:100%;
|
101
|
+
}
|
102
|
+
|
103
|
+
textarea.error, input.error {
|
104
|
+
border:1px solid #f00 !important;
|
105
|
+
}
|
106
|
+
|
107
|
+
tr.item {
|
108
|
+
background-color:#fff;
|
109
|
+
}
|
110
|
+
|
111
|
+
tr.item.odd {
|
112
|
+
background-color:#edf3fe;
|
113
|
+
}
|
114
|
+
|
115
|
+
tr.item td {
|
116
|
+
padding:5px;
|
117
|
+
}
|
118
|
+
|
119
|
+
tr.item td.icon {
|
120
|
+
background-position:5px 2px;
|
121
|
+
padding-left:25px;
|
122
|
+
}
|
123
|
+
|
124
|
+
/* General Classes */
|
125
|
+
.container {
|
126
|
+
float:left;
|
127
|
+
margin:0 0 10px 10px;
|
128
|
+
padding:0 !important;
|
129
|
+
width:220px;
|
130
|
+
}
|
131
|
+
|
132
|
+
.container.gallery img {
|
133
|
+
display:none;
|
134
|
+
}
|
135
|
+
|
136
|
+
.container.gallery a img, .container.image img {
|
137
|
+
display:block;
|
138
|
+
padding:10px;
|
139
|
+
}
|
140
|
+
|
141
|
+
.container:hover {
|
142
|
+
background-color:#ececec;
|
143
|
+
}
|
144
|
+
|
145
|
+
.dropdown {
|
146
|
+
-moz-border-radius-bottomleft:5px;
|
147
|
+
-moz-border-radius-bottomright:5px;
|
148
|
+
-moz-box-shadow:#444 0 2px 2px;
|
149
|
+
-webkit-border-bottom-left-radius:5px;
|
150
|
+
-webkit-border-bottom-right-radius:5px;
|
151
|
+
-webkit-box-shadow:#444 0 2px 2px;
|
152
|
+
}
|
153
|
+
|
154
|
+
.grid {
|
155
|
+
border-collapse:collapse;
|
156
|
+
border:1px solid #aaa;
|
157
|
+
|
158
|
+
thead th {
|
159
|
+
background:#eee;
|
160
|
+
padding:5px;
|
161
|
+
text-align:left;
|
162
|
+
}
|
163
|
+
|
164
|
+
tbody {
|
165
|
+
tr.row {
|
166
|
+
td {
|
167
|
+
border-top:1px solid #aaa;
|
168
|
+
padding:5px;
|
169
|
+
}
|
170
|
+
|
171
|
+
td.actions {
|
172
|
+
text-align:right;
|
173
|
+
}
|
174
|
+
}
|
175
|
+
|
176
|
+
tr.one {
|
177
|
+
background-color:#fff;
|
178
|
+
}
|
179
|
+
|
180
|
+
tr.two {
|
181
|
+
background-color:#edf3fe;
|
182
|
+
}
|
183
|
+
}
|
184
|
+
}
|
185
|
+
|
186
|
+
.grey {
|
187
|
+
color:#666;
|
188
|
+
}
|
189
|
+
|
190
|
+
.header {
|
191
|
+
background-color:#a7a7a7;
|
192
|
+
background-image:-moz-linear-gradient(top, #cacaca, #a7a7a7);
|
193
|
+
background-image:-webkit-gradient(linear, left top, left bottom, from(#cacaca), to(#a7a7a7));
|
194
|
+
border-bottom:1px solid #888;
|
195
|
+
overflow:hidden;
|
196
|
+
padding:5px;
|
197
|
+
-moz-border-radius-topleft:5px;
|
198
|
+
-moz-border-radius-topright:5px;
|
199
|
+
-webkit-border-top-left-radius:5px;
|
200
|
+
-webkit-border-top-right-radius:5px;
|
201
|
+
}
|
202
|
+
|
203
|
+
.header .float-left {
|
204
|
+
cursor:move;
|
205
|
+
font-weight:bold;
|
206
|
+
}
|
207
|
+
|
208
|
+
|
209
|
+
.button {
|
210
|
+
#grandstand > .button-default;
|
211
|
+
}
|
212
|
+
|
213
|
+
.button::-moz-focus-inner {
|
214
|
+
border:none;
|
215
|
+
padding:0 !important;
|
216
|
+
}
|
217
|
+
|
218
|
+
.button:hover {
|
219
|
+
#grandstand > .button-hover;
|
220
|
+
}
|
221
|
+
|
222
|
+
.button:active {
|
223
|
+
#grandstand > .button-active;
|
224
|
+
}
|
225
|
+
|
226
|
+
.button.grey {
|
227
|
+
#grandstand > .button-grey;
|
228
|
+
}
|
229
|
+
|
230
|
+
.button.grey:hover {
|
231
|
+
#grandstand > .button-grey-hover;
|
232
|
+
}
|
233
|
+
|
234
|
+
.button.grey:active {
|
235
|
+
#grandstand > .button-grey-active;
|
236
|
+
}
|
237
|
+
|
238
|
+
.error {
|
239
|
+
margin-top:5px;
|
240
|
+
}
|
241
|
+
|
242
|
+
.errors label {
|
243
|
+
color:#f00;
|
244
|
+
}
|
245
|
+
|
246
|
+
.errors input.text, .errors select, .errors textarea {
|
247
|
+
border:1px solid #f00;
|
248
|
+
}
|
249
|
+
|
250
|
+
.flash {
|
251
|
+
bottom:20px;
|
252
|
+
position:fixed;
|
253
|
+
text-align:center;
|
254
|
+
width:100%;
|
255
|
+
z-index:4;
|
256
|
+
}
|
257
|
+
|
258
|
+
.flash .inner {
|
259
|
+
background:rgba(0, 0, 0, 0.7);
|
260
|
+
color:#fff;
|
261
|
+
display:inline-block;
|
262
|
+
font-size:24pt;
|
263
|
+
margin:0 auto;
|
264
|
+
padding:10px 20px;
|
265
|
+
-moz-border-radius:70px;
|
266
|
+
-webkit-border-radius:70px;
|
267
|
+
}
|
268
|
+
|
269
|
+
.float-left {
|
270
|
+
float:left;
|
271
|
+
}
|
272
|
+
|
273
|
+
.float-right {
|
274
|
+
float:right;
|
275
|
+
}
|
276
|
+
|
277
|
+
.icon {
|
278
|
+
background-position:left top;
|
279
|
+
background-repeat:no-repeat;
|
280
|
+
display:inline-block;
|
281
|
+
min-height:16px;
|
282
|
+
padding-left:20px;
|
283
|
+
}
|
284
|
+
|
285
|
+
.button:hover .icon, .icon:hover {
|
286
|
+
background-position:left bottom;
|
287
|
+
}
|
288
|
+
|
289
|
+
.button.has-icon {
|
290
|
+
padding-left:5px;
|
291
|
+
}
|
292
|
+
|
293
|
+
.icon.add {
|
294
|
+
background-image:url(../images/icons/add.png);
|
295
|
+
}
|
296
|
+
|
297
|
+
.icon.delete {
|
298
|
+
background-image:url(../images/icons/delete.png);
|
299
|
+
}
|
300
|
+
|
301
|
+
.icon.edit {
|
302
|
+
background-image:url(../images/icons/edit.png);
|
303
|
+
}
|
304
|
+
|
305
|
+
.icon.error {
|
306
|
+
background-image:url(../images/icons/error.png);
|
307
|
+
}
|
308
|
+
|
309
|
+
.icon.gallery {
|
310
|
+
background-image:url(../images/icons/gallery.png);
|
311
|
+
}
|
312
|
+
|
313
|
+
.icon.galleries {
|
314
|
+
background-image:url(../images/icons/galleries.png);
|
315
|
+
}
|
316
|
+
|
317
|
+
.icon.image {
|
318
|
+
background-image:url(../images/icons/image.png);
|
319
|
+
}
|
320
|
+
|
321
|
+
.icon.okay {
|
322
|
+
background-image:url(../images/icons/okay.png);
|
323
|
+
}
|
324
|
+
|
325
|
+
.icon.pages {
|
326
|
+
background-image:url(../images/icons/pages.png);
|
327
|
+
}
|
328
|
+
|
329
|
+
.icon.posts {
|
330
|
+
background-image:url(../images/icons/posts.png);
|
331
|
+
}
|
332
|
+
|
333
|
+
.icon.upload {
|
334
|
+
background-image:url(../images/icons/upload.png);
|
335
|
+
}
|
336
|
+
|
337
|
+
.icon.users {
|
338
|
+
background-image:url(../images/icons/users.png);
|
339
|
+
}
|
340
|
+
|
341
|
+
h1.icon {
|
342
|
+
line-height:48px;
|
343
|
+
padding-left:58px;
|
344
|
+
}
|
345
|
+
|
346
|
+
.inset {
|
347
|
+
background-color:#f0f0f0;
|
348
|
+
padding:10px;
|
349
|
+
-moz-border-radius:5px;
|
350
|
+
-webkit-border-radius:5px;
|
351
|
+
-moz-box-shadow:inset #888 0 1px 2px;
|
352
|
+
-webkit-box-shadow:inset #888 0 1px 2px;
|
353
|
+
}
|
354
|
+
|
355
|
+
.inset.icon {
|
356
|
+
background-position:5px 5px;
|
357
|
+
display:block;
|
358
|
+
padding-left:68px;
|
359
|
+
}
|
360
|
+
|
361
|
+
.progress-bar {
|
362
|
+
background:url(../images/background-progress-bar.png) repeat-x left center;
|
363
|
+
margin:0;
|
364
|
+
padding:0 !important;
|
365
|
+
width:200px;
|
366
|
+
|
367
|
+
.progress {
|
368
|
+
background:url(../images/background-progress.gif) repeat-x;
|
369
|
+
height:11px;
|
370
|
+
width:0;
|
371
|
+
}
|
372
|
+
}
|
373
|
+
|
374
|
+
.progress-bar.complete .progress {
|
375
|
+
background-image:url(../images/background-progress-complete.gif);
|
376
|
+
width:100%;
|
377
|
+
}
|
378
|
+
|
379
|
+
.right {
|
380
|
+
text-align:right;
|
381
|
+
}
|
382
|
+
|
383
|
+
/* Form Elements */
|
384
|
+
select {
|
385
|
+
padding:2px;
|
386
|
+
}
|
387
|
+
|
388
|
+
textarea {
|
389
|
+
height:50px;
|
390
|
+
}
|
391
|
+
|
392
|
+
input.text, textarea {
|
393
|
+
background:#fff url(../images/background-input.gif) repeat-x;
|
394
|
+
border-bottom:1px solid #ddd;
|
395
|
+
border-left:1px solid #c3c3c3;
|
396
|
+
border-right:1px solid #c3c3c3;
|
397
|
+
border-top:1px solid #7d7d7d;
|
398
|
+
padding:3px;
|
399
|
+
width:370px;
|
400
|
+
-moz-box-sizing:border-box;
|
401
|
+
-ms-box-sizing:border-box;
|
402
|
+
-webkit-box-sizing:border-box;
|
403
|
+
}
|
404
|
+
|
405
|
+
input.text.medium {
|
406
|
+
width:180px;
|
407
|
+
}
|
408
|
+
|
409
|
+
input.text.oversized {
|
410
|
+
/* display:block;*/
|
411
|
+
font-size:18px;
|
412
|
+
width:100%;
|
413
|
+
}
|
414
|
+
|
415
|
+
input.half.text.oversized {
|
416
|
+
width:183px;
|
417
|
+
}
|
418
|
+
|
419
|
+
input.text.small {
|
420
|
+
width:94px;
|
421
|
+
}
|
422
|
+
|
423
|
+
input.text.tiny {
|
424
|
+
width:50px;
|
425
|
+
}
|
426
|
+
|
427
|
+
input.replace.unedited, textarea.replace.unedited {
|
428
|
+
color:#777 !important;
|
429
|
+
}
|
430
|
+
|
431
|
+
/* jQuery UI */
|
432
|
+
.ui-tabs-hide {
|
433
|
+
display:none;
|
434
|
+
}
|
435
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
/*
|
2
|
+
login.less simply contains the layout for the login page. This page is used
|
3
|
+
only for logging users into the site, and is pretty basic.
|
4
|
+
*/
|
5
|
+
|
6
|
+
#logo {
|
7
|
+
left:50%;
|
8
|
+
margin-left:-190px;
|
9
|
+
position:absolute;
|
10
|
+
top:100px;
|
11
|
+
}
|
12
|
+
|
13
|
+
#login {
|
14
|
+
/* background-image:-webkit-gradient(linear, left top, left bottom, from(#fff), to(#eee));
|
15
|
+
background-image:-moz-linear-gradient(top, #eee, #ddd);
|
16
|
+
*/
|
17
|
+
border-bottom:1px solid #fff;
|
18
|
+
left:50%;
|
19
|
+
margin:0 0 0 -200px;
|
20
|
+
position:absolute;
|
21
|
+
padding:2em;
|
22
|
+
top:130px;
|
23
|
+
width:400px;
|
24
|
+
-moz-box-sizing:border-box;
|
25
|
+
-ms-box-sizing:border-box;
|
26
|
+
-webkit-box-sizing:border-box;
|
27
|
+
-moz-border-radius:5px;
|
28
|
+
-webkit-border-radius:5px;
|
29
|
+
/* -webkit-box-shadow:rgba(0, 0, 0, 0.5) 0 0 5px;*/
|
30
|
+
}
|
@@ -0,0 +1,96 @@
|
|
1
|
+
/*
|
2
|
+
wysiwyg.less contains the CSS for any WYSIWYG editors that are rendered
|
3
|
+
in the admin interface or during site preview. It mostly makes sure things
|
4
|
+
look okay no matter where they happen. Important to note is that when
|
5
|
+
in preview mode, we keep the Grandstand UI theming from global.less,
|
6
|
+
even though it's nested inside someone else's UI. This may not be very
|
7
|
+
pretty, so you should consider extending external.css to include any
|
8
|
+
overrides you may have.
|
9
|
+
*/
|
10
|
+
@import url('_buttons');
|
11
|
+
@import url('_dialogs');
|
12
|
+
|
13
|
+
.admin .wysiwyg {
|
14
|
+
border:1px solid #888;
|
15
|
+
overflow:hidden;
|
16
|
+
position:relative;
|
17
|
+
-webkit-border-radius:3px;
|
18
|
+
|
19
|
+
.toolbar {
|
20
|
+
#grandstand > .styled-toolbar;
|
21
|
+
border-bottom:1px solid #444;
|
22
|
+
position:relative;
|
23
|
+
z-index:4;
|
24
|
+
|
25
|
+
.button {
|
26
|
+
line-height:0;
|
27
|
+
padding:3px;
|
28
|
+
|
29
|
+
.icon {
|
30
|
+
background-position:center top;
|
31
|
+
}
|
32
|
+
|
33
|
+
.icon.bold {
|
34
|
+
background-image:url(../images/icons/editor/bold.png);
|
35
|
+
}
|
36
|
+
|
37
|
+
.icon.italic {
|
38
|
+
background-image:url(../images/icons/editor/italic.png);
|
39
|
+
}
|
40
|
+
|
41
|
+
.icon.ordered-list {
|
42
|
+
background-image:url(../images/icons/editor/ordered-list.png);
|
43
|
+
}
|
44
|
+
|
45
|
+
.icon.unordered-list {
|
46
|
+
background-image:url(../images/icons/editor/unordered-list.png);
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
.button:hover .icon {
|
51
|
+
background-position:center bottom;
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
iframe {
|
56
|
+
background:#fff url(../images/background-input.gif) repeat-x;
|
57
|
+
/* border-bottom:1px solid #ddd;
|
58
|
+
border-left:1px solid #c3c3c3;
|
59
|
+
border-right:1px solid #c3c3c3;
|
60
|
+
border-top:1px solid #7d7d7d;*/
|
61
|
+
display:block;
|
62
|
+
height:400px;
|
63
|
+
width:100%;
|
64
|
+
-webkit-border-bottom-left-radius:3px;
|
65
|
+
-webkit-border-bottom-right-radius:3px;
|
66
|
+
}
|
67
|
+
|
68
|
+
textarea {
|
69
|
+
border-width:0;
|
70
|
+
/* padding:0;*/
|
71
|
+
}
|
72
|
+
|
73
|
+
.cover {
|
74
|
+
background-color:rgba(255, 255, 255, 0.9);
|
75
|
+
height:100%;
|
76
|
+
left:0;
|
77
|
+
position:absolute;
|
78
|
+
top:0;
|
79
|
+
width:100%;
|
80
|
+
z-index:1;
|
81
|
+
-webkit-border-radius:3px;
|
82
|
+
}
|
83
|
+
|
84
|
+
.loading {
|
85
|
+
background:rgba(0, 0, 0, 0.7) url(../images/spinner-dark.gif) center center no-repeat;
|
86
|
+
height:50px;
|
87
|
+
left:50%;
|
88
|
+
margin:-25px 0 0 -25px;
|
89
|
+
position:absolute;
|
90
|
+
top:50%;
|
91
|
+
width:50px;
|
92
|
+
z-index:2;
|
93
|
+
-moz-border-radius:5px;
|
94
|
+
-webkit-border-radius:5px;
|
95
|
+
}
|
96
|
+
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<% wrap_admin_form do -%>
|
2
|
+
<div class="field">
|
3
|
+
<%= form.label :name %>
|
4
|
+
<%= form.text_field :name, :class => 'text' %>
|
5
|
+
<%= errors_on(:gallery, :name) %>
|
6
|
+
</div>
|
7
|
+
<div class="field">
|
8
|
+
<%= form.label :description %>
|
9
|
+
<%= form.text_area :description %>
|
10
|
+
</div>
|
11
|
+
<% end -%>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<% editable ||= false -%>
|
2
|
+
<% gallery.images.each do |image| -%>
|
3
|
+
<div class="inset image container" id="images_<%= image.id %>">
|
4
|
+
<% if editable -%>
|
5
|
+
<div class="header">
|
6
|
+
<div class="float-left image icon">
|
7
|
+
<%= truncate(image.file.original_filename, :length => 23) %>
|
8
|
+
</div>
|
9
|
+
<div class="float-right">
|
10
|
+
<%= link_to '', edit_admin_gallery_image_path(gallery, image), :class => 'edit icon remote' %><%= link_to '', delete_admin_gallery_image_path(gallery, image), :class => 'delete icon remote' %>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
<% end -%>
|
14
|
+
<%= image_tag(image.file.url(:admin_medium), :alt => image.caption) %>
|
15
|
+
</div>
|
16
|
+
<% end -%>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<% galleries.each do |gallery| -%>
|
2
|
+
<div class="inset gallery container" id="galleries_<%= gallery.url %>">
|
3
|
+
<div class="header">
|
4
|
+
<div class="float-left gallery icon">
|
5
|
+
<%= (gallery.name) %>
|
6
|
+
</div>
|
7
|
+
<div class="float-right">
|
8
|
+
<%= link_to '', edit_admin_gallery_path(gallery), :class => 'edit icon remote' %>
|
9
|
+
<%= link_to '', delete_admin_gallery_path(gallery), :class => 'delete icon remote' %>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
<%= link_to(image_tag(gallery.cover_image.file.url(:admin_medium)), admin_gallery_path(gallery)) %>
|
13
|
+
<% gallery.images.limit(100).each do |image| -%>
|
14
|
+
<%= image_tag(image.file.url(:admin_medium)) %>
|
15
|
+
<% end -%>
|
16
|
+
</div>
|
17
|
+
<% end -%>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<h2>Are you sure you want to do this?</h2>
|
2
|
+
<% form_for(@gallery, :html => {:method => :delete}, :url => admin_gallery_path(@gallery)) do %>
|
3
|
+
<div class="field">You cannot undo this once it's done! This gallery, and all of its pictures, will be gone forever - poof!</div>
|
4
|
+
<div class="toolbar">
|
5
|
+
<%= button('Delete') %>
|
6
|
+
<%= button_link_to('Cancel', return_path || admin_gallery_path(@gallery), :class => 'cancel') %>
|
7
|
+
</div>
|
8
|
+
<% end %>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<h2>Edit Gallery</h2>
|
2
|
+
<% form_for(@gallery, :url => admin_gallery_path(@gallery)) do |form| -%>
|
3
|
+
<%= render :partial => 'form', :locals => {:form => form} %>
|
4
|
+
<div class="toolbar">
|
5
|
+
<%= button 'Save' %>
|
6
|
+
<%= button_link_to('Cancel', admin_galleries_path, :class => 'cancel') %>
|
7
|
+
</div>
|
8
|
+
<% end -%>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<form action="<%= request.fullpath %>" method="POST">
|
2
|
+
<div class="source">
|
3
|
+
<span class="header">Galleries</span>
|
4
|
+
<% @galleries.each do |gallery| -%>
|
5
|
+
<a href="<%= admin_gallery_path(gallery) %>">
|
6
|
+
<span class="icon" style="background-image:url(<%= gallery.cover_image.file.url(:admin_icon) %>);"><%= gallery.name %></span>
|
7
|
+
</a>
|
8
|
+
<% end -%>
|
9
|
+
</div>
|
10
|
+
<div class="destination">
|
11
|
+
|
12
|
+
</div>
|
13
|
+
</form>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<form action="<%= request.fullpath %>" method="POST">
|
2
|
+
<div class="source">
|
3
|
+
<div class="header">Galleries</div>
|
4
|
+
<% @galleries.each_with_index do |gallery, index| -%>
|
5
|
+
<a<%= raw ' class="active"' if index.zero? %> href="<%= admin_gallery_path(gallery) %>" rel="gallery-<%= gallery.to_param %>">
|
6
|
+
<span class="icon" style="background-image:url(<%= gallery.cover_image.file.url(:admin_icon) %>);"><%= gallery.name %></span>
|
7
|
+
</a>
|
8
|
+
<% end -%>
|
9
|
+
</div>
|
10
|
+
<div class="destination">
|
11
|
+
<div class="scrollable">
|
12
|
+
<% @galleries.each_with_index do |gallery, index| -%>
|
13
|
+
<div id="gallery-<%= gallery.to_param %>"<%= raw ' style="display:none;"' unless index.zero? %>>
|
14
|
+
<%= render :partial => 'gallery', :locals => {:gallery => gallery} %>
|
15
|
+
</div>
|
16
|
+
<% end -%>
|
17
|
+
</div>
|
18
|
+
</div>
|
19
|
+
</form>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<% content_for :left do %>
|
2
|
+
<%= button_link_to('Add a Gallery', new_admin_gallery_path, :class => 'remote', :icon => 'add') %>
|
3
|
+
<% end %>
|
4
|
+
<% if @galleries.empty? -%>
|
5
|
+
<div class="inset">
|
6
|
+
<h2>You haven't set up any galleries!</h2>
|
7
|
+
<b class="grey">Get started:</b> <%= button_link_to('Add a Gallery', new_admin_gallery_path, :class => 'remote', :icon => 'add') %>
|
8
|
+
</div>
|
9
|
+
<% else -%>
|
10
|
+
<div class="galleries sortable">
|
11
|
+
<%= render :partial => 'list', :locals => {:galleries => @galleries} %>
|
12
|
+
</div>
|
13
|
+
<% end -%>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<h2>New Gallery</h2>
|
2
|
+
<% form_for(@gallery, :url => admin_galleries_path) do |form| -%>
|
3
|
+
<%= render :partial => 'form', :locals => {:form => form} %>
|
4
|
+
<div class="toolbar">
|
5
|
+
<%= button 'Add Gallery' %>
|
6
|
+
<%= button_link_to('Cancel', admin_galleries_path, :class => 'cancel') %>
|
7
|
+
</div>
|
8
|
+
<% end -%>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<% content_for :left do %>
|
2
|
+
<%= button_link_to('Upload An Image', new_admin_gallery_image_path(@gallery), :class => 'remote', :icon => 'upload') %>
|
3
|
+
<%= button_link_to('Upload Multiple', upload_admin_gallery_images_path(@gallery), :class => 'remote', :icon => 'upload') %>
|
4
|
+
<% end %>
|
5
|
+
<h1 class="galleries icon"><%= @gallery.name %> <%= button_link_to('Edit', edit_admin_gallery_path(@gallery), :class => 'remote', :icon => 'edit') %></h1>
|
6
|
+
<% if @gallery.images.empty? -%>
|
7
|
+
<div class="inset">
|
8
|
+
<h2>You haven't uploaded any images!</h2>
|
9
|
+
<b class="grey">Get started:</b> <%= button_link_to('Upload an Image', new_admin_gallery_image_path(@gallery), :class => 'remote') %>
|
10
|
+
</div>
|
11
|
+
<% else -%>
|
12
|
+
<div class="images sortable">
|
13
|
+
<%= render :partial => 'gallery', :locals => {:gallery => @gallery, :editable => true} %>
|
14
|
+
</div>
|
15
|
+
<% end -%>
|