JourneyJoker/templates/auction/offer_table.js

48 lines
2.3 KiB
JavaScript
Raw Normal View History

2021-04-15 16:10:31 +00:00
{% load offeroptions %}
!(function(){
var myTabella = new Tabella(
document.getElementById('offers'),
{
2021-04-15 16:10:31 +00:00
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 %}]
],
2021-04-15 16:10:31 +00:00
rowDesc: ["Anreise", "Abreise", "Dauer"]
},
{
rowVal: [
[{% for offer in object_list %}{% autoescape off %}'{% hearts 3 red %} (304)'{% endautoescape %},{% endfor %}]
],
2021-04-15 16:10:31 +00:00
rowDesc: ["Bewertungen"]
},
{
rowVal: [
[{% for offer in object_list %}'{{ offer.roomcategory.name }}',{% endfor %}],
[{% for offer in object_list %}'&nbsp;',{% endfor %}]
],
2021-04-15 16:10:31 +00:00
rowDesc: ["Zimmerart", "Betten"]
},
{
rowVal: [
[{% for offer in object_list %}'{{ offer.comment }}',{% endfor %}]
],
2021-04-15 16:10:31 +00:00
rowDesc: ["Zusätzliche Angaben"]
},
{
rowVal: [
[{% for offer in object_list %}'€ {{ offer.inquiry.budget }}',{% endfor %}],
[{% for offer in object_list %}'<a href="#{{ offer.uuid }}" class="btn btn-orange btn-block">Zahlungspflichtig buchen!</button>',{% endfor %}]
2021-04-15 16:10:31 +00:00
],
rowDesc: ["Fixpreis", ""]
}
]
});
})();