83 lines
4.7 KiB
PHP
83 lines
4.7 KiB
PHP
<x-layout>
|
|
<div class="container">
|
|
@isset($message)
|
|
<div class="alert alert-success" role="alert">{{ $message }}</div>
|
|
@endisset
|
|
|
|
@foreach($posts as $post)
|
|
<div class="accordion mt-3" id="accordion{{ $post->id }}">
|
|
<div class="card border rounded">
|
|
<div class="card-body" id="Heading{{ $post->id }}" data-toggle="collapse" data-target="#collapse{{ $post->id }}" aria-expanded="true" aria-controls="collapse{{ $post->id }}">
|
|
<div class="row">
|
|
<h3 class="card-title col">{{ $post->title }}</h3>
|
|
<p class="card-title col text-right">skrevet den: {{ $post->post_time }}</p>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-3">
|
|
<p class="card-text">Skrevet af: {{ $post->user->username }}</p>
|
|
<p class="card-text">Mail: {{ $post->user->username }} @edu.sde.dk</p>
|
|
</div>
|
|
<div class="col-1 p-0">
|
|
@if(auth()->id() == $post->user->id)
|
|
<a href="/admin/posts/{{ $post->id }}/edit"><ion-icon name="pencil-outline"></ion-icon></a>
|
|
@endif
|
|
</div>
|
|
<div class="col">
|
|
@if($post->occupation->name == "Datatekniker med Programmering")
|
|
<h5><span class="badge badge-primary float-right badge-pill yeet">
|
|
<ion-icon class="align-middle" name="code-slash-outline"></ion-icon>
|
|
{{ $post->occupation->name }}
|
|
</span></h5>
|
|
@endif
|
|
@if($post->occupation->name == "IT-Supporter")
|
|
<h5><span class="badge badge-warning float-right badge-pill yeet">
|
|
<ion-icon class="align-middle" name="help-buoy-outline"></ion-icon>
|
|
{{ $post->occupation->name }}
|
|
</span></h5>
|
|
@endif
|
|
@if($post->occupation->name == "Datatekniker med Infrastruktur")
|
|
<h5><span class="badge badge-success float-right badge-pill yeet">
|
|
<ion-icon class="align-middle" name="server-outline"></ion-icon>
|
|
{{ $post->occupation->name }}
|
|
</span></h5>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
<div class="row justify-content-start">
|
|
<div class="col-1">
|
|
<p class="card-text d-flex">Status: </p>
|
|
</div>
|
|
<div class="col-3 p-0">
|
|
@if($post->status->name == "Collaborator Found")
|
|
<h5><span class="badge badge-dark badge-pill yeet">
|
|
{{ $post->status->name }}
|
|
</span></h5>
|
|
@endif
|
|
@if($post->status->name == "Looking for collaborator")
|
|
<h5><span class="badge badge-info badge-pill yeet">
|
|
{{ $post->status->name }}
|
|
</span></h5>
|
|
@endif
|
|
@if($post->status->name == "Pending")
|
|
<h5><span class="badge badge-primary badge-pill yeet">
|
|
{{ $post->status->name }}
|
|
</span></h5>
|
|
@endif
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div id="collapse{{ $post->id }}" class="collapse" aria-labelledby="heading{{ $post->id }}" data-parent="#accordion{{ $post->id }}">
|
|
<div class="card-body border rounded">
|
|
{{ $post->text }}
|
|
|
|
@isset($post->files[0])
|
|
<a href="{{ \Illuminate\Support\Facades\Storage::url($post->files[0]->link) }}">Download</a>
|
|
@endisset
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endforeach
|
|
</div>
|
|
</x-layout>
|