Wstepne wyswietlanie dodatkowych informacji

This commit is contained in:
czup 2019-12-07 16:50:36 +01:00
parent d8a7b998ec
commit 5a840b7819

View File

@ -1,5 +1,6 @@
@extends('layout.app') @extends('layout.app')
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
@section('left-menu') @section('left-menu')
@parent<ul> @parent<ul>
<a href="wyjazdy/add"><li>Dodaj<img src="img/left_menu_icon/add.png"></li></a> <a href="wyjazdy/add"><li>Dodaj<img src="img/left_menu_icon/add.png"></li></a>
@ -32,6 +33,23 @@
<td id="operationDangerType{{ $operation->id }}">{{ $operation->dangerType }}</td> <td id="operationDangerType{{ $operation->id }}">{{ $operation->dangerType }}</td>
<td id="operationCommander{{ $operation->id }}">{{$operation->name}} {{$operation->surname}}</td> <td id="operationCommander{{ $operation->id }}">{{$operation->name}} {{$operation->surname}}</td>
<td><a href="{{ URL::asset('wyjazdy/edit/'.$operation->id) }}"><input type="button" onclick="" value="Edytuj"> </a></td> <td><a href="{{ URL::asset('wyjazdy/edit/'.$operation->id) }}"><input type="button" onclick="" value="Edytuj"> </a></td>
<td><input type="button" onclick="showMoreInformation('{{$operation->id}}')" id="more{{$operation->id}}" value="Więcej"></td>
</tr>
<tr id="moreInformation{{$operation->id}}" style="display:none;" bgcolor="#C0C0C0">
<td colspan="5">
<table>
<tr class='table-header' colspan="5">
<td colspan="5">Opis {{$operation->id}}</td>
</tr>
<tr>
<td>{{$operation->description}}</td>
</tr>
<tr class='table-header' colspan="5">
<tr class='table-header' colspan="5">
<td>Członkowie Akcji</td>
</tr>
</table>
</td>
</tr> </tr>
@endforeach @endforeach
</table>" </table>"
@ -42,3 +60,17 @@
@endif @endif
@stop @stop
<script>
function showMoreInformation(operationID){
if( $('#more'+operationID).val() == "Więcej"){
$('#more'+operationID).val("Ukryj");
$("#moreInformation"+operationID).css('display', 'block');
} else{
$('#more'+operationID).val("Więcej");
$("#moreInformation"+operationID).css('display', 'none');
}
}
</script>