Fix displaying of images. #432
This commit is contained in:
parent
32c83aa40c
commit
7aed20019c
2 changed files with 75 additions and 12 deletions
|
|
@ -1508,25 +1508,25 @@ class CMBJobOrderHandler implements JobOrderHandlerInterface
|
|||
$a_other_images = $jo_extra->getAfterOtherImages();
|
||||
|
||||
if ($b_speed_img != null)
|
||||
$pic_array[] = $b_speed_img;
|
||||
$pic_array['before_speed_img'] = $b_speed_img;
|
||||
if ($a_speed_img != null)
|
||||
$pic_array[] = $a_speed_img;
|
||||
$pic_array['after_speed_img'] = $a_speed_img;
|
||||
if ($b_plate_img != null)
|
||||
$pic_array[] = $b_plate_img;
|
||||
$pic_array['before_plate_img'] = $b_plate_img;
|
||||
if ($a_plate_img != null)
|
||||
$pic_array[] = $a_plate_img;
|
||||
$pic_array['after_plate_img'] = $a_plate_img;
|
||||
if ($b_batt_img != null)
|
||||
$pic_array[] = $b_batt_img;
|
||||
$pic_array['before_batt_img'] = $b_batt_img;
|
||||
if ($a_batt_img != null)
|
||||
$pic_array[] = $a_batt_img;
|
||||
$pic_array['after_batt_img'] = $a_batt_img;
|
||||
|
||||
foreach($b_other_images as $b_img)
|
||||
{
|
||||
$pic_array[] = $b_img;
|
||||
$pic_array['b_other_images'][] = $b_img;
|
||||
}
|
||||
foreach ($a_other_images as $a_img)
|
||||
{
|
||||
$pic_array[] = $a_img;
|
||||
$pic_array['a_other_images'][] = $a_img;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -508,11 +508,74 @@
|
|||
</div>
|
||||
<div class="form-group m-form__group row">
|
||||
<div class="col-lg-12">
|
||||
<label data-field="picture">Pictures</label>
|
||||
{% for picture in jo_pictures %}
|
||||
<div class="portrait-box" style="background-image: url('{{ '/uploads/jo_extra/' ~ picture }}');" ></div>
|
||||
{% endfor %}
|
||||
<label> Pictures </label>
|
||||
</div>
|
||||
{% for key, picture in jo_pictures %}
|
||||
{% if key == 'before_speed_img' %}
|
||||
<div class="col-lg-2">
|
||||
<label> Speedometer before Service </label>
|
||||
<div class="portrait-box" style="background-image: url('{{ '/uploads/jo_extra/' ~ picture }}');" ></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if key == 'after_speed_img' %}
|
||||
<div class="col-lg-2">
|
||||
<label> Speedometer after Service </label>
|
||||
<div class="portrait-box" style="background-image: url('{{ '/uploads/jo_extra/' ~ picture }}');" ></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if key == 'before_plate_img' %}
|
||||
<div class="col-lg-2">
|
||||
<label> Plate Number before Service </label>
|
||||
<div class="portrait-box" style="background-image: url('{{ '/uploads/jo_extra/' ~ picture }}');" ></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if key == 'after_plate_img' %}
|
||||
<div class="col-lg-2">
|
||||
<label> Plate Number after Service </label>
|
||||
<div class="portrait-box" style="background-image: url('{{ '/uploads/jo_extra/' ~ picture }}');" ></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if key == 'before_batt_img' %}
|
||||
<div class="col-lg-2">
|
||||
<label> Battery before Service </label>
|
||||
<div class="portrait-box" style="background-image: url('{{ '/uploads/jo_extra/' ~ picture }}');" ></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if key == 'after_batt_img' %}
|
||||
<div class="col-lg-2">
|
||||
<label> Battery after Service </label>
|
||||
<div class="portrait-box" style="background-image: url('{{ '/uploads/jo_extra/' ~ picture }}');" ></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="form-group m-form__group row">
|
||||
<div class="col-lg-12">
|
||||
<label> Other Images before Service</label>
|
||||
</div>
|
||||
{% for key, picture in jo_pictures %}
|
||||
{% if key == 'b_other_images' %}
|
||||
{% for pic in jo_pictures['b_other_images'] %}
|
||||
<div class="col-lg-2">
|
||||
<div class="portrait-box" style="background-image: url('{{ '/uploads/jo_extra/' ~ pic }}');" ></div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="form-group m-form__group row">
|
||||
<div class="col-lg-12">
|
||||
<label> Other Images after Service</label>
|
||||
</div>
|
||||
{% for key, picture in jo_pictures %}
|
||||
{% if key == 'a_other_images' %}
|
||||
{% for pic in jo_pictures['a_other_images'] %}
|
||||
<div class="col-lg-2">
|
||||
<div class="portrait-box" style="background-image: url('{{ '/uploads/jo_extra/' ~ pic }}');" ></div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Reference in a new issue