quadro 0.5.7 → 0.5.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +6 -0
- data/app/assets/javascripts/quadro/application.js.coffee +1 -1
- data/app/assets/javascripts/quadro/plugins/jquery.charactercounter.min.js +15 -0
- data/app/assets/javascripts/quadro/plugins/lightbox.min.js +0 -1
- data/app/assets/javascripts/quadro/quadro.js.coffee +3 -0
- data/app/assets/javascripts/quadro/uploader.js.coffee +2 -1
- data/app/assets/stylesheets/quadro/quadro.css.sass +38 -8
- data/app/controllers/quadro/assets_controller.rb +6 -6
- data/app/controllers/quadro/pages_controller.rb +13 -13
- data/app/controllers/quadro/tools_controller.rb +1 -1
- data/app/controllers/quadro/widgets_controller.rb +2 -2
- data/app/models/quadro/asset/cover.rb +1 -0
- data/app/models/quadro/asset/image.rb +1 -0
- data/app/models/quadro/asset/slide.rb +1 -0
- data/app/models/quadro/page.rb +1 -1
- data/app/views/quadro/assets/edit.js.erb +6 -0
- data/app/views/quadro/assets/image/_form.html.haml +9 -7
- data/app/views/quadro/assets/image/_image.html.haml +1 -1
- data/app/views/quadro/assets/slide/_form.html.haml +10 -8
- data/app/views/quadro/assets/slide/_slide.html.haml +1 -1
- data/app/views/quadro/assets/update.js.erb +6 -0
- data/app/views/quadro/pages/_edit.html.haml +4 -5
- data/app/views/quadro/pages/_new.html.haml +2 -3
- data/app/views/quadro/pages/edit.js.erb +12 -2
- data/app/views/quadro/pages/new.js.erb +6 -0
- data/app/views/quadro/shared/_navigation.html.haml +1 -1
- data/app/views/quadro/shared/_toolbar.html.haml +14 -14
- data/app/views/quadro/users/_edit.html.haml +1 -2
- data/app/views/quadro/widgets/gallery/_uploader.html.haml +1 -1
- data/app/views/quadro/widgets/gallery/_widget.html.haml +6 -2
- data/app/views/quadro/widgets/slider/_uploader.html.haml +1 -1
- data/app/views/quadro/widgets/slider/_widget.html.haml +7 -1
- data/config/locales/en.yml +66 -0
- data/lib/quadro/version.rb +1 -1
- data/test/dummy/app/views/quadro/shared/_navigation.html.haml +3 -4
- metadata +4 -4
- data/app/assets/javascripts/quadro/plugins/jquery.show_char_limit.min.js +0 -1
- data/config/locales/quadro.en.yml +0 -52
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YmE1MTI2NWViNTExOTdmNjAxMjAxYWM2OTFjNmZhNGZjYTY2MzY3Nw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
Y2RlYzQxZDFmNTdiMzAxYjk2YmYxMDhlZDdjNmEyYjg4OTFhMzY5Yg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODA3OGE4MzU3MzNmMGUzNDY1M2U5ODdhYWI4ODk3YzZmMjk1ZGI5YTc5MDRi
|
10
|
+
ODljYjI4ZWVhZWQ2MDE5MTNkN2QzYzg3YjFjNjY0YTYwZmQ3MTQ0MTA3NDVh
|
11
|
+
OGFhNjhhZGU0OWU2NWFkODc4ZTFmODEyZWM4ODk2Yjc3MzRkYjg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MTU3NGVlZDkxYjRiZTBiYzdjM2UxOTU1ODk5NmU4MzYzMWJjYmVkOGM2NGQx
|
14
|
+
ZDM0YTlhNDIzODBlYzkyODA0ZTM5MjFlNWVmOWM1NjNkZjk2ZTZkOTU0OTRm
|
15
|
+
YTc3NzA5NzEyMGFlNDZiMWI1MGVkNDZiOGVjZThjN2E0YzAyMzc=
|
data/README.md
CHANGED
@@ -208,6 +208,12 @@ You can customize the HTML for the maintenance status page at this path:
|
|
208
208
|
public/maintenance.html
|
209
209
|
```
|
210
210
|
|
211
|
+
## Translations
|
212
|
+
|
213
|
+
For internationalization files you should add `quadro-i18n` gem.
|
214
|
+
|
215
|
+
*Note: please refer to gem's official project page [here](https://github.com/hugogilmar/quadro-i18n) for further information**
|
216
|
+
|
211
217
|
## Use it and enjoy it
|
212
218
|
|
213
219
|
Now when you log in into **Quadro** you will find a toolbar fixed at the bottom, to manage your new website or blog.
|
@@ -18,7 +18,7 @@
|
|
18
18
|
#= require quadro/plugins/jasny-bootstrap.min
|
19
19
|
#= require quadro/plugins/jquery.smartmenus.min
|
20
20
|
#= require quadro/plugins/jquery.smartmenus.bootstrap.min
|
21
|
-
#= require quadro/plugins/jquery.
|
21
|
+
#= require quadro/plugins/jquery.charactercounter.min
|
22
22
|
#= require quadro/plugins/pace.min
|
23
23
|
#= require quadro/plugins/lightbox.min
|
24
24
|
#= require quadro/plugins/gmaps.min
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/**
|
2
|
+
* Character Counter v1.5.1
|
3
|
+
* ======================
|
4
|
+
*
|
5
|
+
* Character Counter is a simple, Twitter style character counter.
|
6
|
+
*
|
7
|
+
* https://github.com/dtisgodsson/jquery-character-counter
|
8
|
+
*
|
9
|
+
* @author Darren Taylor
|
10
|
+
* @author Email: shout@darrenonthe.net
|
11
|
+
* @author Twitter: darrentaytay
|
12
|
+
* @author Website: http://darrenonthe.net
|
13
|
+
*
|
14
|
+
*/
|
15
|
+
!function(e){e.fn.characterCounter=function(t){function n(e){var t,n="";for(t in e)n+=" "+t+'="'+e[t]+'"';return n}function r(){var e=a.counterCssClass;return a.customFields["class"]&&(e+=" "+a.customFields["class"],delete a.customFields["class"]),"<"+a.counterWrapper+n(a.customFields)+' class="'+e+'"></'+a.counterWrapper+">"}function c(e){var t=a.counterFormat.replace(/%1/,e);return a.renderTotal&&(t+="/"+a.limit),t}function s(t){var n=e(t).val().length,r=a.counterSelector?e(a.counterSelector):e(t).nextAll("."+a.counterCssClass).first(),s=a.limit-n,o=0>s;a.increaseCounting&&(s=n,o=s>a.limit),o?(r.addClass(a.counterExceededCssClass),a.exceeded=!0,a.onExceed(n)):a.exceeded&&(r.removeClass(a.counterExceededCssClass),a.onDeceed(n),a.exceeded=!1),r.html(c(s))}function o(t){e(t).on("input change",function(){s(t)})}var u={exceeded:!1,counterSelector:!1,limit:150,renderTotal:!1,counterWrapper:"span",counterCssClass:"counter",counterFormat:"%1",counterExceededCssClass:"exceeded",increaseCounting:!1,onExceed:function(e){},onDeceed:function(e){},customFields:{}},a=e.extend(u,t);return this.each(function(){var t=e(this).attr("maxlength");"undefined"!=typeof t&&t!==!1&&e.extend(u,{limit:parseInt(e(this).attr("maxlength"))}),a.counterSelector||e(this).after(r()),o(this),s(this)})}}(jQuery);
|
@@ -10,4 +10,3 @@
|
|
10
10
|
* https://github.com/lokesh/lightbox2/blob/master/LICENSE
|
11
11
|
*/
|
12
12
|
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):a.lightbox=b(a.jQuery)}(this,function(a){function b(b){this.album=[],this.currentImageIndex=void 0,this.init(),this.options=a.extend({},this.constructor.defaults),this.option(b)}return b.defaults={albumLabel:"Image %1 of %2",alwaysShowNavOnTouchDevices:!1,fadeDuration:500,fitImagesInViewport:!0,positionFromTop:50,resizeDuration:700,showImageNumberLabel:!0,wrapAround:!1,disableScrolling:!1},b.prototype.option=function(b){a.extend(this.options,b)},b.prototype.imageCountLabel=function(a,b){return this.options.albumLabel.replace(/%1/g,a).replace(/%2/g,b)},b.prototype.init=function(){this.enable(),this.build()},b.prototype.enable=function(){var b=this;a("body").on("click","a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]",function(c){return b.start(a(c.currentTarget)),!1})},b.prototype.build=function(){var b=this;a('<div id="lightboxOverlay" class="lightboxOverlay"></div><div id="lightbox" class="lightbox"><div class="lb-outerContainer"><div class="lb-container"><img class="lb-image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" /><div class="lb-nav"><a class="lb-prev" href="" ></a><a class="lb-next" href="" ></a></div><div class="lb-loader"><a class="lb-cancel"></a></div></div></div><div class="lb-dataContainer"><div class="lb-data"><div class="lb-details"><span class="lb-caption"></span><span class="lb-number"></span></div><div class="lb-closeContainer"><a class="lb-close"></a></div></div></div></div>').appendTo(a("body")),this.$lightbox=a("#lightbox"),this.$overlay=a("#lightboxOverlay"),this.$outerContainer=this.$lightbox.find(".lb-outerContainer"),this.$container=this.$lightbox.find(".lb-container"),this.containerTopPadding=parseInt(this.$container.css("padding-top"),10),this.containerRightPadding=parseInt(this.$container.css("padding-right"),10),this.containerBottomPadding=parseInt(this.$container.css("padding-bottom"),10),this.containerLeftPadding=parseInt(this.$container.css("padding-left"),10),this.$overlay.hide().on("click",function(){return b.end(),!1}),this.$lightbox.hide().on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$outerContainer.on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$lightbox.find(".lb-prev").on("click",function(){return 0===b.currentImageIndex?b.changeImage(b.album.length-1):b.changeImage(b.currentImageIndex-1),!1}),this.$lightbox.find(".lb-next").on("click",function(){return b.currentImageIndex===b.album.length-1?b.changeImage(0):b.changeImage(b.currentImageIndex+1),!1}),this.$lightbox.find(".lb-loader, .lb-close").on("click",function(){return b.end(),!1})},b.prototype.start=function(b){function c(a){d.album.push({link:a.attr("href"),title:a.attr("data-title")||a.attr("title")})}var d=this,e=a(window);e.on("resize",a.proxy(this.sizeOverlay,this)),a("select, object, embed").css({visibility:"hidden"}),this.sizeOverlay(),this.album=[];var f,g=0,h=b.attr("data-lightbox");if(h){f=a(b.prop("tagName")+'[data-lightbox="'+h+'"]');for(var i=0;i<f.length;i=++i)c(a(f[i])),f[i]===b[0]&&(g=i)}else if("lightbox"===b.attr("rel"))c(b);else{f=a(b.prop("tagName")+'[rel="'+b.attr("rel")+'"]');for(var j=0;j<f.length;j=++j)c(a(f[j])),f[j]===b[0]&&(g=j)}var k=e.scrollTop()+this.options.positionFromTop,l=e.scrollLeft();this.$lightbox.css({top:k+"px",left:l+"px"}).fadeIn(this.options.fadeDuration),this.options.disableScrolling&&a("body").addClass("lb-disable-scrolling"),this.changeImage(g)},b.prototype.changeImage=function(b){var c=this;this.disableKeyboardNav();var d=this.$lightbox.find(".lb-image");this.$overlay.fadeIn(this.options.fadeDuration),a(".lb-loader").fadeIn("slow"),this.$lightbox.find(".lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption").hide(),this.$outerContainer.addClass("animating");var e=new Image;e.onload=function(){var f,g,h,i,j,k,l;d.attr("src",c.album[b].link),f=a(e),d.width(e.width),d.height(e.height),c.options.fitImagesInViewport&&(l=a(window).width(),k=a(window).height(),j=l-c.containerLeftPadding-c.containerRightPadding-20,i=k-c.containerTopPadding-c.containerBottomPadding-120,c.options.maxWidth&&c.options.maxWidth<j&&(j=c.options.maxWidth),c.options.maxHeight&&c.options.maxHeight<j&&(i=c.options.maxHeight),(e.width>j||e.height>i)&&(e.width/j>e.height/i?(h=j,g=parseInt(e.height/(e.width/h),10),d.width(h),d.height(g)):(g=i,h=parseInt(e.width/(e.height/g),10),d.width(h),d.height(g)))),c.sizeContainer(d.width(),d.height())},e.src=this.album[b].link,this.currentImageIndex=b},b.prototype.sizeOverlay=function(){this.$overlay.width(a(document).width()).height(a(document).height())},b.prototype.sizeContainer=function(a,b){function c(){d.$lightbox.find(".lb-dataContainer").width(g),d.$lightbox.find(".lb-prevLink").height(h),d.$lightbox.find(".lb-nextLink").height(h),d.showImage()}var d=this,e=this.$outerContainer.outerWidth(),f=this.$outerContainer.outerHeight(),g=a+this.containerLeftPadding+this.containerRightPadding,h=b+this.containerTopPadding+this.containerBottomPadding;e!==g||f!==h?this.$outerContainer.animate({width:g,height:h},this.options.resizeDuration,"swing",function(){c()}):c()},b.prototype.showImage=function(){this.$lightbox.find(".lb-loader").stop(!0).hide(),this.$lightbox.find(".lb-image").fadeIn("slow"),this.updateNav(),this.updateDetails(),this.preloadNeighboringImages(),this.enableKeyboardNav()},b.prototype.updateNav=function(){var a=!1;try{document.createEvent("TouchEvent"),a=this.options.alwaysShowNavOnTouchDevices?!0:!1}catch(b){}this.$lightbox.find(".lb-nav").show(),this.album.length>1&&(this.options.wrapAround?(a&&this.$lightbox.find(".lb-prev, .lb-next").css("opacity","1"),this.$lightbox.find(".lb-prev, .lb-next").show()):(this.currentImageIndex>0&&(this.$lightbox.find(".lb-prev").show(),a&&this.$lightbox.find(".lb-prev").css("opacity","1")),this.currentImageIndex<this.album.length-1&&(this.$lightbox.find(".lb-next").show(),a&&this.$lightbox.find(".lb-next").css("opacity","1"))))},b.prototype.updateDetails=function(){var b=this;if("undefined"!=typeof this.album[this.currentImageIndex].title&&""!==this.album[this.currentImageIndex].title&&this.$lightbox.find(".lb-caption").html(this.album[this.currentImageIndex].title).fadeIn("fast").find("a").on("click",function(b){void 0!==a(this).attr("target")?window.open(a(this).attr("href"),a(this).attr("target")):location.href=a(this).attr("href")}),this.album.length>1&&this.options.showImageNumberLabel){var c=this.imageCountLabel(this.currentImageIndex+1,this.album.length);this.$lightbox.find(".lb-number").text(c).fadeIn("fast")}else this.$lightbox.find(".lb-number").hide();this.$outerContainer.removeClass("animating"),this.$lightbox.find(".lb-dataContainer").fadeIn(this.options.resizeDuration,function(){return b.sizeOverlay()})},b.prototype.preloadNeighboringImages=function(){if(this.album.length>this.currentImageIndex+1){var a=new Image;a.src=this.album[this.currentImageIndex+1].link}if(this.currentImageIndex>0){var b=new Image;b.src=this.album[this.currentImageIndex-1].link}},b.prototype.enableKeyboardNav=function(){a(document).on("keyup.keyboard",a.proxy(this.keyboardAction,this))},b.prototype.disableKeyboardNav=function(){a(document).off(".keyboard")},b.prototype.keyboardAction=function(a){var b=27,c=37,d=39,e=a.keyCode,f=String.fromCharCode(e).toLowerCase();e===b||f.match(/x|o|c/)?this.end():"p"===f||e===c?0!==this.currentImageIndex?this.changeImage(this.currentImageIndex-1):this.options.wrapAround&&this.album.length>1&&this.changeImage(this.album.length-1):("n"===f||e===d)&&(this.currentImageIndex!==this.album.length-1?this.changeImage(this.currentImageIndex+1):this.options.wrapAround&&this.album.length>1&&this.changeImage(0))},b.prototype.end=function(){this.disableKeyboardNav(),a(window).off("resize",this.sizeOverlay),this.$lightbox.fadeOut(this.options.fadeDuration),this.$overlay.fadeOut(this.options.fadeDuration),a("select, object, embed").css({visibility:"visible"}),this.options.disableScrolling&&a("body").removeClass("lb-disable-scrolling")},new b});
|
13
|
-
//# sourceMappingURL=lightbox.min.map
|
@@ -2,13 +2,14 @@ class Uploader
|
|
2
2
|
constructor: (@element) ->
|
3
3
|
@path = @element.data 'path'
|
4
4
|
@type = @element.data 'type'
|
5
|
+
@hint = @element.data 'hint'
|
5
6
|
@dropper()
|
6
7
|
return
|
7
8
|
|
8
9
|
dropper: ->
|
9
10
|
@element.dropper
|
10
11
|
action: "#{@path}"
|
11
|
-
label:
|
12
|
+
label: "<p><i class=\"fa fa-picture-o fa-2x\"></i></p><p>#{@hint}</p>"
|
12
13
|
postData:
|
13
14
|
type: @type
|
14
15
|
postKey: 'asset[attachment]'
|
@@ -8,14 +8,6 @@ form
|
|
8
8
|
span.status
|
9
9
|
@extend .help-block
|
10
10
|
|
11
|
-
.unobtrusive-flash-container
|
12
|
-
position: fixed
|
13
|
-
top: 0px
|
14
|
-
left: 10%
|
15
|
-
width: 80%
|
16
|
-
z-index: 2000
|
17
|
-
padding: 8px 0px 0px
|
18
|
-
|
19
11
|
#quadro-toolbar
|
20
12
|
padding: 8px
|
21
13
|
|
@@ -56,6 +48,26 @@ form
|
|
56
48
|
#quadro-images
|
57
49
|
height: 13em
|
58
50
|
|
51
|
+
.modal-header
|
52
|
+
background: #e7e7e7
|
53
|
+
border-radius: 6px 6px 0px 0px
|
54
|
+
|
55
|
+
.widget-gallery
|
56
|
+
.thumbnail
|
57
|
+
position: relative
|
58
|
+
.caption
|
59
|
+
position: absolute
|
60
|
+
bottom: 0px
|
61
|
+
left: 0px
|
62
|
+
width: 100%
|
63
|
+
background: rgba(0, 0, 0, 0.5)
|
64
|
+
color: #fff
|
65
|
+
border-radius: 0px 0px 4px 4px
|
66
|
+
a
|
67
|
+
color: #fff
|
68
|
+
text-decoration: none
|
69
|
+
|
70
|
+
|
59
71
|
.quadro-brand
|
60
72
|
text-decoration: none !important
|
61
73
|
|
@@ -92,9 +104,19 @@ form
|
|
92
104
|
right: 20px
|
93
105
|
|
94
106
|
.slide
|
107
|
+
position: relative
|
95
108
|
img
|
96
109
|
width: 100%
|
97
110
|
|
111
|
+
h2.slide-description
|
112
|
+
position: absolute
|
113
|
+
right: 12px
|
114
|
+
bottom: 12px
|
115
|
+
background: rgba(0, 0, 0, 0.5)
|
116
|
+
color: #fff
|
117
|
+
padding: 4px 8px
|
118
|
+
margin: 0px
|
119
|
+
|
98
120
|
a.thumbnail
|
99
121
|
img
|
100
122
|
width: 100%
|
@@ -109,3 +131,11 @@ a.thumbnail
|
|
109
131
|
|
110
132
|
.embed-responsive
|
111
133
|
margin: 18px 0px
|
134
|
+
|
135
|
+
.unobtrusive-flash-container
|
136
|
+
position: fixed
|
137
|
+
top: 0px
|
138
|
+
left: 10%
|
139
|
+
width: 80%
|
140
|
+
z-index: 2000
|
141
|
+
padding: 8px 0px 0px
|
@@ -8,25 +8,25 @@ module Quadro
|
|
8
8
|
|
9
9
|
def create
|
10
10
|
if asset.save
|
11
|
-
flash[:notice] = t('flash.created')
|
11
|
+
flash[:notice] = t('quadro.flash.created')
|
12
12
|
else
|
13
|
-
flash[:alert] = t('flash.not_created')
|
13
|
+
flash[:alert] = t('quadro.flash.not_created')
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
17
|
def update
|
18
18
|
if asset.update_attributes(params[:asset])
|
19
|
-
flash[:notice] = t('flash.updated')
|
19
|
+
flash[:notice] = t('quadro.flash.updated')
|
20
20
|
else
|
21
|
-
flash[:alert] = t('flash.not_updated')
|
21
|
+
flash[:alert] = t('quadro.flash.not_updated')
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
25
|
def destroy
|
26
26
|
if asset.destroy
|
27
|
-
flash[:notice] = t('flash.deleted')
|
27
|
+
flash[:notice] = t('quadro.flash.deleted')
|
28
28
|
else
|
29
|
-
flash[:alert] = t('flash.not_deleted')
|
29
|
+
flash[:alert] = t('quadro.flash.not_deleted')
|
30
30
|
end
|
31
31
|
end
|
32
32
|
end
|
@@ -11,29 +11,29 @@ module Quadro
|
|
11
11
|
def create
|
12
12
|
page.author = current_user
|
13
13
|
if page.save
|
14
|
-
flash[:notice] = t('flash.created')
|
14
|
+
flash[:notice] = t('quadro.flash.created')
|
15
15
|
else
|
16
|
-
flash[:alert] = t('flash.not_created')
|
16
|
+
flash[:alert] = t('quadro.flash.not_created')
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
20
20
|
def update
|
21
21
|
if page.update_attributes(params[:page])
|
22
|
-
flash[:notice] = t('flash.updated')
|
22
|
+
flash[:notice] = t('quadro.flash.updated')
|
23
23
|
else
|
24
|
-
flash[:alert] = t('flash.not_updated')
|
24
|
+
flash[:alert] = t('quadro.flash.not_updated')
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
28
|
def destroy
|
29
29
|
unless page.is_root?
|
30
30
|
if page.destroy
|
31
|
-
flash[:notice] = t('flash.deleted')
|
31
|
+
flash[:notice] = t('quadro.flash.deleted')
|
32
32
|
else
|
33
|
-
flash[:alert] = t('flash.not_deleted')
|
33
|
+
flash[:alert] = t('quadro.flash.not_deleted')
|
34
34
|
end
|
35
35
|
else
|
36
|
-
flash[:alert] = t('flash.could_not_be_deleted')
|
36
|
+
flash[:alert] = t('quadro.flash.could_not_be_deleted')
|
37
37
|
end
|
38
38
|
end
|
39
39
|
|
@@ -42,25 +42,25 @@ module Quadro
|
|
42
42
|
interaction.user_agent = request.user_agent
|
43
43
|
interaction.content = params[:form]
|
44
44
|
if interaction.save
|
45
|
-
flash[:notice] = t('flash.created')
|
45
|
+
flash[:notice] = t('quadro.flash.created')
|
46
46
|
else
|
47
|
-
flash[:alert] = t('flash.not_created')
|
47
|
+
flash[:alert] = t('quadro.flash.not_created')
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
51
|
def publish
|
52
52
|
if page.publish!
|
53
|
-
flash[:notice] = t('flash.published')
|
53
|
+
flash[:notice] = t('quadro.flash.published')
|
54
54
|
else
|
55
|
-
flash[:alert] = t('flash.not_published')
|
55
|
+
flash[:alert] = t('quadro.flash.not_published')
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
59
59
|
def unpublish
|
60
60
|
if page.unpublish!
|
61
|
-
flash[:notice] = t('flash.unpublished')
|
61
|
+
flash[:notice] = t('quadro.flash.unpublished')
|
62
62
|
else
|
63
|
-
flash[:alert] = t('flash.not_unpublished')
|
63
|
+
flash[:alert] = t('quadro.flash.not_unpublished')
|
64
64
|
end
|
65
65
|
end
|
66
66
|
|
@@ -8,9 +8,9 @@ module Quadro
|
|
8
8
|
|
9
9
|
def update
|
10
10
|
if widget.update_attributes(params[:widget])
|
11
|
-
flash[:notice] = t('flash.updated')
|
11
|
+
flash[:notice] = t('quadro.flash.updated')
|
12
12
|
else
|
13
|
-
flash[:alert] = t('flash.not_updated')
|
13
|
+
flash[:alert] = t('quadro.flash.not_updated')
|
14
14
|
end
|
15
15
|
|
16
16
|
respond_with widget
|
@@ -6,6 +6,7 @@ module Quadro
|
|
6
6
|
has_attached_file :attachment, styles: { thumb: '200x200#', small: '800x600>', medium: '1024x768>', large: '1280x1024>' }, default_url: '/assets/quadro/missing/cover/:style.png'
|
7
7
|
|
8
8
|
# validations
|
9
|
+
validates :alt, length: { maximum: 60 }
|
9
10
|
validates_attachment :attachment, content_type: { content_type: ['image/jpg', 'image/jpeg', 'image/png', 'image/gif'] }
|
10
11
|
|
11
12
|
# methods
|
@@ -6,6 +6,7 @@ module Quadro
|
|
6
6
|
has_attached_file :attachment, styles: { thumb: '200x200#', small: '320x240>', medium: '640x480>', large: '800x600>' }, default_url: '/assets/quadro/missing/image/:style.png'
|
7
7
|
|
8
8
|
# validations
|
9
|
+
validates :alt, length: { maximum: 60 }
|
9
10
|
validates_attachment :attachment, content_type: { content_type: ['image/jpg', 'image/jpeg', 'image/png', 'image/gif'] }
|
10
11
|
|
11
12
|
# methods
|
@@ -6,6 +6,7 @@ module Quadro
|
|
6
6
|
has_attached_file :attachment, styles: { thumb: '200x200#', small: '640x480>', medium: '800x600>', large: '1024x768>' }, default_url: '/assets/quadro/missing/slide/:style.png'
|
7
7
|
|
8
8
|
# validations
|
9
|
+
validates :alt, length: { maximum: 60 }
|
9
10
|
validates_attachment :attachment, content_type: { content_type: ['image/jpg', 'image/jpeg', 'image/png', 'image/gif'] }
|
10
11
|
|
11
12
|
# methods
|
data/app/models/quadro/page.rb
CHANGED
@@ -12,7 +12,7 @@ module Quadro
|
|
12
12
|
# validations
|
13
13
|
validates :title, presence: true, length: { maximum: 60 }
|
14
14
|
validates :slug, uniqueness: true
|
15
|
-
validates :summary, length: { maximum:
|
15
|
+
validates :summary, length: { maximum: 155 }
|
16
16
|
|
17
17
|
# associations
|
18
18
|
belongs_to :author, class_name: Quadro::User
|
@@ -5,5 +5,11 @@
|
|
5
5
|
<% when 'slide' %>
|
6
6
|
$("#quadro-modal .modal-content").html("<%= escape_javascript(render('quadro/assets/slide/form', asset: asset, widget: widget, page: page)) %>");
|
7
7
|
<% end %>
|
8
|
+
$("#asset_alt").characterCounter({
|
9
|
+
limit: 60,
|
10
|
+
counterWrapper: "p",
|
11
|
+
counterCssClass: "help-block",
|
12
|
+
counterFormat: "%1 <%= t('quadro.field.chars_remaining') %>"
|
13
|
+
});
|
8
14
|
$("#quadro-modal").modal("show");
|
9
15
|
<% end %>
|
@@ -1,8 +1,7 @@
|
|
1
1
|
.modal-header
|
2
2
|
%button.close(data-dismiss="modal" type="button")
|
3
3
|
%span(aria-hidden="true") ×
|
4
|
-
|
5
|
-
%h4.modal-title Edit image
|
4
|
+
%h4.modal-title= t('quadro.modal.edit')
|
6
5
|
.modal-body
|
7
6
|
= simple_form_for asset, as: :asset, url: (widget.present? ? page_widget_asset_path(page_id: page.id, widget_id: widget.id, id: asset.id) : page_asset_path(page_id: page.id, id: asset.id)), method: :put, multipart: true, remote: true do |form|
|
8
7
|
.row
|
@@ -13,13 +12,16 @@
|
|
13
12
|
.fileinput-preview.fileinput-exists.thumbnail
|
14
13
|
.text-center
|
15
14
|
%span.btn.btn-default.btn-file
|
16
|
-
%span.fileinput-new
|
17
|
-
%span.fileinput-exists
|
15
|
+
%span.fileinput-new= t('quadro.field.upload.select')
|
16
|
+
%span.fileinput-exists= t('quadro.field.upload.change')
|
18
17
|
= form.input_field :attachment
|
19
|
-
%a.btn.btn-default.fileinput-exists(data-dismiss="fileinput" href="#")
|
18
|
+
%a.btn.btn-default.fileinput-exists(data-dismiss="fileinput" href="#")= t('quadro.field.upload.remove')
|
20
19
|
.col-md-8
|
21
20
|
= form.input :alt, input_html: { class: 'form-control' }
|
22
|
-
|
23
|
-
|
21
|
+
.row
|
22
|
+
.col-md-6
|
23
|
+
= form.input :width, input_html: { class: 'form-control' }
|
24
|
+
.col-md-6
|
25
|
+
= form.input :height, input_html: { class: 'form-control' }
|
24
26
|
.text-right
|
25
27
|
= form.submit class: 'btn btn-primary'
|
@@ -6,5 +6,5 @@
|
|
6
6
|
|
7
7
|
= link_to (widget.present? ? edit_page_widget_asset_path(page_id: page.id, widget_id: widget.id, id: asset.id) : edit_page_asset_path(id: asset.id, page_id: page.id)), remote: true, class: "btn btn-link btn-xs" do
|
8
8
|
%i.fa.fa-pencil.text-muted
|
9
|
-
= link_to (widget.present? ? page_widget_asset_path(page_id: page.id, widget_id: widget.id, id: asset.id) : page_asset_path(id: asset.id, page_id: page.id)), method: "delete", confirm: t('confirmation.image'), remote: true, class: "btn btn-link btn-xs" do
|
9
|
+
= link_to (widget.present? ? page_widget_asset_path(page_id: page.id, widget_id: widget.id, id: asset.id) : page_asset_path(id: asset.id, page_id: page.id)), method: "delete", confirm: t('quadro.confirmation.image'), remote: true, class: "btn btn-link btn-xs" do
|
10
10
|
%i.fa.fa-trash-o.text-danger
|
@@ -1,8 +1,7 @@
|
|
1
1
|
.modal-header
|
2
2
|
%button.close(data-dismiss="modal" type="button")
|
3
3
|
%span(aria-hidden="true") ×
|
4
|
-
|
5
|
-
%h4.modal-title Edit slide
|
4
|
+
%h4.modal-title= t('quadro.modal.edit')
|
6
5
|
.modal-body
|
7
6
|
= simple_form_for asset, as: :asset, url: (widget.present? ? page_widget_asset_path(page_id: page.id, widget_id: widget.id, id: asset.id) : page_asset_path(page_id: page.id, id: asset.id)), method: :put, multipart: true, remote: true do |form|
|
8
7
|
.row
|
@@ -13,14 +12,17 @@
|
|
13
12
|
.fileinput-preview.fileinput-exists.thumbnail
|
14
13
|
.text-center
|
15
14
|
%span.btn.btn-default.btn-file
|
16
|
-
%span.fileinput-new
|
17
|
-
%span.fileinput-exists
|
15
|
+
%span.fileinput-new= t('quadro.field.upload.select')
|
16
|
+
%span.fileinput-exists= t('quadro.field.upload.change')
|
18
17
|
= form.input_field :attachment
|
19
|
-
%a.btn.btn-default.fileinput-exists(data-dismiss="fileinput" href="#")
|
18
|
+
%a.btn.btn-default.fileinput-exists(data-dismiss="fileinput" href="#")= t('quadro.field.upload.remove')
|
20
19
|
.col-md-8
|
21
20
|
= form.input :alt, input_html: { class: 'form-control' }
|
22
|
-
= form.input :
|
23
|
-
|
24
|
-
|
21
|
+
= form.input :href, as: :url, input_html: { class: 'form-control' }
|
22
|
+
.row
|
23
|
+
.col-md-6
|
24
|
+
= form.input :width, input_html: { class: 'form-control' }
|
25
|
+
.col-md-6
|
26
|
+
= form.input :height, input_html: { class: 'form-control' }
|
25
27
|
.text-right
|
26
28
|
= form.submit class: 'btn btn-primary'
|
@@ -5,5 +5,5 @@
|
|
5
5
|
.pull-right
|
6
6
|
= link_to edit_page_widget_asset_path(id: asset.id, widget_id: widget.id, page_id: page.id), remote: true, class: "btn btn-link btn-xs" do
|
7
7
|
%i.fa.fa-pencil.text-muted
|
8
|
-
= link_to page_widget_asset_path(id: asset.id, widget_id: widget.id, page_id: page.id), method: "delete", confirm: t('confirmation.slide'), remote: true, class: "btn btn-link btn-xs" do
|
8
|
+
= link_to page_widget_asset_path(id: asset.id, widget_id: widget.id, page_id: page.id), method: "delete", confirm: t('quadro.confirmation.slide'), remote: true, class: "btn btn-link btn-xs" do
|
9
9
|
%i.fa.fa-trash-o.text-danger
|
@@ -5,6 +5,12 @@
|
|
5
5
|
<% when 'slide' %>
|
6
6
|
$("#quadro-modal .modal-content").html("<%= escape_javascript(render('quadro/assets/slide/form', asset: asset, widget: widget, page: page)) %>");
|
7
7
|
<% end %>
|
8
|
+
$("#asset_alt").characterCounter({
|
9
|
+
limit: 60,
|
10
|
+
counterWrapper: "p",
|
11
|
+
counterCssClass: "help-block",
|
12
|
+
counterFormat: "%1 <%= t('quadro.field.chars_remaining') %>"
|
13
|
+
});
|
8
14
|
<% else %>
|
9
15
|
<% case asset.type.constantize.short_name %>
|
10
16
|
<% when 'image' %>
|
@@ -1,8 +1,7 @@
|
|
1
1
|
.modal-header
|
2
2
|
%button.close(data-dismiss="modal" type="button")
|
3
3
|
%span(aria-hidden="true") ×
|
4
|
-
|
5
|
-
%h4.modal-title Edit page
|
4
|
+
%h4.modal-title= t('quadro.modal.edit')
|
6
5
|
.modal-body
|
7
6
|
= simple_form_for page, multipart: true, remote: true do |form|
|
8
7
|
- form.object.build_cover if form.object.cover.nil?
|
@@ -15,11 +14,11 @@
|
|
15
14
|
.fileinput-preview.fileinput-exists.thumbnail
|
16
15
|
.text-center
|
17
16
|
%span.btn.btn-default.btn-file
|
18
|
-
%span.fileinput-new
|
19
|
-
%span.fileinput-exists
|
17
|
+
%span.fileinput-new= t('quadro.field.upload.select')
|
18
|
+
%span.fileinput-exists= t('quadro.field.upload.change')
|
20
19
|
= form.simple_fields_for :cover do |cover|
|
21
20
|
= cover.input_field :attachment
|
22
|
-
%a.btn.btn-default.fileinput-exists(data-dismiss="fileinput" href="#")
|
21
|
+
%a.btn.btn-default.fileinput-exists(data-dismiss="fileinput" href="#")= t('quadro.field.upload.remove')
|
23
22
|
.col-md-8
|
24
23
|
= form.input :title, input_html: { class: 'form-control' }
|
25
24
|
= form.input :summary, as: :text, input_html: { class: 'form-control', rows: 2 }
|
@@ -1,11 +1,10 @@
|
|
1
1
|
.modal-header
|
2
2
|
%button.close(data-dismiss="modal" type="button")
|
3
3
|
%span(aria-hidden="true") ×
|
4
|
-
|
5
|
-
%h4.modal-title New page
|
4
|
+
%h4.modal-title= t('quadro.modal.new')
|
6
5
|
.modal-body
|
7
6
|
= simple_form_for page, url: pages_path(parent_id: params[:parent_id]), remote: true do |form|
|
8
7
|
= form.input :title, input_html: { class: 'form-control' }
|
9
|
-
= form.input :template, collection: page.templates, input_html: { class: 'form-control' }
|
8
|
+
= form.input :template, collection: page.templates, input_html: { class: 'form-control' }, include_blank: false
|
10
9
|
%p.text-right
|
11
10
|
= form.submit class: 'btn btn-primary'
|
@@ -1,6 +1,16 @@
|
|
1
1
|
$("#quadro-modal .modal-content").html("<%= escape_javascript(render('quadro/pages/edit', page: page)) %>");
|
2
|
-
$("#page_title").
|
3
|
-
|
2
|
+
$("#page_title").characterCounter({
|
3
|
+
limit: 60,
|
4
|
+
counterWrapper: "p",
|
5
|
+
counterCssClass: "help-block",
|
6
|
+
counterFormat: "%1 <%= t('quadro.field.chars_remaining') %>"
|
7
|
+
});
|
8
|
+
$("#page_summary").characterCounter({
|
9
|
+
limit: 155,
|
10
|
+
counterWrapper: "p",
|
11
|
+
counterCssClass: "help-block",
|
12
|
+
counterFormat: "%1 <%= t('quadro.field.chars_remaining') %>"
|
13
|
+
});
|
4
14
|
$('#page_published_at').datetimepicker({
|
5
15
|
defaultDate: '<%= page.published_at.to_s %>',
|
6
16
|
format: 'YYYY-MM-DD hh:mm:ss',
|
@@ -1,2 +1,8 @@
|
|
1
1
|
$("#quadro-modal .modal-content").html("<%= escape_javascript(render('quadro/pages/new', page: page)) %>");
|
2
|
+
$("#page_title").characterCounter({
|
3
|
+
limit: 60,
|
4
|
+
counterWrapper: "p",
|
5
|
+
counterCssClass: "help-block",
|
6
|
+
counterFormat: "%1 <%= t('quadro.field.chars_remaining') %>"
|
7
|
+
});
|
2
8
|
$("#quadro-modal").modal("show");
|
@@ -1,6 +1,6 @@
|
|
1
1
|
#quadro-toolbar.navbar.navbar-fixed-bottom
|
2
2
|
#quadro-gallery.well.well-sm.collapsed
|
3
|
-
#quadro-uploader.asset-dropper(data-assetable-type='Quadro::Page' data-assetable-id="#{page.id}" data-type='Quadro::Asset::Image' data-path="#{page_assets_path(page_id: page.id)}")
|
3
|
+
#quadro-uploader.asset-dropper(data-assetable-type='Quadro::Page' data-assetable-id="#{page.id}" data-type='Quadro::Asset::Image' data-path="#{page_assets_path(page_id: page.id)}" data-hint="#{t('quadro.field.uploader')}")
|
4
4
|
#quadro-images.asset-list.clearfix(data-assetable-type='Quadro::Page' data-assetable-id="#{page.id}")
|
5
5
|
- page.images.each do |image|
|
6
6
|
= render 'quadro/assets/image/image', asset: image, page: page
|
@@ -10,28 +10,28 @@
|
|
10
10
|
= image_tag 'quadro/quadro-logo-mini.png'
|
11
11
|
= link_to new_page_path(parent_id: page.id), remote: true, id: "quadro-new", class: "btn btn-default btn-sm" do
|
12
12
|
%i.fa.fa-plus
|
13
|
-
%span.hidden-xs.hidden-sm= t('toolbar.new')
|
13
|
+
%span.hidden-xs.hidden-sm= t('quadro.toolbar.new')
|
14
14
|
= link_to edit_page_path(page.slug), remote: true, id: "quadro-edit", class: "btn btn-default btn-sm" do
|
15
15
|
%i.fa.fa-pencil
|
16
|
-
%span.hidden-xs.hidden-sm= t('toolbar.edit')
|
17
|
-
= link_to page_path(page.slug), remote: true, method: "delete", confirm: t('confirmation.page'), id: "quadro-delete", class: "btn btn-default btn-sm" do
|
16
|
+
%span.hidden-xs.hidden-sm= t('quadro.toolbar.edit')
|
17
|
+
= link_to page_path(page.slug), remote: true, method: "delete", confirm: t('quadro.confirmation.page'), id: "quadro-delete", class: "btn btn-default btn-sm" do
|
18
18
|
%i.fa.fa-trash-o.text-danger
|
19
|
-
%span.hidden-xs.hidden-sm.text-danger= t('toolbar.delete')
|
19
|
+
%span.hidden-xs.hidden-sm.text-danger= t('quadro.toolbar.delete')
|
20
20
|
- unless page.is_root?
|
21
21
|
= link_to unpublish_page_path(page.slug), remote: true, id: "quadro-unpublish", class: "btn btn-default btn-sm #{page.unpublished? ? 'hidden' : ''}" do
|
22
22
|
%i.fa.fa-eye-slash
|
23
|
-
%span.hidden-xs.hidden-sm= t('toolbar.unpublish')
|
23
|
+
%span.hidden-xs.hidden-sm= t('quadro.toolbar.unpublish')
|
24
24
|
= link_to publish_page_path(page.slug), remote: true, id: "quadro-publish", class: "btn btn-default btn-sm #{page.published? ? 'hidden' : ''}" do
|
25
25
|
%i.fa.fa-eye
|
26
|
-
%span.hidden-xs.hidden-sm= t('toolbar.publish')
|
26
|
+
%span.hidden-xs.hidden-sm= t('quadro.toolbar.publish')
|
27
27
|
.pull-right
|
28
28
|
%a#quadro-save.btn.btn-default.btn-sm.hide
|
29
29
|
%i.fa.fa-floppy-o
|
30
|
-
%span.hidden-xs.hidden-sm= t('toolbar.save')
|
30
|
+
%span.hidden-xs.hidden-sm= t('quadro.toolbar.save')
|
31
31
|
%a#quadro-gallery-toggle.btn.btn-default.btn-sm.hidden-xs.hidden-sm
|
32
32
|
%i.fa.fa-picture-o
|
33
|
-
%span= t('toolbar.gallery')
|
34
|
-
%span.hidden-xs.hidden-sm= t('toolbar.editor')
|
33
|
+
%span= t('quadro.toolbar.gallery')
|
34
|
+
%span.hidden-xs.hidden-sm= t('quadro.toolbar.editor')
|
35
35
|
%button#quadro-airmode-off.btn.btn-default.btn-sm.hidden-xs.hidden-sm(type='button')
|
36
36
|
%i.fa.fa-toggle-on
|
37
37
|
%button#quadro-airmode-on.btn.btn-default.btn-sm.hidden-xs.hidden-sm.hidden(type='button')
|
@@ -46,14 +46,14 @@
|
|
46
46
|
%li
|
47
47
|
= link_to sitemap_notifier_path, remote: true do
|
48
48
|
%i.fa.fa-sitemap
|
49
|
-
= t('toolbar.sitemap')
|
49
|
+
= t('quadro.toolbar.sitemap')
|
50
50
|
%li
|
51
51
|
= link_to edit_user_path, remote: true do
|
52
52
|
%i.fa.fa-user
|
53
|
-
= t('toolbar.profile')
|
53
|
+
= t('quadro.toolbar.profile')
|
54
54
|
%li
|
55
55
|
= link_to destroy_user_session_path, method: :delete do
|
56
56
|
%i.fa.fa-sign-out
|
57
|
-
= t('toolbar.sign_out')
|
57
|
+
= t('quadro.toolbar.sign_out')
|
58
58
|
= link_to destroy_user_session_url, method: :delete, class: "btn btn-default btn-sm visible-xs-inline-block hidden-sm" do
|
59
|
-
= t('toolbar.sign_out')
|
59
|
+
= t('quadro.toolbar.sign_out')
|
@@ -1,8 +1,7 @@
|
|
1
1
|
.modal-header
|
2
2
|
%button.close(data-dismiss="modal" type="button")
|
3
3
|
%span(aria-hidden="true") ×
|
4
|
-
|
5
|
-
%h4.modal-title Edit user
|
4
|
+
%h4.modal-title= t('quadro.modal.edit')
|
6
5
|
.modal-body
|
7
6
|
= simple_form_for user, multipart: true, remote: true do |form|
|
8
7
|
.row
|
@@ -1,5 +1,5 @@
|
|
1
1
|
.asset-uploader
|
2
|
-
.asset-dropper(data-assetable-type='Quadro::Widget::Gallery' data-assetable-id="#{widget.id}" data-type='Quadro::Asset::Image' data-path="#{page_widget_assets_path(page_id: widget.page.id, widget_id: widget.id)}")
|
2
|
+
.asset-dropper(data-assetable-type='Quadro::Widget::Gallery' data-assetable-id="#{widget.id}" data-type='Quadro::Asset::Image' data-path="#{page_widget_assets_path(page_id: widget.page.id, widget_id: widget.id)}" data-hint="#{t('quadro.field.uploader')}")
|
3
3
|
.asset-list.clearfix(data-assetable-type='Quadro::Widget::Gallery' data-assetable-id="#{widget.id}")
|
4
4
|
- widget.images.each do |image|
|
5
5
|
= render 'quadro/assets/image/image', asset: image, widget: widget, page: page
|
@@ -2,5 +2,9 @@
|
|
2
2
|
.row
|
3
3
|
- widget.images.each do |image|
|
4
4
|
.col-xs-6.col-sm-3.col-md-2
|
5
|
-
|
6
|
-
=
|
5
|
+
.thumbnail
|
6
|
+
= link_to image.url(:large), data: { lightbox: widget.name, title: image.alt } do
|
7
|
+
= image_tag image.url(:thumb), alt: image.alt
|
8
|
+
- unless image.alt.blank?
|
9
|
+
.caption
|
10
|
+
%small= image.alt
|
@@ -1,5 +1,5 @@
|
|
1
1
|
.asset-uploader
|
2
|
-
.asset-dropper(data-assetable-type='Quadro::Widget::Slider' data-assetable-id="#{widget.id}" data-type='Quadro::Asset::Slide' data-path="#{page_widget_assets_path(page_id: widget.page.id, widget_id: widget.id)}")
|
2
|
+
.asset-dropper(data-assetable-type='Quadro::Widget::Slider' data-assetable-id="#{widget.id}" data-type='Quadro::Asset::Slide' data-path="#{page_widget_assets_path(page_id: widget.page.id, widget_id: widget.id)}" data-hint="#{t('quadro.field.uploader')}")
|
3
3
|
.asset-list.clearfix(data-assetable-type='Quadro::Widget::Slider' data-assetable-id="#{widget.id}")
|
4
4
|
- widget.slides.each do |slide|
|
5
5
|
= render 'quadro/assets/slide/slide', asset: slide, widget: widget, page: page
|
@@ -1,4 +1,10 @@
|
|
1
1
|
.widget.widget-slider
|
2
2
|
- widget.slides.each do |slide|
|
3
3
|
.slide
|
4
|
-
|
4
|
+
- unless slide.href.blank?
|
5
|
+
= link_to slide.href do
|
6
|
+
= image_tag slide.url(:medium), alt: slide.alt
|
7
|
+
%h2.slide-description= slide.alt
|
8
|
+
- else
|
9
|
+
= image_tag slide.url(:medium), alt: slide.alt
|
10
|
+
%h2.slide-description= slide.alt
|
@@ -0,0 +1,66 @@
|
|
1
|
+
en:
|
2
|
+
time:
|
3
|
+
formats:
|
4
|
+
atom: "%FT%TZ"
|
5
|
+
rss: "%a, %d %b %Y %H:%M:%S %z"
|
6
|
+
simple_form:
|
7
|
+
"yes": "Yes"
|
8
|
+
"no": "No"
|
9
|
+
required:
|
10
|
+
text: "required"
|
11
|
+
mark: "*"
|
12
|
+
error_notification:
|
13
|
+
default_message: "Please review the problems below:"
|
14
|
+
labels:
|
15
|
+
defaults:
|
16
|
+
email: "E-mail"
|
17
|
+
password_confirmation: "Confirm password"
|
18
|
+
alt: "Alternative text"
|
19
|
+
href: "Link to URL"
|
20
|
+
hints:
|
21
|
+
defaults:
|
22
|
+
placeholders:
|
23
|
+
defaults:
|
24
|
+
summary: "Text to display as description on search results"
|
25
|
+
quadro:
|
26
|
+
navigation:
|
27
|
+
sign_in: "Sign in"
|
28
|
+
toolbar:
|
29
|
+
new: "New sub page"
|
30
|
+
edit: "Edit"
|
31
|
+
delete: "Delete"
|
32
|
+
publish: "Publish"
|
33
|
+
unpublish: "Unpublish"
|
34
|
+
save: "Save"
|
35
|
+
gallery: "Gallery"
|
36
|
+
editor: "Editor"
|
37
|
+
sitemap: "Notify sitemap.xml"
|
38
|
+
profile: "Edit user"
|
39
|
+
sign_out: "Sign out"
|
40
|
+
modal:
|
41
|
+
new: "New"
|
42
|
+
edit: "Edit"
|
43
|
+
field:
|
44
|
+
chars_remaining: "chars remaining"
|
45
|
+
uploader: "Drag and drop files or click to select"
|
46
|
+
upload:
|
47
|
+
select: "Select"
|
48
|
+
change: "Change"
|
49
|
+
remove: "Remove"
|
50
|
+
flash:
|
51
|
+
created: "Successfully created"
|
52
|
+
not_created: "Was not successfully created"
|
53
|
+
updated: "Successfully updated"
|
54
|
+
not_updated: "Was not successfully updated"
|
55
|
+
deleted: "Successfully deleted"
|
56
|
+
could_not_be_deleted: "It could not be deleted"
|
57
|
+
not_deleted: "Was not successfully deleted"
|
58
|
+
published: "Successfully published"
|
59
|
+
not_published: "Was not successfully published"
|
60
|
+
unpublished: "Successfully unpublished"
|
61
|
+
not_unpublished: "Was not successfully unpublished"
|
62
|
+
notified: "Sitemap update notified"
|
63
|
+
confirmation:
|
64
|
+
page: "Are you sure of delete this page?"
|
65
|
+
image: "Are you sure of delete this image?"
|
66
|
+
slide: "Are you sure of delete this slide?"
|
data/lib/quadro/version.rb
CHANGED
@@ -2,16 +2,15 @@
|
|
2
2
|
.container
|
3
3
|
.navbar-header
|
4
4
|
%button.navbar-toggle.collapsed(data-target='#navigation' data-toggle='collapse' type='button')
|
5
|
-
%span.sr-only Toggle navigation
|
6
5
|
%span.icon-bar
|
7
6
|
%span.icon-bar
|
8
7
|
%span.icon-bar
|
9
8
|
= link_to root_path, class: 'navbar-brand' do
|
10
9
|
= Quadro.config.site
|
11
10
|
#navigation.collapse.navbar-collapse
|
11
|
+
= navigation_for root, class: "nav navbar-nav navbar-right"
|
12
12
|
- unless user_signed_in?
|
13
13
|
%ul.nav.navbar-nav.navbar-right
|
14
14
|
%li
|
15
|
-
= link_to new_user_session_path do
|
16
|
-
|
17
|
-
= navigation_for root, class: "nav navbar-nav navbar-right"
|
15
|
+
= link_to new_user_session_path, rel: "nofollow" do
|
16
|
+
= t('quadro.navigation.sign_in')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quadro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hugo Gilmar Erazo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-06-
|
11
|
+
date: 2016-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -645,8 +645,8 @@ files:
|
|
645
645
|
- app/assets/javascripts/quadro/plugins/bootstrap-datetimepicker.min.js
|
646
646
|
- app/assets/javascripts/quadro/plugins/gmaps.min.js
|
647
647
|
- app/assets/javascripts/quadro/plugins/jasny-bootstrap.min.js
|
648
|
+
- app/assets/javascripts/quadro/plugins/jquery.charactercounter.min.js
|
648
649
|
- app/assets/javascripts/quadro/plugins/jquery.fs.dropper.min.js
|
649
|
-
- app/assets/javascripts/quadro/plugins/jquery.show_char_limit.min.js
|
650
650
|
- app/assets/javascripts/quadro/plugins/jquery.smartmenus.bootstrap.min.js
|
651
651
|
- app/assets/javascripts/quadro/plugins/jquery.smartmenus.min.js
|
652
652
|
- app/assets/javascripts/quadro/plugins/lightbox.min.js
|
@@ -788,7 +788,7 @@ files:
|
|
788
788
|
- config/initializers/simple_form_bootstrap.rb
|
789
789
|
- config/initializers/sitemap.rb
|
790
790
|
- config/initializers/sitemap_notifier.rb
|
791
|
-
- config/locales/
|
791
|
+
- config/locales/en.yml
|
792
792
|
- config/routes.rb
|
793
793
|
- db/migrate/20141122163450_create_quadro_widgets.rb
|
794
794
|
- db/migrate/20141129022344_create_quadro_pages.rb
|
@@ -1 +0,0 @@
|
|
1
|
-
!function(t){function e(t){""==t.attr("id")&&t.attr("id",""+Math.floor(9999999999*Math.random()))}function r(t,e){var r=t.attr("maxlength");return(!r||""==r||-1==r||r>5e5)&&(r=e),r}function i(t){function e(t,e){return""+t}function r(t,e){return""+e}function i(t,e){var r=e>=0?"left":"over",i=1!=Math.abs(e)?"characters":"character";return""+Math.abs(e)+" "+i+" "+r}return"chars_typed"==t?e:"chars_left"==t?r:i}t.fn.showCharLimit=function(s,n){"number"==typeof s?(n||(n={}),n.maxlength=s):n=s||{},n=t.extend({error_class:"error",status_style:"text",status_element_suffix:"__status",status_min:0,newline_cost:1,strip:!0,deprecated_events:!0},n);var a=i(n.status_style);return t(this).bind("check.show-char-limit",function(){var i=t(this),s=i.val();n.strip&&(s=s.replace(/^\s+/,""),s=s.replace(/\s+$/,""));var h=s.length;1!==n.newline_cost&&/[\n\r]/.test(s)&&(h+=/[\n\r]/g.exec(s).length*(n.newline_cost-1));var o=r(i,n.maxlength),c=o-h,l=n.status_element?n.status_element:"#"+i.attr("id")+n.status_element_suffix;if(0==t(l).size()&&(e(i),l="#"+i.attr("id")+n.status_element_suffix,i.after('<span class="status" id="'+i.attr("id")+n.status_element_suffix+'"></span>')),h<n.status_min?t(l).html(""):t(l).html(a(h,c)),n.error_element||n.error_element_suffix){var u=n.error_element?n.error_element:"#"+i.attr("id")+n.error_element_suffix;t(u).toggleClass(n.error_class,0>c)}i.trigger(0>c?"error.show-char-limit":"ok.show-char-limit")}),this.each(function(){n.deprecated_events&&t(this).bind("showLimit ok.show-char-limit error.show-char-limit",function(e){"showLimit"==e.type?t(this).trigger("check.show-char-limit"):"ok"==e.type?t(this).trigger("validationOk"):"error"==e.type&&t(this).trigger("validationError")}),t(this).trigger("check.show-char-limit").keyup(function(){t(this).trigger("check.show-char-limit")}).change(function(){t(this).trigger("check.show-char-limit")})})},t.fn.show_char_limit=t.fn.showCharLimit}(jQuery);
|
@@ -1,52 +0,0 @@
|
|
1
|
-
en:
|
2
|
-
time:
|
3
|
-
formats:
|
4
|
-
atom: "%FT%TZ"
|
5
|
-
rss: "%a, %d %b %Y %H:%M:%S %z"
|
6
|
-
simple_form:
|
7
|
-
"yes": "Yes"
|
8
|
-
"no": "No"
|
9
|
-
required:
|
10
|
-
text: "required"
|
11
|
-
mark: "*"
|
12
|
-
error_notification:
|
13
|
-
default_message: "Please review the problems below:"
|
14
|
-
labels:
|
15
|
-
defaults:
|
16
|
-
email: "E-mail"
|
17
|
-
password_confirmation: "Confirm password"
|
18
|
-
hints:
|
19
|
-
defaults:
|
20
|
-
placeholders:
|
21
|
-
defaults:
|
22
|
-
summary: "Text to display as description on search results"
|
23
|
-
navigation:
|
24
|
-
sign_in: "Sign in"
|
25
|
-
toolbar:
|
26
|
-
new: "New sub page"
|
27
|
-
edit: "Edit"
|
28
|
-
delete: "Delete"
|
29
|
-
publish: "Publish"
|
30
|
-
unpublish: "Unpublish"
|
31
|
-
gallery: "Gallery"
|
32
|
-
editor: "Editor"
|
33
|
-
sitemap: "Notify sitemap.xml"
|
34
|
-
profile: "Edit user"
|
35
|
-
sign_out: "Sign out"
|
36
|
-
flash:
|
37
|
-
created: "Successfully created"
|
38
|
-
not_created: "Was not successfully created"
|
39
|
-
updated: "Successfully updated"
|
40
|
-
not_updated: "Was not successfully updated"
|
41
|
-
deleted: "Successfully deleted"
|
42
|
-
could_not_be_deleted: "It could not be deleted"
|
43
|
-
not_deleted: "Was not successfully deleted"
|
44
|
-
published: "Successfully published"
|
45
|
-
not_published: "Was not successfully published"
|
46
|
-
unpublished: "Successfully unpublished"
|
47
|
-
not_unpublished: "Was not successfully unpublished"
|
48
|
-
notified: "Sitemap update notified"
|
49
|
-
confirmation:
|
50
|
-
page: "Are you sure of delete this page?"
|
51
|
-
image: "Are you sure of delete this image?"
|
52
|
-
slide: "Are you sure of delete this slide?"
|