Merge pull request #1021 from itflow-org/hide-export-null

Hide the Export function when there are no records
This commit is contained in:
Johnny
2024-09-03 23:27:01 -04:00
committed by GitHub
3 changed files with 25 additions and 19 deletions

View File

@@ -55,10 +55,12 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#importLocationModal"> <a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#importLocationModal">
<i class="fa fa-fw fa-upload mr-2"></i>Import <i class="fa fa-fw fa-upload mr-2"></i>Import
</a> </a>
<div class="dropdown-divider"></div> <?php if ($num_rows[0] > 0) { ?>
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportLocationModal"> <div class="dropdown-divider"></div>
<i class="fa fa-fw fa-download mr-2"></i>Export <a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportLocationModal">
</a> <i class="fa fa-fw fa-download mr-2"></i>Export
</a>
<?php } ?>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -78,10 +78,12 @@ $total_tickets_closed = intval($row['total_tickets_closed']);
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#addTicketFromTemplateModal"> <a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#addTicketFromTemplateModal">
<i class="fa fa-fw fa-plus mr-2"></i>From Template <i class="fa fa-fw fa-plus mr-2"></i>From Template
</a> </a>
<div class="dropdown-divider"></div> <?php if ($num_rows[0] > 0) { ?>
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportTicketModal"> <div class="dropdown-divider"></div>
<i class="fa fa-fw fa-download mr-2"></i>Export <a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportTicketModal">
</a> <i class="fa fa-fw fa-download mr-2"></i>Export
</a>
<?php } ?>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -37,10 +37,12 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#addVendorFromTemplateModal"> <a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#addVendorFromTemplateModal">
<i class="fa fa-fw fa-puzzle-piece mr-2"></i>Create from Template <i class="fa fa-fw fa-puzzle-piece mr-2"></i>Create from Template
</a> </a>
<div class="dropdown-divider"></div> <?php if ($num_rows[0] > 0) { ?>
<a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportVendorModal"> <div class="dropdown-divider"></div>
<i class="fa fa-fw fa-download mr-2"></i>Export <a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#exportVendorModal">
</a> <i class="fa fa-fw fa-download mr-2"></i>Export
</a>
<?php } ?>
</div> </div>
</div> </div>
</div> </div>