This commit is contained in:
Nicolas Bally 2020-04-21 12:57:26 +02:00
parent d904b58c91
commit 91ae4abd38
15 changed files with 266 additions and 182 deletions

10
Gemfile
View File

@ -1,8 +1,8 @@
source 'http://rubygems.org' source 'http://rubygems.org'
gem 'rails', '4.2.6' gem 'rails', '4.2.11.1'
gem "mysql2", '~> 0.3.18' gem "mysql2", '0.4.10'
gem 'sass-rails', '5.0.3' gem 'sass-rails', '5.0.3'
@ -35,7 +35,7 @@ group :development, :test do
gem "capistrano", '2.15.9', group: :development, require: false gem "capistrano", '2.15.9', group: :development, require: false
gem "rvm-capistrano",'1.4.1', group: :development gem "rvm-capistrano",'1.4.1', group: :development
gem 'net-ssh', '~>2.7.0' gem 'net-ssh', '~> 5.1.0'
gem 'web-console', '~> 2.0' gem 'web-console', '~> 2.0'
@ -96,4 +96,6 @@ gem 'axlsx', '3.0.0.pre'
gem 'axlsx_rails' gem 'axlsx_rails'
gem 'zip-zip' gem 'zip-zip'
gem "tiny_tds", "1.3.0"

View File

