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:
@@ -19,7 +19,11 @@ if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
|
||||
header('location: index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
//PAGE Security
|
||||
$page_manage = 'products_attributes_manage';
|
||||
$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;
|
||||
@@ -65,6 +69,16 @@ $view = '
|
||||
<p>'.($products_attributes_p ?? '').'</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="title-actions">';
|
||||
|
||||
if ($create_allowed === 1){
|
||||
$view .= '<a href="index.php?page=products_attributes_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)){
|
||||
@@ -74,18 +88,24 @@ $view .= ' <div class="msg success">
|
||||
<i class="fas fa-times"></i>
|
||||
</div>';
|
||||
}
|
||||
|
||||
$view .= '
|
||||
<div class="content-header responsive-flex-column pad-top-5">
|
||||
<a href="index.php?page=products_attributes_manage" class="btn">'.($button_create_products_attribute ?? 'Create attribute').'</a>
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="products_attributes">
|
||||
<div class="search">
|
||||
<label for="search">
|
||||
<input id="search" type="text" name="search" placeholder="'.($products_attribute_search ?? '').'" value="" class="responsive-width-100">
|
||||
<i class="fas fa-search"></i>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
<div id="filter-panel" class="filter-panel" style="display: none;">
|
||||
<div class="filter-content">
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="products_attributes">
|
||||
<div class="filter-row">
|
||||
<div class="filter-group search-group">
|
||||
<input type="text" name="search" placeholder="'.($products_attribute_search ?? 'Search attributes...').'" 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=products_attributes">X</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user