summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhorus2021-01-07 23:57:41 +0100
committerhorus2021-01-07 23:57:41 +0100
commit98742438f33b79a3c9daa978b77088c8cab215ba (patch)
tree04fa1253a2f5a872176f1bd620885f62a43ef638
parentbbd59f395e162b2c80f83aa1ea3cf1a63e436ad5 (diff)
downloadkategorischeraperitif-98742438f33b79a3c9daa978b77088c8cab215ba.tar.gz
Minor improvement to search layout and labels seller.
-rw-r--r--app/Http/Controllers/SearchController.php9
-rw-r--r--resources/views/offers.blade.php10
2 files changed, 16 insertions, 3 deletions
diff --git a/app/Http/Controllers/SearchController.php b/app/Http/Controllers/SearchController.php
index 48a5c2f..315b21e 100644
--- a/app/Http/Controllers/SearchController.php
+++ b/app/Http/Controllers/SearchController.php
@@ -63,8 +63,13 @@ class SearchController extends Controller {
if ( "" != $request->get('type') ) {
$query = $request->get('type');
$data = $data->where('spirit_type', '=', $request->get('type'));
- $title = "Suche nach " . ucwords($request->get('type'));
- }
+ $title = "Alle " . ucwords($request->get('type')) . "-Angebote";
+ } else
+ if ( "" != $request->get('shop') ) {
+ $query = $request->get('shop');
+ $data = $data->where('shop', '=', $request->get('shop'));
+ $title = "Alle Angebote von " . ucwords($request->get('shop'));
+ } else
if ( "" != $request->get('q') ) {
$query = $request->get("q");
$q = "%" . Utility::escapeLike($query) . "%";
diff --git a/resources/views/offers.blade.php b/resources/views/offers.blade.php
index eeff26e..b133ba9 100644
--- a/resources/views/offers.blade.php
+++ b/resources/views/offers.blade.php
@@ -17,7 +17,15 @@
<div class="col-md-8 px-10">
<div class="card-header">
<p><strong>
- <a style="color: inherit;" href="{{ route('search', ['q' => ucwords($offer->spirit_type)]) }}" title="Alle {{ ucwords($offer->spirit_type) }} anzeigen" rel="nofollow">{{ ucwords($offer->spirit_type) }}</a> <span class="float-right">{{ $offer->shop }}</span>
+ <span class="float-left">
+ <small>&nbsp;</small><br>
+ <a style="color: inherit;" href="{{ route('search', ['type' => ucwords($offer->spirit_type)]) }}" title="Alle {{ ucwords($offer->spirit_type) }} anzeigen" rel="nofollow">{{ ucwords($offer->spirit_type) }}</a>
+ </span>
+ <span class="float-right">
+ <small>Verkauft von</small><br>
+ <a style="color: inherit;" href="{{ route('search', ['shop' => ucwords($offer->shop)]) }}" title="Alle Angebote vom Händler {{ ucwords($offer->shop) }} anzeigen" rel="nofollow">{{ ucwords($offer->shop ) }}</a>
+ </span>
+ <div style="clear: both"></div>
</strong></p>
</div>
<div class="card-block card-body px-3">