ForRo/resources/views/back/location.blade.php
ro 2a6b4b2c99 Location editing, part 1
The plumbing for editing location info has been updated, so that data
can be changed by authorized memebers. Also added a new data point for
locations to store archive links

part 2 will focus on setting up permissions and authorizations as well
as smoothing out adding new members and member roles. an edit link will
be added to locations, which will be visible for members with the
correct permissions
2024-02-20 16:33:49 -06:00

46 lines
1.8 KiB
PHP

@extends('frame',['front' => false])
@section('title', 'The Bad Space | Edit '.$title)
@section('main-content')
@parent
<section class="edit-location">
<article>
<h2>Editing {{$title}}</h2>
<form class="location-edit" action="/den/locations/edit" method="post" enctype="multipart/form-data">
@csrf
<label>Edit Location Name</label><br>
<input type="text" name="name" value="{{$location->name}}" /><br>
<label>Edit Location Comments</label><br>
<textarea name="description">{{$location->description}}</textarea><br>
<label>Edit Reference Links (comma seperated)</label><br>
<textarea name="archive_links">{{$location->archive_links}}</textarea><br>
<label>Edit Reference Images</label><br>
<input type="file" name="references[]" accept="image/png, image/jpeg, image/gif" / multiple><br />
<input type="hidden" name="id" value={{$location->uuid}} />
<input type="submit" value="Edit {{$location->name}}" name="submit_button">
</form>
<h2>References</h2>
<h3>Images</h3>
@if($images != null)
@foreach($images as $image)
<a href="/{{$image->path}}" class="location-image" style="background: url(/{{$image->path}}) no-repeat center center / cover #fc6399" />
</a>
@endforeach
@endif
@php
$action = $location->block_count + $location->silence_count;
$rating = ($action / $sources_count)*100;
@endphp
<h3>Links</h3>
@foreach($archive_links as $link)
@php
$link = trim($link);
@endphp
<a href="https://{{$link}}" target="_blank">{{$link}}</a><br />
@endforeach
<br />LAST UPDATED : {{$updated}}
</article>
</section>
@endsection