Skip to content

Commit 2b83514

Browse files
committed
continuing events stuff
1 parent 2a3bcf8 commit 2b83514

File tree

6 files changed

+22
-4
lines changed

6 files changed

+22
-4
lines changed

app/Http/Controllers/Events/EventController.php

+5
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ public function viewEvent($slug)
3636
{
3737
$event = Event::where('slug', $slug)->firstOrFail();
3838
$updates = $event->updates;
39+
if (Auth::check() && ControllerApplication::where('user_id', Auth::id())->where('event_id', $event->id))
40+
{
41+
$app = ControllerApplication::where('user_id', Auth::id())->where('event_id', $event->id)->first();
42+
return view('events.view', compact('event', 'updates', 'app'));
43+
}
3944
return view('events.view', compact('event', 'updates'));
4045
}
4146

app/Models/Events/ControllerApplication.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function discord_webhook()
3838
/*
3939
* The image location for the senders image
4040
*/
41-
"avatar_url" => asset('img/iconwhitebg.png'),
41+
"avatar_url" => "https://resources.ganderoceanic.com/media/img/brand/sqr/ZQO_SQ_BLUE.png",
4242
/*
4343
* Whether or not to read the message in Text-to-speech
4444
*/
@@ -78,7 +78,7 @@ public function discord_webhook()
7878
// Footer object
7979
"footer" => [
8080
"text" => "Gander Oceanic Core",
81-
"icon_url" => asset('img/iconwhitebg.png')
81+
"icon_url" => "https://resources.ganderoceanic.com/media/img/brand/sqr/ZQO_SQ_BLUE.png"
8282
],
8383

8484
// Field array of objects

resources/views/admin/events/view.blade.php

+2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
{{$event->html()}}
4141
<br>
4242
<h4>Updates</h4>
43+
<a href="#" class="btn-sm btn bg-czqo-blue-light">New Update</a>
44+
<br>
4345
@if (count($updates) == 0)
4446
None yet!
4547
@else

resources/views/events/index.blade.php

+5
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
</div>
2626
</div>
2727
@endforeach
28+
@if(count($events) < 1)
29+
<div class="col-md-6">
30+
No events scheduled. Check back soon!
31+
</div>
32+
@endif
2833
</div>
2934
<div class="d-none d-sm-block">
3035
<h5 class="mt-4"><a data-toggle="collapse" data-target="#pastEvents">View Past Events <i class="fas fa-caret-down"></i></a></h5>

resources/views/events/view.blade.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<a href="{{route('events.index')}}" class="white-text" style="font-size: 1.2em;"> <i class="fas fa-arrow-left"></i> All Events</a>
1717
</div>
1818
</div>
19-
<div class="card card-image rounded-0 blue" style="@if($event->image_url)background-image: url({{$event->image_url}});@endif background-size: cover; background-position: center;">
19+
<div class="card card-image rounded-0 blue jarallax" style="@if($event->image_url)background-image: url({{$event->image_url}});@endif background-size: cover; background-position: center;">
2020
<div class="text-white text-left py-1 px-4 mask rgba-blue-grey-strong">
2121
<div class="container">
2222
<div class="py-5">
@@ -73,7 +73,7 @@
7373
<form id="app-form" method="POST" action="{{route('events.controllerapplication.ajax')}}">
7474
@csrf
7575
<input type="hidden" name="event_id" value={{$event->id}}>
76-
<p>Submit an application to the Events Coordinator to control during this event through this form.</p>
76+
<p>Submit an application to control during this event through this form.</p>
7777
<label for="">Availability start time (zulu)</label>
7878
<input type="datetime" name="availability_start" class="form-control flatpickr" id="availability_start">
7979
<label class="mt-2" for="">Availability end time (zulu)</label>
@@ -107,6 +107,10 @@
107107
<br>
108108
<h4 class="font-weight-bold blue-text my-3">Apply to control</h4>
109109
<p>You have already applied. Contact the Events and Marketing Director to change times, or cancel.</p>
110+
<h6 class="font-weight-bold">Your Availability</h6>
111+
<p>{{$app->start_availability_timestamp}} to {{$app->end_availability_timestamp}}</p>
112+
<h6 class="font-weight-bold">Comments</h6>
113+
<p>{{$app->comments}}</p>
110114
@endif
111115
<br>
112116
<h4 class="font-weight-bold blue-text my-3">Updates</h4>

resources/views/index.blade.php

+2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<h4><a href="#blueBannerMid" id="discoverMore" class="white-text" style="transition:fade 0.4s;">Find out more&nbsp;&nbsp;<i class="fas fa-arrow-down"></i></a></h4>
3131
</div>
3232
</div>
33+
@if($nextEvent)
3334
<div class="container white-text">
3435
<p style="font-size: 1.4em;" class="font-weight-bold">
3536
<a href="{{route('events.view', $nextEvent->slug)}}" class="white-text">
@@ -38,6 +39,7 @@
3839
</p>
3940
<p style="font-size: 1.2em;">{{$nextEvent->start_timestamp_pretty()}}</p>
4041
</div>
42+
@endif
4143
</div>
4244
</div>
4345
<div class="container-fluid py-4 blue" id="blueBannerMid">

0 commit comments

Comments
 (0)