Working on admin function: Delete Room on Tour (edit form)

This commit is contained in:
Torsten 2022-06-25 08:59:39 +02:00
parent 1d47935123
commit e94897e2aa
3 changed files with 13 additions and 10 deletions

View file

@ -76,7 +76,7 @@ p {
.ts_tooltip { .ts_tooltip {
position: relative; position: relative;
display: inline-block; display: inline-block;
border-bottom: 1px dotted black; /* If you want dots under the hoverable text */ /* border-bottom: 1px dotted black;*/ /* If you want dots under the hoverable text */
visibility: visible; visibility: visible;
} }

View file

@ -89,7 +89,7 @@
<div class="card-header"><h5>Teilnehmer</h5></div> <div class="card-header"><h5>Teilnehmer</h5></div>
<div class="card-body"> <div class="card-body">
<ul> <p>
<!-- Intentional Assignment ! --> <!-- Intentional Assignment ! -->
@if ($room_id="") @endif @if ($room_id="") @endif
@foreach($rooms as $room) @foreach($rooms as $room)
@ -97,20 +97,24 @@
@if(strlen($room_id)) @if(strlen($room_id))
<hr/> <hr/>
@endif @endif
<ul><b>[{{$room->room_id}}] {{$room->room_name}}</b> <p><b>[{{$room->room_id}}] {{$room->room_name}}</b>
<a href="/tour/{{$tour->id}}/deleteRoomAdmin/{{$room->room_id}}"> @if($room->room_id>0) <!-- Delete link only for real room ids -->
<span style="color:red">Löschen</span> <a class="text-primary ts_tooltip" href="/tour/{{$tour->id}}/deleteRoomAdmin/{{$room->room_id}}">
</a> (X) <span class="ts_tooltiptext">Raum Löschen</span>
</ul> </a>
@endif
</p>
<!-- Intentional Assignment ! --> <!-- Intentional Assignment ! -->
@if ($room_id=$room->room_id) @endif @if ($room_id=$room->room_id) @endif
@endif @endif
@if(strlen($room->user_name)) @if(strlen($room->user_name))
<li> {{ $room->user_name}} <li style="list-style:none"> {{ $room->user_name}}
@if(Auth::user()->role=="ADMIN") @if(Auth::user()->role=="ADMIN")
<a href="/tour/{{$tour->id}}/cancelBookingAdmin/{{$room->user_id}}" class="text-primary">(X)</a> <a href="/tour/{{$tour->id}}/cancelBookingAdmin/{{$room->user_id}}" class="text-primary ts_tooltip">
<span class="ts_tooltiptext">Stornieren</span>
</a>
@endif @endif
</li> </li>
@endif @endif

View file

@ -218,7 +218,6 @@
// When the user clicks anywhere outside of the modal, close it // When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) { window.onclick = function(event) {
event.preventDefault();
if (event.target == modal) { if (event.target == modal) {
modal.style.display = "none"; modal.style.display = "none";
} }