#1446 Ausgebucht anzeigen

git-svn-id: http://78.47.251.156/svn/dev/sterntours-3@3469 f459cee4-fb09-11de-96c3-f9c5f16c3c76
This commit is contained in:
adametz 2018-10-10 14:35:32 +00:00
parent b1d52d66bd
commit 0096fc88d6
2 changed files with 26 additions and 18 deletions

View file

@ -238,7 +238,7 @@
<tbody> <tbody>
{% set last_name = "" %} {% set last_name = "" %}
{% for travel_date in travel_program.travelDates if travel_date.status > 0 %} {% for travel_date in travel_program.travelDates if travel_date.status >= 0 %}
{% if last_name != travel_date.name %} {% if last_name != travel_date.name %}
{% set last_name = travel_date.name %} {% set last_name = travel_date.name %}
@ -325,12 +325,19 @@
'id': loop.index0 'id': loop.index0
} %} } %}
</td> </td>
<td data-title="Verfügbarkeit">
<div style=""> {% if travel_date.effectiveStatus == 0 %}
<img src="/images/icons/available-{{ travel_date.effectiveStatus }}.png" style="height: 24px; width: 24px;vertical-align:middle" alt=""> <td data-title="Verfügbarkeit" colspan="2">
{% if travel_date.effectiveStatus == 0 %} <div style="">
NICHT VERFÜGBAR <img src="/images/icons/available-{{ travel_date.effectiveStatus }}.png" style="height: 24px; width: 24px;vertical-align:middle" alt="">
{% endif %} AUSGEBUCHT
</div>
</td>
{% else %}
<td data-title="Verfügbarkeit">
<div style="">
<img src="/images/icons/available-{{ travel_date.effectiveStatus }}.png" style="height: 24px; width: 24px;vertical-align:middle" alt="">
{% if travel_date.effectiveStatus == 1 %} {% if travel_date.effectiveStatus == 1 %}
BUCHBAR BUCHBAR
{% endif %} {% endif %}
@ -340,17 +347,18 @@
{% if travel_date.effectiveStatus == 3 %} {% if travel_date.effectiveStatus == 3 %}
GARANTIERT GARANTIERT
{% endif %} {% endif %}
</div> </div>
</td> </td>
<td data-title=""> <td data-title="">
<a href="{{ page.urlPath ~ '/buchen?nr=' ~ travel_date.name }}" <a href="{{ page.urlPath ~ '/buchen?nr=' ~ travel_date.name }}"
class="btn btn-primary" class="btn btn-primary"
rel="nofollow" rel="nofollow"
> >
ANFRAGEN ANFRAGEN
</a> </a>
</td> </td>
{% endif %}
</tr> </tr>
{% endif %} {% endif %}

View file

@ -57,7 +57,7 @@ class TravelPeriodRepository extends \Doctrine\ORM\EntityRepository
$qb->addSelect('d'); $qb->addSelect('d');
$qb->where("((p.isSeason = 0 AND d.startDate >= '$startDateStr' AND d.endDate <= '$endDateStr') OR". $qb->where("((p.isSeason = 0 AND d.startDate >= '$startDateStr' AND d.endDate <= '$endDateStr') OR".
" (p.isSeason = 1 AND d.endDate >= '$startDateStr' AND". " (p.isSeason = 1 AND d.endDate >= '$startDateStr' AND".
" DATE_ADD(d.startDate, tp.programDuration, 'DAY') <= '$endDateStr' AND p.status > 0))"); " DATE_ADD(d.startDate, tp.programDuration, 'DAY') <= '$endDateStr' AND p.status >= 0))");
// Prices // Prices
// Instead of a single join to prices we add one join per price type. This reduces the execution time by // Instead of a single join to prices we add one join per price type. This reduces the execution time by