tandem 0.2.0.rc

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +205 -0
  3. data/Rakefile +31 -0
  4. data/app/assets/images/tandem/blank_image.jpg +0 -0
  5. data/app/assets/images/tandem/colorbox/border1.png +0 -0
  6. data/app/assets/images/tandem/colorbox/border2.png +0 -0
  7. data/app/assets/images/tandem/colorbox/ie6/borderBottomCenter.png +0 -0
  8. data/app/assets/images/tandem/colorbox/ie6/borderBottomLeft.png +0 -0
  9. data/app/assets/images/tandem/colorbox/ie6/borderBottomRight.png +0 -0
  10. data/app/assets/images/tandem/colorbox/ie6/borderMiddleLeft.png +0 -0
  11. data/app/assets/images/tandem/colorbox/ie6/borderMiddleRight.png +0 -0
  12. data/app/assets/images/tandem/colorbox/ie6/borderTopCenter.png +0 -0
  13. data/app/assets/images/tandem/colorbox/ie6/borderTopLeft.png +0 -0
  14. data/app/assets/images/tandem/colorbox/ie6/borderTopRight.png +0 -0
  15. data/app/assets/images/tandem/colorbox/loading.gif +0 -0
  16. data/app/assets/images/tandem/ic-delete_image.png +0 -0
  17. data/app/assets/images/tandem/ic-star.png +0 -0
  18. data/app/assets/images/tandem/loader.gif +0 -0
  19. data/app/assets/images/tandem/loader_stripe.png +0 -0
  20. data/app/assets/images/tandem/tandem-editImage2.jpg +0 -0
  21. data/app/assets/images/tandem/tandem_logo.png +0 -0
  22. data/app/assets/images/tandem/tandem_logo_nav.png +0 -0
  23. data/app/assets/javascripts/tandem/contents.js +2 -0
  24. data/app/assets/javascripts/tandem/current_image.jst.eco +19 -0
  25. data/app/assets/javascripts/tandem/gallery_image.jst.eco +10 -0
  26. data/app/assets/javascripts/tandem/images.coffee +42 -0
  27. data/app/assets/javascripts/tandem/pages.js.coffee +32 -0
  28. data/app/assets/javascripts/tandem/popup.js +23 -0
  29. data/app/assets/javascripts/tandem.js +16 -0
  30. data/app/assets/stylesheets/tandem/colorbox.css.erb +83 -0
  31. data/app/assets/stylesheets/tandem/contents.scss +541 -0
  32. data/app/assets/stylesheets/tandem/scaffold.scss +61 -0
  33. data/app/assets/stylesheets/tandem/variables.scss +38 -0
  34. data/app/assets/stylesheets/tandem.css +7 -0
  35. data/app/controllers/tandem/application_controller.rb +19 -0
  36. data/app/controllers/tandem/contents_controller.rb +94 -0
  37. data/app/controllers/tandem/images_controller.rb +92 -0
  38. data/app/controllers/tandem/pages_controller.rb +108 -0
  39. data/app/helpers/tandem/application_helper.rb +29 -0
  40. data/app/helpers/tandem/contents_helper.rb +19 -0
  41. data/app/helpers/tandem/images_helper.rb +10 -0
  42. data/app/helpers/tandem/pages_helper.rb +243 -0
  43. data/app/models/tandem/ability.rb +6 -0
  44. data/app/models/tandem/content/image.rb +7 -0
  45. data/app/models/tandem/content/text.rb +7 -0
  46. data/app/models/tandem/content.rb +41 -0
  47. data/app/models/tandem/image.rb +27 -0
  48. data/app/models/tandem/page.rb +41 -0
  49. data/app/views/layouts/tandem/image.html.slim +19 -0
  50. data/app/views/layouts/tandem/popup.html.slim +17 -0
  51. data/app/views/tandem/contents/_form.html.slim +36 -0
  52. data/app/views/tandem/contents/edit.html.slim +3 -0
  53. data/app/views/tandem/contents/index.html.slim +29 -0
  54. data/app/views/tandem/contents/new.html.slim +3 -0
  55. data/app/views/tandem/contents/show.html.slim +20 -0
  56. data/app/views/tandem/images/_form.html.slim +24 -0
  57. data/app/views/tandem/images/_gallery.html.slim +4 -0
  58. data/app/views/tandem/images/edit.html.slim +8 -0
  59. data/app/views/tandem/images/index.html.slim +9 -0
  60. data/app/views/tandem/images/new.html.slim +4 -0
  61. data/app/views/tandem/images/show.html.slim +10 -0
  62. data/app/views/tandem/images/thumb.html.slim +1 -0
  63. data/app/views/tandem/pages/_form.html.slim +56 -0
  64. data/app/views/tandem/pages/edit.html.slim +1 -0
  65. data/app/views/tandem/pages/index.html.slim +35 -0
  66. data/app/views/tandem/pages/new.html.slim +1 -0
  67. data/app/views/tandem/pages/show.html.slim +16 -0
  68. data/config/cucumber.yml +8 -0
  69. data/config/routes.rb +17 -0
  70. data/db/migrate/20111122221549_create_tandem_pages.rb +20 -0
  71. data/db/migrate/20111122222037_create_tandem_contents.rb +21 -0
  72. data/db/migrate/20111215001943_create_tandem_images.rb +12 -0
  73. data/db/migrate/30000000000000_create_default_page.rb +10 -0
  74. data/db/migrate/30000000000001_add_request_key_to_tandem_contents.rb +44 -0
  75. data/lib/generators/tandem_generator.rb +26 -0
  76. data/lib/generators/templates/initializer.rb +70 -0
  77. data/lib/tandem/engine.rb +23 -0
  78. data/lib/tandem/version.rb +3 -0
  79. data/lib/tandem.rb +46 -0
  80. data/lib/tasks/cucumber.rake +65 -0
  81. data/lib/tasks/tandem_tasks.rake +4 -0
  82. metadata +354 -0
