UI improvement
This commit is contained in:
parent
95b1c8b319
commit
78ef91c204
@ -15,6 +15,38 @@
|
||||
.info{
|
||||
color:rgb(163, 159, 159);
|
||||
}
|
||||
.state{
|
||||
position:absolute;
|
||||
top:0px;
|
||||
right:0px;
|
||||
color:white;
|
||||
padding:4px;
|
||||
padding-left:8px;
|
||||
padding-right:8px;
|
||||
}
|
||||
|
||||
.state-success{
|
||||
background-color:#5cb85c;
|
||||
}
|
||||
.state-danger{
|
||||
background-color:#d9534f;
|
||||
}
|
||||
.state-info{
|
||||
background-color:#428bca;
|
||||
}
|
||||
.state-warning{
|
||||
background-color:#f0ad4e;
|
||||
}
|
||||
.offer{
|
||||
display:block;
|
||||
background: #eeeded;
|
||||
padding:10px;
|
||||
margin-bottom:5px;
|
||||
.price{
|
||||
font-size:25px;
|
||||
font-weight:bold;
|
||||
}
|
||||
}
|
||||
|
||||
p.description{
|
||||
margin-bottom:30px;
|
||||
@ -23,7 +55,10 @@
|
||||
.message-item{
|
||||
background: #eeeded;
|
||||
}
|
||||
|
||||
.content{
|
||||
position:relative;
|
||||
padding-bottom:50px;
|
||||
}
|
||||
.counters{
|
||||
position:absolute;
|
||||
left:0px;
|
||||
|
@ -1,5 +1,26 @@
|
||||
.center.white
|
||||
.show-need
|
||||
.center.white.show-need
|
||||
.top-left-info
|
||||
-if @need.verified?
|
||||
%span.state.state-info.pull-right
|
||||
=@need.human_state
|
||||
-elsif @need.negociating?
|
||||
%span.state.state-warning.pull-right
|
||||
=@need.human_state
|
||||
-elsif @need.failed?
|
||||
%span.state.state-danger.pull-right
|
||||
=@need.human_state
|
||||
-elsif @need.negociated?
|
||||
%span.state.state-success.pull-right
|
||||
-offers = @need.offers.order(price: :asc)
|
||||
-if offers.size > 1
|
||||
Négocié à partir de
|
||||
%strong="#{number_to_currency(offers.first.price, locale: :fr)}"
|
||||
-elsif offers.size == 1
|
||||
Négocié à
|
||||
%strong="#{number_to_currency(offers.first.price, locale: :fr)}"
|
||||
-else
|
||||
Négocié
|
||||
.content
|
||||
%h1= @need.title.upcase
|
||||
|
||||
-if @need.author
|
||||
@ -30,7 +51,19 @@
|
||||
=link_to i(:"check") + " Intéressé", wish_public_need_path(@need) , :class => "btn btn-square btn-lg btn-success pull-right"
|
||||
-else
|
||||
=link_to i(:"hand-paper-o") + " Ça m'intéresse !", wish_public_need_path(@need) , :class => "btn btn-square btn-lg btn-primary pull-right"
|
||||
-elsif @need.negociated
|
||||
-elsif @need.negociated?
|
||||
-if @need.offers.length > 0
|
||||
%h2 Les offres négociées
|
||||
-@need.offers.each do |offer|
|
||||
.offer
|
||||
.supplier
|
||||
Négocié avec le fournisseur
|
||||
%strong= offer.supplier
|
||||
.price
|
||||
=number_to_currency(offer.price, locale: :fr)
|
||||
=link_to "Acheter", "", class: "btn btn-success pull-right"
|
||||
|
||||
|
||||
|
||||
.clear
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user