@ -1,38 +1,37 @@
GEM GEM
remote: http://rubygems.org/ remote: http://rubygems.org/
specs: specs:
actionmailer (4.2.6) actionmailer (4.2.11.1)
actionpack (= 4.2.6) actionpack (= 4.2.11.1)
actionview (= 4.2.6) actionview (= 4.2.11.1)
activejob (= 4.2.6) activejob (= 4.2.11.1)
mail (~> 2.5, >= 2.5.4) mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5) rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.6) actionpack (4.2.11.1)
actionview (= 4.2.6) actionview (= 4.2.11.1)
activesupport (= 4.2.6) activesupport (= 4.2.11.1)
rack (~> 1.6) rack (~> 1.6)
rack-test (~> 0.6.2) rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5) rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2) rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.6) actionview (4.2.11.1)
activesupport (= 4.2.6) activesupport (= 4.2.11.1)
builder (~> 3.1) builder (~> 3.1)
erubis (~> 2.7.0) erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5) rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2) rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (4.2.6) activejob (4.2.11.1)
activesupport (= 4.2.6) activesupport (= 4.2.11.1)
globalid (>= 0.3.0) globalid (>= 0.3.0)
activemodel (4.2.6) activemodel (4.2.11.1)
activesupport (= 4.2.6) activesupport (= 4.2.11.1)
builder (~> 3.1) builder (~> 3.1)
activerecord (4.2.6) activerecord (4.2.11.1)
activemodel (= 4.2.6) activemodel (= 4.2.11.1)
activesupport (= 4.2.6) activesupport (= 4.2.11.1)
arel (~> 6.0) arel (~> 6.0)
activesupport (4.2.6) activesupport (4.2.11.1)
i18n (~> 0.7) i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1) minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4) thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1) tzinfo (~> 1.1)
@ -51,7 +50,7 @@ GEM
bcrypt (3.1.13) bcrypt (3.1.13)
binding_of_caller (0.8.0) binding_of_caller (0.8.0)
debug_inspector (>= 0.0.1) debug_inspector (>= 0.0.1)
builder (3.2.3) builder (3.2.4)
byebug (11.0.1) byebug (11.0.1)
capistrano (2.15.9) capistrano (2.15.9)
highline highline
@ -71,7 +70,7 @@ GEM
execjs execjs
coffee-script-source (1.12.2) coffee-script-source (1.12.2)
commonjs (0.2.7) commonjs (0.2.7)
concurrent-ruby (1.1.5) concurrent-ruby (1.1.6)
countries (3.0.0) countries (3.0.0)
i18n_data (~> 0.8.0) i18n_data (~> 0.8.0)
sixarm_ruby_unaccent (~> 1.1) sixarm_ruby_unaccent (~> 1.1)
@ -79,7 +78,7 @@ GEM
country_select (4.0.0) country_select (4.0.0)
countries (~> 3.0) countries (~> 3.0)
sort_alphabetical (~> 1.0) sort_alphabetical (~> 1.0)
crass (1.0.4) crass (1.0.6)
curb (0.9.10) curb (0.9.10)
debug_inspector (0.0.3) debug_inspector (0.0.3)
elasticsearch (7.1.0) elasticsearch (7.1.0)
@ -161,7 +160,7 @@ GEM
less (~> 2.6.0) less (~> 2.6.0)
sprockets (>= 2) sprockets (>= 2)
libv8 (3.16.14.19) libv8 (3.16.14.19)
loofah (2.2.3) loofah (2.5.0)
crass (~> 1.0.2) crass (~> 1.0.2)
nokogiri (>= 1.5.9) nokogiri (>= 1.5.9)
mail (2.7.1) mail (2.7.1)
@ -170,21 +169,21 @@ GEM
mime-types-data (~> 3.2015) mime-types-data (~> 3.2015)
mime-types-data (3.2019.0331) mime-types-data (3.2019.0331)
mimemagic (0.3.3) mimemagic (0.3.3)
mini_mime (1.0.1) mini_mime (1.0.2)
mini_portile2 (2.4.0) mini_portile2 (2.4.0)
minitest (5.11.3) minitest (5.14.0)
multi_json (1.13.1) multi_json (1.13.1)
multi_xml (0.6.0) multi_xml (0.6.0)
multipart-post (2.1.1) multipart-post (2.1.1)
mysql2 (0.3.21) mysql2 (0.4.10)
net-scp (2.0.0) net-scp (2.0.0)
net-ssh (>= 2.6.5, < 6.0.0) net-ssh (>= 2.6.5, < 6.0.0)
net-sftp (2.1.2) net-sftp (2.1.2)
net-ssh (>= 2.6.5) net-ssh (>= 2.6.5)
net-ssh (2.7.0) net-ssh (5.1.0)
net-ssh-gateway (1.3.0) net-ssh-gateway (1.3.0)
net-ssh (>= 2.6.5) net-ssh (>= 2.6.5)
nokogiri (1.10.3) nokogiri (1.10.9)
mini_portile2 (~> 2.4.0) mini_portile2 (~> 2.4.0)
oauth2 (1.4.1) oauth2 (1.4.1)
faraday (>= 0.8, < 0.16.0) faraday (>= 0.8, < 0.16.0)
@ -203,19 +202,19 @@ GEM
posix-spawn (0.3.13) posix-spawn (0.3.13)
pygments.rb (1.2.1) pygments.rb (1.2.1)
multi_json (>= 1.0.0) multi_json (>= 1.0.0)
rack (1.6.11) rack (1.6.13)
rack-test (0.6.3) rack-test (0.6.3)
rack (>= 1.0) rack (>= 1.0)
rails (4.2.6) rails (4.2.11.1)
actionmailer (= 4.2.6) actionmailer (= 4.2.11.1)
actionpack (= 4.2.6) actionpack (= 4.2.11.1)
actionview (= 4.2.6) actionview (= 4.2.11.1)
activejob (= 4.2.6) activejob (= 4.2.11.1)
activemodel (= 4.2.6) activemodel (= 4.2.11.1)
activerecord (= 4.2.6) activerecord (= 4.2.11.1)
activesupport (= 4.2.6) activesupport (= 4.2.11.1)
bundler (>= 1.3.0, < 2.0) bundler (>= 1.3.0, < 2.0)
railties (= 4.2.6) railties (= 4.2.11.1)
sprockets-rails sprockets-rails
rails-deprecated_sanitizer (1.0.3) rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha) activesupport (>= 4.2.0.alpha)
@ -223,15 +222,15 @@ GEM
activesupport (>= 4.2.0, < 5.0) activesupport (>= 4.2.0, < 5.0)
nokogiri (~> 1.6) nokogiri (~> 1.6)
rails-deprecated_sanitizer (>= 1.0.1) rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.4) rails-html-sanitizer (1.3.0)
loofah (~> 2.2, >= 2.2.2) loofah (~> 2.3)
railties (4.2.6) railties (4.2.11.1)
actionpack (= 4.2.6) actionpack (= 4.2.11.1)
activesupport (= 4.2.6) activesupport (= 4.2.11.1)
rake (>= 0.8.7) rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0) thor (>= 0.18.1, < 2.0)
raindrops (0.19.0) raindrops (0.19.0)
rake (12.3.2) rake (13.0.1)
rb-fsevent (0.10.3) rb-fsevent (0.10.3)
rb-inotify (0.10.0) rb-inotify (0.10.0)
ffi (~> 1.0) ffi (~> 1.0)
@ -285,9 +284,11 @@ GEM
therubyracer (0.12.3) therubyracer (0.12.3)
libv8 (~> 3.16.14.15) libv8 (~> 3.16.14.15)
ref ref
thor (0.20.3) thor (1.0.1)
thread_safe (0.3.6) thread_safe (0.3.6)
tilt (1.4.1) tilt (1.4.1)
tiny_tds (1.3.0)
mini_portile2 (~> 2.0)
truncate_html (0.9.3) truncate_html (0.9.3)
turbolinks (5.2.0) turbolinks (5.2.0)
turbolinks-source (~> 5.2) turbolinks-source (~> 5.2)
@ -297,7 +298,7 @@ GEM
execjs (>= 2.2.2, >= 2.2) execjs (>= 2.2.2, >= 2.2)
less-rails (>= 2.5.0) less-rails (>= 2.5.0)
railties (>= 3.1) railties (>= 3.1)
tzinfo (1.2.5) tzinfo (1.2.7)
thread_safe (~> 0.1) thread_safe (~> 0.1)
uglifier (4.1.20) uglifier (4.1.20)
execjs (>= 0.3.0, < 3) execjs (>= 0.3.0, < 3)
@ -342,13 +343,13 @@ DEPENDENCIES
jbuilder (~> 2.0) jbuilder (~> 2.0)
jquery-rails jquery-rails
kaminari-bootstrap kaminari-bootstrap
mysql2 (~> 0.3.18) mysql2 (= 0.4.10)
net-ssh (~> 2.7.0) net-ssh (~> 5.1.0)
nokogiri nokogiri
omniauth-facebook omniauth-facebook
posix-spawn posix-spawn
pygments.rb pygments.rb
rails (= 4.2.6) rails (= 4.2.11.1)
redcarpet redcarpet
rmagick rmagick
roo (~> 2.8.2) roo (~> 2.8.2)
@ -358,6 +359,7 @@ DEPENDENCIES
sdoc (~> 0.4.0) sdoc (~> 0.4.0)
spring spring
therubyracer therubyracer
tiny_tds (= 1.3.0)
truncate_html truncate_html
turbolinks turbolinks
twitter-bootstrap-rails twitter-bootstrap-rails
@ -368,4 +370,4 @@ DEPENDENCIES
zip-zip zip-zip
BUNDLED WITH BUNDLED WITH
1.16.4 1.17.3

View File

@ -136,7 +136,7 @@ top = 20
$(".menu_item_top").css("min-height", ($(".widther").width()*(550 / 1200))+"px") $(".menu_item_top").css("min-height", ($(".widther").width()*(550 / 1200))+"px")
$(".article_top").css("height", ($(".article_top").width()*(480 / 1200))+"px") $(".article_top").css("height", ($(".article_top").width()*(300 / 1200))+"px")

View File

