[IMP] pos_restaurant: responsive restaurant floor plan & hide floor selector when there is only one floor available
This commit is contained in:
committed by
Frédéric van der Essen
parent
1b77ed2603
commit
604630abb5
@@ -43,10 +43,18 @@
|
||||
flex: 1;
|
||||
position: relative;
|
||||
width: auto;
|
||||
background: rgba(0,0,0,0.1);
|
||||
background: #D8D7D7;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 1024px) {
|
||||
.floor-map {
|
||||
margin: 8px;
|
||||
border-radius: 3px;
|
||||
border: dashed 1px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
}
|
||||
|
||||
.floor-map .table{
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
|
||||
@@ -39,16 +39,18 @@
|
||||
<t t-name="FloorScreenWidget">
|
||||
<div class='floor-screen screen'>
|
||||
<div class='screen-content-flexbox'>
|
||||
<div class='floor-selector'>
|
||||
<t t-foreach="widget.pos.floors" t-as="floor">
|
||||
<t t-if="floor.id === widget.floor.id">
|
||||
<span class='button button-floor active' t-att-data-id="floor.id"><t t-esc="floor.name" /></span>
|
||||
<t t-if='widget.pos.floors.length > 1'>
|
||||
<div class='floor-selector'>
|
||||
<t t-foreach="widget.pos.floors" t-as="floor">
|
||||
<t t-if="floor.id === widget.floor.id">
|
||||
<span class='button button-floor active' t-att-data-id="floor.id"><t t-esc="floor.name" /></span>
|
||||
</t>
|
||||
<t t-if="floor.id !== widget.floor.id">
|
||||
<span class='button button-floor' t-att-data-id="floor.id"><t t-esc="floor.name" /></span>
|
||||
</t>
|
||||
</t>
|
||||
<t t-if="floor.id !== widget.floor.id">
|
||||
<span class='button button-floor' t-att-data-id="floor.id"><t t-esc="floor.name" /></span>
|
||||
</t>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
</t>
|
||||
<div class='floor-map' t-att-style='widget.floor.background_image ? ("background-image:url("+widget.background_image_url(widget.floor)+");") :"" '>
|
||||
<span class='edit-button editing'><i class='fa fa-pencil'></i></span>
|
||||
<div class='edit-bar oe_hidden'>
|
||||
|
||||
Reference in New Issue
Block a user