51 lines
No EOL
3 KiB
JavaScript
51 lines
No EOL
3 KiB
JavaScript
{% load offeroptions %}
|
|
!(function(){
|
|
|
|
var myTabella = new Tabella(
|
|
document.getElementById('offers'),
|
|
{
|
|
from: "",
|
|
tableHeader: [
|
|
{% for offer in object_list %}['{{ offer.roomcategory.establishment.name }}<br/>{% if offer.roomcategory.establishment.image %}<br/><img onclick="$(\'#gallery{{ offer.id }}\').modal(\'show\');" style="max-height:100px;max-width:100%;" src="{{ offer.roomcategory.establishment.image.url }}"></img>{% endif %}'],{% endfor %}
|
|
],
|
|
rows : [
|
|
{
|
|
rowVal: [
|
|
[{% for offer in object_list %}'{{ offer.inquiry.arrival }}',{% endfor %}],
|
|
[{% for offer in object_list %}'{{ offer.departure }}',{% endfor %}],
|
|
[{% for offer in object_list %}'{{ offer.nights }} Nächte',{% endfor %}]
|
|
],
|
|
rowDesc: ["Anreise", "Abreise", "Dauer"]
|
|
},
|
|
{
|
|
rowVal: [
|
|
[{% for offer in object_list %}'{% autoescape off %}{% stars offer.roomcategory.establishment.stars offer.roomcategory.establishment.superior orange %}{% endautoescape %}',{% endfor %}],
|
|
[{% for offer in object_list %}{% autoescape off %}'{% hearts 3 red %} (304)'{% endautoescape %},{% endfor %}]
|
|
],
|
|
rowDesc: ["Sterne", "Bewertungen"]
|
|
},
|
|
{
|
|
rowVal: [
|
|
[{% for offer in object_list %}'{{ offer.roomcategory.name }}',{% endfor %}],
|
|
[{% for offer in object_list %}' ',{% endfor %}]
|
|
],
|
|
rowDesc: ["Zimmerkategorie", "Betten"]
|
|
},
|
|
{
|
|
rowVal: [
|
|
[{% for offer in object_list %}'<i class="fas fa-wifi" title="WLAN"></i><i class="fas fa-parking" title="Parkplätze"></i><i class="fas fa-hand-sparkles" title="Desinfektionsmittel"></i>',{% endfor %}],
|
|
[{% for offer in object_list %}'{{ offer.distance | floatformat:1 }} km',{% endfor %}],
|
|
[{% for offer in object_list %}'{% if offer.comment %}{{ offer.comment }}{% else %} {% endif %}',{% endfor %}]
|
|
],
|
|
rowDesc: ["Ausstattung", "Distanz zum Wunschort", "Zusätzliche Angaben"]
|
|
},
|
|
{
|
|
rowVal: [
|
|
[{% for offer in object_list %}'€ {{ offer.inquiry.budget }}',{% endfor %}],
|
|
[{% for offer in object_list %}'<button data-offer-uuid="{{ offer.uuid }}" data-offer-name="{{ offer.roomcategory.establishment.name }}" data-toggle="modal" data-target="#accept-offer" class="btn btn-orange btn-block accept-button">Angebot annehmen!</button>',{% endfor %}]
|
|
],
|
|
rowDesc: ["Fixpreis", ""]
|
|
}
|
|
]
|
|
});
|
|
})(); |