diff --git a/Gemfile b/Gemfile
index 7b7d488..7246cfd 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,13 +1,13 @@
source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
-gem 'rails', '4.0.12'
+gem 'rails', '4.0.13'
gem 'bcrypt-ruby', '3.1.2'
# Use sqlite3 as the database for Active Record
-gem 'mysql2'
- gem 'sass-rails'
+gem 'mysql2', '~> 0.3.18'
+gem 'sass-rails'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
@@ -28,7 +28,7 @@ gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 1.0.1'
-gem "therubyracer"
+gem "therubyracer", group: :production
#gem "less-rails"
#gem "twitter-bootstrap-rails"
@@ -48,7 +48,7 @@ group :doc do
end
gem "capistrano", group: :development
-gem "rvm-capistrano", group: :development
+gem "rvm-capistrano", group: :development, :require => false
gem 'net-ssh', '~>2.7.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
diff --git a/Gemfile.lock b/Gemfile.lock
index 3ad0131..a955f68 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,25 +1,25 @@
GEM
remote: https://rubygems.org/
specs:
- actionmailer (4.0.12)
- actionpack (= 4.0.12)
+ actionmailer (4.0.13)
+ actionpack (= 4.0.13)
mail (~> 2.5, >= 2.5.4)
- actionpack (4.0.12)
- activesupport (= 4.0.12)
+ actionpack (4.0.13)
+ activesupport (= 4.0.13)
builder (~> 3.1.0)
erubis (~> 2.7.0)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
- activemodel (4.0.12)
- activesupport (= 4.0.12)
+ activemodel (4.0.13)
+ activesupport (= 4.0.13)
builder (~> 3.1.0)
- activerecord (4.0.12)
- activemodel (= 4.0.12)
+ activerecord (4.0.13)
+ activemodel (= 4.0.13)
activerecord-deprecated_finders (~> 1.0.2)
- activesupport (= 4.0.12)
+ activesupport (= 4.0.13)
arel (~> 4.0.0)
- activerecord-deprecated_finders (1.0.3)
- activesupport (4.0.12)
+ activerecord-deprecated_finders (1.0.4)
+ activesupport (4.0.13)
i18n (~> 0.6, >= 0.6.9)
minitest (~> 4.2)
multi_json (~> 1.3)
@@ -50,6 +50,7 @@ GEM
coffee-script-source
execjs
coffee-script-source (1.8.0)
+ concurrent-ruby (1.0.5)
devise (3.4.1)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
@@ -81,7 +82,8 @@ GEM
hpricot (~> 0.8.6)
ruby_parser (~> 3.1.1)
htmlentities (4.3.2)
- i18n (0.6.11)
+ i18n (0.9.5)
+ concurrent-ruby (~> 1.0)
jbuilder (1.0.2)
activesupport (>= 3.0.0)
jquery-rails (3.1.2)
@@ -98,13 +100,13 @@ GEM
rails
kgio (2.9.2)
libv8 (3.16.14.7)
- mail (2.6.3)
- mime-types (>= 1.16, < 3)
- mime-types (2.4.3)
+ mail (2.7.0)
+ mini_mime (>= 0.1.1)
+ mini_mime (1.0.0)
mini_portile (0.6.1)
minitest (4.7.5)
- multi_json (1.10.1)
- mysql2 (0.3.17)
+ multi_json (1.13.1)
+ mysql2 (0.3.21)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-sftp (2.1.2)
@@ -125,24 +127,24 @@ GEM
pygments.rb (0.6.0)
posix-spawn (~> 0.3.6)
yajl-ruby (~> 1.1.0)
- rack (1.5.2)
- rack-test (0.6.2)
+ rack (1.5.5)
+ rack-test (0.6.3)
rack (>= 1.0)
- rails (4.0.12)
- actionmailer (= 4.0.12)
- actionpack (= 4.0.12)
- activerecord (= 4.0.12)
- activesupport (= 4.0.12)
+ rails (4.0.13)
+ actionmailer (= 4.0.13)
+ actionpack (= 4.0.13)
+ activerecord (= 4.0.13)
+ activesupport (= 4.0.13)
bundler (>= 1.3.0, < 2.0)
- railties (= 4.0.12)
+ railties (= 4.0.13)
sprockets-rails (~> 2.0)
- railties (4.0.12)
- actionpack (= 4.0.12)
- activesupport (= 4.0.12)
+ railties (4.0.13)
+ actionpack (= 4.0.13)
+ activesupport (= 4.0.13)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
raindrops (0.13.0)
- rake (10.4.2)
+ rake (12.3.0)
rdoc (4.2.0)
json (~> 1.4)
redcarpet (3.2.1)
@@ -164,20 +166,20 @@ GEM
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
sexp_processor (4.4.4)
- sprockets (2.12.3)
+ sprockets (2.12.4)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
- sprockets-rails (2.2.2)
+ sprockets-rails (2.3.3)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
therubyracer (0.12.1)
libv8 (~> 3.16.14.0)
ref
- thor (0.19.1)
- thread_safe (0.3.4)
+ thor (0.20.0)
+ thread_safe (0.3.6)
tilt (1.4.1)
turbolinks (2.5.3)
coffee-rails
@@ -186,7 +188,7 @@ GEM
execjs
rails (>= 3.1)
railties (>= 3.1)
- tzinfo (0.3.42)
+ tzinfo (0.3.53)
uglifier (2.5.3)
execjs (>= 0.3.0)
json (>= 1.8.0)
@@ -223,14 +225,14 @@ DEPENDENCIES
jquery-ui-rails
kaminari
kaminari-bootstrap
- mysql2
+ mysql2 (~> 0.3.18)
net-ssh (~> 2.7.0)
nokogiri
non-stupid-digest-assets
paypal-sdk-merchant
posix-spawn
pygments.rb
- rails (= 4.0.12)
+ rails (= 4.0.13)
redcarpet
rmagick
rvm-capistrano
@@ -242,3 +244,6 @@ DEPENDENCIES
uglifier (>= 1.3.0)
unicorn (= 4.6.3)
wicked_pdf
+
+BUNDLED WITH
+ 1.16.1
diff --git a/app/assets/javascripts/event_form.coffee b/app/assets/javascripts/event_form.coffee
index 9271bba..d428d3d 100644
--- a/app/assets/javascripts/event_form.coffee
+++ b/app/assets/javascripts/event_form.coffee
@@ -14,4 +14,23 @@
$ ->
$(document).on 'change', ".event_date_form input:checkbox", ->
- update_event_form()
\ No newline at end of file
+ update_event_form()
+
+
+
+
+@update_plume_event_form = ->
+ if $("#plume_event_stop_date").is(":checked")
+ $(".stop_at").show()
+ else
+ $(".stop_at").hide()
+ if $("#plume_event_entire_day").is(":checked")
+ $(".plume_event_time").hide()
+ $(".plume_event_time_input").attr "value", ""
+ else
+ $(".plume_event_time").show()
+
+$ ->
+
+ $(document).on 'change', ".plume_event_date_form input:checkbox", ->
+ update_plume_event_form()
\ No newline at end of file
diff --git a/app/assets/javascripts/public.js.coffee b/app/assets/javascripts/public.js.coffee
index 69f70ac..c76a630 100644
--- a/app/assets/javascripts/public.js.coffee
+++ b/app/assets/javascripts/public.js.coffee
@@ -257,7 +257,12 @@ $("document").ready ->
offset= 0
resize = ->
+ $(".with_ratio").each ->
+ ratio = parseFloat($(this).data("ratio"))
+ height = $(this).width()*ratio
+ $(this).css("height",height+"px")
+
$("iframe").each ->
$(this).css
"height" : Math.round($(this).width()/ 1.77)+"px"
diff --git a/app/assets/stylesheets/admin.css.scss b/app/assets/stylesheets/admin.css.scss
index 73760f7..e8b2dc2 100644
--- a/app/assets/stylesheets/admin.css.scss
+++ b/app/assets/stylesheets/admin.css.scss
@@ -10,11 +10,67 @@
@import "admin/topics";
@import "admin/uploads";
+@import "admin/qi";
+
+
+$vert:rgba(143,193,46,0.9);
+
+#edit_watcher_result{
+ .inner{
+ position:fixed;
+ bottom:3px;
+
+ left:3px;
+ z-index:10;
+ width:450px;
+
+ color: #856404;
+ background-color: #fff3cd;
+ border-color: #ffeeba;
+ padding:8px 12px;
+ border:1px solid rgba(#856404, 0.1);
+
+ }
+}
+
+.shiped{
+ background:green;
+}
+
+.image_file_helper{
+
+ background:rgba(255,255,255,0.8);
+ border-radius:20px;
+ border:1px solid rgba(0,0,0,0.2);
+ padding:5px 10px;
+
+}
+.navbar{
+ margin-bottom:0;
+}
+.home_slider_slide_css{
+ border:1px solid black;
+ border-left:10px solid black;
+ padding:10px;
+ margin:5px;
+ position:relative;
+ &.active{
+ border-color:green;
+ }
+ .actions{
+ position:absolute;
+ top:10px;
+ right:10px;
+ }
+
+}
+
#admin_nav{
border-radius:0px;
}
+
span.preview{
img{
max-width:125px;
@@ -35,9 +91,12 @@ html {
}
body {
- height: 100%;
+
width: 100%;
-
+ font-family:"Roboto";
+ background:#E9ECEE no-repeat fixed;
+ background-size:100%;
+ background-position:bottom center;
}
@@ -95,7 +154,7 @@ border:1px solid #0088cc;
display:inline-block;
padding:6px;
border-radius:50%;
-
+min-width: 27px;
text-align:center;
background:white;
@@ -267,13 +326,34 @@ text-decoration:none;
}
-
+ #menu_item_breadcrumb{
+ margin-bottom:20px;
+ a.root{
+ padding:9px 0px;
+
+ display:inline-block;
+ &.child:before{
+ content:"> ";
+ }
+
+ }
+
+ span, .child{
+ padding:9px 0px;
+
+ display:inline-block;
+
+ &:before{
+ content:"> ";
+ }
+ }
+
+ }
#sortable_menu_item{
.menu_item_row{
- padding:8px 0px;
- background:rgba(240,240,240,1);
- margin:3px 0px;
-
+ padding:4px 0px;
+ border-top:1px solid rgba(240,240,240,1);
+
.actions{
text-align:right;
@@ -337,7 +417,8 @@ text-decoration:none;
.block_portlets{
min-height:50px;
- border:1px dotted rgba(227,227,227,1);
+ padding:10px;
+ border:1px dotted rgba(0,0,0,0.5);
}
@@ -614,26 +695,19 @@ margin:0.5em;
}
.portlet_placeholder{
-background:rgba(80,80,80,0.5);
-
-height:5px;
-
+background:lighten($vert,40);
+cursor:pointer;
+padding:3px;
+text-align:center;
i{
-display:none;
-top:-20px;
-left:-5px;
-font-size:15px;
-
-padding:5px;
-
-
+font-size:17px;
+color:lighten($vert,60);
}
&:hover{
-background:rgba(80,80,80,1);
+background:darken($vert,0);
i{
-display:block;
-position:absolute;top:-9px;
+
}
}
@@ -641,6 +715,30 @@ position:absolute;top:-9px;
.portlet{
cursor:pointer;
box-sizing: border-box;
+position:relative;
+border:1px solid rgba(0,0,0,0.3);
+margin:10px 5px;
+padding:5px;
+&.portlet_block_content{
+ border:0;
+ padding:0;
+}
+
+.portlet_label{
+ position:absolute;
+ top:0;
+ right:0;
+ font-size:12px;
+ background:rgba(0,0,0,0.4);
+ color:white;
+ padding:2px 4px;
+ border-radius:0 0px 0 5px;
+ &:hover{
+ z-index:100;
+ background:rgba(0,0,0,1);
+ }
+
+}
&.active{
border:3px solid rgba(129,155,237,1);
.redactor-editor{
@@ -649,7 +747,7 @@ background:rgba(225,237,251,1);
}
}
&.portlet_text_content{
-border:0;
+//border:0;
}
&.move{
@@ -657,10 +755,7 @@ opacity:0.5;
}
}
-h1{
-margin-top:0;
-}
.table-striped tr:nth-child(odd) td, .table-striped tr:nth-child(odd) th{
@@ -673,6 +768,22 @@ background:rgba(235,244,250,1) !important;
min-height:50px;
}
+.portlet_video_content{
+
+ .video_thumb{
+ width:300px;
+ height:200px;
+ margin:auto;
+ .play_button{
+ text-align:center;
+ color:white;
+ font-size:50px;
+ padding-top:70px;
+ }
+
+ }
+}
+
}
#menu_item_informations{
@@ -726,7 +837,7 @@ min-height:50px;
.row{
margin:auto;
-max-width:1100px;
+
display:block;
@@ -822,47 +933,41 @@ height:auto !important;
}
-.select2-container.form-control{
-
- padding: 0px;
- border: 0px;
- border-radius: 0;
- height: auto;
- margin: 0;
+h1{
+ font-size: 28px !important;
+ margin-top: 21px;
+ margin-bottom: 10.5px
}
-.newsletter_block_edit{
- max-width:770px;
- margin:10px auto;
- padding:10px;
- box-shadow:0 0 10px rgba(0,0,0,0.1);
- border:1px solid #C8C8CA;
-
-
-
-
+.recurrent_cb{
+ td{background:#dff0d8 !important;}
}
-.cancel{
-
- color:#C5C1C5;
- a .icon{
- color:#C5C1C5;
- border-color:#C5C1C5;
-
- }
- &:hover{
- a .icon{
- color:#428bca;
- border-color:#428bca;
- &:hover{
- color:white;
-
+.recurrent_sepa{
+ td{background:#fcf8e3 !important;}
+}
+
+.donate_cheque{
+ td{background:#ffdec5 !important;}
+}
+
+.donate_cb{
+ td{background:#d9edf7 !important;}
+}
+
+.formtastic{
+ .form-wrapper{
+ .row{
+ .col-xs-1, .col-xs-2, .col-xs-3{
+ width:auto;
+ margin:0;
+ padding:0px 5px;
}
}
- color:black;
+
}
+
+
}
-
diff --git a/app/assets/stylesheets/admin.old.css.scss b/app/assets/stylesheets/admin.old.css.scss
new file mode 100644
index 0000000..73760f7
--- /dev/null
+++ b/app/assets/stylesheets/admin.old.css.scss
@@ -0,0 +1,868 @@
+@import "bootstrap";
+
+@import "fontawesome/font-awesome";
+@import "manager";
+@import "redactor";
+@import "pane_hover";
+@import "vendor/select2";
+
+@import "admin/sheets";
+@import "admin/topics";
+@import "admin/uploads";
+
+#admin_nav{
+border-radius:0px;
+
+}
+
+span.preview{
+img{
+max-width:125px;
+max-height:125px;
+cursor:pointer;
+}
+
+}
+img{
+
+max-width:100%;
+}
+
+html {
+ height: 100%;
+ width: 100%;
+
+}
+
+body {
+ height: 100%;
+ width: 100%;
+
+
+}
+
+
+#tags .tag_label{
+ i{ display:none;}
+
+ &.active{
+
+ background:rgba(0,136,204,1);
+ color:white;
+ i{ display:inline;}
+
+ }
+}
+
+.set_tag{
+display:none;
+}
+
+.tag_label{
+ border-radius:11px;background:rgba(206,220,244,1);border:1px solid rgba(170,196,238,1);padding:2px 9px;display:inline-block;cursor:default;color:black;
+ margin-bottom:5px;
+}
+
+.map_content_map img {
+ max-width: none;
+}
+
+#mapCanvas label {
+ width: auto; display:inline;
+}
+
+body.admin{
+
+#artworks{
+.artwork{
+ float:left;width:250px;height:270px;margin:0px 10px 10px 0px;
+ }
+
+}
+
+
+
+
+padding:0px;
+
+.right{
+float:right;
+
+}
+
+.icon{
+border:1px solid #0088cc;
+display:inline-block;
+padding:6px;
+border-radius:50%;
+
+text-align:center;
+background:white;
+
+&:hover{
+background:#0088cc;
+color:white;
+text-decoration:none;
+}
+
+
+}
+
+ #upload_details{
+ display:none;
+ .content{
+ position:absolute;
+ top:0px;
+ left:0px;
+ right:0px;
+ bottom:0px;
+ overflow:auto;
+
+ }
+
+ height:400px;
+ width:800px;
+ position:absolute;
+ top:-400px;
+ right:1em;
+
+ background:white;
+ box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);
+ //background-color: @dropdownBackground;
+ border: 1px solid #ccc; // Fallback for IE7-8
+ //border: 1px solid @dropdownBorder;
+ *border-right-width: 2px;
+ *border-bottom-width: 2px;
+ //.border-radius(6px);
+ //.box-shadow(0 5px 10px rgba(0,0,0,.2));
+
+
+
+ }
+ #upload_details::before {
+
+ content: '';
+ display: inline-block;
+ border-left: 7px solid transparent;
+ border-right: 7px solid transparent;
+
+ position: absolute;
+
+ right: 215px;
+ border-top: 7px solid rgba(0, 0, 0, 0.2);
+
+ border-bottom: 0;
+ bottom: -7px;
+
+
+
+
+
+ }
+
+ #upload_details::after {
+
+
+
+ content: '';
+ display: inline-block;
+ border-left: 6px solid transparent;
+ border-right: 6px solid transparent;
+
+ position: absolute;
+
+ right: 216px;
+ border-top: 6px solid #ffffff;
+ border-bottom: 0;
+ bottom: -6px;
+
+ }
+
+
+
+
+ #toolbar-text{
+ position:fixed;
+ z-index:2;
+
+ top:52px;
+ left:0px;
+ right:330px;
+
+
+ }
+
+ #flashs{
+ position:fixed;
+ bottom:0px;
+
+ left:1em;
+ min-width:600px;
+ width:50%;
+ z-index:3;
+
+ }
+
+
+ form .clearfix:before, form .clearfix:after {
+ display: inline;
+ }
+
+ .error{
+ color:red;
+
+ input{
+ border-color:red;
+ }
+
+ *{
+ color:red;
+ }
+ }
+
+ body.dragging, body.dragging * {
+ cursor: move !important;
+
+ }
+
+ .dragged {
+ position: absolute;
+ opacity: 0.5;
+ z-index: 2000;
+ }
+
+ ol.sortable li.placeholder {
+ position: relative;
+ }
+
+ ol.sortable li.placeholder:before {
+ position: absolute;
+
+ }
+
+
+
+
+
+ .placeholder{
+ background:rgba(143,202,70,0.8);
+ height:10px;
+ }
+
+ .prevv_folder{
+
+ border-top:1px solid #999999;
+ border-bottom:1px solid #999999;
+ padding:8px 0px;
+
+ .placeholder{
+ height:0px;
+ }
+
+ &.active{
+ background:rgba(143,202,70,0.8);
+
+ }
+
+ }
+
+
+
+ #sortable_menu_item{
+ .menu_item_row{
+ padding:8px 0px;
+ background:rgba(240,240,240,1);
+ margin:3px 0px;
+
+ .actions{
+ text-align:right;
+
+ }
+
+ }
+
+
+
+ .receptable{
+ position:relative;
+
+ .placeholder{
+ position:absolute;
+ top:0px;
+ left:0px;
+ right:0px;
+ bottom:0px;
+ height:auto;
+ }
+
+ }
+
+ }
+
+ #menu_item_informations{
+
+
+ form{
+
+ .preview{
+
+ img{
+ height:50px;
+
+ }
+ }
+ }
+
+ position:fixed;
+ z-index:3;
+ overflow:auto;
+ box-shadow:rgba(0,0,0,1) 0px 0px 5px;
+ margin-bottom:0px;
+ top:52px;
+ right:0px;
+ width:330px;
+ bottom:0px;
+ background:white;
+ .placeholder{
+ display:inline-block;
+ width:91px;
+ height:91px;
+ margin:0px;
+}
+
+
+ }
+
+
+
+ .block_portlets{
+ min-height:50px;
+ border:1px dotted rgba(227,227,227,1);
+
+
+ }
+
+ .block_portlets_sortable{
+ border:0px;
+
+ }
+
+
+
+ #menu_item_inspector_container{
+ .panel{
+ border-radius:0px;
+ border-left:0px;
+ border-right:0px;
+
+ }
+ .accordion{
+
+ height:auto;
+
+ }
+
+ .accordion-group{
+ border:0px;
+ border-radius:0px;
+ }
+
+
+ .accordion-body{
+ background:white;
+
+ }
+ .accordion-heading{
+ border-radius:0px;
+ border:0px;
+ background:-webkit-linear-gradient(top, #222222, #111111);
+ padding:0px;
+ min-height:0px;
+ a{
+ padding:10px 20px;
+ color:white;
+
+ &:hover{
+ text-decoration:none;
+ }
+ }
+
+ }
+ .inspector_handle{
+ height:10px;
+ width:100%;
+ background:black;
+ cursor:pointer;
+
+ }
+
+ .content_type{
+ display:inline-block;
+ img{height:50px;cursor:pointer;}
+
+ }
+ }
+
+ .btn-toolbar{
+ display:none;
+ top:-35px;
+
+ }
+
+
+ #column_sliders{
+
+ position:relative;
+
+ .slider{
+ position:absolute;
+ top:0px;
+ left:0px;
+ width:100%;
+ }
+
+ .slider-selection{
+ display:none !important;
+ }
+
+ .slider:not(:first-child){
+
+
+ .slider-track{
+ background:transparent;
+ box-shadow:transparent 0px 0px 0px;
+ }
+ }
+
+
+ .slider-handle{
+ z-index:100;
+ }
+
+ }
+
+ .html_content_form{
+
+
+
+
+
+ #ace_editor_pre{
+ position:relative;
+ width:100%;
+ height:400px;
+ background:white;
+ border:1px solid #353535;
+
+ }
+
+
+
+
+
+ &.large{
+ position:fixed;
+ top:0px;
+ left:0px;
+ bottom:0px;
+ right:0px;
+ background:white;
+ z-index:2000 !important;
+
+
+ #ace_editor_pre{
+ position:absolute;
+ top:10px;
+ left:10px;
+ bottom:50px;
+ right:10px;
+ width:inherit;
+ height:inherit;
+
+
+ }
+
+ .action{
+
+ position:absolute;
+
+ bottom:15px;
+ right:5px;
+
+
+ }
+
+
+
+
+ }
+
+
+ }
+
+
+
+ .image_square{
+ display:inline-block;
+ padding:5px;
+ margin:5px;
+ position:relative;
+ border : 1px solid rgb(230,230,230);
+
+ background:white;
+
+ .actions{
+ display:none;
+ position:absolute;
+ top:0px;
+ right:0px;
+ }
+ }
+
+ .image_square .img{
+ text-align:center;
+ width:150px;
+ height:150px;
+ margin:0px;
+ background-position:center center;
+ background-repeat:no-repeat;
+
+ background-size: contain;
+
+
+
+ }
+
+ .image_square:hover .actions{
+ display:block;
+ border:none;
+ padding:0px;
+ margin:0px;
+
+
+
+ }
+
+ .image_square:hover .actions:hover{
+
+ opacity:1;
+
+ }
+
+
+
+}
+
+.event_date_form{
+ background:rgba(143,193,46,0.9);
+ margin:0px -10px 20px -10px;
+ padding:10px;
+
+ color:black;
+
+ p{
+ line-height:35px;
+ }
+
+ label{
+ display:inline;
+ }
+
+}
+
+
+.field_with_suppr{
+ display:inline-block;
+ position:relative;
+
+ .suppr{
+
+ display:block;
+ position:absolute;
+ top:7px;
+ right:5px;
+ img{
+ cursor:pointer;
+ }
+
+ }
+
+}
+
+.periodes_form .field, .jockers_form .field{
+border:1px solid #5b94c7;
+margin:0.5em;
+}
+
+
+.table-striped{
+
+ tr:nth-child(odd) {
+ td, th{
+ background:#f9f9f9 !important;
+ }}
+
+}
+
+@media print {
+ .visible-print { display: inherit !important; }
+ .hidden-print { display: none !important; }
+
+
+
+
+}
+
+.portlet_placeholder{
+background:rgba(80,80,80,0.5);
+
+height:5px;
+
+i{
+display:none;
+top:-20px;
+left:-5px;
+font-size:15px;
+
+padding:5px;
+
+
+}
+&:hover{
+background:rgba(80,80,80,1);
+
+i{
+display:block;
+position:absolute;top:-9px;
+}
+}
+
+}
+.portlet{
+cursor:pointer;
+box-sizing: border-box;
+&.active{
+border:3px solid rgba(129,155,237,1);
+.redactor-editor{
+background:rgba(225,237,251,1);
+
+}
+}
+&.portlet_text_content{
+border:0;
+}
+
+&.move{
+opacity:0.5;
+}
+
+}
+h1{
+margin-top:0;
+
+}
+
+.table-striped tr:nth-child(odd) td, .table-striped tr:nth-child(odd) th{
+
+background:rgba(235,244,250,1) !important;
+
+}
+
+.block_portlets{
+.portlet{
+min-height:50px;
+}
+
+}
+
+#menu_item_informations{
+ #collapse3{
+
+ position:relative;
+ padding-bottom:50px;
+ }
+
+
+ #element_form_action{
+
+ position:fixed;
+ width:330px;
+ right:0;
+ bottom:0;
+ border-top:solid rgba(221,221,221,1) 1px;
+
+ .portlet_handle, .trash, .save{
+ border-radius:0;
+ border:0;
+ margin:0;
+ display:block;
+ float:left;
+ padding:10px 12px;
+
+ }
+
+ .portlet_handle{
+ width:35%;
+
+ .cancel_message{
+ display:none;
+ }
+ }
+ .trash{
+ width:20%;
+ }
+ .save{
+ width:45%;
+ }
+
+
+ }
+
+}
+
+
+
+
+.row{
+
+margin:auto;
+max-width:1100px;
+display:block;
+
+
+&:after{
+content: "";
+ display: table;
+ clear: both;
+
+}
+
+.columns{
+
+display:block;
+
+box-sizing: border-box;
+float:left;
+display:inline-block;
+
+&.span_12{
+width:100%;
+
+}
+
+&.span_11{
+width:100/12*11;
+
+}
+&.span_10{
+width:percentage(1/12*10);
+
+}
+&.span_9{
+width:percentage(1/12*9);
+
+}
+&.span_8{
+width:percentage(1/12*8);
+
+}
+&.span_7{
+width:percentage(1/12*7);
+
+}
+
+&.span_6{
+width:percentage(1/12*6);
+
+}
+&.span_5{
+width:percentage(1/12*5);
+
+}
+&.span_4{
+width:percentage(1/12*4);
+
+}
+&.span_3{
+width:percentage(1/12*3);
+
+}
+&.span_2{
+width:percentage(1/12*2);
+
+}
+
+&.span_1{
+width:percentage(1/12*1);
+
+}
+
+
+}
+}
+#menu_item_informations{
+h4{
+color: #333333;
+background-color: whitesmoke;
+border:1px solid #dddddd;
+padding:10px 15px;
+font-size:16px;
+cursor:pointer;
+border-left:0px;
+border-right:0px;
+}
+
+.panel{
+padding:0 10px;
+}
+}
+#collapse3{
+height:auto !important;
+
+}
+
+
+.select2-container.form-control{
+
+ padding: 0px;
+ border: 0px;
+ border-radius: 0;
+ height: auto;
+ margin: 0;
+
+}
+
+.newsletter_block_edit{
+
+ max-width:770px;
+ margin:10px auto;
+ padding:10px;
+ box-shadow:0 0 10px rgba(0,0,0,0.1);
+ border:1px solid #C8C8CA;
+
+
+
+
+}
+
+.cancel{
+
+ color:#C5C1C5;
+ a .icon{
+ color:#C5C1C5;
+ border-color:#C5C1C5;
+
+ }
+ &:hover{
+ a .icon{
+ color:#428bca;
+ border-color:#428bca;
+ &:hover{
+ color:white;
+
+ }
+ }
+ color:black;
+ }
+}
+
diff --git a/app/assets/stylesheets/admin/qi.scss b/app/assets/stylesheets/admin/qi.scss
new file mode 100644
index 0000000..a69013c
--- /dev/null
+++ b/app/assets/stylesheets/admin/qi.scss
@@ -0,0 +1,143 @@
+$blue :#2388B8;
+
+
+.navbar-inverse .navbar-nav > li > a, .navbar-inverse .navbar-brand{
+ color:rgba(255, 255, 255, 0.80);
+
+}
+
+.navbar-inverse{
+ background:#31373d;
+}
+
+
+
+
+.qi_header{
+ box-sizing:border-box;
+
+ padding: 13px 20px;
+
+ box-shadow: 0 1px 0 rgba(0, 0, 0, 0.07);
+ background:white;
+ .right{
+ float:right;
+
+ .btn{
+ position:relative;
+ top:-5px;
+ }
+ }
+
+ h1{
+ font-size: 20px !important;
+
+ font-weight: 400;
+ margin:0;
+
+ span{
+ color:rgba(0,0,0,0.6);
+ display:inline-block;
+ &:before{
+ content : "/ ";
+ }
+
+ }
+ }
+
+
+
+}
+
+
+.qi_row{
+ padding:20px;
+}
+
+.qi_pannel{
+ &.padding{
+ padding:20px;
+ }
+ &.qi_plain{
+
+ background-color: #ffffff;
+ border-radius: 3px;
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
+
+ .header{
+ h2{
+ margin-top:0;
+ }
+ margin-bottom:30px;
+ }
+
+ .sub_header{
+ padding-top:20px;
+ margin:0 -20px;
+ padding:0 20px;
+ padding-top:20px;
+ border-top:1px solid rgba(0, 0, 0, 0.1);
+ h2{
+ margin-top:0;
+ }
+ margin-bottom:30px;
+
+ }
+ }
+
+}
+
+.qi_pagination {
+ .pagination{
+ padding:0;
+ margin:0;
+ }
+ text-align:center;
+ display:block;
+ margin:0 -20px;
+ border-top:1px solid rgba(0, 0, 0, 0.1);
+ padding-top:20px;
+ .arrows, .pages{
+ display:inline;
+ }
+
+ .gap, .current, a{
+
+ display:inline-block;
+ //border-radius:50%;
+ padding:8px 14px;
+
+ margin-right:5px;
+
+
+ color:black;
+
+
+ &:hover{
+ background:$blue;
+ font-weight:bold;
+ cursor:pointer;
+ color:white;
+ text-decoration:none;
+ }
+
+ }
+ .current{
+ background:$blue;
+ color:white;
+ font-weight:bold;
+
+ }
+
+}
+
+td{
+ &.actions{
+ min-width:110px;
+ text-align:right;
+ }
+}
+
+.qi_cancel_margins{
+ margin:0 -15px !important;
+}
\ No newline at end of file
diff --git a/app/assets/stylesheets/public.scss b/app/assets/stylesheets/public.scss
index 6f62949..7abaeb7 100644
--- a/app/assets/stylesheets/public.scss
+++ b/app/assets/stylesheets/public.scss
@@ -5,6 +5,8 @@
@import "public/top";
+@import "public/plume";
+
.observer-et-photographier-la-faune-sans-deranger{
.couv{
diff --git a/app/assets/stylesheets/public/plume.css.scss b/app/assets/stylesheets/public/plume.css.scss
new file mode 100644
index 0000000..4b6d614
--- /dev/null
+++ b/app/assets/stylesheets/public/plume.css.scss
@@ -0,0 +1,216 @@
+$grey:#61676A;
+$marron:#9A9289;
+$vert:#7BAE53;
+#main_plume{
+ background:white;
+}
+#plume_wrapper{
+
+
+
+ #plume_header{
+ .plume_logo_mobile{
+ display:none;
+ }
+
+ text-align:center;
+ img{
+ display:block;
+ margin:auto;
+ width:990px;
+ max-width:100%;
+ padding:20px;
+ }
+
+ .baseline{
+ font-size:25px;
+ font-weight:normal;
+ }
+
+ .hr{
+ margin:20px 0;
+ height:30px;
+ background:$grey;
+ }
+ }
+
+ .sommaire{
+ float:left;
+ width:30%;
+ text-align:left;
+
+ .sommaire_panel{
+ background:$marron;
+ padding:20px;
+ .content{
+ padding:10px 20px;
+ border:dashed 1px white;
+ h2{
+ font-weight:bold;
+ color:white;
+ font-size:40px;
+ text-align:center;
+ text-transform:uppercase;
+ margin-top:0;
+ padding-top:0;
+ }
+ h3{
+ text-transform:uppercase;
+ margin:0;
+ padding:0;
+ margin-top:10px;
+ font-weight:bold;
+ color:white;
+ }
+
+ a{
+ display:block;
+ color:black;
+ font-size:18px;
+ &:hover{
+ text-decoration:none;
+ }
+ }
+ }
+
+
+ }
+ }
+ .plume_home{
+ max-width:1250px;
+ margin:auto;
+ .right_plume{
+ margin-left:2%;
+ width:68%;
+ float:left;
+ }
+
+ .plume-article_header{
+ .plume_cat{
+ text-transform:uppercase;
+ color:$vert;
+ font-size:25px;
+ margin-top:15px;
+ font-weight:bold;
+ margin-bottom:20px;
+ }
+ h1{
+ font-size:30px;
+ margin:10px 0;
+ font-weight:bold;
+ color:black;
+ text-transform:none;
+ }
+
+ }
+ .render_block{
+ padding:30px 0;
+ padding-bottom:100px;
+ }
+
+
+ .plume_event{
+ border-bottom:1px dashed $marron;
+ padding: 10px 0;
+
+ h2{
+ color:$vert;
+ font-size:20px;
+ text-transform:none;
+ margin:0;
+ }
+ .date{
+ margin: 5px 0;
+
+ }
+ margin-bottom:10px;
+
+ }
+
+ .plume_breve{
+ border-bottom:1px dashed $marron;
+ padding: 10px 0;
+
+ h2{
+ color:$vert;
+ font-size:20px;
+ text-transform:none;
+ margin:0;
+ }
+
+ margin-bottom:10px;
+ .render_block{
+ padding-bottom:20px;
+ padding-top:20px;
+ }
+ }
+
+
+ .article{
+
+
+ width:50%;
+ float:left;
+
+ &.article_large{
+ float:none;
+ width:auto;
+ margin-top:60px;
+ margin-bottom:100px;
+ .image{
+ width:47%;
+ margin-left:1%;
+ float:left;
+ }
+ .description{
+ margin-left:50%;
+ padding-left:20px;
+ }
+
+ }
+ .inner{
+ margin:0 20px;
+ }
+
+ .image{
+ height:300px;
+ }
+
+ .plume_cat{
+ text-transform:uppercase;
+ color:$vert;
+ font-size:30px;
+ margin-top:15px;
+ font-weight:bold;
+ }
+ h2{
+ font-size:20px;
+ margin:10px 0;
+ font-weight:bold;
+ }
+ }
+ }
+ .plume_bottom{
+ background:$grey;
+ padding:10px 20px;
+ margin-top:20px;
+ .big{
+ font-size:20px;
+ }
+ p{
+ margin:5px 0;
+
+ }
+ *{
+ color:white;
+ }
+
+ }
+
+}
+
+.fill_img{
+ background:center center no-repeat;
+ background-size:100%;
+ background-size:cover;
+}
\ No newline at end of file
diff --git a/app/controllers/admin/plume_articles_controller.rb b/app/controllers/admin/plume_articles_controller.rb
new file mode 100644
index 0000000..e23a073
--- /dev/null
+++ b/app/controllers/admin/plume_articles_controller.rb
@@ -0,0 +1,107 @@
+# -*- encoding : utf-8 -*-
+
+class Admin::PlumeArticlesController < ApplicationController
+
+ before_filter :auth_admin
+
+ layout "admin"
+
+
+
+ before_filter :find_plume_articles
+
+ def index
+
+ end
+
+
+ def cible
+
+ render :layout => false
+
+ end
+
+
+ def new
+
+ @plume_article = PlumeArticle.new(:plume_cat_id => params[:plume_cat_id])
+
+ end
+
+
+ def edit
+
+ @plume_article = PlumeArticle.find(params[:id])
+
+
+ end
+
+
+ def create
+
+ @plume_article = PlumeArticle.new(plume_article_params)
+
+
+ if @plume_article.save
+ flash[:notice] = "L'plume_article à été ajouté avec succès."
+ @plume_articles = @plume_article.plume_cat.plume_articles.order(:position)
+
+ else
+ render :action => "new"
+
+ end
+
+ end
+
+
+ def update
+
+ @plume_article = PlumeArticle.find(params[:id])
+
+
+ if params[:plume_article]
+ if @plume_article.update_attributes(plume_article_params)
+ flash[:notice] = "L'plume_article à été modifié avec succès."
+ else
+ render :action => "edit"
+ end
+
+
+ elsif params[:tag_id]
+ @plume_article.tag_by_tag_ids(params[:tag_id])
+ end
+
+
+
+
+ end
+
+
+ def destroy
+
+ @plume_article = PlumeArticle.find(params[:id])
+ @plume_article.destroy
+
+ end
+
+ protected
+
+ def find_plume_articles
+
+
+ @plume_articles = PlumeArticle.all
+
+
+ end
+
+ private
+ def plume_article_params
+ params.require(:plume_article).permit!
+
+
+
+
+ end
+
+
+end
diff --git a/app/controllers/admin/plume_cats_controller.rb b/app/controllers/admin/plume_cats_controller.rb
new file mode 100644
index 0000000..3fb3d49
--- /dev/null
+++ b/app/controllers/admin/plume_cats_controller.rb
@@ -0,0 +1,107 @@
+# -*- encoding : utf-8 -*-
+
+class Admin::PlumeCatsController < ApplicationController
+
+ before_filter :auth_admin
+
+ layout "admin"
+
+
+
+ before_filter :find_plume_cats
+
+ def index
+
+ end
+
+
+ def cible
+
+ render :layout => false
+
+ end
+
+
+ def new
+
+ @plume_cat = PlumeCat.new(:plume_id => params[:plume_id])
+
+ end
+
+
+ def edit
+
+ @plume_cat = PlumeCat.find(params[:id])
+
+
+ end
+
+
+ def create
+
+ @plume_cat = PlumeCat.new(plume_cat_params)
+
+
+ if @plume_cat.save
+ flash[:notice] = "L'plume_cat à été ajouté avec succès."
+ @plume_cats = @plume_cat.plume.plume_cats
+
+ else
+ render :action => "new"
+
+ end
+
+ end
+
+
+ def update
+
+ @plume_cat = PlumeCat.find(params[:id])
+
+
+ if params[:plume_cat]
+ if @plume_cat.update_attributes(plume_cat_params)
+ flash[:notice] = "L'plume_cat à été modifié avec succès."
+ else
+ render :action => "edit"
+ end
+
+
+ elsif params[:tag_id]
+ @plume_cat.tag_by_tag_ids(params[:tag_id])
+ end
+
+
+
+
+ end
+
+
+ def destroy
+
+ @plume_cat = PlumeCat.find(params[:id])
+ @plume_cat.destroy
+
+ end
+
+ protected
+
+ def find_plume_cats
+
+
+ @plume_cats = PlumeCat.all
+
+
+ end
+
+ private
+ def plume_cat_params
+ params.require(:plume_cat).permit!
+
+
+
+
+ end
+
+
+end
diff --git a/app/controllers/admin/plume_events_controller.rb b/app/controllers/admin/plume_events_controller.rb
new file mode 100644
index 0000000..3ddf34c
--- /dev/null
+++ b/app/controllers/admin/plume_events_controller.rb
@@ -0,0 +1,116 @@
+# -*- encoding : utf-8 -*-
+
+class Admin::PlumeEventsController < ApplicationController
+ before_filter :auth_admin
+
+
+ layout "admin"
+
+ before_filter :find_plume_events
+
+
+ def index
+
+ end
+
+
+ def cible
+ @plume_events = PlumeEvent.all
+
+ render :layout => false
+ end
+
+
+ def new
+ if params[:plume_event_id] and PlumeEvent.find(params[:plume_event_id])
+ @plume_event = PlumeEvent.find(params[:plume_event_id]).dup
+ @plume_event.plume_event_id = params[:plume_event_id]
+ else
+ @plume_event = PlumeEvent.new(:start_at_date =>[ Date.today.day, Date.today.month, Date.today.year].join("/"), :start_at_time => "20:00")
+
+ end
+
+ @plume_event.plume_id = params[:plume_id]
+
+ end
+
+ def edit
+ @plume_event = PlumeEvent.find(params[:id])
+
+
+ end
+
+
+ def create
+ @plume_event = PlumeEvent.new(params.require(:plume_event).permit!)
+
+
+ if @plume_event.save
+
+
+ flash[:notice] = "L'événement à été ajouté avec succès."
+
+ @plume_events = @plume_event.plume.plume_events.order('start_at, stop_at')
+
+ else
+ render :action => "new"
+
+ end
+
+ end
+
+
+ def update
+ @plume_event = PlumeEvent.find(params[:id])
+
+ if @plume_event.update_attributes(params.require(:plume_event).permit!)
+ flash[:notice] = "L'événement à été modifié avec succès."
+ else
+ render :action => "edit"
+
+ end
+
+ end
+
+
+ def destroy
+ @plume_event = PlumeEvent.find(params[:id])
+ @plume_event.destroy
+
+ end
+
+
+ protected
+
+ def find_plume_events
+ date_regex = /^(0[1-9]|[12][0-9]|3[01])[\/](0[1-9]|1[012])[\/](19|20)\d\d$/i
+ if params[:start] and params[:start] =~ date_regex
+ start = Date.parse(params[:start]).beginning_of_day
+ params[:start]= start.strftime('%d/%m/%Y')
+ else
+ params[:start] = "Début"
+ end
+ if params[:stop] and params[:stop] =~ date_regex
+ stop = Date.parse(params[:stop]).end_of_day
+ params[:stop]= stop.strftime('%d/%m/%Y')
+ else
+ params[:stop] = "Fin"
+ end
+
+ @plume_events = PlumeEvent.order('start_at, stop_at')
+ @plume_events = @plume_events.after(start) if start
+ @plume_events = @plume_events.before(stop) if stop
+ per_page = (params[:per_page] and params[:per_page] != "") ? params[:per_page] : 20
+ page = (params[:page] and params[:page] != "") ? params[:page] : 1
+ #@plume_events = PlumeEvent.all.page(page).per(per_page)
+
+ @plume_events = PlumeEvent.order('start_at DESC, stop_at DESC')
+ @plume_events = @plume_events.after(start) if start
+ @plume_events = @plume_events.before(stop) if stop
+
+
+
+
+ @plume_events = @plume_events.page(page).per(per_page)
+ end
+end
diff --git a/app/controllers/admin/plumes_controller.rb b/app/controllers/admin/plumes_controller.rb
new file mode 100644
index 0000000..2c86ff0
--- /dev/null
+++ b/app/controllers/admin/plumes_controller.rb
@@ -0,0 +1,107 @@
+# -*- encoding : utf-8 -*-
+
+class Admin::PlumesController < ApplicationController
+
+ before_filter :auth_admin
+
+ layout "admin"
+
+
+
+ before_filter :find_plumes
+
+ def index
+
+ end
+
+
+ def cible
+
+ render :layout => false
+
+ end
+
+
+ def new
+
+ @plume = Plume.new()
+
+ end
+
+
+ def edit
+
+ @plume = Plume.find(params[:id])
+
+
+ end
+
+
+ def create
+
+ @plume = Plume.new(plume_params)
+
+
+ if @plume.save
+ flash[:notice] = "L'plume à été ajouté avec succès."
+ self.find_plumes
+
+ else
+ render :action => "new"
+
+ end
+
+ end
+
+
+ def update
+
+ @plume = Plume.find(params[:id])
+
+
+ if params[:plume]
+ if @plume.update_attributes(plume_params)
+ flash[:notice] = "L'plume à été modifié avec succès."
+ else
+ render :action => "edit"
+ end
+
+
+ elsif params[:tag_id]
+ @plume.tag_by_tag_ids(params[:tag_id])
+ end
+
+
+
+
+ end
+
+
+ def destroy
+
+ @plume = Plume.find(params[:id])
+ @plume.destroy
+
+ end
+
+ protected
+
+ def find_plumes
+
+
+ @plumes = Plume.all
+
+
+ end
+
+ private
+ def plume_params
+ params.require(:plume).permit!
+
+
+
+
+ end
+
+
+end
diff --git a/app/controllers/public/plume_articles_controller.rb b/app/controllers/public/plume_articles_controller.rb
new file mode 100644
index 0000000..627544e
--- /dev/null
+++ b/app/controllers/public/plume_articles_controller.rb
@@ -0,0 +1,13 @@
+# -*- encoding : utf-8 -*-
+
+class Public::PlumeArticlesController < ApplicationController
+
+ layout "plume"
+
+ def show
+ @plume_article = PlumeArticle.find(params[:id])
+ @plume = @plume_article.plume
+ end
+
+
+end
diff --git a/app/controllers/public/plumes_controller.rb b/app/controllers/public/plumes_controller.rb
new file mode 100644
index 0000000..5d54b7e
--- /dev/null
+++ b/app/controllers/public/plumes_controller.rb
@@ -0,0 +1,42 @@
+# -*- encoding : utf-8 -*-
+
+class Public::PlumesController < ApplicationController
+
+ layout "plume"
+
+
+
+ def index
+
+ @plumes = Plume.all
+
+ @index_title = "La plume du Pic Vert"
+ end
+
+
+
+
+ def show
+ @plume = Plume.find(params[:id])
+
+ if @plume and (@plume.enabled or current_admin)
+
+ @title = @plume.title
+
+
+ else
+ redirect_to "/", :notice => "La page que vous demandez n'a pas pu être trouvée.
Vous avez donc été redirigé sur notre page d'accueil"
+
+ end
+ end
+
+ def agenda
+ @plume = Plume.find(params[:id])
+ end
+
+ def breves
+ @plume = Plume.find(params[:id])
+ end
+
+
+end
diff --git a/app/models/plume.rb b/app/models/plume.rb
new file mode 100644
index 0000000..993511f
--- /dev/null
+++ b/app/models/plume.rb
@@ -0,0 +1,9 @@
+class Plume < ActiveRecord::Base
+ belongs_to :image_file
+
+ has_many :plume_cats
+
+ has_many :plume_articles, :through => :plume_cats
+
+ has_many :plume_events
+end
diff --git a/app/models/plume_article.rb b/app/models/plume_article.rb
new file mode 100644
index 0000000..dcb8d35
--- /dev/null
+++ b/app/models/plume_article.rb
@@ -0,0 +1,27 @@
+class PlumeArticle < ActiveRecord::Base
+ belongs_to :plume_cat
+ has_one :plume, :through => :plume_cat
+ belongs_to :image_file
+
+ has_one :block, :as => :blockable
+ before_validation do
+
+ end
+
+ after_create :after_creation
+
+
+ def after_creation
+ @block = Block.new(:block_name => "Contenu")
+ @block.blockable = self
+ @block.save
+
+
+ end
+
+ def alloweds_types
+ self.block.allow_types :TitleContent, :TextContent, :ImageContent, :LinkContent, :GalleryContent, :HtmlContent
+
+ end
+
+end
diff --git a/app/models/plume_cat.rb b/app/models/plume_cat.rb
new file mode 100644
index 0000000..67d28c9
--- /dev/null
+++ b/app/models/plume_cat.rb
@@ -0,0 +1,5 @@
+class PlumeCat < ActiveRecord::Base
+ belongs_to :plume
+
+ has_many :plume_articles
+end
diff --git a/app/models/plume_event.rb b/app/models/plume_event.rb
new file mode 100644
index 0000000..796c632
--- /dev/null
+++ b/app/models/plume_event.rb
@@ -0,0 +1,122 @@
+class PlumeEvent < ActiveRecord::Base
+ belongs_to :plume
+
+ date_format = /\A(0[1-9]|[12][0-9]|3[01])[\/](0[1-9]|1[012])[\/](19|20)\d\d\z/i
+ hour_format = /\A([0-1]?[0-9]|2[0-3]):([0-5][0-9])(:[0-5][0-9])?\z/i
+ validates :title, :presence => true
+
+ belongs_to :image_file
+
+# validates :start_at_date, :presence => true, :format => { :with => date_format }
+# validates :start_at_time, :presence => true, :format => { :with => hour_format }, :if => :with_time?
+# validates :stop_at_date, :presence => true, :format => { :with => date_format }, :if => :stop_date
+# validates :stop_at_time, :presence => true, :format => { :with => hour_format }, :if => [:with_time?,:stop_date]
+
+ attr_accessor :start_at_date, :start_at_time, :stop_at_date, :stop_at_time, :plume_event_id, :skip_date
+
+ has_one :block, :as => :blockable
+
+
+ scope :between, lambda { |start, stop|
+ after(start).before(stop)
+ }
+
+ scope :after, lambda { |date|
+ where("(start_at >= ? or stop_at >= ?)", date, date )
+ }
+ scope :before, lambda { |date|
+ where("(stop_at <= ?) or (start_at <= ?)", date, date )
+ }
+
+ def alloweds_types
+ self.block.allow_types :TitleContent, :TextContent, :ImageContent, :LinkContent, :GalleryContent, :HtmlContent
+
+ end
+
+ after_create do
+ if self.plume_event_id and PlumeEvent.where(:id => self.plume_event_id).exists?
+
+ plume_event = PlumeEvent.find(self.plume_event_id)
+
+ @block = plume_event.block.dup
+ @block.blockable = self
+ @block.save
+
+ else
+ @block = Block.new(:block_name => "general")
+ @block.blockable = self
+ @block.save
+ end
+
+
+ end
+
+ def create_block(plume_event_id=nil)
+ if plume_event_id
+
+ else
+
+
+
+ end
+ end
+
+ before_validation do
+
+ if !self.skip_date
+ self.stop_at_date, self.stop_at_time = nil, nil if !self.stop_date
+ self.start_at_time, self.stop_at_time = nil, nil if self.entire_day
+
+ if self.entire_day
+ self.start_at = self.start_at_date.to_s
+ self.stop_at = self.stop_at_date.to_s
+ else
+ self.start_at = self.start_at_date.to_s+" "+self.start_at_time.to_s
+ self.stop_at = self.stop_at_date.to_s+" "+self.stop_at_time.to_s
+
+ end
+
+ end
+
+ if self.stop_date and self.start_at and (self.stop_at.beginning_of_day != self.start_at.beginning_of_day)
+ self.many_days = true
+ else
+ self.many_days = false
+ end
+
+ true
+
+ end
+
+ def with_time?
+ true if !self.entire_day
+ end
+
+ after_initialize do
+ if self.start_at
+ if self.entire_day
+ self.start_at_date = self.start_at.strftime('%d/%m/%Y')
+ else
+ self.start_at_date = self.start_at.strftime('%d/%m/%Y')
+ self.start_at_time = self.start_at.strftime('%H:%M')
+ end
+ end
+
+ if self.stop_at
+ if self.entire_day
+ self.stop_at_date = self.stop_at.strftime('%d/%m/%Y')
+ else
+ self.stop_at_date = self.stop_at.strftime('%d/%m/%Y')
+ self.stop_at_time = self.stop_at.strftime('%H:%M')
+ end
+ end
+ end
+
+ def human_date
+
+
+
+ end
+
+
+end
diff --git a/app/views/admin/plume_articles/_form.html.haml b/app/views/admin/plume_articles/_form.html.haml
new file mode 100644
index 0000000..39414a3
--- /dev/null
+++ b/app/views/admin/plume_articles/_form.html.haml
@@ -0,0 +1,12 @@
+= semantic_form_for [:admin,@plume_article], :remote => true do |form|
+ .content
+ = form.inputs do
+ = form.input :plume_cat_id, :label => "Catégorie", :collection => @plume_article.plume_cat.plume.plume_cats.order(:position).all, :as => :select, :include_blank => false
+ = form.input :article_type, :label => "Type d'article :", :collection => [["Article pleine page", "page"],["Demi article", "demi"] ], :as => :select, :include_blank => false
+ = form.input :title, :label => "Titre :"
+ = form.input :description, :label => "Description courte :"
+ = form.input :image_file_id, :as => :qi_image_select
+
+
+ .actions
+ = form.submit "Sauvegarder", :class => "btn btn-primary"
diff --git a/app/views/admin/plume_articles/_index_block.html.haml b/app/views/admin/plume_articles/_index_block.html.haml
new file mode 100644
index 0000000..877dbf4
--- /dev/null
+++ b/app/views/admin/plume_articles/_index_block.html.haml
@@ -0,0 +1,5 @@
+
+
+%table#plume_articles.table
+ =render @plume_cat.plume_articles
+
\ No newline at end of file
diff --git a/app/views/admin/plume_articles/_plume_article.html.haml b/app/views/admin/plume_articles/_plume_article.html.haml
new file mode 100644
index 0000000..489c252
--- /dev/null
+++ b/app/views/admin/plume_articles/_plume_article.html.haml
@@ -0,0 +1,13 @@
+%tr#plume_article_row.plume_article_row{:id => plume_article.id}
+
+ %td=plume_article.title
+
+
+
+
+ %td{:style => "width:140px"}
+ = link_to i(:"trash-o"), [:admin, plume_article], :confirm => 'Voulez-vous vraiment supprimer cet plume_article ?', :method => :delete, :remote => true
+
+ = link_to i(:pencil), edit_admin_plume_article_path(plume_article), :style => "padding:0px 0px 0px 0px;", :remote => true
+ = link_to i(:eye), edit_admin_plume_article_path(plume_article), :style => "padding:0px 0px 0px 0px;"
+
\ No newline at end of file
diff --git a/app/views/admin/plume_articles/_show.html.haml b/app/views/admin/plume_articles/_show.html.haml
new file mode 100644
index 0000000..c9f99b6
--- /dev/null
+++ b/app/views/admin/plume_articles/_show.html.haml
@@ -0,0 +1,7 @@
+#plume_article_show.QI_background_middle.QI_padding_small
+ %table
+
+ %tr
+ %td{:style => "width:150px;"} Nom :
+ %td=@plume_article.title
+
diff --git a/app/views/admin/plume_articles/create.js.erb b/app/views/admin/plume_articles/create.js.erb
new file mode 100644
index 0000000..f363738
--- /dev/null
+++ b/app/views/admin/plume_articles/create.js.erb
@@ -0,0 +1,5 @@
+
+close_pane_hover();
+
+$('#plume_articles').html("<%= escape_javascript(render(@plume_articles))%>");
+
diff --git a/app/views/admin/plume_articles/destroy.js.erb b/app/views/admin/plume_articles/destroy.js.erb
new file mode 100644
index 0000000..2365405
--- /dev/null
+++ b/app/views/admin/plume_articles/destroy.js.erb
@@ -0,0 +1,2 @@
+
+$('#plume_article_row_<%=@plume_article.id%>').remove();
diff --git a/app/views/admin/plume_articles/edit.html.haml b/app/views/admin/plume_articles/edit.html.haml
new file mode 100644
index 0000000..76d1923
--- /dev/null
+++ b/app/views/admin/plume_articles/edit.html.haml
@@ -0,0 +1,81 @@
+#toolbar-text
+
+#menu_item_block_edit{:style => "margin-right:330px;margin-top:45px;"}
+
+ =render :partial => "admin/blocks/block", :locals => {:block => @plume_article.block, :sortable => true}
+
+
+%br
+%br
+%br
+%br
+%br
+%br
+%br
+%br
+%br
+%br
+%br
+#menu_item_inspector_container
+
+
+
+
+
+
+
+ #menu_item_informations
+ %h4
+ Infos sur l'article
+
+
+ .panel#collapseOne{:style => "display:none;"}
+ =render :partial => "form"
+
+ %h4 éléments
+
+ .panel#collapse2
+ .block_portlets_sortable#content_types
+ -@plume_article.block.alloweds_types.each do |slug, name|
+
+ .content_type{:id => slug, :"data-type" => slug}
+ =#i slug.to_s.constantize.picto
+ =image_tag("admin/content_type/type_"+slug.to_s+".png", :alt => name, :title => name, :class => "handle")
+
+
+ #collapse3{:style => "display:none;"}
+ %h4 Modifier l'élément
+
+
+ .panel
+ #element_form
+
+ %div#element_form_action
+ %a.move.btn.btn-default.portlet_handle{:href => "#", :data => {:portlet_id => nil}}
+ %span.move_message
+ =ic :arrows
+
+ déplacer
+ %span.cancel_message
+ =ic :ban
+
+ annuler
+
+ =link_to ic(:"trash-o"), "#", :method => :delete, :data => { :confirm => "Etes-vous sûr ?"}, :remote => true, :class => "btn btn-danger trash"
+
+ %button.save.btn.btn-primary
+ =ic(:"floppy-o")
+
+ Sauvegarder
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/views/admin/plume_articles/edit.js.erb b/app/views/admin/plume_articles/edit.js.erb
new file mode 100644
index 0000000..d042e6f
--- /dev/null
+++ b/app/views/admin/plume_articles/edit.js.erb
@@ -0,0 +1,2 @@
+
+show_pane_hover("<%= escape_javascript(render(:partial => "form"))%>",700,900);
diff --git a/app/views/admin/plume_articles/index.html.haml b/app/views/admin/plume_articles/index.html.haml
new file mode 100644
index 0000000..17cd7fb
--- /dev/null
+++ b/app/views/admin/plume_articles/index.html.haml
@@ -0,0 +1,5 @@
+
+.right= link_to 'Créer un article', new_admin_plume_article_path(:plume_cat_id => @plume_cat.id), :class => "btn btn-primary", :remote => true
+%h1 Liste des plume_articles
+
+#plume_articles_index=render :partial => "index_block"
diff --git a/app/views/admin/plume_articles/index.js.erb b/app/views/admin/plume_articles/index.js.erb
new file mode 100644
index 0000000..95876a4
--- /dev/null
+++ b/app/views/admin/plume_articles/index.js.erb
@@ -0,0 +1,2 @@
+$('#plumes_index').html("<%= escape_javascript(render(:partial => "index_block"))%>");
+unset_busy();
\ No newline at end of file
diff --git a/app/views/admin/plume_articles/new.js.erb b/app/views/admin/plume_articles/new.js.erb
new file mode 100644
index 0000000..7cfbb16
--- /dev/null
+++ b/app/views/admin/plume_articles/new.js.erb
@@ -0,0 +1,2 @@
+
+show_pane_hover("<%= escape_javascript(render(:partial => "form"))%>",700,900);
\ No newline at end of file
diff --git a/app/views/admin/plume_articles/reseau.html.haml b/app/views/admin/plume_articles/reseau.html.haml
new file mode 100644
index 0000000..4fd6dae
--- /dev/null
+++ b/app/views/admin/plume_articles/reseau.html.haml
@@ -0,0 +1,54 @@
+.row{:style => "max-width:inherit;"}
+ .col-xs-9
+ .right= link_to 'Ajouter un plume', new_admin_plume_path(), :class => "btn btn-primary", :remote => true
+ %h1 Liste des plumes
+
+ #plumes_index=render :partial => "index_block"
+
+ .col-xs-3
+ %h3 Tags
+ =render :partial => "tags"
+
+
+ :coffeescript
+ root = exports ? this
+ root.tag_id = []
+
+
+ $(document.body).on "click", "#tags .tag_label", ->
+
+ if $(this).hasClass("active")
+ $(this).removeClass "active"
+
+ else
+ $(this).addClass "active"
+
+ root.tag_id = []
+
+ $("#tags .tag_label.active").each ->
+ root.tag_id.push $(this).data "tag_id"
+
+ if root.tag_id.length > 0
+ $(".set_tag").show()
+ else
+ $(".set_tag").hide()
+
+
+ $(document.body).on "click", ".set_tag", ->
+
+ $.ajax({
+ url:$(this).attr("href"),
+ type: "PUT",
+ data: {
+ tag_id : tag_id
+ }
+
+ })
+
+ return false
+
+
+
+
+
+
diff --git a/app/views/admin/plume_articles/update.js.erb b/app/views/admin/plume_articles/update.js.erb
new file mode 100644
index 0000000..98a45c5
--- /dev/null
+++ b/app/views/admin/plume_articles/update.js.erb
@@ -0,0 +1,8 @@
+
+
+$('#plume_article_row_<%= @plume_article.id %>').replaceWith("<%= escape_javascript(render(@plume_article))%>");
+
+$('#plume_article_show').replaceWith("<%= escape_javascript(render(:partial => "show"))%>");
+
+
+close_pane_hover();
\ No newline at end of file
diff --git a/app/views/admin/plume_cats/_form.html.haml b/app/views/admin/plume_cats/_form.html.haml
new file mode 100644
index 0000000..35a0bf1
--- /dev/null
+++ b/app/views/admin/plume_cats/_form.html.haml
@@ -0,0 +1,10 @@
+= semantic_form_for [:admin,@plume_cat], :remote => true do |form|
+ .content
+ = form.inputs do
+ = form.hidden_field :plume_id
+ = form.input :title, :label => "Titre :"
+
+
+
+ .actions
+ = form.submit "Sauvegarder", :class => "btn btn-primary"
diff --git a/app/views/admin/plume_cats/_index_block.html.haml b/app/views/admin/plume_cats/_index_block.html.haml
new file mode 100644
index 0000000..572572c
--- /dev/null
+++ b/app/views/admin/plume_cats/_index_block.html.haml
@@ -0,0 +1,5 @@
+
+
+%table#plume_cats.table
+ =render @plume.plume_cats.order(:position)
+
\ No newline at end of file
diff --git a/app/views/admin/plume_cats/_plume_cat.html.haml b/app/views/admin/plume_cats/_plume_cat.html.haml
new file mode 100644
index 0000000..a049a56
--- /dev/null
+++ b/app/views/admin/plume_cats/_plume_cat.html.haml
@@ -0,0 +1,17 @@
+%tr#plume_cat_row.plume_cat_row{:id => plume_cat.id}
+
+ %td
+ =plume_cat.title
+ ="-"
+ =plume_cat.plume_articles.count
+ article(s)
+
+
+
+
+ %td{:style => "width:140px"}
+ = link_to i(:"trash-o"), [:admin, plume_cat], :confirm => 'Voulez-vous vraiment supprimer cet plume_cat ?', :method => :delete, :remote => true
+
+ = link_to i(:pencil), edit_admin_plume_cat_path(plume_cat), :style => "padding:0px 0px 0px 0px;", :remote => true
+ = link_to i(:eye), edit_admin_plume_cat_path(plume_cat), :style => "padding:0px 0px 0px 0px;"
+
\ No newline at end of file
diff --git a/app/views/admin/plume_cats/_show.html.haml b/app/views/admin/plume_cats/_show.html.haml
new file mode 100644
index 0000000..e69de29
diff --git a/app/views/admin/plume_cats/_tags.html.haml b/app/views/admin/plume_cats/_tags.html.haml
new file mode 100644
index 0000000..ef51708
--- /dev/null
+++ b/app/views/admin/plume_cats/_tags.html.haml
@@ -0,0 +1,14 @@
+#tags
+ -Tag.order(:name).all.each do |tag|
+ .tag_label#tag_label{:"data-tag_id" => tag.id, :id => tag.id}
+ =tag.name
+ =ic(:"level-up")
+
+
+:coffeescript
+
+ if typeof(tag_id) != 'undefined'
+ $(".set_tag").show()
+ $.each tag_id, (i,a) ->
+ $("#tag_label_"+a).addClass("active")
+
\ No newline at end of file
diff --git a/app/views/admin/plume_cats/create.js.erb b/app/views/admin/plume_cats/create.js.erb
new file mode 100644
index 0000000..480f9ae
--- /dev/null
+++ b/app/views/admin/plume_cats/create.js.erb
@@ -0,0 +1,5 @@
+
+close_pane_hover();
+
+$('#plume_cats').html("<%= escape_javascript(render(@plume_cats))%>");
+
diff --git a/app/views/admin/plume_cats/destroy.js.erb b/app/views/admin/plume_cats/destroy.js.erb
new file mode 100644
index 0000000..26bf0bc
--- /dev/null
+++ b/app/views/admin/plume_cats/destroy.js.erb
@@ -0,0 +1,2 @@
+
+$('#plume_cat_row_<%=@plume_cat.id%>').remove();
diff --git a/app/views/admin/plume_cats/edit.html.haml b/app/views/admin/plume_cats/edit.html.haml
new file mode 100644
index 0000000..df9eb99
--- /dev/null
+++ b/app/views/admin/plume_cats/edit.html.haml
@@ -0,0 +1,21 @@
+-@plume = @plume_cat.plume
+
+.qi_header
+ .right= link_to 'Ajouter un article', new_admin_plume_article_path(:plume_cat_id => @plume_cat.id), :class => "btn btn-primary", :remote => true
+ %h1
+ Plumes
+ %span
+
+ ="Plume N° "+@plume.number.to_s
+ ="- "+@plume.p_version
+
+
+
+.qi_row
+ .qi_pannel.qi_plain.padding
+
+ %h3
+ Articles de la catégorie
+ =@plume_cat.title
+
+ #plume_articles_index=render :partial => "admin/plume_articles/index_block"
diff --git a/app/views/admin/plume_cats/edit.js.erb b/app/views/admin/plume_cats/edit.js.erb
new file mode 100644
index 0000000..d042e6f
--- /dev/null
+++ b/app/views/admin/plume_cats/edit.js.erb
@@ -0,0 +1,2 @@
+
+show_pane_hover("<%= escape_javascript(render(:partial => "form"))%>",700,900);
diff --git a/app/views/admin/plume_cats/index.html.haml b/app/views/admin/plume_cats/index.html.haml
new file mode 100644
index 0000000..043b2d1
--- /dev/null
+++ b/app/views/admin/plume_cats/index.html.haml
@@ -0,0 +1,5 @@
+
+.right= link_to 'Créer une plume_cat', new_admin_plume_cat_path(), :class => "btn btn-primary", :remote => true
+%h1 Liste des plume_cats
+
+#plume_cats_index=render :partial => "index_block"
diff --git a/app/views/admin/plume_cats/index.js.erb b/app/views/admin/plume_cats/index.js.erb
new file mode 100644
index 0000000..f2f26e3
--- /dev/null
+++ b/app/views/admin/plume_cats/index.js.erb
@@ -0,0 +1,2 @@
+$('#plume_cats_index').html("<%= escape_javascript(render(:partial => "index_block"))%>");
+unset_busy();
\ No newline at end of file
diff --git a/app/views/admin/plume_cats/new.js.erb b/app/views/admin/plume_cats/new.js.erb
new file mode 100644
index 0000000..7cfbb16
--- /dev/null
+++ b/app/views/admin/plume_cats/new.js.erb
@@ -0,0 +1,2 @@
+
+show_pane_hover("<%= escape_javascript(render(:partial => "form"))%>",700,900);
\ No newline at end of file
diff --git a/app/views/admin/plume_cats/reseau.html.haml b/app/views/admin/plume_cats/reseau.html.haml
new file mode 100644
index 0000000..9c27679
--- /dev/null
+++ b/app/views/admin/plume_cats/reseau.html.haml
@@ -0,0 +1,54 @@
+.row{:style => "max-width:inherit;"}
+ .col-xs-9
+ .right= link_to 'Ajouter un plume_cat', new_admin_plume_cat_path(), :class => "btn btn-primary", :remote => true
+ %h1 Liste des plume_cats
+
+ #plume_cats_index=render :partial => "index_block"
+
+ .col-xs-3
+ %h3 Tags
+ =render :partial => "tags"
+
+
+ :coffeescript
+ root = exports ? this
+ root.tag_id = []
+
+
+ $(document.body).on "click", "#tags .tag_label", ->
+
+ if $(this).hasClass("active")
+ $(this).removeClass "active"
+
+ else
+ $(this).addClass "active"
+
+ root.tag_id = []
+
+ $("#tags .tag_label.active").each ->
+ root.tag_id.push $(this).data "tag_id"
+
+ if root.tag_id.length > 0
+ $(".set_tag").show()
+ else
+ $(".set_tag").hide()
+
+
+ $(document.body).on "click", ".set_tag", ->
+
+ $.ajax({
+ url:$(this).attr("href"),
+ type: "PUT",
+ data: {
+ tag_id : tag_id
+ }
+
+ })
+
+ return false
+
+
+
+
+
+
diff --git a/app/views/admin/plume_cats/update.js.erb b/app/views/admin/plume_cats/update.js.erb
new file mode 100644
index 0000000..c267231
--- /dev/null
+++ b/app/views/admin/plume_cats/update.js.erb
@@ -0,0 +1,9 @@
+
+
+$('#plume_cat_row_<%= @plume_cat.id %>').replaceWith("<%= escape_javascript(render(@plume_cat))%>");
+
+$('#plume_cat_show').replaceWith("<%= escape_javascript(render(:partial => "show"))%>");
+
+
+$('#tags').replaceWith("<%= escape_javascript(render(:partial => 'tags'))%>");
+close_pane_hover();
\ No newline at end of file
diff --git a/app/views/admin/plume_events/_form.html.haml b/app/views/admin/plume_events/_form.html.haml
new file mode 100644
index 0000000..e7c9c89
--- /dev/null
+++ b/app/views/admin/plume_events/_form.html.haml
@@ -0,0 +1,51 @@
+= semantic_form_for [:admin,@plume_event], :remote => true do |form|
+ .content
+ = form.inputs do
+ =form.input :plume_id, :collection => Plume.all, :label => "Plume :", :as => :select
+ = form.input :title, :label => "Titre :"
+ = form.hidden_field :plume_event_id
+
+ .plume_event_date_form
+ -if form.object.errors.messages[:start_at_date] or form.object.errors.messages[:start_at_time] or form.object.errors.messages[:stop_at_date] or form.object.errors.messages[:stop_at_time]
+ %p.errors
+ Tout les champs doivent être remplis. Les dates doivent être au format jj/mm/yyyy et les heures au format hh:mm.
+ .div
+ =form.label :start_at_date, "Début :", :style=>"display:inline-block;width:50px"
+ =form.text_field :start_at_date, :id => "plume_event_start_at_date", :class => "datepicker"
+ .plume_event_time{:style => "display:inline;"}
+ =form.label :start_at_time, "heure :"
+ .input-append.bootstrap-timepicke{:style => "display:inline-block;"}
+ =form.text_field :start_at_time, :id => "plume_event_start_at_time", :class => "timepicker input-small", :style => "width:50px"
+ %span.add-on
+ %i.icon-time
+
+
+ =form.check_box :entire_day, :id => "plume_event_entire_day"
+ =form.label :entire_day, "jour entier ?"
+ .div
+ %span.stop_at
+ =form.label :stop_at_date, "Fin :", :style=>"display:inline-block;width:50px"
+ =form.text_field :stop_at_date, :id => "plume_event_stop_at_date", :class => "datepicker"
+ .plume_event_time{:style => "display:inline;"}
+ =form.label :stop_at_time, "heure :"
+ .input-append.bootstrap-timepicke{:style => "display:inline-block;"}
+ =form.text_field :stop_at_time, :id => "plume_event_stop_at_time", :class => "timepicker input-small", :style => "width:50px"
+ %span.add-on
+ %i.icon-time
+
+
+ =form.check_box :stop_date, :id => "plume_event_stop_date"
+ =form.label :stop_date, "fin précisée ?"
+
+
+ = form.inputs do
+ = form.input :description, :label => "Description courte :", :as => :text
+
+
+
+
+ .actions
+ = form.submit "Sauvegarder", :class => "btn"
+
+ :javascript
+ update_plume_event_form();
\ No newline at end of file
diff --git a/app/views/admin/plume_events/_index_block.html.haml b/app/views/admin/plume_events/_index_block.html.haml
new file mode 100644
index 0000000..abe63ce
--- /dev/null
+++ b/app/views/admin/plume_events/_index_block.html.haml
@@ -0,0 +1,3 @@
+%table#plume_events.table.table-hover
+ =render @plume_events
+
\ No newline at end of file
diff --git a/app/views/admin/plume_events/_plume_event.html.haml b/app/views/admin/plume_events/_plume_event.html.haml
new file mode 100644
index 0000000..3456e8c
--- /dev/null
+++ b/app/views/admin/plume_events/_plume_event.html.haml
@@ -0,0 +1,10 @@
+%tr#plume_event_row.plume_event_row{:id => plume_event.id}
+
+ %td{:style => "width:400px"}=raw event_human_date(plume_event)
+ %td=plume_event.title
+
+
+ %td.actions{:style => "width:200px;text-align:right;"}
+ = link_to i(:"trash-o"), [:admin, plume_event], :confirm => 'Voulez-vous vraiment supprimer cet événement ?', :method => :delete, :remote => true
+ = link_to i(:pencil), edit_admin_plume_event_path(plume_event), :remote => true
+
\ No newline at end of file
diff --git a/app/views/admin/plume_events/_show.html.haml b/app/views/admin/plume_events/_show.html.haml
new file mode 100644
index 0000000..790f925
--- /dev/null
+++ b/app/views/admin/plume_events/_show.html.haml
@@ -0,0 +1,6 @@
+#plume_event_show
+ %h1
+ =@plume_event.title
+ %em=plume_event_human_date(@plume_event)
+
+ .desc=simple_format @plume_event.description
\ No newline at end of file
diff --git a/app/views/admin/plume_events/cible.html.haml b/app/views/admin/plume_events/cible.html.haml
new file mode 100644
index 0000000..dc7582c
--- /dev/null
+++ b/app/views/admin/plume_events/cible.html.haml
@@ -0,0 +1,6 @@
+
+-Event.all.each do |actuality|
+
+ %h4
+ =actuality.title
+ = link_to i(:check_alt, :gray_light,12), "#",:onclick => "manager_send_cible("+actuality.id.to_s+", 'Folder', '#{escape_javascript(actuality.cible_name)}');return false;" if params[:manager]
diff --git a/app/views/admin/plume_events/create.js.erb b/app/views/admin/plume_events/create.js.erb
new file mode 100644
index 0000000..7a7f0ce
--- /dev/null
+++ b/app/views/admin/plume_events/create.js.erb
@@ -0,0 +1,4 @@
+close_pane_hover();
+
+$('#plume_events').html("<%= escape_javascript(render(@plume_events))%>");
+$('#plume_event_row_<%= @plume_event.id %>').effect("highlight", {}, 3000);
diff --git a/app/views/admin/plume_events/destroy.js.erb b/app/views/admin/plume_events/destroy.js.erb
new file mode 100644
index 0000000..26266aa
--- /dev/null
+++ b/app/views/admin/plume_events/destroy.js.erb
@@ -0,0 +1 @@
+$('#plume_event_row_<%=@plume_event.id%>').remove();
diff --git a/app/views/admin/plume_events/edit.html.haml b/app/views/admin/plume_events/edit.html.haml
new file mode 100644
index 0000000..efe41e2
--- /dev/null
+++ b/app/views/admin/plume_events/edit.html.haml
@@ -0,0 +1,81 @@
+#toolbar-text
+
+#menu_item_block_edit{:style => "margin-right:330px;margin-top:45px;"}
+
+ =render :partial => "admin/blocks/block", :locals => {:block => @plume_event.block, :sortable => true}
+
+
+%br
+%br
+%br
+%br
+%br
+%br
+%br
+%br
+%br
+%br
+%br
+#menu_item_inspector_container
+
+
+
+
+
+
+
+ #menu_item_informations
+ %h4
+ Infos sur l'plume_event
+
+
+ .panel#collapseOne{:style => "display:none;"}
+ =render :partial => "form"
+
+ %h4 éléments
+
+ .panel#collapse2
+ .block_portlets_sortable#content_types
+ -@plume_event.block.alloweds_types.each do |slug, name|
+
+ .content_type{:id => slug, :"data-type" => slug}
+ =#i slug.to_s.constantize.picto
+ =image_tag("admin/content_type/type_"+slug.to_s+".png", :alt => name, :title => name, :class => "handle")
+
+
+ #collapse3{:style => "display:none;"}
+ %h4 Modifier l'élément
+
+
+ .panel
+ #element_form
+
+ %div#element_form_action
+ %a.move.btn.btn-default.portlet_handle{:href => "#", :data => {:portlet_id => nil}}
+ %span.move_message
+ =ic :arrows
+
+ déplacer
+ %span.cancel_message
+ =ic :ban
+
+ annuler
+
+ =link_to ic(:"trash-o"), "#", :method => :delete, :data => { :confirm => "Etes-vous sûr ?"}, :remote => true, :class => "btn btn-danger trash"
+
+ %button.save.btn.btn-primary
+ =ic(:"floppy-o")
+
+ Sauvegarder
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/views/admin/plume_events/edit.js.erb b/app/views/admin/plume_events/edit.js.erb
new file mode 100644
index 0000000..61c7a6f
--- /dev/null
+++ b/app/views/admin/plume_events/edit.js.erb
@@ -0,0 +1 @@
+show_pane_hover("<%= escape_javascript(render(:partial => "form"))%>",850,600);
\ No newline at end of file
diff --git a/app/views/admin/plume_events/index.html.haml b/app/views/admin/plume_events/index.html.haml
new file mode 100644
index 0000000..7da4269
--- /dev/null
+++ b/app/views/admin/plume_events/index.html.haml
@@ -0,0 +1,8 @@
+.header
+ .right= link_to 'Ajouter un événement', new_admin_plume_event_path, :class => "btn", :remote => true
+ %h1 Agenda
+
+#plume_events_index=render :partial => "index_block"
+
+#plume_event_detail
+
diff --git a/app/views/admin/plume_events/index.js.erb b/app/views/admin/plume_events/index.js.erb
new file mode 100644
index 0000000..cc31c7e
--- /dev/null
+++ b/app/views/admin/plume_events/index.js.erb
@@ -0,0 +1 @@
+$('#plume_events_index').html("<%= escape_javascript(render(:partial => "index_block"))%>");
diff --git a/app/views/admin/plume_events/new.js.erb b/app/views/admin/plume_events/new.js.erb
new file mode 100644
index 0000000..696edd1
--- /dev/null
+++ b/app/views/admin/plume_events/new.js.erb
@@ -0,0 +1,3 @@
+
+show_pane_hover("<%= escape_javascript(render(:partial => "form"))%>",850,600);
+
diff --git a/app/views/admin/plume_events/update.js.erb b/app/views/admin/plume_events/update.js.erb
new file mode 100644
index 0000000..5e00365
--- /dev/null
+++ b/app/views/admin/plume_events/update.js.erb
@@ -0,0 +1,5 @@
+close_pane_hover();
+
+$('#plume_event_show').replaceWith("<%= escape_javascript(render(:partial => "show"))%>");
+$('#plume_events').html("<%= escape_javascript(render(@plume_events))%>");
+$('#plume_event_row_<%= @plume_event.id %>').effect("highlight", {}, 3000);
\ No newline at end of file
diff --git a/app/views/admin/plumes/_form.html.haml b/app/views/admin/plumes/_form.html.haml
new file mode 100644
index 0000000..4b84058
--- /dev/null
+++ b/app/views/admin/plumes/_form.html.haml
@@ -0,0 +1,18 @@
+= semantic_form_for [:admin,@plume], :remote => true do |form|
+ .content
+ = form.inputs do
+ = form.input :enabled,:as => :boolean , :label => "Actif"
+
+
+ = form.input :title, :label => "Titre :"
+ = form.input :number, :label => "Numéro plume :"
+ = form.input :p_version, :label => "Ligne 'version' :"
+ = form.input :image_file_id, :as => :qi_image_select
+ = form.input :credits, :label => "Crédit photo couverture :"
+ = form.input :redaction_credits, :label => "Crédits rédac & relecture :"
+
+
+
+
+ .actions
+ = form.submit "Sauvegarder", :class => "btn btn-primary"
diff --git a/app/views/admin/plumes/_index_block.html.haml b/app/views/admin/plumes/_index_block.html.haml
new file mode 100644
index 0000000..d9ff752
--- /dev/null
+++ b/app/views/admin/plumes/_index_block.html.haml
@@ -0,0 +1,5 @@
+
+
+%table#plumes.table
+ =render @plumes
+
\ No newline at end of file
diff --git a/app/views/admin/plumes/_plume.html.haml b/app/views/admin/plumes/_plume.html.haml
new file mode 100644
index 0000000..85c6935
--- /dev/null
+++ b/app/views/admin/plumes/_plume.html.haml
@@ -0,0 +1,14 @@
+%tr#plume_row.plume_row{:id => plume.id, :class => ("warning" if !plume.enabled)}
+
+ %td=plume.title
+ %td
+ =link_to "voir", public_plume_path(plume)
+
+
+
+ %td{:style => "width:140px"}
+ = link_to i(:"trash-o"), [:admin, plume], :confirm => 'Voulez-vous vraiment supprimer cet plume ?', :method => :delete, :remote => true
+
+ = link_to i(:pencil), edit_admin_plume_path(plume), :style => "padding:0px 0px 0px 0px;", :remote => true
+ = link_to i(:eye), edit_admin_plume_path(plume), :style => "padding:0px 0px 0px 0px;"
+
\ No newline at end of file
diff --git a/app/views/admin/plumes/_show.html.haml b/app/views/admin/plumes/_show.html.haml
new file mode 100644
index 0000000..44a88ac
--- /dev/null
+++ b/app/views/admin/plumes/_show.html.haml
@@ -0,0 +1,11 @@
+#plume_show.QI_background_middle.QI_padding_small
+ %table
+
+ %tr
+ %td{:style => "width:150px;"} Nom :
+ %td=@plume.title
+
+ %tr
+ %td Statut :
+ %td=@plume.enabled ? "Publié" : "Brouillon"
+
diff --git a/app/views/admin/plumes/_tags.html.haml b/app/views/admin/plumes/_tags.html.haml
new file mode 100644
index 0000000..ef51708
--- /dev/null
+++ b/app/views/admin/plumes/_tags.html.haml
@@ -0,0 +1,14 @@
+#tags
+ -Tag.order(:name).all.each do |tag|
+ .tag_label#tag_label{:"data-tag_id" => tag.id, :id => tag.id}
+ =tag.name
+ =ic(:"level-up")
+
+
+:coffeescript
+
+ if typeof(tag_id) != 'undefined'
+ $(".set_tag").show()
+ $.each tag_id, (i,a) ->
+ $("#tag_label_"+a).addClass("active")
+
\ No newline at end of file
diff --git a/app/views/admin/plumes/create.js.erb b/app/views/admin/plumes/create.js.erb
new file mode 100644
index 0000000..47821e6
--- /dev/null
+++ b/app/views/admin/plumes/create.js.erb
@@ -0,0 +1,5 @@
+
+close_pane_hover();
+
+$('#plumes').html("<%= escape_javascript(render(@plumes))%>");
+
diff --git a/app/views/admin/plumes/destroy.js.erb b/app/views/admin/plumes/destroy.js.erb
new file mode 100644
index 0000000..a6f0085
--- /dev/null
+++ b/app/views/admin/plumes/destroy.js.erb
@@ -0,0 +1,2 @@
+
+$('#plume_row_<%=@plume.id%>').remove();
diff --git a/app/views/admin/plumes/edit.html.haml b/app/views/admin/plumes/edit.html.haml
new file mode 100644
index 0000000..6478545
--- /dev/null
+++ b/app/views/admin/plumes/edit.html.haml
@@ -0,0 +1,29 @@
+.qi_header
+
+ %h1
+ Plumes
+ %span
+
+ ="Plume N° "+@plume.number.to_s
+ ="- "+@plume.p_version
+
+.qi_row
+ .qi_pannel.qi_plain.padding
+
+
+ .right= link_to 'Ajouter une catégorie', new_admin_plume_cat_path(:plume_id => @plume.id), :class => "btn btn-primary", :remote => true
+
+ %h3 Liste des catégories
+
+ #plumes_index=render :partial => "admin/plume_cats/index_block"
+
+
+.qi_row
+ .qi_pannel.qi_plain.padding
+
+ -@plume_events = @plume.plume_events.order('start_at, stop_at')
+
+ .right= link_to 'Ajouter un événement', new_admin_plume_event_path(:plume_id => @plume.id), :class => "btn btn-primary", :remote => true
+ %h3 Agenda
+
+ #plume_events_index=render :partial => "admin/plume_events/index_block"
diff --git a/app/views/admin/plumes/edit.js.erb b/app/views/admin/plumes/edit.js.erb
new file mode 100644
index 0000000..d042e6f
--- /dev/null
+++ b/app/views/admin/plumes/edit.js.erb
@@ -0,0 +1,2 @@
+
+show_pane_hover("<%= escape_javascript(render(:partial => "form"))%>",700,900);
diff --git a/app/views/admin/plumes/index.html.haml b/app/views/admin/plumes/index.html.haml
new file mode 100644
index 0000000..be6bf8b
--- /dev/null
+++ b/app/views/admin/plumes/index.html.haml
@@ -0,0 +1,7 @@
+.qi_header
+ .right= link_to 'Ajouter une plume', new_admin_plume_path(), :class => "btn btn-primary", :remote => true
+ %h1 Plumes
+
+.qi_row
+ .qi_pannel.qi_plain.padding
+ #plumes_index=render :partial => "index_block"
diff --git a/app/views/admin/plumes/index.js.erb b/app/views/admin/plumes/index.js.erb
new file mode 100644
index 0000000..95876a4
--- /dev/null
+++ b/app/views/admin/plumes/index.js.erb
@@ -0,0 +1,2 @@
+$('#plumes_index').html("<%= escape_javascript(render(:partial => "index_block"))%>");
+unset_busy();
\ No newline at end of file
diff --git a/app/views/admin/plumes/new.js.erb b/app/views/admin/plumes/new.js.erb
new file mode 100644
index 0000000..7cfbb16
--- /dev/null
+++ b/app/views/admin/plumes/new.js.erb
@@ -0,0 +1,2 @@
+
+show_pane_hover("<%= escape_javascript(render(:partial => "form"))%>",700,900);
\ No newline at end of file
diff --git a/app/views/admin/plumes/reseau.html.haml b/app/views/admin/plumes/reseau.html.haml
new file mode 100644
index 0000000..4fd6dae
--- /dev/null
+++ b/app/views/admin/plumes/reseau.html.haml
@@ -0,0 +1,54 @@
+.row{:style => "max-width:inherit;"}
+ .col-xs-9
+ .right= link_to 'Ajouter un plume', new_admin_plume_path(), :class => "btn btn-primary", :remote => true
+ %h1 Liste des plumes
+
+ #plumes_index=render :partial => "index_block"
+
+ .col-xs-3
+ %h3 Tags
+ =render :partial => "tags"
+
+
+ :coffeescript
+ root = exports ? this
+ root.tag_id = []
+
+
+ $(document.body).on "click", "#tags .tag_label", ->
+
+ if $(this).hasClass("active")
+ $(this).removeClass "active"
+
+ else
+ $(this).addClass "active"
+
+ root.tag_id = []
+
+ $("#tags .tag_label.active").each ->
+ root.tag_id.push $(this).data "tag_id"
+
+ if root.tag_id.length > 0
+ $(".set_tag").show()
+ else
+ $(".set_tag").hide()
+
+
+ $(document.body).on "click", ".set_tag", ->
+
+ $.ajax({
+ url:$(this).attr("href"),
+ type: "PUT",
+ data: {
+ tag_id : tag_id
+ }
+
+ })
+
+ return false
+
+
+
+
+
+
diff --git a/app/views/admin/plumes/update.js.erb b/app/views/admin/plumes/update.js.erb
new file mode 100644
index 0000000..47fa319
--- /dev/null
+++ b/app/views/admin/plumes/update.js.erb
@@ -0,0 +1,9 @@
+
+
+$('#plume_row_<%= @plume.id %>').replaceWith("<%= escape_javascript(render(@plume))%>");
+
+$('#plume_show').replaceWith("<%= escape_javascript(render(:partial => "show"))%>");
+
+
+$('#tags').replaceWith("<%= escape_javascript(render(:partial => 'tags'))%>");
+close_pane_hover();
\ No newline at end of file
diff --git a/app/views/layouts/admin.html.haml b/app/views/layouts/admin.html.haml
index 37e3269..b96e90d 100644
--- a/app/views/layouts/admin.html.haml
+++ b/app/views/layouts/admin.html.haml
@@ -7,6 +7,8 @@
%title= @title || "Admin"
= csrf_meta_tags
= stylesheet_link_tag :admin, :media => :all
+
+
= javascript_include_tag "admin"
=javascript_include_tag "http://maps.google.com/maps/api/js?sensor=false®ion=FR"
@@ -66,6 +68,13 @@
%li= link_to "Fichiers", admin_data_files_path
%li.divider
%li= link_to "Contributeurs", admin_authors_path
+ %li.dropdown
+ %a{:href => "#", :class => "dropdown-toggle", :data => {:toggle => "dropdown"}}
+ Plume
+ %b.caret
+ %ul.dropdown-menu
+
+ %li= link_to "Plumes", admin_plumes_path
%li.dropdown
%a{:href => "#", :data => {:toggle => "dropdown"}}
@@ -100,9 +109,7 @@
- .container-fluid
-
- = yield
+ = yield
diff --git a/app/views/layouts/plume.html.haml b/app/views/layouts/plume.html.haml
new file mode 100644
index 0000000..a5c34d6
--- /dev/null
+++ b/app/views/layouts/plume.html.haml
@@ -0,0 +1,71 @@
+!!!
+
+%html{:lang => "fr", "xml:lang" => "fr", :xmlns => "http://www.w3.org/1999/xhtml"}
+ %head
+ %title=@title.to_s+" "
+
+
+ %meta{ :"http-equiv" => "Content-Type", :content => "text/html; charset=utf-8" }
+ %meta{ :"name" => "Description", :content => @description }
+ %meta{ :"name" => "Keywords", :content => @keywords }
+
+
+ = javascript_include_tag "public"
+
+ = csrf_meta_tag
+
+ = stylesheet_link_tag 'public'
+ = stylesheet_link_tag '/fonts/Stylograph/stylesheet.css'
+
+
+
+ =javascript_include_tag "http://maps.google.com/maps/api/js?sensor=false®ion=FR"
+
+ %body
+
+
+ -if flash[:error] or flash[:notice] or flash[:alert]
+ .flash
+
+ =flash[:error]
+ =flash[:notice]
+ =flash[:alert]
+
+
+
+
+
+ -if !(@menu_item and @menu_item.slug and @menu_item.slug == "index" )
+ %p{:style => "height:80px;"}
+
+ -if @menu_item and @menu_item.slug and @menu_item.slug == "index"
+ #slider_content
+
+
+