Need management from admin panel + customer mailing + admin mailing
This commit is contained in:
parent
a867e95951
commit
388d8d5cb6
4
Gemfile
4
Gemfile
@ -42,6 +42,7 @@ group :development, :test do
|
|||||||
gem 'web-console', '~> 2.0'
|
gem 'web-console', '~> 2.0'
|
||||||
|
|
||||||
gem 'spring'
|
gem 'spring'
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
@ -60,7 +61,6 @@ gem 'acts_as_commentable'
|
|||||||
|
|
||||||
gem 'gravatar_image_tag'
|
gem 'gravatar_image_tag'
|
||||||
|
|
||||||
|
|
||||||
gem 'wicked_pdf'
|
gem 'wicked_pdf'
|
||||||
|
|
||||||
gem 'wkhtmltopdf-binary'
|
gem 'wkhtmltopdf-binary'
|
||||||
@ -68,3 +68,5 @@ gem 'wkhtmltopdf-binary'
|
|||||||
gem "geocoder"
|
gem "geocoder"
|
||||||
|
|
||||||
gem "paranoia", "~> 2.0"
|
gem "paranoia", "~> 2.0"
|
||||||
|
|
||||||
|
gem 'workflow', '~> 1.2.0'
|
||||||
|
@ -215,6 +215,7 @@ GEM
|
|||||||
wicked_pdf (0.11.0)
|
wicked_pdf (0.11.0)
|
||||||
rails
|
rails
|
||||||
wkhtmltopdf-binary (0.9.9.3)
|
wkhtmltopdf-binary (0.9.9.3)
|
||||||
|
workflow (1.2.0)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
@ -251,6 +252,7 @@ DEPENDENCIES
|
|||||||
web-console (~> 2.0)
|
web-console (~> 2.0)
|
||||||
wicked_pdf
|
wicked_pdf
|
||||||
wkhtmltopdf-binary
|
wkhtmltopdf-binary
|
||||||
|
workflow (~> 1.2.0)
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
1.10.6
|
1.10.6
|
||||||
|
@ -16,32 +16,39 @@
|
|||||||
.next,.prev, .page{
|
.next,.prev, .page{
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
padding:5px 10px;
|
padding:5px 10px;
|
||||||
|
|
||||||
margin-right:5px;
|
margin-right:5px;
|
||||||
font-size:18px;
|
font-size:18px;
|
||||||
|
|
||||||
color:white;
|
color:white;
|
||||||
a{
|
a{
|
||||||
color:black;
|
color:black;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.current{
|
.current{
|
||||||
background:#FE9944;
|
background:#FE9944;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.customer_table{
|
.customer_table{
|
||||||
td, th{
|
td, th{
|
||||||
|
|
||||||
vertical-align:middle !important;
|
vertical-align:middle !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.admin_table{
|
||||||
|
td, th{
|
||||||
|
|
||||||
|
vertical-align:middle !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#admin_nav{
|
#admin_nav{
|
||||||
border-radius:0px;
|
border-radius:0px;
|
||||||
@ -65,26 +72,26 @@ max-width:100%;
|
|||||||
html {
|
html {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#tags .tag_label{
|
#tags .tag_label{
|
||||||
i{ display:none;}
|
i{ display:none;}
|
||||||
|
|
||||||
&.active{
|
&.active{
|
||||||
|
|
||||||
background:rgba(0,136,204,1);
|
background:rgba(0,136,204,1);
|
||||||
color:white;
|
color:white;
|
||||||
i{ display:inline;}
|
i{ display:inline;}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -97,13 +104,13 @@ display:none;
|
|||||||
margin-bottom:5px;
|
margin-bottom:5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.map_content_map img {
|
.map_content_map img {
|
||||||
max-width: none;
|
max-width: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#mapCanvas label {
|
#mapCanvas label {
|
||||||
width: auto; display:inline;
|
width: auto; display:inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
body.admin{
|
body.admin{
|
||||||
|
|
||||||
@ -141,7 +148,7 @@ text-decoration:none;
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#upload_details{
|
#upload_details{
|
||||||
display:none;
|
display:none;
|
||||||
.content{
|
.content{
|
||||||
@ -151,9 +158,9 @@ text-decoration:none;
|
|||||||
right:0px;
|
right:0px;
|
||||||
bottom:0px;
|
bottom:0px;
|
||||||
overflow:auto;
|
overflow:auto;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
height:400px;
|
height:400px;
|
||||||
width:800px;
|
width:800px;
|
||||||
position:absolute;
|
position:absolute;
|
||||||
@ -169,9 +176,9 @@ text-decoration:none;
|
|||||||
*border-bottom-width: 2px;
|
*border-bottom-width: 2px;
|
||||||
//.border-radius(6px);
|
//.border-radius(6px);
|
||||||
//.box-shadow(0 5px 10px rgba(0,0,0,.2));
|
//.box-shadow(0 5px 10px rgba(0,0,0,.2));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
#upload_details::before {
|
#upload_details::before {
|
||||||
|
|
||||||
@ -188,21 +195,21 @@ text-decoration:none;
|
|||||||
border-bottom: 0;
|
border-bottom: 0;
|
||||||
bottom: -7px;
|
bottom: -7px;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#upload_details::after {
|
#upload_details::after {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
content: '';
|
content: '';
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
border-left: 6px solid transparent;
|
border-left: 6px solid transparent;
|
||||||
border-right: 6px solid transparent;
|
border-right: 6px solid transparent;
|
||||||
|
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
||||||
right: 216px;
|
right: 216px;
|
||||||
@ -213,8 +220,8 @@ text-decoration:none;
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#toolbar-text{
|
#toolbar-text{
|
||||||
position:fixed;
|
position:fixed;
|
||||||
z-index:2;
|
z-index:2;
|
||||||
@ -222,10 +229,10 @@ text-decoration:none;
|
|||||||
top:52px;
|
top:52px;
|
||||||
left:0px;
|
left:0px;
|
||||||
right:330px;
|
right:330px;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#flashs{
|
#flashs{
|
||||||
position:fixed;
|
position:fixed;
|
||||||
bottom:0px;
|
bottom:0px;
|
||||||
@ -236,7 +243,7 @@ text-decoration:none;
|
|||||||
z-index:3;
|
z-index:3;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
form .clearfix:before, form .clearfix:after {
|
form .clearfix:before, form .clearfix:after {
|
||||||
display: inline;
|
display: inline;
|
||||||
@ -244,11 +251,11 @@ text-decoration:none;
|
|||||||
|
|
||||||
.error{
|
.error{
|
||||||
color:red;
|
color:red;
|
||||||
|
|
||||||
input{
|
input{
|
||||||
border-color:red;
|
border-color:red;
|
||||||
}
|
}
|
||||||
|
|
||||||
*{
|
*{
|
||||||
color:red;
|
color:red;
|
||||||
}
|
}
|
||||||
@ -274,10 +281,10 @@ text-decoration:none;
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.placeholder{
|
.placeholder{
|
||||||
background:rgba(143,202,70,0.8);
|
background:rgba(143,202,70,0.8);
|
||||||
height:10px;
|
height:10px;
|
||||||
@ -292,7 +299,7 @@ text-decoration:none;
|
|||||||
.placeholder{
|
.placeholder{
|
||||||
height:0px;
|
height:0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.active{
|
&.active{
|
||||||
background:rgba(143,202,70,0.8);
|
background:rgba(143,202,70,0.8);
|
||||||
|
|
||||||
@ -312,14 +319,14 @@ text-decoration:none;
|
|||||||
text-align:right;
|
text-align:right;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.receptable{
|
.receptable{
|
||||||
position:relative;
|
position:relative;
|
||||||
|
|
||||||
.placeholder{
|
.placeholder{
|
||||||
position:absolute;
|
position:absolute;
|
||||||
top:0px;
|
top:0px;
|
||||||
@ -332,21 +339,21 @@ text-decoration:none;
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#menu_item_informations{
|
#menu_item_informations{
|
||||||
|
|
||||||
|
|
||||||
form{
|
form{
|
||||||
|
|
||||||
.preview{
|
.preview{
|
||||||
|
|
||||||
img{
|
img{
|
||||||
height:50px;
|
height:50px;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
position:fixed;
|
position:fixed;
|
||||||
z-index:3;
|
z-index:3;
|
||||||
overflow:auto;
|
overflow:auto;
|
||||||
@ -363,48 +370,48 @@ text-decoration:none;
|
|||||||
height:91px;
|
height:91px;
|
||||||
margin:0px;
|
margin:0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.block_portlets{
|
.block_portlets{
|
||||||
min-height:50px;
|
min-height:50px;
|
||||||
border:1px dotted rgba(227,227,227,1);
|
border:1px dotted rgba(227,227,227,1);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.block_portlets_sortable{
|
.block_portlets_sortable{
|
||||||
border:0px;
|
border:0px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#menu_item_inspector_container{
|
#menu_item_inspector_container{
|
||||||
.panel{
|
.panel{
|
||||||
border-radius:0px;
|
border-radius:0px;
|
||||||
border-left:0px;
|
border-left:0px;
|
||||||
border-right:0px;
|
border-right:0px;
|
||||||
|
|
||||||
}
|
}
|
||||||
.accordion{
|
.accordion{
|
||||||
|
|
||||||
height:auto;
|
height:auto;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.accordion-group{
|
.accordion-group{
|
||||||
border:0px;
|
border:0px;
|
||||||
border-radius:0px;
|
border-radius:0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.accordion-body{
|
.accordion-body{
|
||||||
background:white;
|
background:white;
|
||||||
|
|
||||||
}
|
}
|
||||||
.accordion-heading{
|
.accordion-heading{
|
||||||
border-radius:0px;
|
border-radius:0px;
|
||||||
@ -415,70 +422,70 @@ text-decoration:none;
|
|||||||
a{
|
a{
|
||||||
padding:10px 20px;
|
padding:10px 20px;
|
||||||
color:white;
|
color:white;
|
||||||
|
|
||||||
&:hover{
|
&:hover{
|
||||||
text-decoration:none;
|
text-decoration:none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.inspector_handle{
|
.inspector_handle{
|
||||||
height:10px;
|
height:10px;
|
||||||
width:100%;
|
width:100%;
|
||||||
background:black;
|
background:black;
|
||||||
cursor:pointer;
|
cursor:pointer;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.content_type{
|
.content_type{
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
img{height:50px;cursor:pointer;}
|
img{height:50px;cursor:pointer;}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-toolbar{
|
.btn-toolbar{
|
||||||
display:none;
|
display:none;
|
||||||
top:-35px;
|
top:-35px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#column_sliders{
|
#column_sliders{
|
||||||
|
|
||||||
position:relative;
|
position:relative;
|
||||||
|
|
||||||
.slider{
|
.slider{
|
||||||
position:absolute;
|
position:absolute;
|
||||||
top:0px;
|
top:0px;
|
||||||
left:0px;
|
left:0px;
|
||||||
width:100%;
|
width:100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.slider-selection{
|
.slider-selection{
|
||||||
display:none !important;
|
display:none !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.slider:not(:first-child){
|
.slider:not(:first-child){
|
||||||
|
|
||||||
|
|
||||||
.slider-track{
|
.slider-track{
|
||||||
background:transparent;
|
background:transparent;
|
||||||
box-shadow:transparent 0px 0px 0px;
|
box-shadow:transparent 0px 0px 0px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.slider-handle{
|
.slider-handle{
|
||||||
z-index:100;
|
z-index:100;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.html_content_form{
|
.html_content_form{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ace_editor_pre{
|
#ace_editor_pre{
|
||||||
@ -487,12 +494,12 @@ text-decoration:none;
|
|||||||
height:400px;
|
height:400px;
|
||||||
background:white;
|
background:white;
|
||||||
border:1px solid #353535;
|
border:1px solid #353535;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
&.large{
|
&.large{
|
||||||
position:fixed;
|
position:fixed;
|
||||||
@ -502,8 +509,8 @@ text-decoration:none;
|
|||||||
right:0px;
|
right:0px;
|
||||||
background:white;
|
background:white;
|
||||||
z-index:2000 !important;
|
z-index:2000 !important;
|
||||||
|
|
||||||
|
|
||||||
#ace_editor_pre{
|
#ace_editor_pre{
|
||||||
position:absolute;
|
position:absolute;
|
||||||
top:10px;
|
top:10px;
|
||||||
@ -512,29 +519,29 @@ text-decoration:none;
|
|||||||
right:10px;
|
right:10px;
|
||||||
width:inherit;
|
width:inherit;
|
||||||
height:inherit;
|
height:inherit;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.action{
|
.action{
|
||||||
|
|
||||||
position:absolute;
|
position:absolute;
|
||||||
|
|
||||||
bottom:15px;
|
bottom:15px;
|
||||||
right:5px;
|
right:5px;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.image_square{
|
.image_square{
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
@ -544,7 +551,7 @@ text-decoration:none;
|
|||||||
border : 1px solid rgb(230,230,230);
|
border : 1px solid rgb(230,230,230);
|
||||||
|
|
||||||
background:white;
|
background:white;
|
||||||
|
|
||||||
.actions{
|
.actions{
|
||||||
display:none;
|
display:none;
|
||||||
position:absolute;
|
position:absolute;
|
||||||
@ -562,9 +569,9 @@ text-decoration:none;
|
|||||||
background-repeat:no-repeat;
|
background-repeat:no-repeat;
|
||||||
|
|
||||||
background-size: contain;
|
background-size: contain;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.image_square:hover .actions{
|
.image_square:hover .actions{
|
||||||
@ -574,41 +581,41 @@ text-decoration:none;
|
|||||||
margin:0px;
|
margin:0px;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.image_square:hover .actions:hover{
|
.image_square:hover .actions:hover{
|
||||||
|
|
||||||
opacity:1;
|
opacity:1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.event_date_form{
|
.event_date_form{
|
||||||
background:rgba(143,193,46,0.9);
|
background:rgba(143,193,46,0.9);
|
||||||
margin:0px -10px 20px -10px;
|
margin:0px -10px 20px -10px;
|
||||||
padding:10px;
|
padding:10px;
|
||||||
|
|
||||||
color:black;
|
color:black;
|
||||||
|
|
||||||
p{
|
p{
|
||||||
line-height:35px;
|
line-height:35px;
|
||||||
}
|
}
|
||||||
|
|
||||||
label{
|
label{
|
||||||
display:inline;
|
display:inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.field_with_suppr{
|
.field_with_suppr{
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
position:relative;
|
position:relative;
|
||||||
|
|
||||||
.suppr{
|
.suppr{
|
||||||
|
|
||||||
display:block;
|
display:block;
|
||||||
@ -620,7 +627,7 @@ text-decoration:none;
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.periodes_form .field, .jockers_form .field{
|
.periodes_form .field, .jockers_form .field{
|
||||||
@ -641,10 +648,10 @@ margin:0.5em;
|
|||||||
@media print {
|
@media print {
|
||||||
.visible-print { display: inherit !important; }
|
.visible-print { display: inherit !important; }
|
||||||
.hidden-print { display: none !important; }
|
.hidden-print { display: none !important; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.portlet_placeholder{
|
.portlet_placeholder{
|
||||||
@ -734,10 +741,10 @@ min-height:50px;
|
|||||||
padding:10px 12px;
|
padding:10px 12px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.portlet_handle{
|
.portlet_handle{
|
||||||
width:35%;
|
width:35%;
|
||||||
|
|
||||||
.cancel_message{
|
.cancel_message{
|
||||||
display:none;
|
display:none;
|
||||||
}
|
}
|
||||||
@ -748,10 +755,10 @@ min-height:50px;
|
|||||||
.save{
|
.save{
|
||||||
width:45%;
|
width:45%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -864,8 +871,8 @@ height:auto !important;
|
|||||||
border:50%;
|
border:50%;
|
||||||
margin-left:1em;
|
margin-left:1em;
|
||||||
width:1em;
|
width:1em;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -883,7 +890,7 @@ height:auto !important;
|
|||||||
position:relative;
|
position:relative;
|
||||||
background:black;
|
background:black;
|
||||||
margin-bottom:5px;
|
margin-bottom:5px;
|
||||||
|
|
||||||
.link{
|
.link{
|
||||||
background:rgba(250,250,250,0.5);
|
background:rgba(250,250,250,0.5);
|
||||||
text-align:center;
|
text-align:center;
|
||||||
@ -892,18 +899,18 @@ height:auto !important;
|
|||||||
bottom:0;
|
bottom:0;
|
||||||
left:0;
|
left:0;
|
||||||
right:50%;
|
right:50%;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
opacity:0;
|
opacity:0;
|
||||||
|
|
||||||
&:hover{
|
&:hover{
|
||||||
opacity:1;
|
opacity:1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.invalid{
|
.invalid{
|
||||||
a{
|
a{
|
||||||
@ -911,9 +918,9 @@ height:auto !important;
|
|||||||
padding:5px;
|
padding:5px;
|
||||||
&:hover{
|
&:hover{
|
||||||
background:rgba(250,250,250,0.8)
|
background:rgba(250,250,250,0.8)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.valid{
|
.valid{
|
||||||
@ -922,11 +929,11 @@ height:auto !important;
|
|||||||
padding-top:80px;
|
padding-top:80px;
|
||||||
font-size:70px;
|
font-size:70px;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
a:last-child{
|
a:last-child{
|
||||||
|
|
||||||
right:0;
|
right:0;
|
||||||
left:50%;
|
left:50%;
|
||||||
}
|
}
|
||||||
@ -935,29 +942,29 @@ height:auto !important;
|
|||||||
|
|
||||||
h1{
|
h1{
|
||||||
font-size:2em;
|
font-size:2em;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h2{
|
h2{
|
||||||
font-size:1.5em;
|
font-size:1.5em;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h3{
|
h3{
|
||||||
font-size:1.2em;
|
font-size:1.2em;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#customer_rows .danger{
|
#customer_rows .danger{
|
||||||
|
|
||||||
background:rgba(242,222,222,1) !important;
|
background:rgba(242,222,222,1) !important;
|
||||||
|
|
||||||
td{
|
td{
|
||||||
background:rgba(242,222,222,1) !important;
|
background:rgba(242,222,222,1) !important;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -17,35 +17,35 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#main{
|
#main{
|
||||||
position:relative;
|
position:relative;
|
||||||
|
|
||||||
}
|
}
|
||||||
.top{
|
.top{
|
||||||
|
|
||||||
//margin-bottom:10px;
|
//margin-bottom:10px;
|
||||||
position:relative;
|
position:relative;
|
||||||
background:rgba(2,43,71,1) ;
|
background:rgba(2,43,71,1) ;
|
||||||
background-size:100%;
|
background-size:100%;
|
||||||
background-size:cover;
|
background-size:cover;
|
||||||
|
|
||||||
|
|
||||||
#menu{
|
#menu{
|
||||||
a{
|
a{
|
||||||
color:white;
|
color:white;
|
||||||
|
|
||||||
}
|
}
|
||||||
.btn-primary{
|
.btn-primary{
|
||||||
|
|
||||||
color:white;
|
color:white;
|
||||||
}
|
}
|
||||||
|
|
||||||
background:white;
|
background:white;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.top_home{
|
.top_home{
|
||||||
|
|
||||||
@ -56,30 +56,30 @@ position:relative;
|
|||||||
position:relative;
|
position:relative;
|
||||||
#search_form{
|
#search_form{
|
||||||
margin-top:40px;
|
margin-top:40px;
|
||||||
|
|
||||||
}
|
}
|
||||||
#specific_search{
|
#specific_search{
|
||||||
color:white;
|
color:white;
|
||||||
background:rgba(0,0,0,0.5);
|
background:rgba(0,0,0,0.5);
|
||||||
.inner{
|
.inner{
|
||||||
padding:10px;
|
padding:10px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
h1, h2{
|
h1, h2{
|
||||||
text-align:center;
|
text-align:center;
|
||||||
|
|
||||||
|
|
||||||
color:white;
|
color:white;
|
||||||
width:100%;
|
width:100%;
|
||||||
padding:0;
|
padding:0;
|
||||||
margin:0;
|
margin:0;
|
||||||
}
|
}
|
||||||
|
|
||||||
h1{
|
h1{
|
||||||
font-size:2.3em;
|
font-size:2.3em;
|
||||||
margin-top:400px;
|
margin-top:400px;
|
||||||
@ -89,13 +89,13 @@ position:relative;
|
|||||||
h2{
|
h2{
|
||||||
|
|
||||||
font-size:1.4em;
|
font-size:1.4em;
|
||||||
|
|
||||||
img{
|
img{
|
||||||
width:60px;
|
width:60px;
|
||||||
display:block;
|
display:block;
|
||||||
margin:1em auto;
|
margin:1em auto;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -103,23 +103,23 @@ position:relative;
|
|||||||
|
|
||||||
|
|
||||||
#menu{
|
#menu{
|
||||||
|
|
||||||
background:rgba(0,0,0,0) !important;
|
background:rgba(0,0,0,0) !important;
|
||||||
width:100%;
|
width:100%;
|
||||||
|
|
||||||
z-index:10;
|
z-index:10;
|
||||||
|
|
||||||
-webkit-transition: background-color 1000ms linear;
|
-webkit-transition: background-color 1000ms linear;
|
||||||
-moz-transition: background-color 1000ms linear;
|
-moz-transition: background-color 1000ms linear;
|
||||||
-o-transition: background-color 1000ms linear;
|
-o-transition: background-color 1000ms linear;
|
||||||
-ms-transition: background-color 1000ms linear;
|
-ms-transition: background-color 1000ms linear;
|
||||||
transition: background-color 1000ms linear;
|
transition: background-color 1000ms linear;
|
||||||
|
|
||||||
a{
|
a{
|
||||||
color:white;
|
color:white;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ul{
|
ul{
|
||||||
margin:0;
|
margin:0;
|
||||||
padding:2px 10px;
|
padding:2px 10px;
|
||||||
@ -130,18 +130,18 @@ position:relative;
|
|||||||
display:inline;
|
display:inline;
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
padding:8px 0px;
|
padding:8px 0px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.public-table{
|
||||||
|
td, th{
|
||||||
|
vertical-align:middle !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.bottom{
|
.bottom{
|
||||||
background:#323232;
|
background:#323232;
|
||||||
@ -151,44 +151,44 @@ position:relative;
|
|||||||
text-align:left;
|
text-align:left;
|
||||||
#nb{
|
#nb{
|
||||||
position:absolute;
|
position:absolute;
|
||||||
|
|
||||||
right:20px;
|
right:20px;
|
||||||
height:25px;
|
height:25px;
|
||||||
bottom:20px;
|
bottom:20px;
|
||||||
opacity:0.4;
|
opacity:0.4;
|
||||||
|
|
||||||
&:hover{
|
&:hover{
|
||||||
opacity:1;
|
opacity:1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
ul{
|
ul{
|
||||||
margin-left:0;
|
margin-left:0;
|
||||||
list-style:none;
|
list-style:none;
|
||||||
padding:0;
|
padding:0;
|
||||||
li{
|
li{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
a,h4{
|
a,h4{
|
||||||
font-weight:normal;
|
font-weight:normal;
|
||||||
color:rgb(255, 255, 255);
|
color:rgb(255, 255, 255);
|
||||||
|
|
||||||
}
|
}
|
||||||
a{
|
a{
|
||||||
display:block;
|
display:block;
|
||||||
padding: .2em 0 0.6em;
|
padding: .2em 0 0.6em;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
h4{
|
h4{
|
||||||
|
|
||||||
padding: .5em 0;
|
padding: .5em 0;
|
||||||
border-bottom: 1px solid #656565;
|
border-bottom: 1px solid #656565;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.page{
|
.page{
|
||||||
@ -196,20 +196,20 @@ position:relative;
|
|||||||
table{
|
table{
|
||||||
margin:1em auto;
|
margin:1em auto;
|
||||||
tr:nth-child(even) {
|
tr:nth-child(even) {
|
||||||
|
|
||||||
|
|
||||||
background:rgba(210,222,237,1);
|
background:rgba(210,222,237,1);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
td{
|
td{
|
||||||
padding:5px;
|
padding:5px;
|
||||||
border:1px solid rgba(77,128,186,1);
|
border:1px solid rgba(77,128,186,1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -224,14 +224,14 @@ position:relative;
|
|||||||
}
|
}
|
||||||
h1{
|
h1{
|
||||||
font-size:45px;
|
font-size:45px;
|
||||||
|
|
||||||
}
|
}
|
||||||
h2{
|
h2{
|
||||||
font-size:32px;
|
font-size:32px;
|
||||||
|
|
||||||
}
|
}
|
||||||
padding:2em 10px;
|
padding:2em 10px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.annonce_message_li{
|
.annonce_message_li{
|
||||||
@ -242,23 +242,23 @@ position:relative;
|
|||||||
border-color:transparent;
|
border-color:transparent;
|
||||||
.time{
|
.time{
|
||||||
color:white;
|
color:white;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
display:block;
|
display:block;
|
||||||
text-align:left;
|
text-align:left;
|
||||||
padding:10px 10px;
|
padding:10px 10px;
|
||||||
color:#454340;
|
color:#454340;
|
||||||
|
|
||||||
img{
|
img{
|
||||||
float:left;
|
float:left;
|
||||||
border-radius:50%;
|
border-radius:50%;
|
||||||
height:60px;
|
height:60px;
|
||||||
margin-right:5px;
|
margin-right:5px;
|
||||||
|
|
||||||
}
|
}
|
||||||
.new{
|
.new{
|
||||||
|
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
width:10px;
|
width:10px;
|
||||||
height:10px;
|
height:10px;
|
||||||
@ -266,27 +266,27 @@ position:relative;
|
|||||||
border-radius:50%;
|
border-radius:50%;
|
||||||
}
|
}
|
||||||
.pseudo{
|
.pseudo{
|
||||||
|
|
||||||
font-weight:bold;
|
font-weight:bold;
|
||||||
margin-bottom:10px;
|
margin-bottom:10px;
|
||||||
|
|
||||||
}
|
}
|
||||||
.time{
|
.time{
|
||||||
font-size:0.8;
|
font-size:0.8;
|
||||||
color:rgba(120,118,115,1);
|
color:rgba(120,118,115,1);
|
||||||
float:right;
|
float:right;
|
||||||
margin-left:10px;
|
margin-left:10px;
|
||||||
|
|
||||||
}
|
}
|
||||||
border-radius:0;
|
border-radius:0;
|
||||||
border-bottom:1px solid gray;
|
border-bottom:1px solid gray;
|
||||||
|
|
||||||
}
|
}
|
||||||
.annonce_message_show{
|
.annonce_message_show{
|
||||||
background:white;min-height:600px;
|
background:white;min-height:600px;
|
||||||
padding-top:10px;
|
padding-top:10px;
|
||||||
padding-bottom:10px;
|
padding-bottom:10px;
|
||||||
|
|
||||||
.message_annonce{
|
.message_annonce{
|
||||||
color:white;
|
color:white;
|
||||||
background:#4F81B8;
|
background:#4F81B8;
|
||||||
@ -294,18 +294,18 @@ position:relative;
|
|||||||
margin-bottom:10px;
|
margin-bottom:10px;
|
||||||
a{
|
a{
|
||||||
color:white;
|
color:white;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.am{
|
.am{
|
||||||
.badge{
|
.badge{
|
||||||
|
|
||||||
background:#3677AF;
|
background:#3677AF;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#categories{
|
#categories{
|
||||||
@ -314,7 +314,7 @@ position:relative;
|
|||||||
h2{
|
h2{
|
||||||
font-size:1.2em;
|
font-size:1.2em;
|
||||||
font-weight:normal;
|
font-weight:normal;
|
||||||
|
|
||||||
}
|
}
|
||||||
h3{
|
h3{
|
||||||
font-size:1.1em;
|
font-size:1.1em;
|
||||||
@ -322,7 +322,7 @@ position:relative;
|
|||||||
border-bottom:1px solid #DBDBDB;
|
border-bottom:1px solid #DBDBDB;
|
||||||
padding-bottom:10px;
|
padding-bottom:10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
ul{
|
ul{
|
||||||
list-style:none;
|
list-style:none;
|
||||||
padding:0;
|
padding:0;
|
||||||
@ -334,18 +334,18 @@ position:relative;
|
|||||||
color:#525252;
|
color:#525252;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.customer_dashboard{
|
.customer_dashboard{
|
||||||
|
|
||||||
.panel{
|
.panel{
|
||||||
|
|
||||||
min-height:260px;
|
min-height:260px;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#annonce_menu{
|
#annonce_menu{
|
||||||
@ -364,41 +364,41 @@ position:relative;
|
|||||||
margin-bottom:5px;
|
margin-bottom:5px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.active{
|
.active{
|
||||||
color:orange ;
|
color:orange ;
|
||||||
a{
|
a{
|
||||||
|
|
||||||
color:orange;
|
color:orange;
|
||||||
}
|
}
|
||||||
.menu_icon{
|
.menu_icon{
|
||||||
|
|
||||||
background:orange;
|
background:orange;
|
||||||
color:white;
|
color:white;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ok{
|
.ok{
|
||||||
color:green;
|
color:green;
|
||||||
a{
|
a{
|
||||||
|
|
||||||
color:green;
|
color:green;
|
||||||
}
|
}
|
||||||
.menu_icon{
|
.menu_icon{
|
||||||
|
|
||||||
background:green;
|
background:green;
|
||||||
color:white;
|
color:white;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.next_step{
|
.next_step{
|
||||||
|
|
||||||
padding:20px 10px;
|
padding:20px 10px;
|
||||||
text-align:center;
|
text-align:center;
|
||||||
margin-bottom:50px;
|
margin-bottom:50px;
|
||||||
@ -417,11 +417,11 @@ position:relative;
|
|||||||
border: 1px solid #e5e5e5;
|
border: 1px solid #e5e5e5;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#new_customer_form_container{
|
#new_customer_form_container{
|
||||||
|
|
||||||
h1{
|
h1{
|
||||||
text-align:center;
|
text-align:center;
|
||||||
}
|
}
|
||||||
@ -434,14 +434,14 @@ position:relative;
|
|||||||
border: 1px solid #e5e5e5;
|
border: 1px solid #e5e5e5;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.fav{
|
.fav{
|
||||||
padding:5px;
|
padding:5px;
|
||||||
&.active, &:hover{
|
&.active, &:hover{
|
||||||
color:#ffcc17;
|
color:#ffcc17;
|
||||||
|
|
||||||
}
|
}
|
||||||
color:#dddddd;
|
color:#dddddd;
|
||||||
font-size:18px;
|
font-size:18px;
|
||||||
@ -452,14 +452,14 @@ position:relative;
|
|||||||
padding:20px;
|
padding:20px;
|
||||||
background:white;
|
background:white;
|
||||||
margin-bottom:20px;
|
margin-bottom:20px;
|
||||||
|
|
||||||
tr:nth-child(odd){
|
tr:nth-child(odd){
|
||||||
|
|
||||||
background:#F7F9FA;
|
background:#F7F9FA;
|
||||||
}
|
}
|
||||||
td{
|
td{
|
||||||
border:0 !important;
|
border:0 !important;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -491,23 +491,23 @@ height: 100%;
|
|||||||
text-align:center;
|
text-align:center;
|
||||||
}
|
}
|
||||||
th{
|
th{
|
||||||
|
|
||||||
background:rgba(220,240,248,1);
|
background:rgba(220,240,248,1);
|
||||||
|
|
||||||
font-weight:normal;
|
font-weight:normal;
|
||||||
}
|
}
|
||||||
.header_tr{
|
.header_tr{
|
||||||
|
|
||||||
th{
|
th{
|
||||||
color:white;
|
color:white;
|
||||||
background:rgba(58,59,86,1) !important;
|
background:rgba(58,59,86,1) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.orange{
|
.orange{
|
||||||
background:#c8de84;
|
background:#c8de84;
|
||||||
//color:black;
|
//color:black;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -527,24 +527,24 @@ height: 100%;
|
|||||||
|
|
||||||
@media screen and (max-width:740px) {
|
@media screen and (max-width:740px) {
|
||||||
#annonce{
|
#annonce{
|
||||||
|
|
||||||
#corps, #infos{
|
#corps, #infos{
|
||||||
|
|
||||||
width:auto;
|
width:auto;
|
||||||
float:none;
|
float:none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#infos{
|
#infos{
|
||||||
padding:10px;
|
padding:10px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#default_image{
|
#default_image{
|
||||||
|
|
||||||
height:300px;
|
height:300px;
|
||||||
border-radius:0;
|
border-radius:0;
|
||||||
}
|
}
|
||||||
@ -565,20 +565,20 @@ height: 100%;
|
|||||||
padding-left:20px;
|
padding-left:20px;
|
||||||
}
|
}
|
||||||
.fav{
|
.fav{
|
||||||
|
|
||||||
float:none;
|
float:none;
|
||||||
position:static;
|
position:static;
|
||||||
display:inline;
|
display:inline;
|
||||||
cursor:pointer;
|
cursor:pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#menu{
|
#menu{
|
||||||
text-align:center;
|
text-align:center;
|
||||||
.add_annonce{
|
.add_annonce{
|
||||||
|
|
||||||
display:block;
|
display:block;
|
||||||
|
|
||||||
.btn{
|
.btn{
|
||||||
@ -589,20 +589,20 @@ height: 100%;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ul{
|
ul{
|
||||||
|
|
||||||
float:none;
|
float:none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#search_form{ #general_search{
|
#search_form{ #general_search{
|
||||||
display:block;
|
display:block;
|
||||||
.place_search{
|
.place_search{
|
||||||
|
|
||||||
float:none;
|
float:none;
|
||||||
}
|
}
|
||||||
#q, #place, #annonce_cat_id{
|
#q, #place, #annonce_cat_id{
|
||||||
@ -613,9 +613,9 @@ height: 100%;
|
|||||||
border-radius:8px;
|
border-radius:8px;
|
||||||
margin:5px auto;
|
margin:5px auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
#search_button{
|
#search_button{
|
||||||
|
|
||||||
float:none;
|
float:none;
|
||||||
width:200px;
|
width:200px;
|
||||||
display:block;
|
display:block;
|
||||||
@ -646,6 +646,5 @@ height: 100%;
|
|||||||
margin:20px auto;
|
margin:20px auto;
|
||||||
display:block;
|
display:block;
|
||||||
height:200px;
|
height:200px;
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
|
56
app/controllers/admin/needs_controller.rb
Normal file
56
app/controllers/admin/needs_controller.rb
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
class Admin::NeedsController < ApplicationController
|
||||||
|
layout "admin"
|
||||||
|
|
||||||
|
def index
|
||||||
|
@needs_to_validate = Need.where(state: 'created').order(created_at: :desc)
|
||||||
|
end
|
||||||
|
|
||||||
|
def edit
|
||||||
|
@need = Need.find(params[:id])
|
||||||
|
end
|
||||||
|
|
||||||
|
def update
|
||||||
|
@need = Need.find(params[:id])
|
||||||
|
if @need.update_attributes(need_params)
|
||||||
|
flash[:notice] = "Besoin sauvegardé avec succès."
|
||||||
|
redirect_to admin_needs_path
|
||||||
|
else
|
||||||
|
render :action => "edit"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def destroy
|
||||||
|
@need = Need.find(params[:id])
|
||||||
|
if(@need.destroy)
|
||||||
|
flash[:notice] = "Besoin supprimé avec succès."
|
||||||
|
end
|
||||||
|
redirect_to admin_needs_path
|
||||||
|
end
|
||||||
|
|
||||||
|
def validate
|
||||||
|
@need = Need.find(params[:id])
|
||||||
|
if @need.validate!
|
||||||
|
flash[:notice] = "Besoin validé avec succès"
|
||||||
|
CustomerMailer.validate_need(@need).deliver
|
||||||
|
else
|
||||||
|
flash[:error] = "L'état actuel de ce besoin ne permet sa validation"
|
||||||
|
end
|
||||||
|
redirect_to admin_needs_path
|
||||||
|
end
|
||||||
|
|
||||||
|
def refuse
|
||||||
|
@need = Need.find(params[:id])
|
||||||
|
if @need.refuse!
|
||||||
|
flash[:notice] = "Besoin refusé avec succès"
|
||||||
|
CustomerMailer.refuse_need(@need).deliver
|
||||||
|
else
|
||||||
|
flash[:error] = "L'état actuel de ce besoin ne permet son refus"
|
||||||
|
end
|
||||||
|
redirect_to admin_needs_path
|
||||||
|
end
|
||||||
|
|
||||||
|
def need_params
|
||||||
|
params.require(:need).permit(:title, :description)
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
@ -2,52 +2,51 @@ class ApplicationController < ActionController::Base
|
|||||||
# Prevent CSRF attacks by raising an exception.
|
# Prevent CSRF attacks by raising an exception.
|
||||||
# For APIs, you may want to use :null_session instead.
|
# For APIs, you may want to use :null_session instead.
|
||||||
protect_from_forgery with: :exception
|
protect_from_forgery with: :exception
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def auth_customer
|
def auth_customer
|
||||||
|
|
||||||
session[:devise_id] = params[:d] if params[:d]
|
session[:devise_id] = params[:d] if params[:d]
|
||||||
if !current_customer
|
if !current_customer
|
||||||
|
|
||||||
session[:before_auth_url] = request.url
|
session[:before_auth_url] = request.url
|
||||||
redirect_to new_public_customers_auth_path(:p => params[:p], :for_annonce => (true if params[:controller] == "public/annonces"))
|
redirect_to new_public_customers_auth_path(:p => params[:p], :for_annonce => (true if params[:controller] == "public/annonces"))
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def auth_admin
|
def auth_admin
|
||||||
if !current_admin
|
if !current_admin
|
||||||
redirect_to new_admin_admin_auth_path
|
redirect_to new_admin_admin_auth_path
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def current_admin
|
def current_admin
|
||||||
|
|
||||||
if cookies[:admin_remember_token]
|
if cookies[:admin_remember_token]
|
||||||
if @current_admin = Admin.find_by_remember_token(cookies[:admin_remember_token])
|
if @current_admin = Admin.find_by_remember_token(cookies[:admin_remember_token])
|
||||||
@current_admin = Admin.find_by_remember_token(cookies[:admin_remember_token])
|
@current_admin = Admin.find_by_remember_token(cookies[:admin_remember_token])
|
||||||
else
|
else
|
||||||
cookies[:admin_remember_token] =nil
|
cookies[:admin_remember_token] =nil
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def current_customer
|
def current_customer
|
||||||
if cookies[:customer_auth_token] and Customer.exists?(:token => cookies[:customer_auth_token])
|
if cookies[:customer_auth_token] and Customer.exists?(:token => cookies[:customer_auth_token])
|
||||||
a_c = Customer.find_by_token(cookies[:customer_auth_token])
|
a_c = Customer.find_by_token(cookies[:customer_auth_token])
|
||||||
@ -55,21 +54,20 @@ class ApplicationController < ActionController::Base
|
|||||||
@current_customer = a_c
|
@current_customer = a_c
|
||||||
else
|
else
|
||||||
cookies[:customer_auth_token] = nil
|
cookies[:customer_auth_token] = nil
|
||||||
|
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
helper_method :current_admin, :current_customer
|
helper_method :current_admin, :current_customer
|
||||||
|
|
||||||
end
|
|
||||||
|
|
||||||
|
end
|
||||||
|
@ -5,7 +5,9 @@ class Public::MyAccountController < ApplicationController
|
|||||||
before_filter :auth_customer
|
before_filter :auth_customer
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@needs = Kaminari.paginate_array(current_customer.needs).page(params[:page]).per(2)
|
@needs = Kaminari.paginate_array(current_customer.needs.order(created_at: :desc))
|
||||||
|
.page(params[:page])
|
||||||
|
.per(5)
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -35,6 +35,12 @@ class Public::NeedsController < ApplicationController
|
|||||||
@need.author = current_customer
|
@need.author = current_customer
|
||||||
if @need.save
|
if @need.save
|
||||||
flash[:notice] = "Votre besoin à été créé avec succès."
|
flash[:notice] = "Votre besoin à été créé avec succès."
|
||||||
|
|
||||||
|
# Find all admins with emails
|
||||||
|
admins = Admin.where.not(email: nil)
|
||||||
|
admins.each do |admin|
|
||||||
|
AdminMailer.new_need(admin, @need).deliver
|
||||||
|
end
|
||||||
redirect_to public_my_account_path
|
redirect_to public_my_account_path
|
||||||
else
|
else
|
||||||
render :action => "new"
|
render :action => "new"
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
class AdminMailer < ActionMailer::Base
|
class AdminMailer < ApplicationMailer
|
||||||
|
layout "mail"
|
||||||
|
|
||||||
def password_reset(admin)
|
def password_reset(admin)
|
||||||
@admin = admin
|
@admin = admin
|
||||||
mail :to => admin.email, :subject => "Reinitialisation du mot de passe.", :from => "info@nicolasbally.com"
|
mail :to => admin.email, :subject => "Reinitialisation du mot de passe.", :from => "info@nicolasbally.com"
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
def new_need(admin, need)
|
||||||
|
@need = need
|
||||||
|
mail to: admin.email, subject: "Nouvelle proposition de besoin"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
class ApplicationMailer < ActionMailer::Base
|
class ApplicationMailer < ActionMailer::Base
|
||||||
default from: "from@example.com"
|
default from: "\"Négos\" <contact@negos-pro.fr>"
|
||||||
layout 'mailer'
|
layout 'mailer'
|
||||||
end
|
end
|
||||||
|
@ -8,46 +8,55 @@ class CustomerMailer < ApplicationMailer
|
|||||||
def confirm(customer)
|
def confirm(customer)
|
||||||
@customer = customer
|
@customer = customer
|
||||||
|
|
||||||
mail from: "contact@negos-pro.fr", to: customer.email, :subject => "Important : Activation de votre compte Négos"
|
mail to: customer.email, :subject => "Important : Activation de votre compte Négos"
|
||||||
end
|
end
|
||||||
|
|
||||||
def validate_account(customer)
|
def validate_account(customer)
|
||||||
@customer = customer
|
@customer = customer
|
||||||
|
|
||||||
mail from: "contact@negos-pro.fr", to: customer.email, :subject => "Important : Validation de votre compte Négos"
|
mail to: customer.email, :subject => "Important : Validation de votre compte Négos"
|
||||||
end
|
end
|
||||||
|
|
||||||
def confirm_ins(customer)
|
def confirm_ins(customer)
|
||||||
@customer = customer
|
@customer = customer
|
||||||
|
|
||||||
mail from: "contact@negos-pro.fr", to: customer.email, :subject => "Confirmation d’inscription"
|
mail to: customer.email, :subject => "Confirmation d’inscription"
|
||||||
end
|
end
|
||||||
|
|
||||||
def validate_ins(customer)
|
def validate_ins(customer)
|
||||||
@customer = customer
|
@customer = customer
|
||||||
|
|
||||||
mail from: "contact@negos-pro.fr", to: customer.email, :subject => "Bienvenue chez NEGOS"
|
mail to: customer.email, :subject => "Bienvenue chez NEGOS"
|
||||||
end
|
end
|
||||||
|
|
||||||
def notify_ins(customer)
|
def notify_ins(customer)
|
||||||
@customer = customer
|
@customer = customer
|
||||||
|
|
||||||
mail from: "contact@negos-pro.fr", to: "daniel@videlier.fr", bcc: "info@nicolasbally.com", :subject => "Nouveau compte client sur Negos"
|
mail to: "daniel@videlier.fr", bcc: "info@nicolasbally.com", :subject => "Nouveau compte client sur Negos"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def validate_need(need)
|
||||||
|
@need = need
|
||||||
|
@customer = need.author
|
||||||
|
mail to: @customer.email, :subject => "Proposition de besoin validée"
|
||||||
|
end
|
||||||
|
|
||||||
|
def refuse_need(need)
|
||||||
|
@need = need
|
||||||
|
@customer = need.author
|
||||||
|
mail to: @customer.email, :subject => "Proposition de besoin refusée"
|
||||||
|
end
|
||||||
|
|
||||||
def new_user(customer)
|
def new_user(customer)
|
||||||
@customer = customer
|
@customer = customer
|
||||||
@parent = @customer.parent
|
@parent = @customer.parent
|
||||||
if @parent
|
if @parent
|
||||||
#mail from: "no-reply@negos.pro", to: @parent.email, :subject => "Vous avez un nouvel affilié sur Negos.pro !" do |format|
|
#mail from: "no-reply@negos.pro", to: @parent.email, :subject => "Vous avez un nouvel affilié sur Negos.pro !" do |format|
|
||||||
# format.html { render layout: false }
|
# format.html { render layout: false }
|
||||||
|
|
||||||
|
|
||||||
#end
|
#end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -56,29 +65,29 @@ class CustomerMailer < ApplicationMailer
|
|||||||
#
|
#
|
||||||
# en.customer.reset_password.subject
|
# en.customer.reset_password.subject
|
||||||
#
|
#
|
||||||
|
|
||||||
def new_message(customer)
|
def new_message(customer)
|
||||||
@customer = customer
|
@customer = customer
|
||||||
|
|
||||||
mail from: "Négos.com <no-reply@negos.pro>", to: customer.email, :subject => "Vous avez un nouveau message privé"
|
mail from: "Négos.com <no-reply@negos.pro>", to: customer.email, :subject => "Vous avez un nouveau message privé"
|
||||||
end
|
end
|
||||||
|
|
||||||
def password_reset(customer)
|
def password_reset(customer)
|
||||||
@customer = customer
|
@customer = customer
|
||||||
mail :to => @customer.email, :subject => "Reinitialisation du mot de passe.", :from => "Négos.com <no-reply@negos.pro>"
|
mail :to => @customer.email, :subject => "Reinitialisation du mot de passe.", :from => "Négos.com <no-reply@negos.pro>"
|
||||||
end
|
end
|
||||||
|
|
||||||
def new_commission(commission)
|
def new_commission(commission)
|
||||||
@commission = commission
|
@commission = commission
|
||||||
|
|
||||||
if @commission.commission_type_id == 1 or @commission.commission_type_id == 2 or @commission.commission_type_id == 3
|
if @commission.commission_type_id == 1 or @commission.commission_type_id == 2 or @commission.commission_type_id == 3
|
||||||
mail from: "no-reply@negos.pro", to: @commission.customer.email, :subject => "Vous avez reçu une commission sur Négos.com !" do |format|
|
mail from: "no-reply@negos.pro", to: @commission.customer.email, :subject => "Vous avez reçu une commission sur Négos.com !" do |format|
|
||||||
format.html { render layout: false }
|
format.html { render layout: false }
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -1,15 +1,51 @@
|
|||||||
class Need < ActiveRecord::Base
|
class Need < ActiveRecord::Base
|
||||||
|
include Workflow
|
||||||
|
|
||||||
|
workflow_column :state
|
||||||
max_paginates_per 10
|
max_paginates_per 10
|
||||||
|
|
||||||
|
|
||||||
validates :title, :presence => true,
|
|
||||||
:length => {:within => 4..128}
|
|
||||||
|
|
||||||
validates :description, :presence => true, length: {maximum: 65535}
|
|
||||||
|
|
||||||
belongs_to :author, class_name: 'Customer'
|
|
||||||
|
|
||||||
acts_as_paranoid
|
acts_as_paranoid
|
||||||
|
|
||||||
|
|
||||||
|
validates :title, :presence => true, length: {within: 4..128}
|
||||||
|
validates :description, presence: true, length: {maximum: 65535}
|
||||||
|
belongs_to :author, class_name: 'Customer'
|
||||||
|
|
||||||
|
# Need's workflow lifecycle
|
||||||
|
workflow do
|
||||||
|
state :created do
|
||||||
|
event :validate, :transitions_to => :verified
|
||||||
|
event :refuse, :transitions_to => :refused
|
||||||
|
end
|
||||||
|
state :refused
|
||||||
|
state :verified do
|
||||||
|
event :negociate, :transitions_to => :negociating
|
||||||
|
end
|
||||||
|
state :negociating do
|
||||||
|
event :accept, :transitions_to => :negociated
|
||||||
|
event :reject, :transitions_to => :failed
|
||||||
|
end
|
||||||
|
state :negociated
|
||||||
|
state :failed
|
||||||
|
end
|
||||||
|
|
||||||
|
# Human state conversion
|
||||||
|
def human_state
|
||||||
|
case state
|
||||||
|
when 'created'
|
||||||
|
"En attente de validation"
|
||||||
|
when 'verified'
|
||||||
|
"Validé"
|
||||||
|
when 'refused'
|
||||||
|
"Refusé"
|
||||||
|
when 'negociating'
|
||||||
|
"En cours de negociation"
|
||||||
|
when 'negociated'
|
||||||
|
"Négociation effecutée"
|
||||||
|
when 'failed'
|
||||||
|
"Négociation échouée"
|
||||||
|
else
|
||||||
|
"Inconnu"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
9
app/views/admin/needs/_form.html.haml
Normal file
9
app/views/admin/needs/_form.html.haml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
=semantic_form_for [:admin, @need] do |f|
|
||||||
|
.content
|
||||||
|
|
||||||
|
|
||||||
|
=f.inputs do
|
||||||
|
=f.input :title, :label => "Titre : "
|
||||||
|
=f.input :description, :label => "Description : ", :rows => 5, :input_html => {:style => "height:100px;"}
|
||||||
|
|
||||||
|
.actions= f.submit "Sauvegarder", :class => "btn btn-primary"
|
13
app/views/admin/needs/_need.html.haml
Normal file
13
app/views/admin/needs/_need.html.haml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
|
||||||
|
%tr{:id => need.id}
|
||||||
|
%td
|
||||||
|
=need.title
|
||||||
|
%td
|
||||||
|
=link_to need.author.organisation, edit_admin_customer_path(need.author)
|
||||||
|
%td
|
||||||
|
Il y a #{time_ago_in_words( need.created_at)}
|
||||||
|
%td.actions{:style => "width:150px;text-align:right"}
|
||||||
|
= link_to i(:"trash-o"), [:admin, need], :data => {:confirm => 'Voulez-vous vraiment supprimer ce besoin ?'}, :method => :delete
|
||||||
|
= link_to i(:pencil), edit_admin_need_path(need)
|
||||||
|
= link_to i(:remove), refuse_admin_need_path(need), title: "Refuser", :data => {:confirm => 'Voulez-vous vraiment refuser ce besoin ?'}
|
||||||
|
= link_to i(:check), validate_admin_need_path(need), title: "Valider", :data => {:confirm => 'Voulez-vous vraiment valider ce besoin ?'}
|
2
app/views/admin/needs/edit.html.haml
Normal file
2
app/views/admin/needs/edit.html.haml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
%h1 Modifier un besoin
|
||||||
|
=render :partial => "form"
|
22
app/views/admin/needs/index.html.haml
Normal file
22
app/views/admin/needs/index.html.haml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
%h1 Gestion des besoins
|
||||||
|
|
||||||
|
-if @needs_to_validate.length > 0
|
||||||
|
%h2 #{pluralize(@needs_to_validate.length, 'besoin')} à contrôler
|
||||||
|
|
||||||
|
|
||||||
|
%table.table.admin_table.table-hover.table-striped
|
||||||
|
%thead.rows_header
|
||||||
|
|
||||||
|
%tr
|
||||||
|
%td
|
||||||
|
Titre
|
||||||
|
%td
|
||||||
|
Émetteur
|
||||||
|
%td
|
||||||
|
Créé
|
||||||
|
%td{:style => "width:100px"}
|
||||||
|
|
||||||
|
|
||||||
|
%tbody.rows
|
||||||
|
|
||||||
|
=render @needs_to_validate
|
23
app/views/admin_mailer/new_need.html.haml
Normal file
23
app/views/admin_mailer/new_need.html.haml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
%p Bonjour,
|
||||||
|
|
||||||
|
%p
|
||||||
|
Une proposition de besoin vient d'être ajoutée par le client
|
||||||
|
%strong= @need.author.organisation.to_s
|
||||||
|
|
||||||
|
%p
|
||||||
|
Vous pouvez vous rendre dans la rubrique
|
||||||
|
=link_to "Gestion des besoins", admin_needs_path
|
||||||
|
afin de valider ou refuser cette proposition.
|
||||||
|
|
||||||
|
%p
|
||||||
|
Voici quelques informations sur le besoin
|
||||||
|
|
||||||
|
%p
|
||||||
|
%strong Titre :
|
||||||
|
%br
|
||||||
|
=@need.title
|
||||||
|
|
||||||
|
%p
|
||||||
|
%strong Description :
|
||||||
|
%br
|
||||||
|
=@need.description
|
5
app/views/customer_mailer/refuse_need.html.haml
Normal file
5
app/views/customer_mailer/refuse_need.html.haml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
%p Bonjour,
|
||||||
|
|
||||||
|
%p Nous avons le regret de vous annoncer que votre proposition de besoin "#{@need.title.to_s}" vient d'être refusée.
|
||||||
|
|
||||||
|
%p Celle-ci ne respectait pas la charte imposée par notre service.
|
7
app/views/customer_mailer/validate_need.html.haml
Normal file
7
app/views/customer_mailer/validate_need.html.haml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
%p Bonjour,
|
||||||
|
|
||||||
|
%p Nous avons le plaisir de vous annoncer que votre proposition de besoin "#{@need.title.to_s}" vient d'être validée.
|
||||||
|
|
||||||
|
%p Les autres utilisateurs vont dès à présent pouvoir montrer leurs intérêts pour ce nouveau besoin.
|
||||||
|
|
||||||
|
%p Merci !
|
@ -9,66 +9,67 @@
|
|||||||
= stylesheet_link_tag :admin, :media => :all
|
= stylesheet_link_tag :admin, :media => :all
|
||||||
= javascript_include_tag "admin"
|
= javascript_include_tag "admin"
|
||||||
=javascript_include_tag "https://maps.google.com/maps/api/js?sensor=false®ion=FR"
|
=javascript_include_tag "https://maps.google.com/maps/api/js?sensor=false®ion=FR"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%body.admin
|
%body.admin
|
||||||
%nav#admin_nav.navbar.navbar-default.navbar-inverse{role: "navigation"}
|
%nav#admin_nav.navbar.navbar-default.navbar-inverse{role: "navigation"}
|
||||||
.container-fluid
|
.container-fluid
|
||||||
|
|
||||||
.navbar-header
|
.navbar-header
|
||||||
%button.navbar-toggle{"data-target" => "#bs-example-navbar-collapse-1", "data-toggle" => "collapse", type: "button"}
|
%button.navbar-toggle{"data-target" => "#bs-example-navbar-collapse-1", "data-toggle" => "collapse", type: "button"}
|
||||||
%span.sr-only Toggle navigation
|
%span.sr-only Toggle navigation
|
||||||
%span.icon-bar
|
%span.icon-bar
|
||||||
%span.icon-bar
|
%span.icon-bar
|
||||||
%span.icon-bar
|
%span.icon-bar
|
||||||
%a.navbar-brand{href: "/admin"}
|
%a.navbar-brand{href: "/admin"}
|
||||||
=ic :home
|
=ic :home
|
||||||
|
|
||||||
#bs-example-navbar-collapse-1.collapse.navbar-collapse
|
#bs-example-navbar-collapse-1.collapse.navbar-collapse
|
||||||
%ul.nav.navbar-nav
|
%ul.nav.navbar-nav
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%li= link_to "Comptes utilisateurs", admin_customers_path
|
%li= link_to "Comptes utilisateurs", admin_customers_path
|
||||||
|
- unvalidated_need_count = Need.where(state: 'created').count
|
||||||
|
-if unvalidated_need_count > 0
|
||||||
|
%li= link_to content_tag(:span,unvalidated_need_count , class: 'badge') + " Gestion des besoins", admin_needs_path
|
||||||
|
-else
|
||||||
|
%li= link_to " Gestion des besoins", admin_needs_path
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
%ul.nav.navbar-nav.navbar-right
|
%ul.nav.navbar-nav.navbar-right
|
||||||
%li.dropdown
|
%li.dropdown
|
||||||
%a.dropdown-toggle{"data-toggle" => "dropdown", href: "#"}
|
%a.dropdown-toggle{"data-toggle" => "dropdown", href: "#"}
|
||||||
=current_admin.firstname
|
=current_admin.firstname
|
||||||
=current_admin.name
|
=current_admin.name
|
||||||
%b.caret
|
%b.caret
|
||||||
|
|
||||||
%ul.dropdown-menu
|
%ul.dropdown-menu
|
||||||
%li= link_to "Gestion des admins", admin_admins_path
|
%li= link_to "Gestion des admins", admin_admins_path
|
||||||
%li.divider
|
%li.divider
|
||||||
%li=link_to "Se déconnecter", logout_admin_admin_auths_path
|
%li=link_to "Se déconnecter", logout_admin_admin_auths_path
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.container-fluid
|
.container-fluid
|
||||||
|
|
||||||
= yield
|
= yield
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#flashs= bootstrap_flash
|
#flashs= bootstrap_flash
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -48,13 +48,20 @@
|
|||||||
|
|
||||||
.padding.center.white
|
.padding.center.white
|
||||||
%h3
|
%h3
|
||||||
Mes besoins
|
Mes propositions de besoin
|
||||||
|
%div.alert.alert-info
|
||||||
|
%p
|
||||||
|
Si vous avez un besoin qui ne fait pas encore parti de notre liste, vous pouvez vous-même le proposer à Négos.
|
||||||
|
%br
|
||||||
|
Votre proposition sera alors soumise à une courte validation par l'un de nos modérateurs.
|
||||||
|
%br
|
||||||
|
Vous serez informer par courriel dès l'acceptation de votre proposition.
|
||||||
-if @needs.length > 0
|
-if @needs.length > 0
|
||||||
=render "public/needs/index", needs: @needs
|
=render "public/needs/index", needs: @needs
|
||||||
-else
|
-else
|
||||||
%p
|
%p
|
||||||
Vous n'avez pas encore créé de besoin
|
Vous n'avez pas encore proposer de besoin
|
||||||
=link_to "Déclarer un besoin", new_public_need_path, :class => "btn btn-primary"
|
=link_to "Proposer un besoin", new_public_need_path, :class => "btn btn-primary"
|
||||||
.padding.center.white
|
.padding.center.white
|
||||||
%h3
|
%h3
|
||||||
Ma liste de souhait
|
Ma liste de souhait
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
%table.table.table-striped
|
%table.table.public-table.table-striped
|
||||||
%thead
|
%thead
|
||||||
|
|
||||||
%tr
|
%tr
|
||||||
%th
|
%th
|
||||||
Titre du besoin
|
Titre du besoin
|
||||||
@ -10,7 +9,6 @@
|
|||||||
Souhaité par
|
Souhaité par
|
||||||
%th{:style => "width:100px"}
|
%th{:style => "width:100px"}
|
||||||
|
|
||||||
|
|
||||||
%tbody
|
%tbody
|
||||||
|
|
||||||
=render @needs
|
=render @needs
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
%tr{:id => need.id}
|
-css_class = 'danger' if need.refused?
|
||||||
|
|
||||||
|
%tr{:id => need.id, class: css_class}
|
||||||
%td
|
%td
|
||||||
=need.title
|
=need.title
|
||||||
%td
|
%td
|
||||||
|
=need.human_state
|
||||||
%td
|
%td
|
||||||
|
|
||||||
%td.actions{:style => "width:150px;text-align:right"}
|
%td.actions{:style => "width:150px;text-align:right"}
|
||||||
= link_to i(:"trash-o btn btn-default"), [:public, need], :data => {:confirm => 'Voulez-vous vraiment supprimer ce besoin ?'}, method: :delete
|
-if need.created? or need.refused?
|
||||||
|
= link_to i(:"trash-o btn btn-default"), [:public, need], :data => {:confirm => 'Voulez-vous vraiment supprimer ce besoin ?'}, method: :delete
|
||||||
= link_to i(:"pencil btn btn-primary"), edit_public_need_path(need)
|
= link_to i(:"pencil btn btn-primary"), edit_public_need_path(need)
|
||||||
|
@ -38,9 +38,11 @@ Rails.application.configure do
|
|||||||
|
|
||||||
# Raises error for missing translations
|
# Raises error for missing translations
|
||||||
# config.action_view.raise_on_missing_translations = true
|
# config.action_view.raise_on_missing_translations = true
|
||||||
|
|
||||||
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
|
config.action_mailer.delivery_method = :smtp
|
||||||
config.action_mailer.delivery_method = :file
|
config.action_mailer.smtp_settings = { address: "localhost", port: 1025 }
|
||||||
|
config.action_mailer.default_url_options = { host: 'rails-144740.nitrousapp.com', port: 3000}
|
||||||
|
|
||||||
|
|
||||||
HOSTNAME="localhost:3000"
|
HOSTNAME="localhost:3000"
|
||||||
end
|
end
|
||||||
|
@ -235,12 +235,16 @@ Rails.application.routes.draw do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
resources :needs do
|
||||||
|
member do
|
||||||
|
get :validate
|
||||||
|
get :refuse
|
||||||
|
end
|
||||||
|
end
|
||||||
resources :customers do
|
resources :customers do
|
||||||
member do
|
member do
|
||||||
get :validate
|
get :validate
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
resources :categories do
|
resources :categories do
|
||||||
|
5
db/migrate/20151201090113_add_state_field_to_needs.rb
Normal file
5
db/migrate/20151201090113_add_state_field_to_needs.rb
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
class AddStateFieldToNeeds < ActiveRecord::Migration
|
||||||
|
def change
|
||||||
|
add_column :needs, :state, :string
|
||||||
|
end
|
||||||
|
end
|
@ -11,7 +11,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema.define(version: 20151130173626) do
|
ActiveRecord::Schema.define(version: 20151201090113) do
|
||||||
|
|
||||||
create_table "admins", force: :cascade do |t|
|
create_table "admins", force: :cascade do |t|
|
||||||
t.string "name", limit: 255
|
t.string "name", limit: 255
|
||||||
@ -389,6 +389,7 @@ ActiveRecord::Schema.define(version: 20151130173626) do
|
|||||||
t.datetime "updated_at", null: false
|
t.datetime "updated_at", null: false
|
||||||
t.integer "author_id", limit: 4
|
t.integer "author_id", limit: 4
|
||||||
t.datetime "deleted_at"
|
t.datetime "deleted_at"
|
||||||
|
t.string "state", limit: 255
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "needs", ["author_id"], name: "index_needs_on_author_id", using: :btree
|
add_index "needs", ["author_id"], name: "index_needs_on_author_id", using: :btree
|
||||||
|
Loading…
x
Reference in New Issue
Block a user