@ -316,18 +316,18 @@ paddingTop:"hide",paddingBottom:"hide"},a);else a.toShow.animate({height:"show",
* jquery.ui.widget.js * jquery.ui.widget.js
* jquery.ui.position.js * jquery.ui.position.js
*/ */
(function(d){var e=0;d.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var a=this,b=this.element[0].ownerDocument,g;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(!(a.options.disabled||a.element.propAttr("readOnly"))){g= (function(d){var e=0;d.widget("ui.j_reclamation_avoir",{options:{appendTo:"body",autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var a=this,b=this.element[0].ownerDocument,g;this.element.addClass("ui-j_reclamation_avoir-input").attr("j_reclamation_avoir","off").attr({role:"textbox","aria-j_reclamation_avoir":"list","aria-haspopup":"true"}).bind("keydown.j_reclamation_avoir",function(c){if(!(a.options.disabled||a.element.propAttr("readOnly"))){g=
false;var f=d.ui.keyCode;switch(c.keyCode){case f.PAGE_UP:a._move("previousPage",c);break;case f.PAGE_DOWN:a._move("nextPage",c);break;case f.UP:a._move("previous",c);c.preventDefault();break;case f.DOWN:a._move("next",c);c.preventDefault();break;case f.ENTER:case f.NUMPAD_ENTER:if(a.menu.active){g=true;c.preventDefault()}case f.TAB:if(!a.menu.active)return;a.menu.select(c);break;case f.ESCAPE:a.element.val(a.term);a.close(c);break;default:clearTimeout(a.searching);a.searching=setTimeout(function(){if(a.term!= false;var f=d.ui.keyCode;switch(c.keyCode){case f.PAGE_UP:a._move("previousPage",c);break;case f.PAGE_DOWN:a._move("nextPage",c);break;case f.UP:a._move("previous",c);c.preventDefault();break;case f.DOWN:a._move("next",c);c.preventDefault();break;case f.ENTER:case f.NUMPAD_ENTER:if(a.menu.active){g=true;c.preventDefault()}case f.TAB:if(!a.menu.active)return;a.menu.select(c);break;case f.ESCAPE:a.element.val(a.term);a.close(c);break;default:clearTimeout(a.searching);a.searching=setTimeout(function(){if(a.term!=
a.element.val()){a.selectedItem=null;a.search(null,c)}},a.options.delay);break}}}).bind("keypress.autocomplete",function(c){if(g){g=false;c.preventDefault()}}).bind("focus.autocomplete",function(){if(!a.options.disabled){a.selectedItem=null;a.previous=a.element.val()}}).bind("blur.autocomplete",function(c){if(!a.options.disabled){clearTimeout(a.searching);a.closing=setTimeout(function(){a.close(c);a._change(c)},150)}});this._initSource();this.response=function(){return a._response.apply(a,arguments)}; a.element.val()){a.selectedItem=null;a.search(null,c)}},a.options.delay);break}}}).bind("keypress.j_reclamation_avoir",function(c){if(g){g=false;c.preventDefault()}}).bind("focus.j_reclamation_avoir",function(){if(!a.options.disabled){a.selectedItem=null;a.previous=a.element.val()}}).bind("blur.j_reclamation_avoir",function(c){if(!a.options.disabled){clearTimeout(a.searching);a.closing=setTimeout(function(){a.close(c);a._change(c)},150)}});this._initSource();this.response=function(){return a._response.apply(a,arguments)};
this.menu=d("<ul></ul>").addClass("ui-autocomplete").appendTo(d(this.options.appendTo||"body",b)[0]).mousedown(function(c){var f=a.menu.element[0];d(c.target).closest(".ui-menu-item").length||setTimeout(function(){d(document).one("mousedown",function(h){h.target!==a.element[0]&&h.target!==f&&!d.ui.contains(f,h.target)&&a.close()})},1);setTimeout(function(){clearTimeout(a.closing)},13)}).menu({focus:function(c,f){f=f.item.data("item.autocomplete");false!==a._trigger("focus",c,{item:f})&&/^key/.test(c.originalEvent.type)&& this.menu=d("<ul></ul>").addClass("ui-j_reclamation_avoir").appendTo(d(this.options.appendTo||"body",b)[0]).mousedown(function(c){var f=a.menu.element[0];d(c.target).closest(".ui-menu-item").length||setTimeout(function(){d(document).one("mousedown",function(h){h.target!==a.element[0]&&h.target!==f&&!d.ui.contains(f,h.target)&&a.close()})},1);setTimeout(function(){clearTimeout(a.closing)},13)}).menu({focus:function(c,f){f=f.item.data("item.j_reclamation_avoir");false!==a._trigger("focus",c,{item:f})&&/^key/.test(c.originalEvent.type)&&
a.element.val(f.value)},selected:function(c,f){var h=f.item.data("item.autocomplete"),i=a.previous;if(a.element[0]!==b.activeElement){a.element.focus();a.previous=i;setTimeout(function(){a.previous=i;a.selectedItem=h},1)}false!==a._trigger("select",c,{item:h})&&a.element.val(h.value);a.term=a.element.val();a.close(c);a.selectedItem=h},blur:function(){a.menu.element.is(":visible")&&a.element.val()!==a.term&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu"); a.element.val(f.value)},selected:function(c,f){var h=f.item.data("item.j_reclamation_avoir"),i=a.previous;if(a.element[0]!==b.activeElement){a.element.focus();a.previous=i;setTimeout(function(){a.previous=i;a.selectedItem=h},1)}false!==a._trigger("select",c,{item:h})&&a.element.val(h.value);a.term=a.element.val();a.close(c);a.selectedItem=h},blur:function(){a.menu.element.is(":visible")&&a.element.val()!==a.term&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu");
d.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();d.Widget.prototype.destroy.call(this)},_setOption:function(a,b){d.Widget.prototype._setOption.apply(this,arguments);a==="source"&&this._initSource();if(a==="appendTo")this.menu.element.appendTo(d(b||"body",this.element[0].ownerDocument)[0]);a==="disabled"&& d.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-j_reclamation_avoir-input").removeAttr("j_reclamation_avoir").removeAttr("role").removeAttr("aria-j_reclamation_avoir").removeAttr("aria-haspopup");this.menu.element.remove();d.Widget.prototype.destroy.call(this)},_setOption:function(a,b){d.Widget.prototype._setOption.apply(this,arguments);a==="source"&&this._initSource();if(a==="appendTo")this.menu.element.appendTo(d(b||"body",this.element[0].ownerDocument)[0]);a==="disabled"&&
b&&this.xhr&&this.xhr.abort()},_initSource:function(){var a=this,b,g;if(d.isArray(this.options.source)){b=this.options.source;this.source=function(c,f){f(d.ui.autocomplete.filter(b,c.term))}}else if(typeof this.options.source==="string"){g=this.options.source;this.source=function(c,f){a.xhr&&a.xhr.abort();a.xhr=d.ajax({url:g,data:c,dataType:"json",autocompleteRequest:++e,success:function(h){this.autocompleteRequest===e&&f(h)},error:function(){this.autocompleteRequest===e&&f([])}})}}else this.source= b&&this.xhr&&this.xhr.abort()},_initSource:function(){var a=this,b,g;if(d.isArray(this.options.source)){b=this.options.source;this.source=function(c,f){f(d.ui.j_reclamation_avoir.filter(b,c.term))}}else if(typeof this.options.source==="string"){g=this.options.source;this.source=function(c,f){a.xhr&&a.xhr.abort();a.xhr=d.ajax({url:g,data:c,dataType:"json",j_reclamation_avoirRequest:++e,success:function(h){this.j_reclamation_avoirRequest===e&&f(h)},error:function(){this.j_reclamation_avoirRequest===e&&f([])}})}}else this.source=
this.options.source},search:function(a,b){a=a!=null?a:this.element.val();this.term=this.element.val();if(a.length<this.options.minLength)return this.close(b);clearTimeout(this.closing);if(this._trigger("search",b)!==false)return this._search(a)},_search:function(a){this.pending++;this.element.addClass("ui-autocomplete-loading");this.source({term:a},this.response)},_response:function(a){if(!this.options.disabled&&a&&a.length){a=this._normalize(a);this._suggest(a);this._trigger("open")}else this.close(); this.options.source},search:function(a,b){a=a!=null?a:this.element.val();this.term=this.element.val();if(a.length<this.options.minLength)return this.close(b);clearTimeout(this.closing);if(this._trigger("search",b)!==false)return this._search(a)},_search:function(a){this.pending++;this.element.addClass("ui-j_reclamation_avoir-loading");this.source({term:a},this.response)},_response:function(a){if(!this.options.disabled&&a&&a.length){a=this._normalize(a);this._suggest(a);this._trigger("open")}else this.close();
this.pending--;this.pending||this.element.removeClass("ui-autocomplete-loading")},close:function(a){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this.menu.element.hide();this.menu.deactivate();this._trigger("close",a)}},_change:function(a){this.previous!==this.element.val()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(a){if(a.length&&a[0].label&&a[0].value)return a;return d.map(a,function(b){if(typeof b==="string")return{label:b,value:b};return d.extend({label:b.label|| this.pending--;this.pending||this.element.removeClass("ui-j_reclamation_avoir-loading")},close:function(a){clearTimeout(this.closing);if(this.menu.element.is(":visible")){this.menu.element.hide();this.menu.deactivate();this._trigger("close",a)}},_change:function(a){this.previous!==this.element.val()&&this._trigger("change",a,{item:this.selectedItem})},_normalize:function(a){if(a.length&&a[0].label&&a[0].value)return a;return d.map(a,function(b){if(typeof b==="string")return{label:b,value:b};return d.extend({label:b.label||
b.value,value:b.value||b.label},b)})},_suggest:function(a){var b=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(b,a);this.menu.deactivate();this.menu.refresh();b.show();this._resizeMenu();b.position(d.extend({of:this.element},this.options.position));this.options.autoFocus&&this.menu.next(new d.Event("mouseover"))},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(a,b){var g=this; b.value,value:b.value||b.label},b)})},_suggest:function(a){var b=this.menu.element.empty().zIndex(this.element.zIndex()+1);this._renderMenu(b,a);this.menu.deactivate();this.menu.refresh();b.show();this._resizeMenu();b.position(d.extend({of:this.element},this.options.position));this.options.autoFocus&&this.menu.next(new d.Event("mouseover"))},_resizeMenu:function(){var a=this.menu.element;a.outerWidth(Math.max(a.width("").outerWidth(),this.element.outerWidth()))},_renderMenu:function(a,b){var g=this;
d.each(b,function(c,f){g._renderItem(a,f)})},_renderItem:function(a,b){return d("<li></li>").data("item.autocomplete",b).append(d("<a></a>").text(b.label)).appendTo(a)},_move:function(a,b){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term);this.menu.deactivate()}else this.menu[a](b);else this.search(null,b)},widget:function(){return this.menu.element}});d.extend(d.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, d.each(b,function(c,f){g._renderItem(a,f)})},_renderItem:function(a,b){return d("<li></li>").data("item.j_reclamation_avoir",b).append(d("<a></a>").text(b.label)).appendTo(a)},_move:function(a,b){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term);this.menu.deactivate()}else this.menu[a](b);else this.search(null,b)},widget:function(){return this.menu.element}});d.extend(d.ui.j_reclamation_avoir,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,
"\\$&")},filter:function(a,b){var g=new RegExp(d.ui.autocomplete.escapeRegex(b),"i");return d.grep(a,function(c){return g.test(c.label||c.value||c)})}})})(jQuery); "\\$&")},filter:function(a,b){var g=new RegExp(d.ui.j_reclamation_avoir.escapeRegex(b),"i");return d.grep(a,function(c){return g.test(c.label||c.value||c)})}})})(jQuery);
(function(d){d.widget("ui.menu",{_create:function(){var e=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(a){if(d(a.target).closest(".ui-menu-item a").length){a.preventDefault();e.select(a)}});this.refresh()},refresh:function(){var e=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex", (function(d){d.widget("ui.menu",{_create:function(){var e=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(a){if(d(a.target).closest(".ui-menu-item a").length){a.preventDefault();e.select(a)}});this.refresh()},refresh:function(){var e=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex",
-1).mouseenter(function(a){e.activate(a,d(this).parent())}).mouseleave(function(){e.deactivate()})},activate:function(e,a){this.deactivate();if(this.hasScroll()){var b=a.offset().top-this.element.offset().top,g=this.element.scrollTop(),c=this.element.height();if(b<0)this.element.scrollTop(g+b);else b>=c&&this.element.scrollTop(g+b-c+a.height())}this.active=a.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",e,{item:a})},deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id"); -1).mouseenter(function(a){e.activate(a,d(this).parent())}).mouseleave(function(){e.deactivate()})},activate:function(e,a){this.deactivate();if(this.hasScroll()){var b=a.offset().top-this.element.offset().top,g=this.element.scrollTop(),c=this.element.height();if(b<0)this.element.scrollTop(g+b);else b>=c&&this.element.scrollTop(g+b-c+a.height())}this.active=a.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",e,{item:a})},deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id");
this._trigger("blur");this.active=null}},next:function(e){this.move("next",".ui-menu-item:first",e)},previous:function(e){this.move("prev",".ui-menu-item:last",e)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(e,a,b){if(this.active){e=this.active[e+"All"](".ui-menu-item").eq(0);e.length?this.activate(b,e):this.activate(b,this.element.children(a))}else this.activate(b, this._trigger("blur");this.active=null}},next:function(e){this.move("next",".ui-menu-item:first",e)},previous:function(e){this.move("prev",".ui-menu-item:last",e)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(e,a,b){if(this.active){e=this.active[e+"All"](".ui-menu-item").eq(0);e.length?this.activate(b,e):this.activate(b,this.element.children(a))}else this.activate(b,

View File

@ -1,6 +1,6 @@
/*! jQuery UI - v1.12.0 - 2016-07-08 /*! jQuery UI - v1.12.0 - 2016-07-08
* http://jqueryui.com * http://jqueryui.com
* Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/autocomplete.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js * Includes: widget.js, position.js, data.js, disable-selection.js, effect.js, effects/effect-blind.js, effects/effect-bounce.js, effects/effect-clip.js, effects/effect-drop.js, effects/effect-explode.js, effects/effect-fade.js, effects/effect-fold.js, effects/effect-highlight.js, effects/effect-puff.js, effects/effect-pulsate.js, effects/effect-scale.js, effects/effect-shake.js, effects/effect-size.js, effects/effect-slide.js, effects/effect-transfer.js, focusable.js, form-reset-mixin.js, jquery-1-7.js, keycode.js, labels.js, scroll-parent.js, tabbable.js, unique-id.js, widgets/accordion.js, widgets/j_reclamation_avoir.js, widgets/button.js, widgets/checkboxradio.js, widgets/controlgroup.js, widgets/datepicker.js, widgets/dialog.js, widgets/draggable.js, widgets/droppable.js, widgets/menu.js, widgets/mouse.js, widgets/progressbar.js, widgets/resizable.js, widgets/selectable.js, widgets/selectmenu.js, widgets/slider.js, widgets/sortable.js, widgets/spinner.js, widgets/tabs.js, widgets/tooltip.js
* Copyright jQuery Foundation and other contributors; Licensed MIT */ * Copyright jQuery Foundation and other contributors; Licensed MIT */
(function( factory ) { (function( factory ) {
@ -5591,15 +5591,15 @@ var widgetsMenu = $.widget( "ui.menu", {
//>>label: Autocomplete //>>label: Autocomplete
//>>group: Widgets //>>group: Widgets
//>>description: Lists suggested words as the user is typing. //>>description: Lists suggested words as the user is typing.
//>>docs: http://api.jqueryui.com/autocomplete/ //>>docs: http://api.jqueryui.com/j_reclamation_avoir/
//>>demos: http://jqueryui.com/autocomplete/ //>>demos: http://jqueryui.com/j_reclamation_avoir/
//>>css.structure: ../../themes/base/core.css //>>css.structure: ../../themes/base/core.css
//>>css.structure: ../../themes/base/autocomplete.css //>>css.structure: ../../themes/base/j_reclamation_avoir.css
//>>css.theme: ../../themes/base/theme.css //>>css.theme: ../../themes/base/theme.css
$.widget( "ui.autocomplete", { $.widget( "ui.j_reclamation_avoir", {
version: "1.12.0", version: "1.12.0",
defaultElement: "<input>", defaultElement: "<input>",
options: { options: {
@ -5650,8 +5650,8 @@ $.widget( "ui.autocomplete", {
this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ]; this.valueMethod = this.element[ isTextarea || isInput ? "val" : "text" ];
this.isNewMenu = true; this.isNewMenu = true;
this._addClass( "ui-autocomplete-input" ); this._addClass( "ui-j_reclamation_avoir-input" );
this.element.attr( "autocomplete", "off" ); this.element.attr( "j_reclamation_avoir", "off" );
this._on( this.element, { this._on( this.element, {
keydown: function( event ) { keydown: function( event ) {
@ -5785,7 +5785,7 @@ $.widget( "ui.autocomplete", {
.hide() .hide()
.menu( "instance" ); .menu( "instance" );
this._addClass( this.menu.element, "ui-autocomplete", "ui-front" ); this._addClass( this.menu.element, "ui-j_reclamation_avoir", "ui-front" );
this._on( this.menu.element, { this._on( this.menu.element, {
mousedown: function( event ) { mousedown: function( event ) {
@ -5827,7 +5827,7 @@ $.widget( "ui.autocomplete", {
} }
} }
item = ui.item.data( "ui-autocomplete-item" ); item = ui.item.data( "ui-j_reclamation_avoir-item" );
if ( false !== this._trigger( "focus", event, { item: item } ) ) { if ( false !== this._trigger( "focus", event, { item: item } ) ) {
// use value to match what will end up in the input, if it was a key event // use value to match what will end up in the input, if it was a key event
@ -5844,7 +5844,7 @@ $.widget( "ui.autocomplete", {
} }
}, },
menuselect: function( event, ui ) { menuselect: function( event, ui ) {
var item = ui.item.data( "ui-autocomplete-item" ), var item = ui.item.data( "ui-j_reclamation_avoir-item" ),
previous = this.previous; previous = this.previous;
// Only trigger when focus was lost (click on menu) // Only trigger when focus was lost (click on menu)
@ -5883,19 +5883,19 @@ $.widget( "ui.autocomplete", {
this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" ); this._addClass( this.liveRegion, null, "ui-helper-hidden-accessible" );
// Turning off autocomplete prevents the browser from remembering the // Turning off j_reclamation_avoir prevents the browser from remembering the
// value when navigating through history, so we re-enable autocomplete // value when navigating through history, so we re-enable j_reclamation_avoir
// if the page is unloaded before the widget is destroyed. #7790 // if the page is unloaded before the widget is destroyed. #7790
this._on( this.window, { this._on( this.window, {
beforeunload: function() { beforeunload: function() {
this.element.removeAttr( "autocomplete" ); this.element.removeAttr( "j_reclamation_avoir" );
} }
} ); } );
}, },
_destroy: function() { _destroy: function() {
clearTimeout( this.searching ); clearTimeout( this.searching );
this.element.removeAttr( "autocomplete" ); this.element.removeAttr( "j_reclamation_avoir" );
this.menu.element.remove(); this.menu.element.remove();
this.liveRegion.remove(); this.liveRegion.remove();
}, },
@ -5953,7 +5953,7 @@ $.widget( "ui.autocomplete", {
if ( $.isArray( this.options.source ) ) { if ( $.isArray( this.options.source ) ) {
array = this.options.source; array = this.options.source;
this.source = function( request, response ) { this.source = function( request, response ) {
response( $.ui.autocomplete.filter( array, request.term ) ); response( $.ui.j_reclamation_avoir.filter( array, request.term ) );
}; };
} else if ( typeof this.options.source === "string" ) { } else if ( typeof this.options.source === "string" ) {
url = this.options.source; url = this.options.source;
@ -6013,7 +6013,7 @@ $.widget( "ui.autocomplete", {
_search: function( value ) { _search: function( value ) {
this.pending++; this.pending++;
this._addClass( "ui-autocomplete-loading" ); this._addClass( "ui-j_reclamation_avoir-loading" );
this.cancelSearch = false; this.cancelSearch = false;
this.source( { term: value }, this._response() ); this.source( { term: value }, this._response() );
@ -6029,7 +6029,7 @@ $.widget( "ui.autocomplete", {
this.pending--; this.pending--;
if ( !this.pending ) { if ( !this.pending ) {
this._removeClass( "ui-autocomplete-loading" ); this._removeClass( "ui-j_reclamation_avoir-loading" );
} }
}, this ); }, this );
}, },
@ -6135,7 +6135,7 @@ $.widget( "ui.autocomplete", {
}, },
_renderItemData: function( ul, item ) { _renderItemData: function( ul, item ) {
return this._renderItem( ul, item ).data( "ui-autocomplete-item", item ); return this._renderItem( ul, item ).data( "ui-j_reclamation_avoir-item", item );
}, },
_renderItem: function( ul, item ) { _renderItem: function( ul, item ) {
@ -6198,12 +6198,12 @@ $.widget( "ui.autocomplete", {
} }
} ); } );
$.extend( $.ui.autocomplete, { $.extend( $.ui.j_reclamation_avoir, {
escapeRegex: function( value ) { escapeRegex: function( value ) {
return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" ); return value.replace( /[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&" );
}, },
filter: function( array, term ) { filter: function( array, term ) {
var matcher = new RegExp( $.ui.autocomplete.escapeRegex( term ), "i" ); var matcher = new RegExp( $.ui.j_reclamation_avoir.escapeRegex( term ), "i" );
return $.grep( array, function( value ) { return $.grep( array, function( value ) {
return matcher.test( value.label || value.value || value ); return matcher.test( value.label || value.value || value );
} ); } );
@ -6213,7 +6213,7 @@ $.extend( $.ui.autocomplete, {
// Live region extension, adding a `messages` option // Live region extension, adding a `messages` option
// NOTE: This is an experimental API. We are still investigating // NOTE: This is an experimental API. We are still investigating
// a full solution for string manipulation and internationalization. // a full solution for string manipulation and internationalization.
$.widget( "ui.autocomplete", $.ui.autocomplete, { $.widget( "ui.j_reclamation_avoir", $.ui.j_reclamation_avoir, {
options: { options: {
messages: { messages: {
noResults: "No search results.", noResults: "No search results.",
@ -6240,7 +6240,7 @@ $.widget( "ui.autocomplete", $.ui.autocomplete, {
} }
} ); } );
var widgetsAutocomplete = $.ui.autocomplete; var widgetsAutocomplete = $.ui.j_reclamation_avoir;
/*! /*!
@ -13873,7 +13873,7 @@ var widgetsSelectmenu = $.widget( "ui.selectmenu", [ $.ui.formResetMixin, {
id: this.ids.button, id: this.ids.button,
role: "combobox", role: "combobox",
"aria-expanded": "false", "aria-expanded": "false",
"aria-autocomplete": "list", "aria-j_reclamation_avoir": "list",
"aria-owns": this.ids.menu, "aria-owns": this.ids.menu,
"aria-haspopup": "true", "aria-haspopup": "true",
title: this.element.attr( "title" ) title: this.element.attr( "title" )
@ -16795,12 +16795,12 @@ $.widget( "ui.spinner", {
this._on( this._events ); this._on( this._events );
this._refresh(); this._refresh();
// Turning off autocomplete prevents the browser from remembering the // Turning off j_reclamation_avoir prevents the browser from remembering the
// value when navigating through history, so we re-enable autocomplete // value when navigating through history, so we re-enable j_reclamation_avoir
// if the page is unloaded before the widget is destroyed. #7790 // if the page is unloaded before the widget is destroyed. #7790
this._on( this.window, { this._on( this.window, {
beforeunload: function() { beforeunload: function() {
this.element.removeAttr( "autocomplete" ); this.element.removeAttr( "j_reclamation_avoir" );
} }
} ); } );
}, },
@ -16928,7 +16928,7 @@ $.widget( "ui.spinner", {
// Support mobile enhanced option and make backcompat more sane // Support mobile enhanced option and make backcompat more sane
_enhance: function() { _enhance: function() {
this.uiSpinner = this.element this.uiSpinner = this.element
.attr( "autocomplete", "off" ) .attr( "j_reclamation_avoir", "off" )
.wrap( "<span>" ) .wrap( "<span>" )
.parent() .parent()
@ -17202,7 +17202,7 @@ $.widget( "ui.spinner", {
_destroy: function() { _destroy: function() {
this.element this.element
.prop( "disabled", false ) .prop( "disabled", false )
.removeAttr( "autocomplete role aria-valuemin aria-valuemax aria-valuenow" ); .removeAttr( "j_reclamation_avoir role aria-valuemin aria-valuemax aria-valuenow" );
this.uiSpinner.replaceWith( this.element ); this.uiSpinner.replaceWith( this.element );
}, },
@ -17255,7 +17255,7 @@ if ( $.uiBackCompat !== false ) {
$.widget( "ui.spinner", $.ui.spinner, { $.widget( "ui.spinner", $.ui.spinner, {
_enhance: function() { _enhance: function() {
this.uiSpinner = this.element this.uiSpinner = this.element
.attr( "autocomplete", "off" ) .attr( "j_reclamation_avoir", "off" )
.wrap( this._uiSpinnerHtml() ) .wrap( this._uiSpinnerHtml() )
.parent() .parent()

View File

@ -358,10 +358,10 @@
} }
// this is necessary, otherwise if the user submit the form // this is necessary, otherwise if the user submit the form
// and then press the "back" button, the autocomplete will erase // and then press the "back" button, the j_reclamation_avoir will erase
// the data. Works fine on IE9+, FF, Opera, Safari. // the data. Works fine on IE9+, FF, Opera, Safari.
if ($('input').length && 'oninput' in $('input')[0] === false && el.attr('autocomplete') === 'on') { if ($('input').length && 'oninput' in $('input')[0] === false && el.attr('j_reclamation_avoir') === 'on') {
el.attr('autocomplete', 'off'); el.attr('j_reclamation_avoir', 'off');
} }
p.destroyEvents(); p.destroyEvents();

View File

@ -1751,7 +1751,7 @@ the specific language governing permissions and limitations under the Apache Lic
"<input class='select2-focusser select2-offscreen' type='text'/>", "<input class='select2-focusser select2-offscreen' type='text'/>",
"<div class='select2-drop select2-display-none'>", "<div class='select2-drop select2-display-none'>",
" <div class='select2-search'>", " <div class='select2-search'>",
" <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'/>", " <input type='text' j_reclamation_avoir='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'/>",
" </div>", " </div>",
" <ul class='select2-results'>", " <ul class='select2-results'>",
" </ul>", " </ul>",
@ -2278,7 +2278,7 @@ the specific language governing permissions and limitations under the Apache Lic
}).html([ }).html([
"<ul class='select2-choices'>", "<ul class='select2-choices'>",
" <li class='select2-search-field'>", " <li class='select2-search-field'>",
" <input type='text' autocomplete='off' autocorrect='off' autocapitilize='off' spellcheck='false' class='select2-input'>", " <input type='text' j_reclamation_avoir='off' autocorrect='off' autocapitilize='off' spellcheck='false' class='select2-input'>",
" </li>", " </li>",
"</ul>", "</ul>",
"<div class='select2-drop select2-drop-multi select2-display-none'>", "<div class='select2-drop select2-drop-multi select2-display-none'>",

View File

@ -68,10 +68,10 @@
} }
.article_inner{
.blog_content_show{ max-width:800px;
margin-left:342px; margin:auto;
width:90%;
} }
.blog_sidebar_bottom{ .blog_sidebar_bottom{
@ -398,7 +398,6 @@
.article_content{ .article_content{
background:white; background:white;
margin-top:20px;
padding-bottom:50px; padding-bottom:50px;
h1{ h1{
margin-top: 0; margin-top: 0;

View File

@ -0,0 +1,15 @@
class Public::BannersController < ApplicationController
layout "public"
def remove_banner
session[:no_banner] = true
render :inline => "ok"
end
def add_banner
session[:no_banner] = nil
render :inline => "ok"
end
end

View File

@ -1,8 +1,8 @@
require 'elasticsearch/model' require 'elasticsearch/model'
class Article < ActiveRecord::Base class Article < ActiveRecord::Base
include Elasticsearch::Model #include Elasticsearch::Model
include Elasticsearch::Model::Callbacks #include Elasticsearch::Model::Callbacks
has_many :question_juridiques has_many :question_juridiques
@ -91,7 +91,7 @@ class Article < ActiveRecord::Base
end end
after_update do after_update do
logger.debug ["Updating document... ", __elasticsearch__.delete_document, __elasticsearch__.index_document].join #logger.debug ["Updating document... ", __elasticsearch__.delete_document, __elasticsearch__.index_document].join
# after_destroy { logger.debug ["Deleting document... ", delete_document].join } # after_destroy { logger.debug ["Deleting document... ", delete_document].join }
end end

View File

@ -1,4 +0,0 @@
class ExportHist < ActiveRecord::Base
validates :piece, :presence => true, :uniqueness => true
end

View File

@ -161,9 +161,111 @@
.clear .clear
=link_to add_banner_public_banners_path(), :remote => true, :onclick => "$('#banner').show();$('#small_banner').closest('#small_banner').hide();" do
#small_banner{:style => ("display:none;" if !session[:no_banner])}
%span{:style => "font-size:20px;"}
=ic(:warning)
%br
Informations
%br
COVID-2019
#banner{:style => ("display:none;" if session[:no_banner])}
.left
%span{:style => "font-size:25px;"}=ic(:warning)
%br
COVID-2019
.right
%p
%strong Jipé continue à produire
en prenant les mesures nécessaires pour
%strong
assurer la sécurité
de ses
%strong collaborateurs,
de ses
%strong prestataires
et
%strong fournisseurs.
%p
Après avoir fourni des
%strong structures pour faire face à lurgence,
nous pouvons
%strong dès maintenant
vous proposer des
%strong solutions pour gérer laprès confinement
(salles externes, douches de décontamination, sanitaires, lieux disolement…)
%p.actions
=link_to "En savoir plus", "/fr/blog/covid-19-jipe-continue-a-produire-et-propose-des-solutions.html"
=link_to "Nous contacter", "/fr/contact.html"
.close_banner=link_to ic(:times)+" Ne plus afficher cette info", remove_banner_public_banners_path(), :remote => true, :onclick => "$(this).closest('#banner').hide();$('#small_banner').show();"
.clear
:scss
#small_banner{
position:absolute;
top:50px;
left:0;
background:#ffedcd;
color:#333f48;
color:#BF2F2A;
font-size:14px;
text-align:center;
padding:10px 30px;
z-index:10;
font-weight:bold;
}
#banner{
background:#ffedcd;
color:#333f48;
padding:20px 20px;
font-size:14px;
position:relative;
p{
margin:5px 0;
}
.actions{
a{
padding:4px 8px;
border:1px solid #BF2F2A;
display:inline-block;
margin-right:8px;
margin-top:8px;
}
}
.close_banner{
position:absolute;
bottom:5px;right:5px;
}
.right{
margin-left:200px;
}
.left{
color:#BF2F2A;
font-size:18px;
float:left;
text-align:center;
width:200px;
margin-left:-10px;
padding-top:30px;
}
}
-if @menu_item and @menu_item.id != 1 -if @menu_item and @menu_item.id != 1
-if @menu_item.ancestors.reverse[0] -if @menu_item.ancestors.reverse[0]
@ -288,6 +390,9 @@
}); });
=yield =yield
:scss :scss
#sub_menu_top.home_sub_menu{ #sub_menu_top.home_sub_menu{

View File

@ -1,4 +1,3 @@
=render :partial => "public/articles/intro_blog"
-if @lang_article.image_file -if @lang_article.image_file
-img_url = @lang_article.image_file.file.large.url -img_url = @lang_article.image_file.file.large.url
@ -15,23 +14,16 @@
.blog_sidebar_top
.blog_sidebar.left{:style => "float:left;"}=render :partial => "public/articles/sidebar"
.blog_content_show .blog_content_show
.inner{:style => "width:100%;float:left"}
.article_content
.article_top{:style => "background-image:url('#{img_url}');", :class => ("with_img" if img_url)}
-if !@article.gradient_cached
=#.gradient
.article_content
.article_top{:style => "background-image:url('#{img_url}');", :class => ("with_img" if img_url)}
.article_inner
-if !@article.title_cached -if !@article.title_cached
%h1 %h1
@ -41,58 +33,20 @@
=@lang_article.title =@lang_article.title
%p.date %p.date
=("le " if @lang.id != 2).to_s+l(@article.published_at, :format => :human_date) le
="-" =l(@article.published_at, :format => :human_date)
=link_to "#comments" do
%span.coms=i(:"comment-o")+" "+@article.comments.where(:enabled => true).count.to_s
=render @article.blocks.find_by_lang_site_id(@lang.id)
-if @article.article_author
.center
.author
=@article.article_author.title if @article.article_author.title
=@article.article_author.name
-if @article.juridique
.article_comments_container
#question_juridiques
.article_comments
%h3 Vos questions à notre avocate
%br
%center
=link_to ic(:plus)+" Posez votre question", new_public_question_juridique_path(:article_id => @article.id), :remote => true, :class => "ask_button"
%br
#question_juridique_form
=render @article.question_juridiques.enableds.before(Time.now.end_of_day).order("created_at DESC").all
-elsif @article.commentable
.article_comments_container
.article_comments
#comments
%h3=qit "comments-title", "Commentaires"
=render :partial => "public/comments/comment", :collection => @article.comments.where(:enabled => true, :parent_id => nil).order("created_at DESC")
#comment_form =render @article.blocks.find_by_lang_site_id(@lang.id)
.form_place=render :partial => "public/comments/form"
-if current_admin
.admin_panel
=link_to "Modifier cet article", edit_admin_article_path(:id => @article.id, :lang => @lang.slug), :class => "btn btn-primary"
=link_to "Télécharger l'image de bandeau", @article.image_file.file.large.url, :class => "btn btn-primary" if @article.image_file
.blog_sidebar_bottom -if current_admin
.blog_sidebar=render :partial => "public/articles/sidebar" .admin_panel
=link_to "Modifier cet article", edit_admin_article_path(:id => @article.id, :lang => @lang.slug), :class => "btn btn-primary"
=link_to "Télécharger l'image de bandeau", @article.image_file.file.large.url, :class => "btn btn-primary" if @article.image_file

View File

@ -1,4 +1,6 @@
Rails.application.routes.draw do Rails.application.routes.draw do
get "cirques-pre" => "public/home#cirques", :lang => "fr" get "cirques-pre" => "public/home#cirques", :lang => "fr"
@ -73,7 +75,13 @@ Rails.application.routes.draw do
namespace :public do namespace :public do
resources :banners do
collection do
get :remove_banner
get :add_banner
end
end
resources :contacts resources :contacts
get 'label_site/index' get 'label_site/index'
@ -488,6 +496,18 @@ end
namespace :admin do namespace :admin do
get "navision/index" => "navision#index"
get "navision/show" => "navision#show"
get "navision/export_sale" => "navision#export_sale"
get "navision/export_purchase" => "navision#export_purchase"
get "navision/get_account" => "navision#get_account"
resources :exports do resources :exports do
collection do collection do
post :prepare_file post :prepare_file

View File

@ -1,9 +0,0 @@
class CreateExportHists < ActiveRecord::Migration
def change
create_table :export_hists do |t|
t.string :piece
t.timestamps null: false
end
end
end