48 lines
No EOL
2.4 KiB
JavaScript
48 lines
No EOL
2.4 KiB
JavaScript
{% load offeroptions %}
|
|
!(function(){
|
|
|
|
var myTabella = new Tabella(
|
|
document.getElementById('offers'),
|
|
{
|
|
from: "",
|
|
tableHeader: [
|
|
{% for offer in object_list %}['{{ offer.roomcategory.establishment.name }}<br/>{% autoescape off %}{% stars offer.roomcategory.establishment.stars offer.roomcategory.establishment.superior orange %}{% endautoescape %}{% if offer.roomcategory.establishment.image %}<br/><img 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 %}'{% hearts 3 red %} (304)'{% endautoescape %},{% endfor %}]
|
|
],
|
|
rowDesc: ["Bewertungen"]
|
|
},
|
|
{
|
|
rowVal: [
|
|
[{% for offer in object_list %}'{{ offer.roomcategory.name }}',{% endfor %}],
|
|
[{% for offer in object_list %}' ',{% endfor %}]
|
|
],
|
|
rowDesc: ["Zimmerart", "Betten"]
|
|
},
|
|
{
|
|
rowVal: [
|
|
[{% for offer in object_list %}'{{ offer.comment }}',{% endfor %}]
|
|
],
|
|
rowDesc: ["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", ""]
|
|
}
|
|
]
|
|
});
|
|
})(); |