@@ -0,0 +1,541 @@
1
+ /*
2
+ These are styles for the actual tandem application UX.
3
+
4
+ */
5
+
6
+ @import "variables";
7
+
8
+ body.tandem-admin-bar {
9
+ margin-top: 35px;
10
+ }
11
+ #tandem_page_links {
12
+ z-index: 900;
13
+ position: fixed;
14
+ top: 0;
15
+ left: 0;
16
+ height: 35px;
17
+ line-height: 35px;
18
+ width: 100%;
19
+ background: #333;
20
+ margin: 0;
21
+ padding: 0 10px;
22
+ border-bottom: 1px solid $darkblue;
23
+ li {
24
+ display: inline;
25
+ padding: 0 20px;
26
+ a, a:active, a:visited {
27
+ color: $lightblue;
28
+ text-decoration: none;
29
+ &:hover {color: #aaa;}
30
+ }
31
+ }
32
+ a#page_new_link {
33
+ background: transparent url(image_path('tandem/tandem_logo_nav.png')) left no-repeat;
34
+ padding-left: 100px;
35
+ }
36
+ }
37
+ .tandem_content:hover {
38
+ outline: 1px solid $midblue;
39
+ cursor: pointer;
40
+ }
41
+ .tandem_toolbar {
42
+ position: absolute;
43
+ margin: 10px 5px;
44
+ display: none;
45
+ background: none;
46
+ font-size: 13px;
47
+ @include goo;
48
+ }
49
+ .tandem_toolbar a.tandem_edit_link,
50
+ .tandem_toolbar a.tandem_edit_link:active,
51
+ .tandem_toolbar a.tandem_edit_link:visited {
52
+ font-size: 13px;
53
+ @include goo;
54
+ color: #333;
55
+ background: $lightblue;
56
+ padding: 5px 10px;
57
+ text-decoration: none;
58
+ text-transform: uppercase;
59
+ @include radius(3px);
60
+ font-weight: normal;
61
+ box-shadow: 0px 0px 5px #333;
62
+ &:hover {
63
+ color: #fff !important;
64
+ background: $darkblue;
65
+ }
66
+ }
67
+
68
+
69
+
70
+ /////// Tandem Editor
71
+ h4.tandem-logo {
72
+ font-size: 12px;
73
+ text-align:right;
74
+ position: relative;
75
+ right: 0;
76
+ @include goo;
77
+ color: $midblue;
78
+ font-weight: none;
79
+ height: 33px;
80
+ margin: 10px 0;
81
+ font-weight: normal;
82
+ text-shadow: none;
83
+ background: transparent url(image_path('tandem/tandem_logo.png')) 100% 0 no-repeat;
84
+ text-indent: -9999px;
85
+ }
86
+
87
+
88
+ /////// Contents, Page, & Image Editor
89
+
90
+ #tandem-editor {
91
+ width: 600px;
92
+ }
93
+ #tandem-editor-wym {
94
+ width: 100%;
95
+ }
96
+
97
+ #tandem-editor, #tandem-editor-wym {
98
+ h1.tandem-title {
99
+ font-size: 18px;
100
+ @include goo;
101
+ color: $darkblue;
102
+ font-weight: none;
103
+ margin: 10px 0;
104
+ }
105
+ h3#selected_image_title {
106
+ font-size: 20px;
107
+ @include goo;
108
+ color: #407992;
109
+ font-weight: normal;
110
+ margin: 15px 0;
111
+ }
112
+ iframe{
113
+ border:none;
114
+ height: 100%;
115
+ width: 100%;
116
+ }
117
+ a.use {
118
+ font-size: 15px;
119
+ color: $darkblue;
120
+ }
121
+ form {
122
+ div {
123
+ padding: 5px;
124
+ }
125
+ div.field_with_errors {
126
+ padding:0;
127
+ label {padding: 0;}
128
+ input {
129
+ background: #fdeeee;
130
+ }
131
+ }
132
+ label {
133
+ @include goo;
134
+ color: $darkblue;
135
+ width: 100px;
136
+ padding: 0;
137
+ text-align: left;
138
+ font-size: 14px;
139
+ margin-left: 10px;
140
+ display:block;
141
+ float: left;
142
+ }
143
+ input, textarea {
144
+ border: 1px solid #ccc;
145
+ @include radius(3px);
146
+ box-shadow: 0 0 5px #aaa;
147
+ padding: 5px;
148
+ position:relative;
149
+ }
150
+ input#page_is_default, input#page_parent_id_, input#page_parent_id_1 {top:5px;}
151
+ .field {
152
+ margin: 15px 0;
153
+ @include goo;
154
+ }
155
+ .field span {
156
+ font-size: 14px;
157
+ color: $darkblue;
158
+ padding: 0 10px 0 5px;
159
+ position: relative;
160
+ top: 5px;
161
+ }
162
+ .wym_box {
163
+ background: none;
164
+ border:none;
165
+ border-bottom: 1px solid #eee;
166
+ }
167
+ .wym_iframe {
168
+ background: #fff;
169
+ border: 1px solid #ccc;
170
+ }
171
+ .wym_skin_default .wym_iframe iframe {border:none;height: 300px;}
172
+ iframe .wym_iframe {background: transparent; border:none;}
173
+ } // end form
174
+ .wym_section {
175
+ background: none;
176
+ h2 {
177
+ background: none;
178
+ border: 1px solid $darkblue;
179
+ @include goo;
180
+ border: none;
181
+ padding: 0;
182
+ margin: 0;
183
+ }
184
+ ul {
185
+ border: none;
186
+ }
187
+ a {
188
+ @include goo;
189
+ color: $darkblue;
190
+ padding: 3px 5px;
191
+ }
192
+ border:none;
193
+ padding: 2px 3px;
194
+ } // end wym-section
195
+ .actions {
196
+ // margin: 15px 10px;
197
+ input.wymupdate,input.save {
198
+ background: #4ba9d8;
199
+ color: #fff;
200
+ font-size: 18px;
201
+ @include radius(8px);
202
+ border: 1px solid #4ba9d8;
203
+ cursor: pointer;
204
+ padding: 8px 10px;
205
+ @include goo;
206
+ &:hover {color: #fff;background: $darkblue;}
207
+ }
208
+ } // end actions
209
+ #error_explanation {
210
+ @include errors;
211
+ }
212
+ ul#tandem_image_attributes {
213
+ margin: 0;
214
+ padding: 0;
215
+ li {
216
+ list-style: none;
217
+ padding: 5px;
218
+ list-position: inside;
219
+ @include goo;
220
+ color: #3e4c52;
221
+ font-size: 12px;
222
+ }
223
+ li.image_name {
224
+ font-size: 16px;
225
+ }
226
+ }
227
+ } // end tandem editor
228
+
229
+ .wym {width: 100%;}
230
+
231
+ /// Image Upload Modal
232
+
233
+ #tandem-editor-wym form.tandem_content_editor {
234
+ float: left;
235
+ padding-left: 1%;
236
+ }
237
+ form.tandem_text_editor {
238
+ width: 100%;
239
+ }
240
+ form.tandem_text_editor textarea#content_text_content {
241
+ width: 95%;
242
+ }
243
+ form.tandem_image_editor {
244
+ width: 24%;
245
+ }
246
+ iframe {
247
+ width: 90%;
248
+ padding: 0;
249
+ margin :0;
250
+ height: 300px;
251
+ overflow: scroll;
252
+ }
253
+ div#tandem-image-editor {
254
+ width:73%;
255
+ float:left;
256
+ border-left: 1px solid $lightblue;
257
+ }
258
+ //
259
+ h3.tandem-mod-title {
260
+ font-size: 15px;
261
+ @include goo;
262
+ color: $darkblue;
263
+ font-weight: normal;
264
+ margin: 10px 0;
265
+ }
266
+
267
+ #tandem-image-editor div#gallery-image {
268
+ width: 100%;
269
+ padding: 0;
270
+ margin: 0;
271
+
272
+
273
+ h3 {
274
+ font-size: 15px;
275
+ @include goo;
276
+ color: $darkblue;
277
+ font-weight: normal;
278
+ margin: 10px 0;
279
+ }
280
+ }
281
+ /* force to show scrollbars in webkit browsers */
282
+
283
+ #tandem-editor-wym {
284
+ ::-webkit-scrollbar {
285
+ -webkit-appearance: none;
286
+ width: 7px;
287
+ }
288
+ ::-webkit-scrollbar-thumb {
289
+ border-radius: 4px;
290
+ background-color: rgba(0,0,0,.5);
291
+ -webkit-box-shadow: 0 0 1px rgba(255,255,255,.5);
292
+ }
293
+ }
294
+
295
+ section#tandem_image_gallery {
296
+ max-height:400px;
297
+ overflow-y: scroll;
298
+ border-top: 1px solid $lightblue;
299
+ margin: 10px 0;
300
+ h1 {
301
+ font-weight: normal;
302
+ color: $darkblue;
303
+ font-size: 15px;
304
+ @include goo;
305
+ }
306
+ ul {
307
+ list-style:none;
308
+ li {
309
+ float:left;
310
+ display: block;
311
+ width: 180px;
312
+ height: 130px;
313
+ margin: 0 10px 40px 10px;
314
+ padding: 10px 5px 5px 5px;
315
+ background: $lightblue;
316
+ span {
317
+ display: block;
318
+ width: 150px;
319
+ height: 80px;
320
+ margin: 0 auto;
321
+ overflow: hidden;
322
+ text-align:center;
323
+ }
324
+ img {
325
+ margin: 0 auto;
326
+ background: #fff;
327
+ height: 100%;
328
+ }
329
+
330
+ p {
331
+ @include goo;
332
+ color: $darkblue;
333
+ display:block;
334
+ clear:both;
335
+ font-size: 12px;
336
+ text-align: center;
337
+ position: relative;
338
+ padding: 5px 0;
339
+ a.delete_image {
340
+ display: block;
341
+ width: 16px;
342
+ height: 16px;
343
+ background: transparent url(image_path('tandem/ic-delete_image.png')) 0 0 no-repeat;
344
+ position: absolute;
345
+ bottom: 0;
346
+ right: 0;
347
+ cursor: default;
348
+ &:hover {
349
+ opacity: 0.5;
350
+ -moz-opacity: 0.5;
351
+ filter:alpha(opacity=50);
352
+ }
353
+ }
354
+ }
355
+ &:hover {
356
+ cursor: pointer;
357
+ -webkit-box-shadow: 0 0 20px rgba(122,122,122, .5);
358
+ -moz-box-shadow: 0 0 20px rgba(122,122,122, .5);
359
+ box-shadow: 0 0 20px rgba(122,122,122, .5);
360
+ -webkit-transform: rotate(0deg) scale(1.05);
361
+ -moz-transform: rotate(0deg) scale(1.05);
362
+ transform: rotate(0deg) scale(1.05);
363
+ z-index: 300;
364
+ }
365
+
366
+ }
367
+
368
+ }
369
+ }
370
+
371
+ #tandem-upload-image {
372
+ padding: 0;
373
+ margin: 0 0 0 20px;
374
+ @include goo;
375
+ position: relative;
376
+ span#upload-button {
377
+ display: block;
378
+ width: 200px;
379
+ padding: 10px 0 10px 10px;
380
+ height: 20px;
381
+ margin-top: 10px;
382
+ color: #407992;
383
+ @include radius(5px);
384
+ border: 1px solid #c3cace;
385
+ font-size: 18px;
386
+ -webkit-box-shadow: 0px 0px 7px #ccc;
387
+ -moz-box-shadow: 0px 0px 7px #ccc;
388
+ box-shadow: 0px 0px 7px #ccc;
389
+ background: #e8f2f7;
390
+ background: #e9f3f8; /* Old browsers */
391
+ background: -moz-linear-gradient(top, #e9f3f8 0%, #dbe9f0 100%); /* FF3.6+ */
392
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e9f3f8), color-stop(100%,#dbe9f0)); /* Chrome,Safari4+ */
393
+ background: -webkit-linear-gradient(top, #e9f3f8 0%,#dbe9f0 100%); /* Chrome10+,Safari5.1+ */
394
+ background: -o-linear-gradient(top, #e9f3f8 0%,#dbe9f0 100%); /* Opera 11.10+ */
395
+ background: -ms-linear-gradient(top, #e9f3f8 0%,#dbe9f0 100%); /* IE10+ */
396
+ background: linear-gradient(top, #e9f3f8 0%,#dbe9f0 100%); /* W3C */
397
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e9f3f8', endColorstr='#dbe9f0',GradientType=0 ); /* IE6-9 */
398
+ @include goo;
399
+ cursor: pointer;
400
+ position: relative;
401
+ &#upload-button:hover {
402
+ background: #e5e5e5; /* Old browsers */
403
+ background: -moz-linear-gradient(top, #e5e5e5 0%, #d1d1d1 100%); /* FF3.6+ */
404
+ background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#e5e5e5), color-stop(100%,#d1d1d1)); /* Chrome,Safari4+ */
405
+ background: -webkit-linear-gradient(top, #e5e5e5 0%,#d1d1d1 100%); /* Chrome10+,Safari5.1+ */
406
+ background: -o-linear-gradient(top, #e5e5e5 0%,#d1d1d1 100%); /* Opera 11.10+ */
407
+ background: -ms-linear-gradient(top, #e5e5e5 0%,#d1d1d1 100%); /* IE10+ */
408
+ background: linear-gradient(top, #e5e5e5 0%,#d1d1d1 100%); /* W3C */
409
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e5e5e5', endColorstr='#d1d1d1',GradientType=0 ); /* IE6-9 */
410
+ color: #fff;
411
+ border-color: #aaa;
412
+ cursor: pointer;
413
+ }
414
+ input#image_resource {
415
+ opacity: 0;
416
+ -moz-opacity: 0;
417
+ filter:alpha(opacity=0);
418
+ position: absolute;
419
+ top: 0;
420
+ left: 0;
421
+ cursor: pointer;
422
+ width: 200px;
423
+ }
424
+ }
425
+ input#upload-button:hover {
426
+ background: #eee;
427
+ }
428
+ section#error_explanation {
429
+ @include errors;
430
+ display:none;
431
+ }
432
+ .loader {
433
+ display:none;
434
+ width: 200px;
435
+ height: 20px;
436
+ background: $lightblue;
437
+ position: absolute;
438
+ top: 10px;
439
+ left: 250px;
440
+ @include radius(5px);
441
+ padding: 0;
442
+ margin: 0;
443
+ -webkit-box-shadow: 0 0 5px #aaa;
444
+ -moz-box-shadow: 0 0 5px #aaa;
445
+ box-shadow: 0 0 5px #aaa;
446
+ overflow: hidden;
447
+ .range {
448
+ width: 0;
449
+ padding:0;
450
+ height: 20px;
451
+ background: transparent url(image_path('tandem/loader_stripe.png'));
452
+ span {
453
+ font-size: 14px;
454
+ position: relative;
455
+ bottom: 5px;
456
+ }
457
+ }
458
+ }
459
+ }
460
+
461
+ /// Colorbox Overwrites
462
+
463
+ #cboxTitle{
464
+ display: none !important;
465
+ text-transform: capitalize;
466
+ text-align:center;
467
+ width:100%;
468
+ font-size: 18px;
469
+ @include goo;
470
+ color: $highblue;
471
+ font-weight: none;
472
+ }
473
+ #cboxOverlay {
474
+ background: #333;
475
+ }
476
+ #cboxClose {
477
+ @include goo;
478
+ color: $darkblue;
479
+ font-size: 13px;
480
+ bottom: 25px;
481
+ }
482
+ #cboxLoadedContent{
483
+ padding-bottom: 50px;
484
+ background: transparent url(image_path('tandem/tandem_logo.png')) 0 100% no-repeat;
485
+
486
+ }
487
+
488
+
489
+ /// Advanced Settings
490
+
491
+ #tandem_advanced_settings {
492
+ margin: 0 0 15px 0;
493
+ .advanced-settings {
494
+ display: none;
495
+ }
496
+ h3 {
497
+ cursor: pointer;
498
+ font-size: 13px;
499
+ font-weight: normal;
500
+ display: block;
501
+ margin: 10px;
502
+ color: $darkblue;
503
+ text-decoration: none;
504
+ @include goo;
505
+ padding: 3px 0 0 20px;
506
+ background: transparent url(image_path('tandem/ic-star.png')) left no-repeat;
507
+ }
508
+ h3:hover {
509
+ color: #333;
510
+ }
511
+ }
512
+ form.tandem_content_editor div#tandem_advanced_settings .advanced-settings {
513
+ display: none;
514
+ .field {
515
+ padding: none;
516
+ label {
517
+ width: 100%;
518
+ padding: 0;
519
+ margin: 0;
520
+ float: none;
521
+ }
522
+ input {
523
+ width: 90%;
524
+ }
525
+ }
526
+ }
527
+ form.tandem_text_editor div#tandem_advanced_settings .advanced-settings .field input {
528
+ width: 200px;
529
+ }
530
+
531
+ /* new clearfix */
532
+ .clearfix:after {
533
+ visibility: hidden;
534
+ display: block;
535
+ font-size: 0;
536
+ content: " ";
537
+ clear: both;
538
+ height: 0;
539
+ }
540
+ *:first-child+html .clearfix { zoom: 1; } /* IE7 */
541
+
@@ -0,0 +1,61 @@
1
+ // These styles are the backbone of the tandem app and include the defaults for the tandem 'show' page
2
+
3
+ @import "variables";
4
+
5
+ // Tandem Show page styles
6
+
7
+ #tandem-defaults {
8
+ width: 940px;
9
+ margin: 0 auto;
10
+ @include goo;
11
+ color: #333;
12
+ padding: 15px;
13
+ .hero h1 {
14
+ color: $darkblue;
15
+ text-align: center;
16
+ }
17
+ pre {
18
+ background-color: #eee;
19
+ padding: 10px;
20
+ font-size: 11px;
21
+ }
22
+
23
+ div.field, div.actions {
24
+ margin-bottom: 10px;
25
+ }
26
+
27
+ #notice {
28
+ color: green;
29
+ }
30
+
31
+ #error_explanation {
32
+ width: 450px;
33
+ border: 2px solid red;
34
+ padding: 7px;
35
+ padding-bottom: 0;
36
+ margin-bottom: 20px;
37
+ background-color: #f0f0f0;
38
+ }
39
+
40
+ #error_explanation h2 {
41
+ text-align: left;
42
+ font-weight: bold;
43
+ padding: 5px 5px 5px 15px;
44
+ font-size: 12px;
45
+ margin: -7px;
46
+ margin-bottom: 0px;
47
+ background-color: #c00;
48
+ color: #fff;
49
+ }
50
+
51
+ #error_explanation ul li {
52
+ font-size: 12px;
53
+ list-style: square;
54
+ }
55
+ }
56
+
57
+ // end tandem show page styles
58
+
59
+
60
+
61
+
@@ -0,0 +1,38 @@
1
+ // Varibles for Tandem UX
2
+
3
+ @import url(http://fonts.googleapis.com/css?family=Glegoo);
4
+
5
+ @mixin goo {
6
+ font-family: 'Glegoo', serif;
7
+ }
8
+
9
+ @mixin radius($radius) {
10
+ -moz-border-radius: $radius;
11
+ -webkit-border-radius: $radius;
12
+ border-radius: $radius;
13
+ }
14
+ @mixin errors {
15
+ background: $lightblue;
16
+ padding: 5px;
17
+ margin: 5px 0;
18
+ h1, h2 {
19
+ font-size: 18px;
20
+ @include goo;
21
+ color: $darkblue;
22
+ font-weight: normal;
23
+ margin-left: 15px;
24
+ }
25
+ ul {
26
+ li {
27
+ color: $darkblue;
28
+ font-size: 13px;
29
+ margin: 7px 0;
30
+ }
31
+ }
32
+ }
33
+ $lightblue: #E8F3F8;
34
+ $lowblue: #DBE6EC;
35
+ $midblue: #C2CBCE;
36
+ $highblue: #A4BCC2;
37
+ $darkblue: #81A8B8;
38
+ $red: #660000;
@@ -0,0 +1,7 @@
1
+ /*
2
+ * This is a manifest file that'll automatically include all the stylesheets available in this directory
3
+ * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4
+ * the top of the compiled file, but it's generally better to create a new file per style scope.
5
+ *= require_self
6
+ *= require_tree './tandem'
7
+ */
@@ -0,0 +1,19 @@
1
+ module Tandem
2
+ class ApplicationController < ActionController::Base
3
+ check_authorization
4
+
5
+ rescue_from CanCan::AccessDenied do |exception|
6
+ redirect_to (Configuration::unauthorized_path || root_url) , :alert => exception.message
7
+ end
8
+
9
+ def current_user
10
+ Configuration.current_user.call(request)
11
+ end
12
+
13
+ private
14
+
15
+ def current_ability
16
+ @current_ability ||= ::Tandem::Ability.new(current_user)
17
+ end
18
+ end
19
+ end