Enhance UI and functionality across multiple pages
- Added filter panels and search functionality to media, orders, partners, pricelists, products, products attributes, software versions, translations, and users pages. - Implemented security checks for create, update, and delete permissions on various pages. - Updated CSS styles for improved layout and responsiveness, including new styles for filter panels and buttons. - Refactored existing forms to utilize the new filter panel design for a more consistent user experience. - Adjusted API versioning in servicereport and servicereports pages for better compatibility. - Improved button icons for filter actions and form submissions for better user interaction.
This commit is contained in:
37
orders.php
37
orders.php
@@ -19,6 +19,11 @@ if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
|
||||
header('location: index.php');
|
||||
exit;
|
||||
}
|
||||
//PAGE Security
|
||||
$page_manage = 'order';
|
||||
$update_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'U');
|
||||
$delete_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'D');
|
||||
$create_allowed = isAllowed($page_manage ,$_SESSION['profile'],$_SESSION['permission'],'C');
|
||||
|
||||
//GET PARAMETERS
|
||||
$pagination_page = isset($_GET['p']) ? $_GET['p'] : 1;
|
||||
@@ -64,6 +69,16 @@ $view = '
|
||||
<p>'.($orders_p ?? '').'</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title-actions">';
|
||||
|
||||
if ($create_allowed === 1){
|
||||
$view .= '<a href="index.php?page=orders_manage" class="btn">+</a>';
|
||||
}
|
||||
|
||||
$view .= '<button id="filter-toggle" class="btn alt" onclick="toggleFilters()">
|
||||
<i class="fa-solid fa-search"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>';
|
||||
|
||||
if (isset($success_msg)){
|
||||
@@ -75,9 +90,27 @@ $view .= ' <div class="msg success">
|
||||
}
|
||||
|
||||
$view .= '
|
||||
<div class="content-header responsive-flex-column pad-top-5">
|
||||
<a href="index.php?page=orders_manage" class="btn">'.($button_create_orders ?? 'Create order').'</a>
|
||||
|
||||
<div id="filter-panel" class="filter-panel" style="display: none;">
|
||||
<div class="filter-content">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="orders">
|
||||
<div class="filter-row">
|
||||
<div class="filter-group search-group">
|
||||
<input type="text" name="search" placeholder="'.($orders_search ?? 'Search orders...').'" value="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="filter-actions">
|
||||
<button type="submit" class="btn"><i class="fas fa-level-down-alt fa-rotate-90"></i></button>
|
||||
<a class="btn alt" href="index.php?page=orders">'.$general_filters_clear.'</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
$view .= '
|
||||
<div class="content-block">
|
||||
<div class="table">
|
||||
<table>
|
||||
|
||||
Reference in New Issue
Block a user