in total I have 3 files which contain the following functionality:
-
I got a navigation bar which toggles 3 different areas.
-
I got a table which contains data
-
A file which include file 1 and 2 (master file)
So now if I open the master file I can go through all 3 areas but every are should contain different data in the table. File 1
<div class="manage-budget-nav-wrapper text-left mx-lg mx-sm-4 mx-2">
<ul class="nav nav-tabs border-0" role="tablist">
<li class="nav-item">
<a class="nav-link px-0 mr-sm-5 mr-3 ml-0 active" id="home-tab" data-toggle="tab" href="#home-1" role="tab"
aria-controls="home-1" aria-selected="true">Offenes Gesamtguthaben</a>
</li>
<li class="nav-item">
<a class="nav-link px-0 mr-sm-5 mr-3 ml-0" id="profile-tab" data-toggle="tab" href="#profile-1" role="tab"
aria-controls="profile-1" aria-selected="false">Spenden</a>
</li>
<li class="nav-item">
<a class="nav-link px-0 mr-sm-5 mr-3 ml-0" id="profile-tab" data-toggle="tab" href="#redeem-1" role="tab"
aria-controls="redeem-1" aria-selected="false">Gutschein</a>
</li>
</ul>
<hr class="mt-0">
</div>
file 2
<div class="table-responsive">
<table class="table table-striped table-hover mb-4">
<thead>
<tr>
@if (\Request::is('admin/locals/donations'))
<th scope="col">Erwerbsdatum</th>
@elseif (\Request::is('admin/locals/dashboard'))
<th scope="col">Buchungstag</th>
@endif
</tr>
</thead>
<tbody>
@if (\Request::is('admin/locals/donations') class_exist)
<tr>
<td>{24.12.2020}</td>
</tr>
@elseif (\Request::is('admin/locals/dashboard'))
<tr>
<td>{24.12.2020}</td>
</tr>
@endif
</tbody>
</table>
</div>
I already got some if statement but how can I check if e.g. area one is active or got class active. Inside the navigation to check @if (aria-selected="true")
.
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2XWBaGI
via IFTTT
Aucun commentaire:
Enregistrer un commentaire