summaryrefslogtreecommitdiff
path: root/site/resources/views/wpoffer.blade.php
diff options
context:
space:
mode:
Diffstat (limited to 'site/resources/views/wpoffer.blade.php')
-rw-r--r--site/resources/views/wpoffer.blade.php104
1 files changed, 104 insertions, 0 deletions
diff --git a/site/resources/views/wpoffer.blade.php b/site/resources/views/wpoffer.blade.php
new file mode 100644
index 0000000..3243b26
--- /dev/null
+++ b/site/resources/views/wpoffer.blade.php
@@ -0,0 +1,104 @@
+<?php
+if ( !$data->count() ) {
+ /* Keine Angebote */
+?>
+<div class="alert alert-secondary" data-track-content data-content-name="{{ ucfirst($spirit_type) }}" data-content-piece="Keine Angebote" data-content-target="">
+ <h4 class="alert-heading">Keine Angebote</h4>
+ Momentan liegen keine {{ $title }} vor. Probieren Sie es später noch einmal.
+</div>
+<?php
+ /* Ende Keine Angebote */
+} else {
+ /* Liste Angebote */
+
+?>
+
+@include('snippets.wpsortbuttons')
+<?php
+ foreach( $data as $offer) {
+?>
+
+ <div class="card">
+ <div class="row ">
+ <div class="col-md-4">
+<?php
+if ( "Drankdozijn" == $offer->shop ) {
+ $img_style = 'style="padding-top: 0.75rem;"';
+ $badge_style = 'style="margin-bottom: 150% !important;"';
+ $badge_style = 'style="top: 0 !important;"';
+ #$badge_style = "";
+} else {
+ $img_style = "";
+ $badge_style = "";
+?>
+ <div class="card-header-dp-none">
+ <p><strong>
+ <span style="visibility: hidden;">
+ {{ ucfirst($spirit_type) }} <span class="float-right">{{ $offer->shop }}</span>
+ </span>
+ </strong></p>
+ </div>
+<?php
+}
+?>
+ <div class="card-img-overlay card-img-overlay-badge" {!! $badge_style !!}>
+ <p class="card-text float-right rounded off-badge" {!! $badge_style !!}>{{ $offer->procent}}%</p>
+ </div>
+ <img src="{{ $offer->image_url}}" class="w-100 card-img" {!! $img_style !!}>
+ </div>
+ <div class="col-md-8 px-10">
+ <div class="card-header">
+ <p><strong>
+ {{ ucfirst($spirit_type) }} <span class="float-right">{{ $offer->shop }}</span>
+ </strong></p>
+ </div>
+ <div class="card-block card-body px-3">
+ <h3 class="card-title">{{ $offer->name }}</h3>
+ <div class="row">
+ <p class="card-text col-md-6">
+ Preis: {{ TF::fF($offer->discounted_price) }} €
+ <br>
+ Alter Preis: {{ TF::fF($offer->original_price) }} €
+ <br>
+<?php
+ if ( "" != $offer->free_shipping ) {
+ # todo: remove € sign from $free_shipping variable
+ $free_shipping = str_replace("€", "", $offer->free_shipping);
+?>
+ Versand: {{ TF::fF($offer->shipping_costs) }} €, gratis ab {{ $free_shipping }} €
+<?php
+ } else {
+?>
+ Versand ist nie kostenlos
+<?php
+ }
+?>
+ </p>
+ <p class="card-text col-md-6">
+ Alkohol: {{ TF::fF($offer->abv) . " %" }}
+ <br>
+ Volumen: {{ TF::fF($offer->volume) . " Liter" }}
+ <br>
+ {{ TF::fF($offer->base_price ) }} € / Liter
+ </p>
+ </div>
+ </div>
+ <div class="card-footer">
+ <a href="{{ $offer->url }}" class="btn btn-primary">Zum Shop</a>
+ <p class="float-right">Preis vom {{ strftime("%d. %B", $offer->created_at) }}</p>
+ </div>
+ </div>
+
+ </div>
+ </div>
+<?php
+}
+?>
+
+{{ $data->appends(Input::except('page'))->links() }}
+
+<?php
+ /* Ende Liste Angebote */
+}
+
+?>