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:
117
equipments.php
117
equipments.php
@@ -117,7 +117,17 @@ $view = '
|
||||
<p>'.$assets_p.' </p>
|
||||
</div>
|
||||
</div>
|
||||
'.$back_btn_orgin.'
|
||||
<div class="title-actions">
|
||||
'.$back_btn_orgin;
|
||||
|
||||
if ($create_allowed === 1){
|
||||
$view .= '<a href="index.php?page=equipment_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)){
|
||||
@@ -129,65 +139,62 @@ $view .= ' <div class="msg success">
|
||||
}
|
||||
|
||||
$view .= '
|
||||
<div class="content-header responsive-flex-column pad-top-5">';
|
||||
|
||||
if ($create_allowed ===1){
|
||||
$view .= '<a href="index.php?page=equipment_manage" class="btn">'.$button_create_asset.'</a>';
|
||||
}
|
||||
$view .= '
|
||||
<form action="" method="get">
|
||||
'.$filter.'
|
||||
<div class="filters">
|
||||
<a href="#"><i class="fa-solid fa-filter"></i>'.$general_filters.'</a>
|
||||
<div class="list">
|
||||
<select name="status">
|
||||
<option value="" disabled selected>'.$equipment_label3.'</option>
|
||||
<option value="0"'.($status==0?' selected':'').'>'.$status0_text.'</option>
|
||||
<option value="1"'.($status==1?' selected':'').'>'.$status1_text.'</option>
|
||||
<option value="2"'.($status==2?' selected':'').'>'.$status2_text.'</option>
|
||||
<option value="3"'.($status==3?' selected':'').'>'.$status3_text.'</option>
|
||||
<option value="4"'.($status==4?' selected':'').'>'.$status4_text.'</option>
|
||||
<option value="5"'.($status==5?' selected':'').'>'.$status5_text.'</option>
|
||||
</select>
|
||||
'.$product_list.'
|
||||
<button type="submit">'.$button_apply.'</button>
|
||||
<a class="cancel_link" style="color: #FFFFFF;text-decoration: none;" href="index.php?page=equipments">'.$general_filters_clear.'</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sort">
|
||||
<a href="#"><i class="fa-solid fa-sort"></i>'.$general_sort.'</a>
|
||||
<div class="list">
|
||||
<select name="sort">
|
||||
<option value="" disabled selected>'.$general_sort.'</option>
|
||||
<option value="1"'.($sort==1?' selected':'').'>'.$equipment_label2.' '.$general_sort_type_1.'</option>
|
||||
<option value="2"'.($sort==2?' selected':'').'>'.$equipment_label2.' '.$general_sort_type_2.'</option>
|
||||
<option value="3"'.($sort==3?' selected':'').'>'.$equipment_label3.' '.$general_sort_type_1.'</option>
|
||||
<option value="4"'.($sort==4?' selected':'').'>'.$equipment_label3.' '.$general_sort_type_2.'</option>
|
||||
<option value="5"'.($sort==5?' selected':'').'>'.$warranty_status.' '.$general_sort_type_1.'</option>
|
||||
<option value="6"'.($sort==6?' selected':'').'>'.$warranty_status.' '.$general_sort_type_2.'</option>
|
||||
<option value="7"'.($sort==7?' selected':'').'>'.$service_status.' '.$general_sort_type_1.'</option>
|
||||
<option value="8"'.($sort==8?' selected':'').'>'.$service_status.' '.$general_sort_type_2.'</option>
|
||||
<option value="9"'.($sort==9?' selected':'').'>'.$general_sort_type_3.'</option>
|
||||
<option value="10"'.($sort==10?' selected':'').'>'.$general_sort_type_4.'</option>
|
||||
<div id="filter-panel" class="filter-panel" style="display: none;">
|
||||
<div class="filter-content">
|
||||
<form action="" method="get">
|
||||
'.$filter.'
|
||||
<div class="filter-row">
|
||||
<div class="filter-group">
|
||||
<select name="status">
|
||||
<option value="" disabled selected>'.$equipment_label3.'</option>
|
||||
<option value="0"'.($status==0?' selected':'').'>'.$status0_text.'</option>
|
||||
<option value="1"'.($status==1?' selected':'').'>'.$status1_text.'</option>
|
||||
<option value="2"'.($status==2?' selected':'').'>'.$status2_text.'</option>
|
||||
<option value="3"'.($status==3?' selected':'').'>'.$status3_text.'</option>
|
||||
<option value="4"'.($status==4?' selected':'').'>'.$status4_text.'</option>
|
||||
<option value="5"'.($status==5?' selected':'').'>'.$status5_text.'</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
</select>
|
||||
<button type="submit">'.$button_apply.'</button>
|
||||
<div class="filter-group">
|
||||
'.$product_list.'
|
||||
</div>
|
||||
|
||||
<div class="filter-group">
|
||||
<select name="sort">
|
||||
<option value="" disabled selected>'.$general_sort.'</option>
|
||||
<option value="1"'.($sort==1?' selected':'').'>'.$equipment_label2.' '.$general_sort_type_1.'</option>
|
||||
<option value="2"'.($sort==2?' selected':'').'>'.$equipment_label2.' '.$general_sort_type_2.'</option>
|
||||
<option value="3"'.($sort==3?' selected':'').'>'.$equipment_label3.' '.$general_sort_type_1.'</option>
|
||||
<option value="4"'.($sort==4?' selected':'').'>'.$equipment_label3.' '.$general_sort_type_2.'</option>
|
||||
<option value="5"'.($sort==5?' selected':'').'>'.$warranty_status.' '.$general_sort_type_1.'</option>
|
||||
<option value="6"'.($sort==6?' selected':'').'>'.$warranty_status.' '.$general_sort_type_2.'</option>
|
||||
<option value="7"'.($sort==7?' selected':'').'>'.$service_status.' '.$general_sort_type_1.'</option>
|
||||
<option value="8"'.($sort==8?' selected':'').'>'.$service_status.' '.$general_sort_type_2.'</option>
|
||||
<option value="9"'.($sort==9?' selected':'').'>'.$general_sort_type_3.'</option>
|
||||
<option value="10"'.($sort==10?' selected':'').'>'.$general_sort_type_4.'</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="filter-group search-group">
|
||||
<input type="text" name="search" placeholder="'.$equiment_search.'" value="">
|
||||
</div>
|
||||
</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=equipments">X</a>';
|
||||
|
||||
//SHOW DOWNLOAD TO EXCELL OPTION ONLY TO ADMIN USERS
|
||||
if ($_SESSION['permission'] == 3 || $_SESSION['permission'] == 4){
|
||||
$view .='<div class="filters">
|
||||
<a href="index.php?page=equipments&download="><i class="fa-solid fa-download"></i></a>
|
||||
</div>';
|
||||
$view .= '<a class="btn alt" href="index.php?page=equipments&download=">
|
||||
<i class="fa-solid fa-download"></i>
|
||||
</a>';
|
||||
}
|
||||
$view .= '<div class="search">
|
||||
<label for="search">
|
||||
<input id="search" type="text" name="search" placeholder="'.$equiment_search.'" value="" class="responsive-width-100">
|
||||
<i class="fas fa-search"></i>
|
||||
</label>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
$view .= ' </div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
';
|
||||
$view .= '
|
||||
|
||||
Reference in New Issue
Block a user