Skip to content
Snippets Groups Projects
Commit c9bc38d8 authored by Phil Höfer's avatar Phil Höfer
Browse files

Merge branch '747-feld-fur-preise-in-der-produktsuche' into 'development'

Resolve "Feld für Preise in der Produktsuche"

Closes #747

See merge request !1251
parents f1d8f68d 0dbfba49
No related branches found
No related tags found
2 merge requests!1262WIP: Resolve "Spendenseite Texte anpassen",!1251Resolve "Feld für Preise in der Produktsuche"
......@@ -65,9 +65,22 @@ class Result
$this->partnershop = isset($additionalInformation["partnershop"]) ? $additionalInformation["partnershop"] : false;
$this->image = isset($additionalInformation["image"]) ? $additionalInformation["image"] : "";
$this->price = isset($additionalInformation["price"]) ? $additionalInformation["price"] : 0;
$this->price_text = $this->price_to_text($this->price);
$this->additionalInformation = $additionalInformation;
}
private function price_to_text($price)
{
$euros = $price / 100;
$cents = $price % 100;
$price_text = $euros . ',';
if ($cents < 10) {
$price_text .= '0';
}
$price_text .= $cents . ' €';
return $price_text;
}
/* Ranked das Ergebnis nach folgenden Aspekten:
* Startwert 0
* + 0.02 * Sourcerank (20 - Position in Ergebnisliste des Suchanbieters)
......
......@@ -14,7 +14,16 @@
justify-content: space-between;
.result-title {
margin: 0px;
&>* {
font-size: @result-font-large;
}
.overflow-ellipsis;
.result-price {
padding: 0px 10px;
color: white;
background-color: #ff8000;
border-radius: 3px;
}
a {
&,
&:active,
......@@ -23,7 +32,6 @@
&:visited {
color: black;
text-decoration: none;
font-size: @result-font-large;
}
}
}
......@@ -50,10 +58,23 @@
}
}
}
.resultpage-body {
.result-body {
margin-top: 10px;
width: 90%;
display: flex;
text-align: justify;
.result-image {
width: 180px;
padding-right: 10px;
margin-right: 10px;
& img {
display: block;
max-width: 160px;
max-height: 120px;
width: auto;
height: auto;
}
}
.result-description {
margin-bottom: 3px;
word-break: break-word;
......@@ -79,11 +100,6 @@
border: solid 1px @result-description-img-border-color;
}
}
.result-image>img {
height: 100px;
padding: 10px;
max-width: 100%;
}
}
.result-footer {
margin-top: 10px;
......
......@@ -14,7 +14,7 @@
{{ $ad->anzeigeLink }}
</a>
</div>
<div class="resultpage-body">
<div class="result-body">
<div class="result-description">
{{ $ad->descr }}
</div>
......
......@@ -5,6 +5,9 @@
@if(stripos($result->anzeigeLink, "twitter.com") !== false)
<i class="fa fa-twitter" aria-hidden="true"></i>
@endif
@if( isset($result->price) && $result->price != 0)
<span class="result-price">{!! $result->price_text !!}</span>
@endif
<a href="{{ $result->link }}" target="{{ $metager->getNewtab() }}" rel="noopener">
{!! $result->titel !!}
</a>
......@@ -21,7 +24,7 @@
</span>
@endif
</div>
<div class="resultpage-body">
<div class="result-body">
@if( isset($result->logo) )
<div class="result-logo">
<a href="{{ $result->link }}" target="{{ $metager->getNewtab() }}" rel="noopener">
......@@ -30,22 +33,20 @@
</div>
@endif
@if( $result->image !== "" )
<div class="result-image result-description">
<div class="result-image">
<a href="{{ $result->link }}" target="{{ $metager->getNewtab() }}" rel="noopener">
<img src="{{ $metager->getImageProxyLink($result->image) }}" align="left" width="120px" height="60px" alt="" />
</a>
{!! $result->descr !!}
</div>
@endif
@if( $metager->getFokus() == "nachrichten" )
<div class="result-description">
<span class="date">{{ isset($result->additionalInformation["date"])?date("Y-m-d H:i:s", $result->additionalInformation["date"]):"" }}</span> {{ $result->descr }}
</div>
@else
@if( $metager->getFokus() == "nachrichten" )
<div class="result-description">
<span class="date">{{ isset($result->additionalInformation["date"])?date("Y-m-d H:i:s", $result->additionalInformation["date"]):"" }}</span> {{ $result->descr }}
</div>
@else
<div class="result-description">
{{ $result->descr }}
</div>
@endif
<div class="result-description">
{!! $result->descr !!}
</div>
@endif
</div>
<div class="result-footer">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment