riddick 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +128 -3
- data/TODO-0.0.4 +9 -0
- data/lib/riddick/backends.rb +8 -0
- data/lib/riddick/backends/key_value.rb +1 -0
- data/lib/riddick/backends/key_value/value.rb +3 -0
- data/lib/riddick/backends/redis.rb +5 -0
- data/lib/riddick/backends/redis/value.rb +1 -0
- data/lib/riddick/backends/simple.rb +4 -0
- data/lib/riddick/hash.rb +5 -0
- data/lib/riddick/public/javascripts/riddick.js +5 -1
- data/lib/riddick/public/javascripts/vendor/jquery.js +2 -9266
- data/lib/riddick/public/stylesheets/vendor/bootstrap.css +0 -192
- data/lib/riddick/server.rb +33 -5
- data/lib/riddick/version.rb +1 -1
- data/lib/riddick/views/index.erb +29 -22
- data/riddick.gemspec +2 -0
- metadata +5 -4
- data/lib/riddick/public/stylesheets/vendor/bootstrap-responsive.css +0 -9
@@ -349,188 +349,6 @@ button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-
|
|
349
349
|
.btn-link,.btn-link:active{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
|
350
350
|
.btn-link{border-color:transparent;cursor:pointer;color:#0088cc;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
|
351
351
|
.btn-link:hover{color:#005580;text-decoration:underline;background-color:transparent;}
|
352
|
-
[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat;margin-top:1px;}
|
353
|
-
.icon-white,.nav>.active>a>[class^="icon-"],.nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"]{background-image:url("../img/glyphicons-halflings-white.png");}
|
354
|
-
.icon-glass{background-position:0 0;}
|
355
|
-
.icon-music{background-position:-24px 0;}
|
356
|
-
.icon-search{background-position:-48px 0;}
|
357
|
-
.icon-envelope{background-position:-72px 0;}
|
358
|
-
.icon-heart{background-position:-96px 0;}
|
359
|
-
.icon-star{background-position:-120px 0;}
|
360
|
-
.icon-star-empty{background-position:-144px 0;}
|
361
|
-
.icon-user{background-position:-168px 0;}
|
362
|
-
.icon-film{background-position:-192px 0;}
|
363
|
-
.icon-th-large{background-position:-216px 0;}
|
364
|
-
.icon-th{background-position:-240px 0;}
|
365
|
-
.icon-th-list{background-position:-264px 0;}
|
366
|
-
.icon-ok{background-position:-288px 0;}
|
367
|
-
.icon-remove{background-position:-312px 0;}
|
368
|
-
.icon-zoom-in{background-position:-336px 0;}
|
369
|
-
.icon-zoom-out{background-position:-360px 0;}
|
370
|
-
.icon-off{background-position:-384px 0;}
|
371
|
-
.icon-signal{background-position:-408px 0;}
|
372
|
-
.icon-cog{background-position:-432px 0;}
|
373
|
-
.icon-trash{background-position:-456px 0;}
|
374
|
-
.icon-home{background-position:0 -24px;}
|
375
|
-
.icon-file{background-position:-24px -24px;}
|
376
|
-
.icon-time{background-position:-48px -24px;}
|
377
|
-
.icon-road{background-position:-72px -24px;}
|
378
|
-
.icon-download-alt{background-position:-96px -24px;}
|
379
|
-
.icon-download{background-position:-120px -24px;}
|
380
|
-
.icon-upload{background-position:-144px -24px;}
|
381
|
-
.icon-inbox{background-position:-168px -24px;}
|
382
|
-
.icon-play-circle{background-position:-192px -24px;}
|
383
|
-
.icon-repeat{background-position:-216px -24px;}
|
384
|
-
.icon-refresh{background-position:-240px -24px;}
|
385
|
-
.icon-list-alt{background-position:-264px -24px;}
|
386
|
-
.icon-lock{background-position:-287px -24px;}
|
387
|
-
.icon-flag{background-position:-312px -24px;}
|
388
|
-
.icon-headphones{background-position:-336px -24px;}
|
389
|
-
.icon-volume-off{background-position:-360px -24px;}
|
390
|
-
.icon-volume-down{background-position:-384px -24px;}
|
391
|
-
.icon-volume-up{background-position:-408px -24px;}
|
392
|
-
.icon-qrcode{background-position:-432px -24px;}
|
393
|
-
.icon-barcode{background-position:-456px -24px;}
|
394
|
-
.icon-tag{background-position:0 -48px;}
|
395
|
-
.icon-tags{background-position:-25px -48px;}
|
396
|
-
.icon-book{background-position:-48px -48px;}
|
397
|
-
.icon-bookmark{background-position:-72px -48px;}
|
398
|
-
.icon-print{background-position:-96px -48px;}
|
399
|
-
.icon-camera{background-position:-120px -48px;}
|
400
|
-
.icon-font{background-position:-144px -48px;}
|
401
|
-
.icon-bold{background-position:-167px -48px;}
|
402
|
-
.icon-italic{background-position:-192px -48px;}
|
403
|
-
.icon-text-height{background-position:-216px -48px;}
|
404
|
-
.icon-text-width{background-position:-240px -48px;}
|
405
|
-
.icon-align-left{background-position:-264px -48px;}
|
406
|
-
.icon-align-center{background-position:-288px -48px;}
|
407
|
-
.icon-align-right{background-position:-312px -48px;}
|
408
|
-
.icon-align-justify{background-position:-336px -48px;}
|
409
|
-
.icon-list{background-position:-360px -48px;}
|
410
|
-
.icon-indent-left{background-position:-384px -48px;}
|
411
|
-
.icon-indent-right{background-position:-408px -48px;}
|
412
|
-
.icon-facetime-video{background-position:-432px -48px;}
|
413
|
-
.icon-picture{background-position:-456px -48px;}
|
414
|
-
.icon-pencil{background-position:0 -72px;}
|
415
|
-
.icon-map-marker{background-position:-24px -72px;}
|
416
|
-
.icon-adjust{background-position:-48px -72px;}
|
417
|
-
.icon-tint{background-position:-72px -72px;}
|
418
|
-
.icon-edit{background-position:-96px -72px;}
|
419
|
-
.icon-share{background-position:-120px -72px;}
|
420
|
-
.icon-check{background-position:-144px -72px;}
|
421
|
-
.icon-move{background-position:-168px -72px;}
|
422
|
-
.icon-step-backward{background-position:-192px -72px;}
|
423
|
-
.icon-fast-backward{background-position:-216px -72px;}
|
424
|
-
.icon-backward{background-position:-240px -72px;}
|
425
|
-
.icon-play{background-position:-264px -72px;}
|
426
|
-
.icon-pause{background-position:-288px -72px;}
|
427
|
-
.icon-stop{background-position:-312px -72px;}
|
428
|
-
.icon-forward{background-position:-336px -72px;}
|
429
|
-
.icon-fast-forward{background-position:-360px -72px;}
|
430
|
-
.icon-step-forward{background-position:-384px -72px;}
|
431
|
-
.icon-eject{background-position:-408px -72px;}
|
432
|
-
.icon-chevron-left{background-position:-432px -72px;}
|
433
|
-
.icon-chevron-right{background-position:-456px -72px;}
|
434
|
-
.icon-plus-sign{background-position:0 -96px;}
|
435
|
-
.icon-minus-sign{background-position:-24px -96px;}
|
436
|
-
.icon-remove-sign{background-position:-48px -96px;}
|
437
|
-
.icon-ok-sign{background-position:-72px -96px;}
|
438
|
-
.icon-question-sign{background-position:-96px -96px;}
|
439
|
-
.icon-info-sign{background-position:-120px -96px;}
|
440
|
-
.icon-screenshot{background-position:-144px -96px;}
|
441
|
-
.icon-remove-circle{background-position:-168px -96px;}
|
442
|
-
.icon-ok-circle{background-position:-192px -96px;}
|
443
|
-
.icon-ban-circle{background-position:-216px -96px;}
|
444
|
-
.icon-arrow-left{background-position:-240px -96px;}
|
445
|
-
.icon-arrow-right{background-position:-264px -96px;}
|
446
|
-
.icon-arrow-up{background-position:-289px -96px;}
|
447
|
-
.icon-arrow-down{background-position:-312px -96px;}
|
448
|
-
.icon-share-alt{background-position:-336px -96px;}
|
449
|
-
.icon-resize-full{background-position:-360px -96px;}
|
450
|
-
.icon-resize-small{background-position:-384px -96px;}
|
451
|
-
.icon-plus{background-position:-408px -96px;}
|
452
|
-
.icon-minus{background-position:-433px -96px;}
|
453
|
-
.icon-asterisk{background-position:-456px -96px;}
|
454
|
-
.icon-exclamation-sign{background-position:0 -120px;}
|
455
|
-
.icon-gift{background-position:-24px -120px;}
|
456
|
-
.icon-leaf{background-position:-48px -120px;}
|
457
|
-
.icon-fire{background-position:-72px -120px;}
|
458
|
-
.icon-eye-open{background-position:-96px -120px;}
|
459
|
-
.icon-eye-close{background-position:-120px -120px;}
|
460
|
-
.icon-warning-sign{background-position:-144px -120px;}
|
461
|
-
.icon-plane{background-position:-168px -120px;}
|
462
|
-
.icon-calendar{background-position:-192px -120px;}
|
463
|
-
.icon-random{background-position:-216px -120px;width:16px;}
|
464
|
-
.icon-comment{background-position:-240px -120px;}
|
465
|
-
.icon-magnet{background-position:-264px -120px;}
|
466
|
-
.icon-chevron-up{background-position:-288px -120px;}
|
467
|
-
.icon-chevron-down{background-position:-313px -119px;}
|
468
|
-
.icon-retweet{background-position:-336px -120px;}
|
469
|
-
.icon-shopping-cart{background-position:-360px -120px;}
|
470
|
-
.icon-folder-close{background-position:-384px -120px;}
|
471
|
-
.icon-folder-open{background-position:-408px -120px;width:16px;}
|
472
|
-
.icon-resize-vertical{background-position:-432px -119px;}
|
473
|
-
.icon-resize-horizontal{background-position:-456px -118px;}
|
474
|
-
.icon-hdd{background-position:0 -144px;}
|
475
|
-
.icon-bullhorn{background-position:-24px -144px;}
|
476
|
-
.icon-bell{background-position:-48px -144px;}
|
477
|
-
.icon-certificate{background-position:-72px -144px;}
|
478
|
-
.icon-thumbs-up{background-position:-96px -144px;}
|
479
|
-
.icon-thumbs-down{background-position:-120px -144px;}
|
480
|
-
.icon-hand-right{background-position:-144px -144px;}
|
481
|
-
.icon-hand-left{background-position:-168px -144px;}
|
482
|
-
.icon-hand-up{background-position:-192px -144px;}
|
483
|
-
.icon-hand-down{background-position:-216px -144px;}
|
484
|
-
.icon-circle-arrow-right{background-position:-240px -144px;}
|
485
|
-
.icon-circle-arrow-left{background-position:-264px -144px;}
|
486
|
-
.icon-circle-arrow-up{background-position:-288px -144px;}
|
487
|
-
.icon-circle-arrow-down{background-position:-312px -144px;}
|
488
|
-
.icon-globe{background-position:-336px -144px;}
|
489
|
-
.icon-wrench{background-position:-360px -144px;}
|
490
|
-
.icon-tasks{background-position:-384px -144px;}
|
491
|
-
.icon-filter{background-position:-408px -144px;}
|
492
|
-
.icon-briefcase{background-position:-432px -144px;}
|
493
|
-
.icon-fullscreen{background-position:-456px -144px;}
|
494
|
-
.btn-group{position:relative;font-size:0;white-space:nowrap;*margin-left:.3em;}.btn-group:first-child{*margin-left:0;}
|
495
|
-
.btn-group+.btn-group{margin-left:5px;}
|
496
|
-
.btn-toolbar{font-size:0;margin-top:10px;margin-bottom:10px;}.btn-toolbar .btn-group{display:inline-block;*display:inline;*zoom:1;}
|
497
|
-
.btn-toolbar .btn+.btn,.btn-toolbar .btn-group+.btn,.btn-toolbar .btn+.btn-group{margin-left:5px;}
|
498
|
-
.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
|
499
|
-
.btn-group>.btn+.btn{margin-left:-1px;}
|
500
|
-
.btn-group>.btn,.btn-group>.dropdown-menu{font-size:14px;}
|
501
|
-
.btn-group>.btn-mini{font-size:11px;}
|
502
|
-
.btn-group>.btn-small{font-size:12px;}
|
503
|
-
.btn-group>.btn-large{font-size:16px;}
|
504
|
-
.btn-group>.btn:first-child{margin-left:0;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;}
|
505
|
-
.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;}
|
506
|
-
.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-top-left-radius:6px;-moz-border-radius-topleft:6px;border-top-left-radius:6px;-webkit-border-bottom-left-radius:6px;-moz-border-radius-bottomleft:6px;border-bottom-left-radius:6px;}
|
507
|
-
.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;-moz-border-radius-topright:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;-moz-border-radius-bottomright:6px;border-bottom-right-radius:6px;}
|
508
|
-
.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2;}
|
509
|
-
.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0;}
|
510
|
-
.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);*padding-top:5px;*padding-bottom:5px;}
|
511
|
-
.btn-group>.btn-mini+.dropdown-toggle{padding-left:5px;padding-right:5px;*padding-top:2px;*padding-bottom:2px;}
|
512
|
-
.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px;}
|
513
|
-
.btn-group>.btn-large+.dropdown-toggle{padding-left:12px;padding-right:12px;*padding-top:7px;*padding-bottom:7px;}
|
514
|
-
.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);}
|
515
|
-
.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6;}
|
516
|
-
.btn-group.open .btn-primary.dropdown-toggle{background-color:#0044cc;}
|
517
|
-
.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406;}
|
518
|
-
.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f;}
|
519
|
-
.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351;}
|
520
|
-
.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4;}
|
521
|
-
.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222222;}
|
522
|
-
.btn .caret{margin-top:8px;margin-left:0;}
|
523
|
-
.btn-mini .caret,.btn-small .caret,.btn-large .caret{margin-top:6px;}
|
524
|
-
.btn-large .caret{border-left-width:5px;border-right-width:5px;border-top-width:5px;}
|
525
|
-
.dropup .btn-large .caret{border-bottom:5px solid #000000;border-top:0;}
|
526
|
-
.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;}
|
527
|
-
.btn-group-vertical{display:inline-block;*display:inline;*zoom:1;}
|
528
|
-
.btn-group-vertical .btn{display:block;float:none;width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
|
529
|
-
.btn-group-vertical .btn+.btn{margin-left:0;margin-top:-1px;}
|
530
|
-
.btn-group-vertical .btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}
|
531
|
-
.btn-group-vertical .btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}
|
532
|
-
.btn-group-vertical .btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0;}
|
533
|
-
.btn-group-vertical .btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;}
|
534
352
|
.nav{margin-left:0;margin-bottom:20px;list-style:none;}
|
535
353
|
.nav>li>a{display:block;}
|
536
354
|
.nav>li>a:hover{text-decoration:none;background-color:#eeeeee;}
|
@@ -691,19 +509,9 @@ button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-
|
|
691
509
|
.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);}.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15);}
|
692
510
|
.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
|
693
511
|
.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
|
694
|
-
.close{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000000;text-shadow:0 1px 0 #ffffff;opacity:0.2;filter:alpha(opacity=20);}.close:hover{color:#000000;text-decoration:none;cursor:pointer;opacity:0.4;filter:alpha(opacity=40);}
|
695
|
-
button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none;}
|
696
512
|
.pull-right{float:right;}
|
697
513
|
.pull-left{float:left;}
|
698
514
|
.hide{display:none;}
|
699
515
|
.show{display:block;}
|
700
516
|
.invisible{visibility:hidden;}
|
701
517
|
.affix{position:fixed;}
|
702
|
-
.fade{opacity:0;-webkit-transition:opacity 0.15s linear;-moz-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear;}.fade.in{opacity:1;}
|
703
|
-
.collapse{position:relative;height:0;overflow:hidden;overflow:visible \9;-webkit-transition:height 0.35s ease;-moz-transition:height 0.35s ease;-o-transition:height 0.35s ease;transition:height 0.35s ease;}.collapse.in{height:auto;}
|
704
|
-
.hidden{display:none;visibility:hidden;}
|
705
|
-
.visible-phone{display:none !important;}
|
706
|
-
.visible-tablet{display:none !important;}
|
707
|
-
.hidden-desktop{display:none !important;}
|
708
|
-
.visible-desktop{display:inherit !important;}
|
709
|
-
@media (min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit !important;} .visible-desktop{display:none !important ;} .visible-tablet{display:inherit !important;} .hidden-tablet{display:none !important;}}@media (max-width:767px){.hidden-desktop{display:inherit !important;} .visible-desktop{display:none !important;} .visible-phone{display:inherit !important;} .hidden-phone{display:none !important;}}@media (max-width:767px){body{padding-left:20px;padding-right:20px;} .navbar-fixed-top,.navbar-fixed-bottom{margin-left:-20px;margin-right:-20px;} .container-fluid{padding:0;} .dl-horizontal dt{float:none;clear:none;width:auto;text-align:left;} .dl-horizontal dd{margin-left:0;} .container{width:auto;} .row-fluid{width:100%;} .row,.thumbnails{margin-left:0;} .thumbnails>li{float:none;margin-left:0;} [class*="span"],.row-fluid [class*="span"]{float:none;display:block;width:auto;margin-left:0;} .span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;} .input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;} .input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto;} .modal{position:fixed;top:20px;left:20px;right:20px;width:auto;margin:0;}.modal.fade.in{top:auto;}}@media (max-width:480px){.nav-collapse{-webkit-transform:translate3d(0, 0, 0);} .page-header h1 small{display:block;line-height:20px;} input[type="checkbox"],input[type="radio"]{border:1px solid #ccc;} .form-horizontal .control-group>label{float:none;width:auto;padding-top:0;text-align:left;} .form-horizontal .controls{margin-left:0;} .form-horizontal .control-list{padding-top:0;} .form-horizontal .form-actions{padding-left:10px;padding-right:10px;} .modal{top:10px;left:10px;right:10px;} .modal-header .close{padding:10px;margin:-10px;} .carousel-caption{position:static;}}@media (min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";line-height:0;} .row:after{clear:both;} [class*="span"]{float:left;margin-left:20px;} .container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px;} .span12{width:724px;} .span11{width:662px;} .span10{width:600px;} .span9{width:538px;} .span8{width:476px;} .span7{width:414px;} .span6{width:352px;} .span5{width:290px;} .span4{width:228px;} .span3{width:166px;} .span2{width:104px;} .span1{width:42px;} .offset12{margin-left:764px;} .offset11{margin-left:702px;} .offset10{margin-left:640px;} .offset9{margin-left:578px;} .offset8{margin-left:516px;} .offset7{margin-left:454px;} .offset6{margin-left:392px;} .offset5{margin-left:330px;} .offset4{margin-left:268px;} .offset3{margin-left:206px;} .offset2{margin-left:144px;} .offset1{margin-left:82px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";line-height:0;} .row-fluid:after{clear:both;} .row-fluid [class*="span"]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;} .row-fluid [class*="span"]:first-child{margin-left:0;} .row-fluid .span12{width:100%;*width:99.94680851063829%;} .row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%;} .row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%;} .row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%;} .row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%;} .row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%;} .row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%;} .row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%;} .row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%;} .row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%;} .row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%;} .row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%;} .row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%;} .row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%;} .row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%;} .row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%;} .row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%;} .row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%;} .row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%;} .row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%;} .row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%;} .row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%;} .row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%;} .row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%;} .row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%;} .row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%;} .row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%;} .row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%;} .row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%;} .row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%;} .row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%;} .row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%;} .row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%;} .row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%;} .row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%;} .row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%;} input,textarea,.uneditable-input{margin-left:0;} .controls-row [class*="span"]+[class*="span"]{margin-left:20px;} input.span12, textarea.span12, .uneditable-input.span12{width:710px;} input.span11, textarea.span11, .uneditable-input.span11{width:648px;} input.span10, textarea.span10, .uneditable-input.span10{width:586px;} input.span9, textarea.span9, .uneditable-input.span9{width:524px;} input.span8, textarea.span8, .uneditable-input.span8{width:462px;} input.span7, textarea.span7, .uneditable-input.span7{width:400px;} input.span6, textarea.span6, .uneditable-input.span6{width:338px;} input.span5, textarea.span5, .uneditable-input.span5{width:276px;} input.span4, textarea.span4, .uneditable-input.span4{width:214px;} input.span3, textarea.span3, .uneditable-input.span3{width:152px;} input.span2, textarea.span2, .uneditable-input.span2{width:90px;} input.span1, textarea.span1, .uneditable-input.span1{width:28px;}}@media (min-width:1200px){.row{margin-left:-30px;*zoom:1;}.row:before,.row:after{display:table;content:"";line-height:0;} .row:after{clear:both;} [class*="span"]{float:left;margin-left:30px;} .container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px;} .span12{width:1170px;} .span11{width:1070px;} .span10{width:970px;} .span9{width:870px;} .span8{width:770px;} .span7{width:670px;} .span6{width:570px;} .span5{width:470px;} .span4{width:370px;} .span3{width:270px;} .span2{width:170px;} .span1{width:70px;} .offset12{margin-left:1230px;} .offset11{margin-left:1130px;} .offset10{margin-left:1030px;} .offset9{margin-left:930px;} .offset8{margin-left:830px;} .offset7{margin-left:730px;} .offset6{margin-left:630px;} .offset5{margin-left:530px;} .offset4{margin-left:430px;} .offset3{margin-left:330px;} .offset2{margin-left:230px;} .offset1{margin-left:130px;} .row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";line-height:0;} .row-fluid:after{clear:both;} .row-fluid [class*="span"]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%;} .row-fluid [class*="span"]:first-child{margin-left:0;} .row-fluid .span12{width:100%;*width:99.94680851063829%;} .row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%;} .row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%;} .row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%;} .row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%;} .row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%;} .row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%;} .row-fluid .span5{width:40.17094017094017%;*width:40.11774868157847%;} .row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%;} .row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%;} .row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%;} .row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%;} .row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%;} .row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%;} .row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%;} .row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%;} .row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%;} .row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%;} .row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%;} .row-fluid .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%;} .row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%;} .row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%;} .row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%;} .row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%;} .row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%;} .row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%;} .row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%;} .row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%;} .row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%;} .row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%;} .row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%;} .row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%;} .row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%;} .row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%;} .row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%;} .row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%;} input,textarea,.uneditable-input{margin-left:0;} .controls-row [class*="span"]+[class*="span"]{margin-left:30px;} input.span12, textarea.span12, .uneditable-input.span12{width:1156px;} input.span11, textarea.span11, .uneditable-input.span11{width:1056px;} input.span10, textarea.span10, .uneditable-input.span10{width:956px;} input.span9, textarea.span9, .uneditable-input.span9{width:856px;} input.span8, textarea.span8, .uneditable-input.span8{width:756px;} input.span7, textarea.span7, .uneditable-input.span7{width:656px;} input.span6, textarea.span6, .uneditable-input.span6{width:556px;} input.span5, textarea.span5, .uneditable-input.span5{width:456px;} input.span4, textarea.span4, .uneditable-input.span4{width:356px;} input.span3, textarea.span3, .uneditable-input.span3{width:256px;} input.span2, textarea.span2, .uneditable-input.span2{width:156px;} input.span1, textarea.span1, .uneditable-input.span1{width:56px;} .thumbnails{margin-left:-30px;} .thumbnails>li{margin-left:30px;} .row-fluid .thumbnails{margin-left:0;}}@media (max-width:979px){body{padding-top:0;} .navbar-fixed-top,.navbar-fixed-bottom{position:static;} .navbar-fixed-top{margin-bottom:20px;} .navbar-fixed-bottom{margin-top:20px;} .navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px;} .navbar .container{width:auto;padding:0;} .navbar .brand{padding-left:10px;padding-right:10px;margin:0 0 0 -5px;} .nav-collapse{clear:both;} .nav-collapse .nav{float:none;margin:0 0 10px;} .nav-collapse .nav>li{float:none;} .nav-collapse .nav>li>a{margin-bottom:2px;} .nav-collapse .nav>.divider-vertical{display:none;} .nav-collapse .nav .nav-header{color:#555555;text-shadow:none;} .nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:9px 15px;font-weight:bold;color:#555555;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} .nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} .nav-collapse .dropdown-menu li+li a{margin-bottom:2px;} .nav-collapse .nav>li>a:hover,.nav-collapse .dropdown-menu a:hover{background-color:#f2f2f2;} .navbar-inverse .nav-collapse .nav>li>a:hover,.navbar-inverse .nav-collapse .dropdown-menu a:hover{background-color:#111111;} .nav-collapse.in .btn-group{margin-top:5px;padding:0;} .nav-collapse .dropdown-menu{position:static;top:auto;left:auto;float:none;display:block;max-width:none;margin:0 15px;padding:0;background-color:transparent;border:none;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} .nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none;} .nav-collapse .dropdown-menu .divider{display:none;} .nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1);} .navbar .nav-collapse .nav.pull-right{float:none;margin-left:0;} .nav-collapse,.nav-collapse.collapse{overflow:hidden;height:0;} .navbar .btn-navbar{display:block;} .navbar-static .navbar-inner{padding-left:10px;padding-right:10px;}}@media (min-width:980px){.nav-collapse.collapse{height:auto !important;overflow:visible !important;}}
|
data/lib/riddick/server.rb
CHANGED
@@ -1,40 +1,55 @@
|
|
1
1
|
require 'riddick'
|
2
2
|
|
3
3
|
module Riddick
|
4
|
+
# Main Riddick GUI.
|
5
|
+
# Can be run as a stand-alone app or mounten into another Rails app.
|
6
|
+
# All translations cam be changed (see README for further details).
|
7
|
+
# To change the templates, subclass Riddick::Server and set change the view path.
|
4
8
|
class Server < Sinatra::Base
|
9
|
+
# I18n load the fallback translations lazy.
|
10
|
+
# To correctly display the default translations, we have to ensure they are loaded on startup.
|
5
11
|
Riddick::Backends.simple.init_translations
|
6
12
|
|
7
13
|
helpers do
|
14
|
+
# Build an internal URL.
|
8
15
|
def url(*parts)
|
9
16
|
[request.script_name, parts].join('/').squeeze '/'
|
10
17
|
end
|
11
18
|
|
19
|
+
# URL for the main interface.
|
12
20
|
def root_url
|
13
21
|
url '/'
|
14
22
|
end
|
15
23
|
|
24
|
+
# URL for displaying default translations only.
|
16
25
|
def default_url
|
17
26
|
url 'default'
|
18
27
|
end
|
19
28
|
|
29
|
+
# URL for displaying custom translations only.
|
20
30
|
def my_url
|
21
31
|
url 'my'
|
22
32
|
end
|
23
33
|
|
34
|
+
# URL for storing a translation.
|
24
35
|
def set_url
|
25
36
|
url 'set'
|
26
37
|
end
|
27
38
|
|
39
|
+
# URL for deleting a translation.
|
28
40
|
def del_url(k)
|
29
41
|
url('del') + "?k=#{URI.escape k}"
|
30
42
|
end
|
31
43
|
|
44
|
+
# Truncate a string with default length 30. Truncation string is '...' by default
|
45
|
+
# and can be changed by changing the appropriate translation (see README for further details).
|
32
46
|
def truncate(v, l = 30)
|
33
47
|
s = v.to_s
|
34
|
-
s.size > l ? s.first(l) + '...' : s
|
48
|
+
s.size > l ? s.first(l) + I18n.t('riddick.truncation', default: '...') : s
|
35
49
|
end
|
36
50
|
end
|
37
51
|
|
52
|
+
# Render index page with all translations.
|
38
53
|
get '/' do
|
39
54
|
predefined = Riddick::Backends.simple.translations
|
40
55
|
custom = Riddick::Backends.key_value.translations
|
@@ -42,34 +57,47 @@ module Riddick
|
|
42
57
|
erb :index
|
43
58
|
end
|
44
59
|
|
60
|
+
# Render index page with default translations only.
|
45
61
|
get '/default' do
|
46
62
|
@translations = Riddick::Backends.simple.translations
|
47
63
|
erb :index
|
48
64
|
end
|
49
65
|
|
66
|
+
# Render index page with custom translations only.
|
50
67
|
get '/my' do
|
51
68
|
@translations = Riddick::Backends.key_value.translations
|
52
69
|
erb :index
|
53
70
|
end
|
54
71
|
|
72
|
+
# Store a translation.
|
73
|
+
# Params (both have to be non-empty values):
|
74
|
+
# k - path for the translation (including the locale).
|
75
|
+
# v - the translation itself.
|
55
76
|
post '/set' do
|
56
77
|
k, v = params[:k], params[:v]
|
57
78
|
if k && v && !k.empty? && !v.empty?
|
58
79
|
Riddick::Backends.store_translation k, v
|
59
|
-
session[:flash_success] = '
|
80
|
+
session[:flash_success] = I18n.t('riddick.notice.set.success',
|
81
|
+
default: 'Translation successfully stored!')
|
60
82
|
else
|
61
|
-
session[:flash_error] = '
|
83
|
+
session[:flash_error] = I18n.t('riddick.notice.set.error',
|
84
|
+
default: 'Error: either path or translation is empty!')
|
62
85
|
end
|
63
86
|
redirect my_url
|
64
87
|
end
|
65
88
|
|
89
|
+
# Delete a translation.
|
90
|
+
# Params (have to be a non-empty value):
|
91
|
+
# k - path for the translation (including the locale).
|
66
92
|
get '/del' do
|
67
93
|
k = params[:k]
|
68
94
|
if k && !k.empty?
|
69
95
|
Riddick::Backends.delete_translation k
|
70
|
-
session[:flash_success] = '
|
96
|
+
session[:flash_success] = I18n.t('riddick.notice.del.success',
|
97
|
+
default: 'Translation successfully deleted!')
|
71
98
|
else
|
72
|
-
session[:flash_error] = '
|
99
|
+
session[:flash_error] = I18n.t('riddick.notice.del.error',
|
100
|
+
default: 'Error: no such key or key empty!')
|
73
101
|
end
|
74
102
|
redirect(request.referer || root_url)
|
75
103
|
end
|
data/lib/riddick/version.rb
CHANGED
data/lib/riddick/views/index.erb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html lang="en">
|
3
3
|
<head>
|
4
|
-
<title
|
4
|
+
<title><%= I18n.t 'riddick.head.title', default: 'Welcome to Riddick!' %></title>
|
5
5
|
<meta charset="utf-8">
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
7
7
|
<!--[if IE ]><meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"><![endif]-->
|
@@ -9,7 +9,6 @@
|
|
9
9
|
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
|
10
10
|
<![endif]-->
|
11
11
|
<link href="<%= url 'stylesheets/vendor/bootstrap.css' %>" media="all" rel="stylesheet" type="text/css">
|
12
|
-
<link href="<%= url 'stylesheets/vendor/bootstrap-responsive.css' %>" media="all" rel="stylesheet" type="text/css">
|
13
12
|
<link href="<%= url 'stylesheets/vendor/chosen.css' %>" media="all" rel="stylesheet" type="text/css">
|
14
13
|
<link href="<%= url 'stylesheets/riddick.css' %>" media="all" rel="stylesheet" type="text/css">
|
15
14
|
</head>
|
@@ -18,71 +17,79 @@
|
|
18
17
|
<div class="container">
|
19
18
|
<div class="navbar">
|
20
19
|
<div class="navbar-inner">
|
21
|
-
<a href="<%= root_url %>" class="brand"
|
20
|
+
<a href="<%= root_url %>" class="brand"><%= I18n.t 'riddick.nav.brand', default: 'Riddick' %></a>
|
22
21
|
<ul class="nav">
|
23
22
|
<li class="<%= 'active' if request.path == root_url %>">
|
24
|
-
<a href="<%= root_url %>"
|
25
|
-
</li>
|
23
|
+
<a href="<%= root_url %>"><%= I18n.t 'riddick.nav.all', default: 'All translations' %></a></li>
|
26
24
|
<li class="<%= 'active' if request.path == my_url %>">
|
27
|
-
<a href="<%= my_url %>"
|
28
|
-
</li>
|
25
|
+
<a href="<%= my_url %>"><%= I18n.t 'riddick.nav.my', default: 'My translations' %></a></li>
|
29
26
|
<li class="<%= 'active' if request.path == default_url %>">
|
30
|
-
<a href="<%= default_url %>"
|
31
|
-
</li>
|
27
|
+
<a href="<%= default_url %>"><%= I18n.t 'riddick.nav.default', default: 'Default translations' %></a></li>
|
32
28
|
</ul>
|
33
29
|
</div>
|
34
30
|
</div>
|
35
31
|
|
32
|
+
<!-- Form for posting new and changing existing translations. -->
|
36
33
|
<form action="<%= set_url %>" method="post" class="form-horizontal well">
|
37
|
-
<select name="k" data-chosen="chosen" data-for="textarea[name=v]"
|
34
|
+
<select name="k" data-chosen="chosen" data-for="textarea[name=v]"
|
35
|
+
data-placeholder="<%= I18n.t 'riddick.form.select.placeholder', default: 'en.greeting' %>">
|
38
36
|
<option></option>
|
39
37
|
<% @translations.each do |k, v| %>
|
40
38
|
<option value="<%= k %>" data-v='<%= v %>'><%= k %></option>
|
41
39
|
<% end %>
|
42
40
|
</select>
|
43
|
-
<button type="submit" class="btn btn-success"
|
44
|
-
<textarea name="v" type="text"
|
41
|
+
<button type="submit" class="btn btn-success"><%= I18n.t 'riddick.form.button', default: 'Change' %></button><br />
|
42
|
+
<textarea name="v" type="text"
|
43
|
+
placeholder="<%= I18n.t 'riddick.form.textarea.placeholder', default: 'Hello World!' %>"></textarea>
|
45
44
|
</form>
|
46
45
|
|
46
|
+
<!-- Flash notifications. -->
|
47
47
|
<% [:flash_success, :flash_error].each do |k| %>
|
48
48
|
<% if v = session.delete(k) %>
|
49
49
|
<div class="alert alert-<%= k.to_s.gsub 'flash_', '' %>"><%= v %></div>
|
50
50
|
<% end %>
|
51
51
|
<% end %>
|
52
52
|
|
53
|
+
<!-- List of translations. -->
|
53
54
|
<% if @translations.any? %>
|
54
55
|
<table class="table table-striped">
|
55
|
-
<tr
|
56
|
+
<tr>
|
57
|
+
<th><%= I18n.t 'riddick.table.header.path', default: 'Path' %></th>
|
58
|
+
<th><%= I18n.t 'riddick.table.header.translation', default: 'Translation' %></th>
|
59
|
+
<th><%= I18n.t 'riddick.table.header.actions', default: 'Actions' %></th>
|
60
|
+
</tr>
|
56
61
|
<% @translations.each_pair do |k, v| %>
|
57
62
|
<tr>
|
58
63
|
<% if v.kind_of? Riddick::Backends::KeyValue::Value %>
|
64
|
+
<!-- Details for custom translation. -->
|
59
65
|
<td><span class="badge badge-success"><%= k %></span></td>
|
60
66
|
<td><code>
|
61
|
-
|
62
|
-
|
67
|
+
<a rel="popover" data-title="<%= I18n.t 'riddick.table.popover.my', default: 'My translation' %>"
|
68
|
+
data-content='<%= v %>' data-trigger="hover"><%= truncate v %></a>
|
63
69
|
</code></td>
|
64
70
|
<td>
|
65
71
|
<a href="#custom-translations" data-choose="<%= k %>" data-v='<%= v %>'
|
66
|
-
class="btn btn-mini"
|
67
|
-
<a href="<%= del_url k %>" data-confirm="Are you sure?"
|
68
|
-
class="btn btn-mini btn-danger"
|
72
|
+
class="btn btn-mini"><%= I18n.t 'riddick.table.edit.my', default: 'Edit' %></a>
|
73
|
+
<a href="<%= del_url k %>" data-confirm="<%= I18n.t 'riddick.table.confirm', default: 'Are you sure?' %>"
|
74
|
+
class="btn btn-mini btn-danger"><%= I18n.t 'riddick.table.delete', default: 'Delete' %></a>
|
69
75
|
</td>
|
70
76
|
<% else %>
|
77
|
+
<!-- Details for default translation. -->
|
71
78
|
<td><span class="badge"><%= k %></span></td>
|
72
79
|
<td><code>
|
73
|
-
<a rel="popover" data-title="Default translation
|
74
|
-
data-trigger="hover"><%= truncate v %></a>
|
80
|
+
<a rel="popover" data-title="<%= I18n.t 'riddick.table.popover.default', default: 'Default translation' %>"
|
81
|
+
data-content='<%= v %>' data-trigger="hover"><%= truncate v %></a>
|
75
82
|
</code></td>
|
76
83
|
<td>
|
77
84
|
<a href="#custom-translations" data-choose="<%= k %>" data-v='<%= v %>'
|
78
|
-
class="btn btn-mini"
|
85
|
+
class="btn btn-mini"><%= I18n.t 'riddick.table.edit.default', default: 'Edit' %></a>
|
79
86
|
</td>
|
80
87
|
<% end %>
|
81
88
|
</tr>
|
82
89
|
<% end %>
|
83
90
|
</table>
|
84
91
|
<% else %>
|
85
|
-
<div class="alert alert-info"
|
92
|
+
<div class="alert alert-info"><%= I18n.t 'riddick.notice.empty', default: 'You have no translations yet.' %></div>
|
86
93
|
<% end %>
|
87
94
|
|
88
95
|
<div class="well"><a href="https://github.com/kostia/riddick">https://github.com/kostia/riddick</a></div>
|
data/riddick.gemspec
CHANGED
@@ -5,6 +5,8 @@ Gem::Specification.new do |gem|
|
|
5
5
|
gem.version = Riddick.version
|
6
6
|
gem.description = %{
|
7
7
|
Riddick is a simple Sintra app providing a GUI for key-value-backends for I18n.
|
8
|
+
By default it uses Redis as I18n backend for translations,
|
9
|
+
but you can add your own key-value backend.
|
8
10
|
}
|
9
11
|
gem.summary = 'Friendly GUI for managing your I18n translations'
|
10
12
|
gem.homepage = 'https://github.com/kostia/riddick'
|