v0.10.20a - 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:31:56 +02:00
parent bccd00683f
commit cf1baac983
2 changed files with 5 additions and 5 deletions
@@ -47,13 +47,13 @@
@endif
<div class="container" style="margin-top: 8px;">
@if ($new->type_id == 1 || $new->type_id == 2) {{-- If it's a news or menu then display the whole message --}}
@if ($new->type == 'News' || $new->type == 'Menu') {{-- If it's a news or menu then display the whole message --}}
{!! $new->content !!}
@else {{-- If it's a menu, guide or event. Then display up to 300 characters of text --}}
{!! \App\Helpers::closetags(substr($new->content, 0, 300) ) !!}
@endif
@if ($new->type_id == 3) {{-- If it's displaying an event, then show `Tilmeld`, `Læs mere` & `Se deltagere` --}}
@if ($new->type == 'Activity') {{-- If it's displaying an event, then show `Tilmeld`, `Læs mere` & `Se deltagere` --}}
<div class="row" style="justify-content: space-between; margin-top: 16px;">
@if (count(\App\UserEvent::query()->where('event_id', '=', $new->arrangement_id)->where('user_id', '=', Auth::user()->id)->get()) > 0)
<a style="margin: 0; padding: 0; font-weight: 700;" class="sde-blue text-center" href="javascript:void(0);" onclick="ajaxCall({{ $new->arrangement_id }}, this)" >{{__('msg.afmeld')}}</a>
@@ -63,7 +63,7 @@
<a style="margin: 0; padding: 0; font-weight: 700;" class="sde-blue text-center" href="{{route("events.show", ["event" => $new->arrangement_id ])}}">{{__('msg.læsmere')}}</a>
<a style="margin: 0; padding: 0; font-weight: 700;" class="sde-blue text-center" href="{{route("events.accountsignups", ["event" => $new->arrangement_id ])}}">{{__('msg.sedeltagere')}}</a>
</div>
@elseif ($new->type_id == 4) {{-- Else if's displaying guides, then show `Læs mere` --}}
@elseif ($new->type == 'Guide') {{-- Else if's displaying guides, then show `Læs mere` --}}
<div class="row" style="justify-content: center">
<a style="font-weight: 700;" href="{{route("guides.show", ["guide" => $new->arrangement_id])}}" class="sde-blue">{{__('msg.læsmere')}}</a>
</div>