Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
elloha
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Bolt Extensions
elloha
Commits
f629746a
Commit
f629746a
authored
Nov 13, 2018
by
Van
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(all): update fields
parent
e5f95cd5
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
361 additions
and
125 deletions
+361
-125
SearchController.php
src/Controller/Frontend/SearchController.php
+51
-14
EllohaExtension.php
src/EllohaExtension.php
+4
-1
ResaType.php
src/Form/ResaType.php
+2
-0
EllohaRequest.php
src/Request/EllohaRequest.php
+3
-3
QueryBuilder.php
src/Storage/QueryBuilder.php
+0
-1
results.html.twig
templates/Frontend/search/results.html.twig
+301
-106
No files found.
src/Controller/Frontend/SearchController.php
View file @
f629746a
...
...
@@ -46,6 +46,7 @@ class SearchController extends Base
public
function
search
()
{
$formData
=
$this
->
app
[
'request'
]
->
request
->
get
(
'resa'
);
dump
(
$formData
);
$this
->
_saveBaseFormData
();
try
{
...
...
@@ -55,39 +56,75 @@ class SearchController extends Base
;
}
finally
{
$idsProduct
=
$this
->
ellohaRequest
->
getIdProducts
();
$results
=
$this
->
_searchReservableContents
(
$idsProduct
);
$hotels
=
(
!
$results
[
'hotels'
])
?
[]
:
$results
[
'hotels'
];
$locatifs_meubles
=
(
isset
(
$results
[
'locatifs-meubles'
]))
?
$results
[
'locatifs-meubles'
]
:
[];
$hebergements_collectifs
=
(
isset
(
$results
[
'hebergements-collectifs'
]))
?
$results
[
'hebergements-collectifs'
]
:
[];
$results
=
$this
->
_searchReservableContents
(
$idsProduct
,
$formData
);
return
$this
->
render
(
'@elloha/Frontend/search/results.html.twig'
,
[
'records'
=>
[
'hotels'
=>
$hotels
,
'locatifs_meubles'
=>
$locatifs_meubles
,
'hebergements_collectifs'
=>
$hebergements_collectifs
]
'results'
=>
$results
]);
}
}
/**
* @param array $idsProduct
* @param array $formData
* @return array
* Search foreach contenttypes records where idsProduct is in the array
*/
private
function
_searchReservableContents
(
array
$idsProduct
=
[])
private
function
_searchReservableContents
(
array
$idsProduct
=
[]
,
array
$formData
=
[]
)
{
$results
=
[];
$ids
=
implode
(
' || '
,
$idsProduct
);
$reservables
=
[];
$contentsSearchable
=
$this
->
_getSearchableContents
();
dump
(
key
(
$contentsSearchable
));
dump
(
$contentsSearchable
[]);
if
(
in_array
(
$formData
[
'Type'
],
$contentsSearchable
)){
dump
(
"BOOOOOOOOOOOUUUYAH"
);
}
foreach
(
$this
->
_getSearchableContents
()
as
$content
)
{
$records
=
$this
->
app
[
'storage'
]
->
getContent
(
$content
[
'slug'
],
[
'resacode'
=>
$ids
,
'returnsingle'
=>
false
]);
$res
ult
s
[
$content
[
'slug'
]]
=
$records
;
$res
ervable
s
[
$content
[
'slug'
]]
=
$records
;
}
$nonReservables
=
$this
->
_getNonReservablesRecords
(
$reservables
);
$results
[
'reservables'
]
=
$reservables
;
$results
[
'nonreservables'
]
=
$nonReservables
;
return
$results
;
}
/**
* @param array $reservables
* @return array
*/
protected
function
_getNonReservablesRecords
(
array
$reservables
=
[])
{
$nonReservables
=
[];
foreach
(
$this
->
_getSearchableContents
()
as
$content
)
{
$query
=
'SELECT id FROM '
.
$this
->
getContenttypeTablename
(
$content
[
'slug'
]);
$idsReservable
=
array_keys
(
$reservables
[
$content
[
'slug'
]]);
if
(
!
empty
(
$idsReservable
))
{
$idsReservableString
=
implode
(
', '
,
$idsReservable
);
$query
.=
' WHERE id NOT IN ('
.
$idsReservableString
.
')'
;
}
$rows
=
$this
->
app
[
'db'
]
->
fetchAll
(
$query
);
$idsNonReservable
=
array_map
(
function
(
$rows
)
{
return
$rows
[
'id'
];
},
$rows
);
$records
=
$this
->
app
[
'storage'
]
->
getContent
(
$content
[
'slug'
],
[
'id'
=>
implode
(
' || '
,
$idsNonReservable
),
'returnsingle'
=>
false
]);
$nonReservables
[
$content
[
'slug'
]]
=
$records
;
}
return
$nonReservables
;
}
/**
* @return array
* Get the define searchable table
*/
...
...
@@ -96,7 +133,6 @@ class SearchController extends Base
foreach
(
$this
->
config
[
'searchable_contenttypes'
]
as
$contenttype
)
{
$tables
[]
=
$this
->
getContenttypeTablename
(
$contenttype
);
}
return
$tables
;
}
...
...
@@ -107,7 +143,8 @@ class SearchController extends Base
protected
function
_getSearchableContents
(){
$contents
=
[];
foreach
(
$this
->
config
[
'searchable_contenttypes'
]
as
$contenttype
)
{
$contents
[]
=
$this
->
getContenttype
(
$contenttype
);
/*$contents[$contenttype] = $this->getContenttype($contenttype);*/
$contents
[
$contenttype
]
=
$this
->
getContenttype
(
$contenttype
);
}
return
$contents
;
}
...
...
src/EllohaExtension.php
View file @
f629746a
...
...
@@ -115,7 +115,10 @@ class EllohaExtension extends SimpleExtension
protected
function
_getResaTypesForOptions
()
{
$types
=
[];
foreach
(
$this
->
getConfig
()[
'resa_types'
]
as
$key
=>
$value
)
{
/*foreach ($this->getConfig()['resa_types'] as $key => $value) {
$types[$key] = (isset($value['label'])) ? $value['label'] : 'Non défini';
}*/
foreach
(
$this
->
getConfig
()[
'resa_content'
]
as
$key
=>
$value
)
{
$types
[
$key
]
=
(
isset
(
$value
[
'label'
]))
?
$value
[
'label'
]
:
'Non défini'
;
}
return
$types
;
...
...
src/Form/ResaType.php
View file @
f629746a
...
...
@@ -32,6 +32,7 @@ class ResaType extends AbstractType
'class'
=>
'main control-label col-xs-12'
],
'choices'
=>
array_merge
([
null
=>
'Tous les hébergements'
],
$options
[
'resaTypes'
])
])
->
add
(
'StartDate'
,
...
...
@@ -83,6 +84,7 @@ class ResaType extends AbstractType
{
$resolver
->
setDefaults
([
'resaTypes'
=>
null
]);
}
...
...
src/Request/EllohaRequest.php
View file @
f629746a
...
...
@@ -55,7 +55,7 @@ class EllohaRequest
public
function
setData
(
array
$data
=
[])
{
$this
->
setType
(
$data
[
'Type'
])
/*->setType($data['Type'])*/
->
setStartDate
((
$data
[
'StartDate'
]))
->
setEndDate
(
$data
[
'EndDate'
])
->
setAdultNumber
(
$data
[
'AdultNumber'
])
...
...
@@ -69,9 +69,9 @@ class EllohaRequest
*/
public
function
getData
()
{
$data
=
[];
if
(
$this
->
getType
())
{
/*
if($this->getType()) {
$data['Type'] = $this->getType();
}
}
*/
if
(
$this
->
getStartDate
())
{
$data
[
'StartDate'
]
=
$this
->
getStartDate
();
}
...
...
src/Storage/QueryBuilder.php
View file @
f629746a
...
...
@@ -37,7 +37,6 @@ class QueryBuilder
$storage
=
$this
->
app
[
'storage'
];
$query
=
$this
->
_buildQuery
(
$contentType
,
$fields
);
dump
(
$query
);
if
(
!
empty
(
$query
))
{
$rows
=
$this
->
app
[
'db'
]
->
fetchAll
(
$query
);
...
...
templates/Frontend/search/results.html.twig
View file @
f629746a
...
...
@@ -13,69 +13,144 @@
{{
resaForm
(
'resaform'
)
}}
</div>
{# Hotels réservables #}
{%
if
records.hotels
is
defined
%}
{%
if
records.hotels
!=
null
%}
<h1>
Hôtels réservable
</h1>
{%
for
record
in
records.hotels
%}
{%
set
reservables
=
results.reservables
%}
{%
set
nonreservables
=
results.nonreservables
%}
{# Hotels #}
{%
if
reservables
[
'hotels'
]
or
nonreservables
[
'hotels'
]
!=
null
%}
<h2>
Hotels
</h2>
{%
if
reservables
[
'hotels'
]
!=
null
%}
<h1>
Reservable en ligne
</h1>
{%
for
record
in
reservables
[
'hotels'
]
%}
<div
class=
"col-md-2"
>
<div
class=
"card-content"
style=
"height: auto"
>
<div
class=
"pictogrammes"
style=
"float: left"
>
{%
if
record.acceshandi
==
true
%}
{# Icone + "Accessible aux personnes à mobilité réduite" #}
<img
src=
"http://tourisme-bearn-paysdenay.com/templates/otpaysdenay/img/labels/pictos/handicap.png"
style=
"height: 15px; background: #519fbd"
>
{%
endif
%}
{%
if
record.animaux
==
true
%}
{# Icone + "Animaux bienvenus" #}
<img
src=
"http://tourisme-bearn-paysdenay.com/templates/otpaysdenay/img/labels/pictos/animaux.png"
style=
"height: 15px; background: #519fbd; margin-right: 1em;"
>
{%
endif
%}
{# A customiser avec des étoiles au lieu du texte #}
{%
if
record.clas
!=
null
%}
{{
record.clas
}}
<br
/>
{%
endif
%}
{%
if
record.logisclas
!=
null
%}
{%
for
clas
in
record.logisclas
|
hashtag
%}
{{
clas
}}
{%
endfor
%}
{%
endif
%}
{%
if
record.labels
!=
null
%}
<div
class=
"labels"
>
{%
for
label
in
record.labels
|
hashtag
%}
{{
label
|
label
}}
{%
if
record.acceshandi
==
true
%}
{# Icone + "Accessible aux personnes à mobilité réduite" #}
<img
src=
"http://tourisme-bearn-paysdenay.com/templates/otpaysdenay/img/labels/pictos/handicap.png"
style=
"height: 15px; background: #519fbd"
>
{%
endif
%}
{%
if
record.animaux
==
true
%}
{# Icone + "Animaux bienvenus" #}
<img
src=
"http://tourisme-bearn-paysdenay.com/templates/otpaysdenay/img/labels/pictos/animaux.png"
style=
"height: 15px; background: #519fbd; margin-right: 1em;"
>
{%
endif
%}
{# A customiser avec des étoiles au lieu du texte #}
{%
if
record.clas
!=
null
%}
{{
record.clas
}}
<br
/>
{%
endif
%}
{%
if
record.logisclas
!=
null
%}
{%
for
clas
in
record.logisclas
|
hashtag
%}
{{
clas
}}
{%
endfor
%}
</div>
{%
endif
%}
{# Générer un icone pour chaque chaine #}
{%
if
record.chaines
!=
null
%}
{%
for
chaine
in
record.chaines
|
hashtag
%}
{{
chaine
}}
{%
endfor
%}
<br
/>
{%
endif
%}
{%
if
record.labels
!=
null
%}
<div
class=
"labels"
>
{%
for
label
in
record.labels
|
hashtag
%}
{{
label
|
label
}}
{%
endfor
%}
</div>
{%
endif
%}
{# Générer un icone pour chaque chaine #}
{%
if
record.chaines
!=
null
%}
{%
for
chaine
in
record.chaines
|
hashtag
%}
{{
chaine
}}
{%
endfor
%}
<br
/>
{%
endif
%}
{%
if
record.groupe
!=
"non"
or
record.groupe
!=
null
%}
{# Icone Groupe + "Groupes bienvenus" #}
<p>
Groupes bienvenus
</p>
{%
endif
%}
</div>
{%
if
record.photo
!=
null
%}
<img
class=
"main-photo"
src=
"
{{
record.photo
|
mainPhoto
}}
"
/>
{%
endif
%}
{%
if
record.groupe
!=
"non"
or
record.groupe
!=
null
%}
{# Icone Groupe + "Groupes bienvenus" #}
<p>
Groupes bienvenus
</p>
<div><a
href=
"
{{
record.link
}}
"
>
{{
record.nomoffre
}}
à
{{
record.commune
}}
</a></div>
{# HUBRESA #}
{%
if
products
[
record.values.syndicobjectid
]
is
defined
%}
<div
id=
"Resa"
>
<p
class=
"button"
>
{{
products
[
record.values.syndicobjectid
]
.
prix
}}
€
</p>
<a
href=
"
{{
products
[
record.values.syndicobjectid
]
.
url
}}
"
class=
"button is-primary"
>
Je réserve
</a>
</div>
{%
endif
%}
<br
/>
</div>
</div>
{%
endfor
%}
{%
endif
%}
{%
if
nonreservables
[
'hotels'
]
!=
null
%}
<h1>
Non réservable en ligne
</h1>
{%
for
record
in
nonreservables
[
'hotels'
]
%}
<div
class=
"col-md-2"
>
<div
class=
"card-content"
style=
"height: auto"
>
<div
class=
"pictogrammes"
style=
"float: left"
>
{%
if
record.acceshandi
==
true
%}
{# Icone + "Accessible aux personnes à mobilité réduite" #}
<img
src=
"http://tourisme-bearn-paysdenay.com/templates/otpaysdenay/img/labels/pictos/handicap.png"
style=
"height: 15px; background: #519fbd"
>
{%
endif
%}
{%
if
record.animaux
==
true
%}
{# Icone + "Animaux bienvenus" #}
<img
src=
"http://tourisme-bearn-paysdenay.com/templates/otpaysdenay/img/labels/pictos/animaux.png"
style=
"height: 15px; background: #519fbd; margin-right: 1em;"
>
{%
endif
%}
{# A customiser avec des étoiles au lieu du texte #}
{%
if
record.clas
!=
null
%}
{{
record.clas
}}
<br
/>
{%
endif
%}
{%
if
record.logisclas
!=
null
%}
{%
for
clas
in
record.logisclas
|
hashtag
%}
{{
clas
}}
{%
endfor
%}
{%
endif
%}
{%
if
record.labels
!=
null
%}
<div
class=
"labels"
>
{%
for
label
in
record.labels
|
hashtag
%}
{{
label
|
label
}}
{%
endfor
%}
</div>
{%
endif
%}
{# Générer un icone pour chaque chaine #}
{%
if
record.chaines
!=
null
%}
{%
for
chaine
in
record.chaines
|
hashtag
%}
{{
chaine
}}
{%
endfor
%}
<br
/>
{%
endif
%}
{%
if
record.groupe
!=
"non"
or
record.groupe
!=
null
%}
{# Icone Groupe + "Groupes bienvenus" #}
<p>
Groupes bienvenus
</p>
{%
endif
%}
</div>
{%
if
record.photo
!=
null
%}
<img
class=
"main-photo"
src=
"
{{
record.photo
|
mainPhoto
}}
"
/>
{%
endif
%}
<div><a
href=
"
{{
record.link
}}
"
>
{{
record.nomoffre
}}
à
{{
record.commune
}}
</a></div>
<div><a
href=
"
{{
record.link
}}
"
>
{{
record.nomoffre
}}
à
{{
record.commune
}}
</a></div>
{# HUBRESA #}
{%
if
products
[
record.values.syndicobjectid
]
is
defined
%}
<div
id=
"Resa"
>
<p
class=
"button"
>
{{
products
[
record.values.syndicobjectid
]
.
prix
}}
€
</p>
<a
href=
"
{{
products
[
record.values.syndicobjectid
]
.
url
}}
"
class=
"button is-primary"
>
Je réserve
</a>
</div>
{%
endif
%}
<br
/>
</div>
</div>
{%
endfor
%}
<hr>
{%
endfor
%}
{%
endif
%}
{%
endif
%}
{# Hebergements Collectifs réservables #}
{%
if
records.hebergements_collectifs
is
defined
%}
{%
if
records.hebergements_collectifs
!=
null
%}
<h1>
Hébergements collectifs réservable
</h1>
{%
for
record
in
records.hebergements_collectifs
%}
<div
class=
"col-md-2"
>
{# Hebergements Collectifs #}
{%
if
reservables
[
'hebergements-collectifs'
]
or
nonreservables
[
'hebergements-collectifs'
]
!=
null
%}
<h2>
Hébergements Collectifs
</h2>
{%
if
reservables
[
'hebergements-collectifs'
]
!=
null
%}
<h1>
Reservable en ligne
</h1>
{%
for
record
in
reservables
[
'hebergements-collectifs'
]
%}
<div
class=
"col-md-2"
>
<div
class=
"card-content"
style=
"height: auto"
>
<div
class=
"pictogrammes"
style=
"float: left"
>
{%
if
record.acceshandi
==
true
%}
...
...
@@ -131,75 +206,195 @@
<br
/>
</div>
</div>
{%
endfor
%}
<hr>
{%
endfor
%}
{%
endif
%}
{%
endif
%}
{# Locatifs meubles réservables #}
{%
if
records.locatifs_meubles
is
defined
%}
{%
if
records.locatifs_meubles
!=
null
%}
<h1>
Locatifs meublés réservable
</h1>
{%
for
record
in
records.locatifs_meubles
%}
<div
class=
"col-md-2"
>
<div
class=
"card-content"
style=
"height: auto"
>
<div
class=
"pictogrammes"
style=
"float: left"
>
{%
if
record.acceshandi
==
true
%}
{# Icone + "Accessible aux personnes à mobilité réduite" #}
<img
src=
"http://tourisme-bearn-paysdenay.com/templates/otpaysdenay/img/labels/pictos/handicap.png"
style=
"height: 15px; background: #519fbd"
>
{%
endif
%}
{%
if
record.animaux
==
true
%}
{# Icone + "Animaux bienvenus" #}
<img
src=
"http://tourisme-bearn-paysdenay.com/templates/otpaysdenay/img/labels/pictos/animaux.png"
style=
"height: 15px; background: #519fbd; margin-right: 1em;"
>
{%
endif
%}
{# A customiser avec des étoiles au lieu du texte #}
{%
if
record.clas
!=
null
%}
{{
record.clas
}}
<br
/>
{%
endif
%}
{%
if
record.logisclas
!=
null
%}
{%
for
clas
in
record.logisclas
|
hashtag
%}
{{
clas
}}
{%
endfor
%}
{%
endif
%}
{%
if
record.labels
!=
null
%}
<div
class=
"labels"
>
{%
for
label
in
record.labels
|
hashtag
%}
{{
label
|
label
}}
{%
if
nonreservables
[
'hebergements-collectifs'
]
!=
null
%}
<h1>
Non réservable en ligne
</h1>
{%
for
record
in
nonreservables
[
'hebergements-collectifs'
]
%}
<div
class=
"col-md-2"
>
<div
class=
"card-content"
style=
"height: auto"
>
<div
class=
"pictogrammes"
style=
"float: left"
>
{%
if
record.acceshandi
==
true
%}
{# Icone + "Accessible aux personnes à mobilité réduite" #}
<img
src=
"http://tourisme-bearn-paysdenay.com/templates/otpaysdenay/img/labels/pictos/handicap.png"
style=
"height: 15px; background: #519fbd"
>
{%
endif
%}
{%
if
record.animaux
==
true
%}
{# Icone + "Animaux bienvenus" #}
<img
src=
"http://tourisme-bearn-paysdenay.com/templates/otpaysdenay/img/labels/pictos/animaux.png"
style=
"height: 15px; background: #519fbd; margin-right: 1em;"
>
{%
endif
%}
{# A customiser avec des étoiles au lieu du texte #}
{%
if
record.clas
!=
null
%}
{{
record.clas
}}
<br
/>
{%
endif
%}
{%
if
record.logisclas
!=
null
%}
{%
for
clas
in
record.logisclas
|
hashtag
%}
{{
clas
}}
{%
endfor
%}
{%
endif
%}
{%
if
record.labels
!=
null
%}
<div
class=
"labels"
>
{%
for
label
in
record.labels
|
hashtag
%}
{{
label
|
label
}}
{%
endfor
%}
</div>
{%
endif
%}
{# Générer un icone pour chaque chaine #}
{%
if
record.chaines
!=
null
%}
{%
for
chaine
in
record.chaines
|
hashtag
%}
{{
chaine
}}
{%
endfor
%}
<br
/>
{%
endif
%}
{%
if
record.groupe
!=
"non"
or
record.groupe
!=
null
%}
{# Icone Groupe + "Groupes bienvenus" #}
<p>
Groupes bienvenus
</p>
{%
endif
%}
</div>
{%
if
record.photo
!=
null
%}
<img
class=
"main-photo"
src=
"
{{
record.photo
|
mainPhoto
}}
"
/>
{%
endif
%}
<div><a
href=
"
{{
record.link
}}
"
>
{{
record.nomoffre
}}
à
{{
record.commune
}}
</a></div>
{# HUBRESA #}
{%
if
products
[
record.values.syndicobjectid
]
is
defined
%}
<div
id=
"Resa"
>
<p
class=
"button"
>
{{
products
[
record.values.syndicobjectid
]
.
prix
}}
€
</p>
<a
href=
"
{{
products
[
record.values.syndicobjectid
]
.
url
}}
"
class=
"button is-primary"
>
Je réserve
</a>
</div>
{%
endif
%}
{# Générer un icone pour chaque chaine #}
{%
if
record.chaines
!=
null
%}
{%
for
chaine
in
record.chaines
|
hashtag
%}
{{
chaine
}}
{%
endfor
%}
<br
/>
<br
/>
</div>
</div>
{%
endfor
%}
{%
endif
%}
{%
endif
%}
{# Locatifs Meublés #}
{%
if
reservables
[
'locatifs-meubles'
]
or
nonreservables
[
'locatifs-meubles'
]
!=
null
%}
<h2>
Locatifs meublés
</h2>
{%
if
reservables
[
'locatifs-meubles'
]
!=
null
%}
<h1>
Reservable en ligne
</h1>
{%
for
record
in
reservables
[
'locatifs-meubles'
]
%}
<div
class=
"col-md-2"
>
<div
class=
"card-content"
style=
"height: auto"
>
<div
class=
"pictogrammes"
style=
"float: left"
>
{%
if
record.acceshandi
==
true
%}
{# Icone + "Accessible aux personnes à mobilité réduite" #}
<img
src=
"http://tourisme-bearn-paysdenay.com/templates/otpaysdenay/img/labels/pictos/handicap.png"
style=
"height: 15px; background: #519fbd"
>
{%
endif
%}
{%
if
record.animaux
==
true
%}
{# Icone + "Animaux bienvenus" #}
<img
src=
"http://tourisme-bearn-paysdenay.com/templates/otpaysdenay/img/labels/pictos/animaux.png"
style=
"height: 15px; background: #519fbd; margin-right: 1em;"
>
{%
endif
%}
{# A customiser avec des étoiles au lieu du texte #}
{%
if
record.clas
!=
null
%}
{{
record.clas
}}
<br
/>
{%
endif
%}
{%
if
record.logisclas
!=
null
%}
{%
for
clas
in
record.logisclas
|
hashtag
%}
{{
clas
}}
{%
endfor
%}
{%
endif
%}
{%
if
record.labels
!=
null
%}
<div
class=
"labels"
>
{%
for
label
in
record.labels
|
hashtag
%}
{{
label
|
label
}}
{%
endfor
%}
</div>
{%
endif
%}
{# Générer un icone pour chaque chaine #}
{%
if
record.chaines
!=
null
%}
{%
for
chaine
in
record.chaines
|
hashtag
%}
{{
chaine
}}
{%
endfor
%}
<br
/>
{%
endif
%}
{%
if
record.groupe
!=
"non"
or
record.groupe
!=
null
%}
{# Icone Groupe + "Groupes bienvenus" #}
<p>
Groupes bienvenus
</p>
{%
endif
%}
</div>
{%
if
record.photo
!=
null
%}
<img
class=
"main-photo"
src=
"
{{
record.photo
|
mainPhoto
}}
"
/>
{%
endif
%}
{%
if
record.groupe
!=
"non"
or
record.groupe
!=
null
%}
{# Icone Groupe + "Groupes bienvenus" #}
<p>
Groupes bienvenus
</p>
<div><a
href=
"
{{
record.link
}}
"
>
{{
record.nomoffre
}}
à
{{
record.commune
}}
</a></div>
{# HUBRESA #}
{%
if
products
[
record.values.syndicobjectid
]
is
defined
%}
<div
id=
"Resa"
>
<p
class=
"button"
>
{{
products
[
record.values.syndicobjectid
]
.
prix
}}
€
</p>
<a
href=
"
{{
products
[
record.values.syndicobjectid
]
.
url
}}
"
class=
"button is-primary"
>
Je réserve
</a>
</div>
{%
endif
%}
</div>
{%
if
record.photo
!=
null
%}
<img
class=
"main-photo"
src=
"
{{
record.photo
|
mainPhoto
}}
"
/>
{%
endif
%}
<div><a
href=
"
{{
record.link
}}
"
>
{{
record.nomoffre
}}
à
{{
record.commune
}}
</a></div>
{# HUBRESA #}
{%
if
products
[
record.values.syndicobjectid
]
is
defined
%}
<div
id=
"Resa"
>
<p
class=
"button"
>
{{
products
[
record.values.syndicobjectid
]
.
prix
}}
€
</p>
<a
href=
"
{{
products
[
record.values.syndicobjectid
]
.
url
}}
"
class=
"button is-primary"
>
Je réserve
</a>
<br
/>
</div>
</div>
{%
endfor
%}
{%
endif
%}
{%
if
nonreservables
[
'locatifs-meubles'
]
!=
null
%}
<h1>
Non réservable en ligne
</h1>
{%
for
record
in
nonreservables
[
'locatifs-meubles'
]
%}
<div
class=
"col-md-2"
>
<div
class=
"card-content"
style=
"height: auto"
>
<div
class=
"pictogrammes"
style=
"float: left"
>
{%
if
record.acceshandi
==
true
%}
{# Icone + "Accessible aux personnes à mobilité réduite" #}
<img
src=
"http://tourisme-bearn-paysdenay.com/templates/otpaysdenay/img/labels/pictos/handicap.png"
style=
"height: 15px; background: #519fbd"
>
{%
endif
%}
{%
if
record.animaux
==
true
%}
{# Icone + "Animaux bienvenus" #}
<img
src=
"http://tourisme-bearn-paysdenay.com/templates/otpaysdenay/img/labels/pictos/animaux.png"
style=
"height: 15px; background: #519fbd; margin-right: 1em;"
>
{%
endif
%}
{# A customiser avec des étoiles au lieu du texte #}
{%
if
record.clas
!=
null
%}
{{
record.clas
}}
<br
/>
{%
endif
%}
{%
if
record.logisclas
!=
null
%}
{%
for
clas
in
record.logisclas
|
hashtag
%}
{{
clas
}}
{%
endfor
%}
{%
endif
%}
{%
if
record.labels
!=
null
%}
<div
class=
"labels"
>
{%
for
label
in
record.labels
|
hashtag
%}
{{
label
|
label
}}
{%
endfor
%}
</div>
{%
endif
%}
{# Générer un icone pour chaque chaine #}
{%
if
record.chaines
!=
null
%}
{%
for
chaine
in
record.chaines
|
hashtag
%}
{{
chaine
}}
{%
endfor
%}
<br
/>
{%
endif
%}
{%
if
record.groupe
!=
"non"
or
record.groupe
!=
null
%}
{# Icone Groupe + "Groupes bienvenus" #}
<p>
Groupes bienvenus
</p>
{%
endif
%}
</div>
{%
endif
%}
{%
if
record.photo
!=
null
%}
<img
class=
"main-photo"
src=
"
{{
record.photo
|
mainPhoto
}}
"
/>
{%
endif
%}
<div><a
href=
"
{{
record.link
}}
"
>
{{
record.nomoffre
}}
à
{{
record.commune
}}
</a></div>
<br
/>
{# HUBRESA #}
{%
if
products
[
record.values.syndicobjectid
]
is
defined
%}
<div
id=
"Resa"
>
<p
class=
"button"
>
{{
products
[
record.values.syndicobjectid
]
.
prix
}}
€
</p>
<a
href=
"
{{
products
[
record.values.syndicobjectid
]
.
url
}}
"
class=
"button is-primary"
>
Je réserve
</a>
</div>
{%
endif
%}
<br
/>
</div>
</div>
</div>
{%
endfor
%}
<hr>
{%
endfor
%}
{%
endif
%}
{%
endif
%}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment