v0.10.20c - Changed type_id to type on news.index, so it's no longer a number

This commit is contained in:
Anders 2020-08-31 14:54:25 +02:00
parent 101be37dfe
commit 25c279653b
1 changed files with 4 additions and 4 deletions

View File

@ -81,7 +81,7 @@
<main style="justify-content: unset; padding: 0">
@foreach($news as $new)
<!--Code to list events-->
@if($new->type_id == 1)<!--Code that prints news-->
@if($new->type == 'News')<!--Code that prints news-->
<div class="card">
<div class="img"><img src="{{URL::asset('/images/icons/news.svg')}}" alt="News:"></div>
<div class="title">{{ $new->subname }}</div>
@ -93,7 +93,7 @@
{!! $new->content !!}
</div>
</div>
@elseif($new->type_id == 2)<!--Code that prints menuplan -->
@elseif($new->type == 'Menu')<!--Code that prints menuplan -->
<div class="card">
<div class="img"><a href="{{ route('menu-plans.index') }}"><img src="{{URL::asset('/images/icons/Menuplan.svg')}}" alt="Menuplan:"></a></div>
<div class="title">{{ $new->subname }}</div>
@ -108,7 +108,7 @@
@endif
</div>
</div>
@elseif($new->type_id == 3)<!--Code that prints events-->
@elseif($new->type == 'Activity')<!--Code that prints events-->
<div class="card">
<div class="img"><a href="{{ route('events.index') }}"><img src="{{URL::asset('/images/icons/Aktiviteter.svg')}}" alt="Aktiviteter:"></a></div>
<div class="title">{{ $new->subname }}</div>
@ -139,7 +139,7 @@
<div class="container" style="margin-top: 8px;">
{!! \App\Helpers::closetags(substr($new->content, 0, 300) ) !!}
@if ($new->type_id == 4) {{-- Else if's displaying guides, then show `Læs mere` --}}
@if ($new->type == 'Guide') {{-- Else if's displaying guides, then show `Læs mere` --}}
<div class="row" style="justify-content: center; border-top: 1px solid rgba(0, 0, 0, .2);">
<a style="font-weight: 700;" href="{{route("guides.show", ["guide" => $new->arrangement_id])}}" class="sde-blue">{{__('msg.læsmere')}}</a>
</div>