Dynamic position rendering for homepage
This commit is contained in:
parent
a4e415943a
commit
49c1ed4698
|
@ -3,9 +3,6 @@
|
|||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class DashboardController extends Controller
|
||||
{
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Vacancy;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class HomeController extends Controller
|
||||
|
@ -13,6 +14,7 @@ class HomeController extends Controller
|
|||
*/
|
||||
public function index()
|
||||
{
|
||||
return view('home');
|
||||
return view('home')
|
||||
->with('positions', Vacancy::where('vacancyStatus', 'OPEN')->get());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -174,7 +174,7 @@
|
|||
|
||||
<td>{{$vacancy->id}}</td>
|
||||
<td>{{$vacancy->vacancyName}}</td>
|
||||
<td>{{$vacancy->vacancyDescription}}</td>
|
||||
<td>{{substr($vacancy->vacancyDescription, 0, 20)}}...</td>
|
||||
<td><span class="badge badge-success">{{$vacancy->discordRoleID}}</span></td>
|
||||
<td><span class="badge badge-success">{{$vacancy->permissionGroupName}}</span></td>
|
||||
<td>{{$vacancy->vacancyCount}}</td>
|
||||
|
|
|
@ -19,13 +19,17 @@
|
|||
|
||||
<div class="row mt-5 mb-5">
|
||||
|
||||
<div class="col">
|
||||
@if (!$positions->isEmpty())
|
||||
|
||||
@foreach($positions as $position)
|
||||
|
||||
<div class="col-md-4">
|
||||
|
||||
<div class="card">
|
||||
|
||||
<div class="card-header text-center">
|
||||
|
||||
<h4 class="card-title">Helper</h4>
|
||||
<h4 class="card-title">{{$position->vacancyName}}</h4>
|
||||
|
||||
|
||||
|
||||
|
@ -34,7 +38,7 @@
|
|||
<div class="card-body text-center">
|
||||
|
||||
<p class="card-text">
|
||||
Helpers are the basic building block of every network. They help keep things clean and organised, and report to Chat Moderators.
|
||||
{{$position->vacancyDescription}}
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
@ -50,24 +54,30 @@
|
|||
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
@endforeach
|
||||
|
||||
@else
|
||||
|
||||
<div class="col-md-4 offset-md-4">
|
||||
|
||||
<div class="card">
|
||||
|
||||
<div class="card-header text-center">
|
||||
<h3 class="card-title">Moderator</h3>
|
||||
</div>
|
||||
<div class="card-header">
|
||||
|
||||
<div class="card-body text-center">
|
||||
|
||||
<p class="card-text">Moderators keep the network clean from cheaters, spam accounts, and abusive users. Their tasks include monitoring the anti-cheat logs, responding to reports and helping users.</p>
|
||||
<div class="card-title"><h4>Applications Closed</h4></div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-footer text-center">
|
||||
<div class="card-body">
|
||||
|
||||
<button type="button" class="btn btn-success">Apply</button>
|
||||
<button type="button" class="btn btn-info">Learn More</button>
|
||||
<div class="alert alert-info">
|
||||
|
||||
<p><b>Hello there!</b></p>
|
||||
<p>
|
||||
We are currently not hiring any new staff members at the moment. If you'd like to apply, check out our Discord's
|
||||
announcement channel for news when a new position opens.
|
||||
Our application cycle usually lasts two weeks, so if you're seeing this, it's because it finished, and new one will begin soon.
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -75,30 +85,9 @@
|
|||
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
|
||||
<div class="card">
|
||||
|
||||
<div class="card-header text-center">
|
||||
<h3 class="card-title">Chat Moderator</h3>
|
||||
</div>
|
||||
|
||||
<div class="card-body text-center">
|
||||
|
||||
<p class="card-text">Chat Moderators' primary goal is monitoring the in-game chat, Discord Channels, and engaging with the community, relieving Moderators of this duty.</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="card-footer text-center">
|
||||
|
||||
<button type="button" class="btn btn-success">Apply</button>
|
||||
<button type="button" class="btn btn-info">Learn More</button>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue