mirror of
https://github.com/itflow-org/itflow
synced 2026-09-14 18:55:12 +00:00
Initial migration from AdminLTE 3 to 4, bootstrap 4 to 5
This commit is contained in:
@@ -87,26 +87,26 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
|
||||
<div class="card card-dark">
|
||||
<div class="card-header py-2">
|
||||
<h3 class="card-title mt-2"><i class="fa fa-fw fa-address-book mr-2"></i>Contacts</h3>
|
||||
<h3 class="card-title mt-2"><i class="fa fa-fw fa-address-book me-2"></i>Contacts</h3>
|
||||
<div class="card-tools">
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary ajax-modal" data-modal-url="modals/contact/contact_add.php?client_id=<?= $client_id ?>">
|
||||
<i class="fas fa-plus mr-2"></i>New Contact
|
||||
<i class="fas fa-plus me-2"></i>New Contact
|
||||
</button>
|
||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-toggle="dropdown"></button>
|
||||
<button type="button" class="btn btn-primary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown"></button>
|
||||
<div class="dropdown-menu">
|
||||
<?php if ($client_url) { ?>
|
||||
<!-- <a class="dropdown-item text-dark" href="#" data-toggle="modal" data-target="#contactInviteModal"><i class="fas fa-fw fa-paper-plane mr-2"></i>Invite</a>-->
|
||||
<!-- <a class="dropdown-item text-dark" href="#" data-bs-toggle="modal" data-bs-target="#contactInviteModal"><i class="fas fa-fw fa-paper-plane me-2"></i>Invite</a>-->
|
||||
<!-- <div class="dropdown-divider"></div>-->
|
||||
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||
data-modal-url="modals/contact/contact_import.php?<?= $client_url ?>">
|
||||
<i class="fa fa-fw fa-upload mr-2"></i>Import
|
||||
<i class="fa fa-fw fa-upload me-2"></i>Import
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<?php } ?>
|
||||
<a class="dropdown-item text-dark ajax-modal" href="#"
|
||||
data-modal-url="<?= buildExportModalUrl('modals/contact/contact_export.php', ['client_id', 'client', 'location', 'tags', 'archived', 'q']) ?>">
|
||||
<i class="fa fa-fw fa-download mr-2"></i>Export
|
||||
<i class="fa fa-fw fa-download me-2"></i>Export
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -123,9 +123,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
<div class="col-md-4">
|
||||
<div class="input-group mb-3 mb-md-0">
|
||||
<input type="search" class="form-control" name="q" value="<?php if (isset($q)) { echo stripslashes(escapeHtml($q)); } ?>" placeholder="Search Contacts">
|
||||
<div class="input-group-append">
|
||||
<button class="btn btn-dark"><i class="fa fa-search"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -211,70 +209,70 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
<?php } ?>
|
||||
|
||||
<div class="col-md-3">
|
||||
<div class="btn-group float-right">
|
||||
<div class="btn-group float-end">
|
||||
<a href="?<?= $client_url ?>archived=<?php if($archived == 1){ echo 0; } else { echo 1; } ?>"
|
||||
class="btn btn-<?php if($archived == 1){ echo "primary"; } else { echo "default"; } ?>">
|
||||
<i class="fa fa-fw fa-archive mr-2"></i>Archived
|
||||
<i class="fa fa-fw fa-archive me-2"></i>Archived
|
||||
</a>
|
||||
<div class="dropdown ml-2" id="bulkActionButton" hidden>
|
||||
<button class="btn btn-secondary dropdown-toggle" type="button" data-toggle="dropdown">
|
||||
<i class="fas fa-fw fa-layer-group mr-2"></i>Bulk Action (<span id="selectedCount">0</span>)
|
||||
<div class="dropdown ms-2" id="bulkActionButton" hidden>
|
||||
<button class="btn btn-secondary dropdown-toggle" type="button" data-bs-toggle="dropdown">
|
||||
<i class="fas fa-fw fa-layer-group me-2"></i>Bulk Action (<span id="selectedCount">0</span>)
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<?php if ($client_url) { ?>
|
||||
<a class="dropdown-item ajax-modal" href="#"
|
||||
data-modal-url="modals/contact/contact_bulk_assign_location.php?<?= $client_url ?>"
|
||||
data-bulk="true">
|
||||
<i class="fas fa-fw fa-map-marker-alt mr-2"></i>Assign Location
|
||||
<i class="fas fa-fw fa-map-marker-alt me-2"></i>Assign Location
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<?php } ?>
|
||||
<a class="dropdown-item ajax-modal" href="#"
|
||||
data-modal-url="modals/contact/contact_bulk_edit_phone.php"
|
||||
data-bulk="true">
|
||||
<i class="fas fa-fw fa-phone-alt mr-2"></i>Set Phone Number
|
||||
<i class="fas fa-fw fa-phone-alt me-2"></i>Set Phone Number
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item ajax-modal" href="#"
|
||||
data-modal-url="modals/contact/contact_bulk_edit_department.php"
|
||||
data-bulk="true">
|
||||
<i class="fas fa-fw fa-users mr-2"></i>Set Department
|
||||
<i class="fas fa-fw fa-users me-2"></i>Set Department
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item ajax-modal" href="#"
|
||||
data-modal-url="modals/contact/contact_bulk_edit_role.php"
|
||||
data-bulk="true">
|
||||
<i class="fas fa-fw fa-user-shield mr-2"></i>Set Roles
|
||||
<i class="fas fa-fw fa-user-shield me-2"></i>Set Roles
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item ajax-modal" href="#"
|
||||
data-modal-url="modals/contact/contact_bulk_assign_tags.php"
|
||||
data-bulk="true">
|
||||
<i class="fas fa-fw fa-tags mr-2"></i>Assign Tags
|
||||
<i class="fas fa-fw fa-tags me-2"></i>Assign Tags
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item ajax-modal" href="#"
|
||||
data-modal-url="modals/contact/contact_bulk_email.php"
|
||||
data-modal-size="lg"
|
||||
data-bulk="true">
|
||||
<i class="fas fa-fw fa-paper-plane mr-2"></i>Send Email
|
||||
<i class="fas fa-fw fa-paper-plane me-2"></i>Send Email
|
||||
</a>
|
||||
<?php if ($archived) { ?>
|
||||
<div class="dropdown-divider"></div>
|
||||
<button class="dropdown-item text-info"
|
||||
type="submit" form="bulkActions" name="bulk_restore_contacts">
|
||||
<i class="fas fa-fw fa-redo mr-2"></i>Restore
|
||||
<i class="fas fa-fw fa-redo me-2"></i>Restore
|
||||
</button>
|
||||
<div class="dropdown-divider"></div>
|
||||
<button class="dropdown-item text-danger text-bold"
|
||||
type="submit" form="bulkActions" name="bulk_delete_contacts">
|
||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||
<i class="fas fa-fw fa-trash me-2"></i>Delete
|
||||
</button>
|
||||
<?php } else { ?>
|
||||
<div class="dropdown-divider"></div>
|
||||
<button class="dropdown-item text-danger confirm-link"
|
||||
type="submit" form="bulkActions" name="bulk_archive_contacts">
|
||||
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
||||
<i class="fas fa-fw fa-archive me-2"></i>Archive
|
||||
</button>
|
||||
<?php } ?>
|
||||
</div>
|
||||
@@ -290,7 +288,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table border">
|
||||
<thead class="thead-light <?php if (!$num_rows[0]) { echo "d-none"; } ?>">
|
||||
<thead class="table-light <?php if (!$num_rows[0]) { echo "d-none"; } ?>">
|
||||
<tr>
|
||||
<td class="bg-light checkbox-column">
|
||||
<div class="form-check">
|
||||
@@ -298,7 +296,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
</div>
|
||||
</td>
|
||||
<th>
|
||||
<a class="text-secondary ml-3" href="?<?= $url_query_strings_sort ?>&sort=contact_name&order=<?= $disp ?>">
|
||||
<a class="text-secondary ms-3" href="?<?= $url_query_strings_sort ?>&sort=contact_name&order=<?= $disp ?>">
|
||||
Name <?php if ($sort == 'contact_name') { echo $order_icon; } ?>
|
||||
</a>
|
||||
</th>
|
||||
@@ -343,27 +341,27 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
if (empty($contact_extension)) {
|
||||
$contact_extension_display = "";
|
||||
} else {
|
||||
$contact_extension_display = "<small class='text-secondary ml-1'>x$contact_extension</small>";
|
||||
$contact_extension_display = "<small class='text-secondary ms-1'>x$contact_extension</small>";
|
||||
}
|
||||
$contact_phone_country_code = escapeHtml($row['contact_phone_country_code']);
|
||||
$contact_phone = escapeHtml(formatPhoneNumber($row['contact_phone'], $contact_phone_country_code));
|
||||
if (empty($contact_phone)) {
|
||||
$contact_phone_display = "";
|
||||
} else {
|
||||
$contact_phone_display = "<div><i class='fas fa-fw fa-phone mr-2'></i><a href='tel:$contact_phone'>$contact_phone$contact_extension_display</a></div>";
|
||||
$contact_phone_display = "<div><i class='fas fa-fw fa-phone me-2'></i><a href='tel:$contact_phone'>$contact_phone$contact_extension_display</a></div>";
|
||||
}
|
||||
$contact_mobile_country_code = escapeHtml($row['contact_mobile_country_code']);
|
||||
$contact_mobile = escapeHtml(formatPhoneNumber($row['contact_mobile'], $contact_mobile_country_code));
|
||||
if (empty($contact_mobile)) {
|
||||
$contact_mobile_display = "";
|
||||
} else {
|
||||
$contact_mobile_display = "<div class='mt-2'><i class='fas fa-fw fa-mobile-alt mr-2'></i><a href='tel:$contact_mobile'>$contact_mobile</a></div>";
|
||||
$contact_mobile_display = "<div class='mt-2'><i class='fas fa-fw fa-mobile-alt me-2'></i><a href='tel:$contact_mobile'>$contact_mobile</a></div>";
|
||||
}
|
||||
$contact_email = escapeHtml($row['contact_email']);
|
||||
if (empty($contact_email)) {
|
||||
$contact_email_display = "";
|
||||
} else {
|
||||
$contact_email_display = "<div class='mt-1'><i class='fas fa-fw fa-envelope mr-2'></i><a href='mailto:$contact_email'>$contact_email</a><button class='btn btn-sm clipboardjs' type='button' data-clipboard-text='$contact_email'><i class='far fa-copy text-secondary'></i></button></div>";
|
||||
$contact_email_display = "<div class='mt-1'><i class='fas fa-fw fa-envelope me-2'></i><a href='mailto:$contact_email'>$contact_email</a><button class='btn btn-sm clipboardjs' type='button' data-clipboard-text='$contact_email'><i class='far fa-copy text-secondary'></i></button></div>";
|
||||
}
|
||||
$contact_info_display = "$contact_phone_display $contact_mobile_display $contact_email_display";
|
||||
if (empty($contact_info_display)) {
|
||||
@@ -398,7 +396,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
$auth_method = escapeHtml($row['user_auth_method']);
|
||||
$contact_user_id = intval($row['contact_user_id']);
|
||||
if ($contact_user_id) {
|
||||
$user_exists_display = "<span class='badge badge-pill badge-dark p-1' title='User: $auth_method'><i class='fas fa-fw fa-user'></i></span>";
|
||||
$user_exists_display = "<span class='badge rounded-pill bg-dark p-1' title='User: $auth_method'><i class='fas fa-fw fa-user'></i></span>";
|
||||
} else {
|
||||
$user_exists_display = "";
|
||||
}
|
||||
@@ -409,7 +407,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('asset_id') AS num FROM assets WHERE asset_contact_id = $contact_id AND asset_archived_at IS NULL"));
|
||||
$asset_count = $row['num'];
|
||||
if ($asset_count) {
|
||||
$asset_count_display = "<a href='contact.php?client_id=$client_id&contact_id=$contact_id#assets' class='mr-2 mb-1 badge badge-pill badge-dark p-2' title='Assets ($asset_count)'><i class='fas fa-fw fa-desktop mr-2'></i>$asset_count</a>";
|
||||
$asset_count_display = "<a href='contact.php?client_id=$client_id&contact_id=$contact_id#assets' class='me-2 mb-1 badge rounded-pill bg-dark p-2' title='Assets ($asset_count)'><i class='fas fa-fw fa-desktop me-2'></i>$asset_count</a>";
|
||||
} else {
|
||||
$asset_count_display = '';
|
||||
}
|
||||
@@ -418,7 +416,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('credential_id') AS num FROM credentials WHERE credential_contact_id = $contact_id AND credential_archived_at IS NULL"));
|
||||
$credential_count = $row['num'];
|
||||
if ($credential_count) {
|
||||
$credential_count_display = "<a href='contact.php?client_id=$client_id&contact_id=$contact_id#credentials' class='mr-2 mb-1 badge badge-pill badge-secondary p-2' title='Credentials ($credential_count)'><i class='fas fa-fw fa-key mr-2'></i>$credential_count</a>";
|
||||
$credential_count_display = "<a href='contact.php?client_id=$client_id&contact_id=$contact_id#credentials' class='me-2 mb-1 badge rounded-pill bg-secondary p-2' title='Credentials ($credential_count)'><i class='fas fa-fw fa-key me-2'></i>$credential_count</a>";
|
||||
} else {
|
||||
$credential_count_display = '';
|
||||
}
|
||||
@@ -427,7 +425,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('software_id') AS num FROM software, software_contacts WHERE software.software_id = software_contacts.software_id AND software_contacts.contact_id = $contact_id AND software_archived_at IS NULL"));
|
||||
$software_count = $row['num'];
|
||||
if ($software_count) {
|
||||
$software_count_display = "<a href='contact.php?client_id=$client_id&contact_id=$contact_id#software' class='mr-2 mb-1 badge badge-pill badge-secondary p-2' title='Licenses ($software_count)'><i class='fas fa-fw fa-cube mr-2'></i>$software_count</a>";
|
||||
$software_count_display = "<a href='contact.php?client_id=$client_id&contact_id=$contact_id#software' class='me-2 mb-1 badge rounded-pill bg-secondary p-2' title='Licenses ($software_count)'><i class='fas fa-fw fa-cube me-2'></i>$software_count</a>";
|
||||
} else {
|
||||
$software_count_display = '';
|
||||
}
|
||||
@@ -436,7 +434,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
$row = mysqli_fetch_assoc(mysqli_query($mysqli, "SELECT COUNT('ticket_id') AS num FROM tickets WHERE ticket_contact_id = $contact_id AND ticket_archived_at IS NULL"));
|
||||
$ticket_count = $row['num'];
|
||||
if ($ticket_count) {
|
||||
$ticket_count_display = "<a href='contact.php?client_id=$client_id&contact_id=$contact_id#tickets' class='mr-2 mb-1 badge badge-pill badge-secondary p-2' title='Tickets ($ticket_count)'><i class='fas fa-fw fa-life-ring mr-2'></i>$ticket_count</a>";
|
||||
$ticket_count_display = "<a href='contact.php?client_id=$client_id&contact_id=$contact_id#tickets' class='me-2 mb-1 badge rounded-pill bg-secondary p-2' title='Tickets ($ticket_count)'><i class='fas fa-fw fa-life-ring me-2'></i>$ticket_count</a>";
|
||||
} else {
|
||||
$ticket_count_display = '';
|
||||
}
|
||||
@@ -459,7 +457,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
}
|
||||
|
||||
$contact_tag_id_array[] = $contact_tag_id;
|
||||
$contact_tag_name_display_array[] = "<a href='contacts.php?$client_url tags[]=$contact_tag_id'><span class='badge text-light p-1 mr-1' style='background-color: $contact_tag_color;'><i class='fa fa-fw fa-$contact_tag_icon mr-2'></i>$contact_tag_name</span></a>";
|
||||
$contact_tag_name_display_array[] = "<a href='contacts.php?$client_url tags[]=$contact_tag_id'><span class='badge text-light p-1 me-1' style='background-color: $contact_tag_color;'><i class='fa fa-fw fa-$contact_tag_icon me-2'></i>$contact_tag_name</span></a>";
|
||||
}
|
||||
$contact_tags_display = implode('', $contact_tag_name_display_array);
|
||||
|
||||
@@ -472,19 +470,19 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
</td>
|
||||
<td>
|
||||
<a class="text-dark" href="contact.php?client_id=<?= $client_id ?>&contact_id=<?= $contact_id ?>">
|
||||
<div class="media">
|
||||
<div class="d-flex">
|
||||
<?php if ($contact_photo) { ?>
|
||||
<span class="fa-stack fa-2x mr-3 text-center">
|
||||
<span class="fa-stack fa-2x me-3 text-center">
|
||||
<img class="img-size-50 img-circle" src="<?= "../uploads/clients/$client_id/$contact_photo" ?>">
|
||||
</span>
|
||||
<?php } else { ?>
|
||||
<span class="fa-stack fa-2x mr-3">
|
||||
<span class="fa-stack fa-2x me-3">
|
||||
<i class="fa fa-circle fa-stack-2x text-secondary"></i>
|
||||
<span class="fa fa-stack-1x text-white"><?= $contact_initials ?></span>
|
||||
</span>
|
||||
<?php } ?>
|
||||
|
||||
<div class="media-body">
|
||||
<div class="flex-grow-1">
|
||||
<div class="<?php if($contact_important) { echo "text-bold"; } ?>"><?= $contact_name ?> <?= $user_exists_display ?></div>
|
||||
<?= $contact_title_display ?>
|
||||
<div><?= $contact_primary_display ?></div>
|
||||
@@ -509,41 +507,41 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli, "SELECT FOUND_ROWS()"));
|
||||
<td><a href="contacts.php?client_id=<?= $client_id ?>"><?= $client_name ?></a></td>
|
||||
<?php } ?>
|
||||
<td>
|
||||
<div class="dropdown dropleft text-center">
|
||||
<button class="btn btn-secondary btn-sm" type="button" data-toggle="dropdown">
|
||||
<div class="dropdown dropstart text-center">
|
||||
<button class="btn btn-secondary btn-sm" type="button" data-bs-toggle="dropdown">
|
||||
<i class="fas fa-ellipsis-h"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu">
|
||||
<a class="dropdown-item" href="contact.php?<?= $client_url ?>contact_id=<?= $contact_id ?>">
|
||||
<i class="fas fa-fw fa-eye mr-2"></i>Details
|
||||
<i class="fas fa-fw fa-eye me-2"></i>Details
|
||||
</a>
|
||||
<a class="dropdown-item ajax-modal" href="#" data-modal-url="modals/contact/contact_note_add.php?id=<?= $contact_id ?>">
|
||||
<i class="fas fa-fw fa-sticky-note mr-2"></i>Make Note
|
||||
<i class="fas fa-fw fa-sticky-note me-2"></i>Make Note
|
||||
</a>
|
||||
<a class="dropdown-item ajax-modal" href="#" data-modal-url="modals/contact/contact_edit.php?id=<?= $contact_id ?>">
|
||||
<i class="fas fa-fw fa-edit mr-2"></i>Edit
|
||||
<i class="fas fa-fw fa-edit me-2"></i>Edit
|
||||
</a>
|
||||
<?php if ($session_user_role == 3 && $contact_primary == 0) { ?>
|
||||
<?php if ($contact_archived_at) { ?>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item text-info confirm-link" href="post.php?restore_contact=<?= $contact_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
||||
<i class="fas fa-fw fa-redo mr-2"></i>Restore
|
||||
<i class="fas fa-fw fa-redo me-2"></i>Restore
|
||||
</a>
|
||||
<?php } else { ?>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item text-danger confirm-link" href="post.php?archive_contact=<?= $contact_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
||||
<i class="fas fa-fw fa-archive mr-2"></i>Archive
|
||||
<i class="fas fa-fw fa-archive me-2"></i>Archive
|
||||
</a>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item text-danger confirm-link" href="post.php?anonymize_contact=<?= $contact_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
||||
<i class="fas fa-fw fa-user-secret mr-2"></i>Anonymize & Archive
|
||||
<i class="fas fa-fw fa-user-secret me-2"></i>Anonymize & Archive
|
||||
</a>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($config_destructive_deletes_enable) { ?>
|
||||
<div class="dropdown-divider"></div>
|
||||
<a class="dropdown-item text-danger text-bold confirm-link" href="post.php?delete_contact=<?= $contact_id ?>&csrf_token=<?= $_SESSION['csrf_token'] ?>">
|
||||
<i class="fas fa-fw fa-trash mr-2"></i>Delete
|
||||
<i class="fas fa-fw fa-trash me-2"></i>Delete
|
||||
</a>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
|
||||
Reference in New Issue
Block a user