diff --git a/accounts.php b/accounts.php index e0aeb49..72e748c 100644 --- a/accounts.php +++ b/accounts.php @@ -12,12 +12,18 @@ include_once './settings/settings_redirector.php'; //SET ORIGIN FOR NAVIGATION $_SESSION['prev_origin'] = ''; +$page = 'accounts'; //Check if allowed -if (isAllowed('accounts',$_SESSION['profile'],$_SESSION['permission'],'R') === 0){ +if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){ header('location: index.php'); exit; } +//PAGE Security +$page_manage = 'account_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; @@ -62,6 +68,16 @@ $view = '

'.$account_p .'

+
'; + +if ($create_allowed === 1){ + $view .= '+'; +} + +$view .= ' +
'; if (isset($success_msg)){ @@ -71,30 +87,33 @@ $view .= '
'; } + $view .= ' -
- '.$button_create_account.' -
- -
- '.$general_filters.' -
- - +
'; diff --git a/assets/admin.js b/assets/admin.js index 25bdad0..15f2a49 100644 --- a/assets/admin.js +++ b/assets/admin.js @@ -51,6 +51,26 @@ if (document.querySelector('.filters a')) { } }; } + +// Filter panel toggle functions +function toggleFilters() { + const panel = document.getElementById("filter-panel"); + if (panel.style.display === "none" || panel.style.display === "") { + panel.style.display = "block"; + } else { + panel.style.display = "none"; + } +} + +// Close filter panel when clicking outside +document.addEventListener("click", function(event) { + const panel = document.getElementById("filter-panel"); + const toggle = document.getElementById("filter-toggle"); + + if (panel && toggle && !panel.contains(event.target) && !toggle.contains(event.target)) { + panel.style.display = "none"; + } +}); if (document.querySelector('.sort a')) { let filtersList = document.querySelector('.sort .list'); let filtersListStyle = window.getComputedStyle(filtersList); diff --git a/assets/functions.php b/assets/functions.php index 0370dc6..32c5d57 100644 --- a/assets/functions.php +++ b/assets/functions.php @@ -1803,7 +1803,7 @@ function serviceEvents ($messages,$page){ include dirname(__FILE__,2).'/settings/translations/translations_US.php'; } - $view_header = ' + $view_header = '
diff --git a/cartests.php b/cartests.php index d946b36..5a49aca 100644 --- a/cartests.php +++ b/cartests.php @@ -68,6 +68,16 @@ $view = '

'.$cartests_p.'

+
'; + +if ($create_allowed === 1){ + $view .= '+'; +} + +$view .= ' +
'; if (isset($success_msg)){ @@ -77,38 +87,40 @@ $view .= '
'; } + $view .= ' -
'; -if ($create_allowed ===1){ - $view .= ''.$button_create_cartest.''; -} -$view .= ' -
- -
- '.$general_filters.' -
- - +
'; diff --git a/communications.php b/communications.php index 262a352..b1c6417 100644 --- a/communications.php +++ b/communications.php @@ -23,6 +23,11 @@ if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){ header('location: index.php'); exit; } +//PAGE Security +$page_manage = 'communication'; +$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; @@ -71,7 +76,21 @@ $view = '

'.$communication_p.'

- '.$back_btn_orgin.' +
+ '.$back_btn_orgin; + +if ($create_allowed === 1){ + $view .= ''.$button_create_communication.''; +} + +if (isAllowed('communication_send',$_SESSION['profile'],$_SESSION['permission'],'U') === 1){ + $view .= ''.$button_create_communication_send.''; +} + +$view .= ' +
'; if (isset($success_msg)){ @@ -81,33 +100,32 @@ $view .= '
'; } -$view .= ' -
- '.$button_create_communication.''; -if (isAllowed('communication_send',$_SESSION['profile'],$_SESSION['permission'],'U') === 1){ -$view .= ''.$button_create_communication_send.''; -} -$view .= '
- -
- '.$general_filters.' -
- - +$view .= ' +
'; diff --git a/contracts.php b/contracts.php index 3447036..e18eac2 100644 --- a/contracts.php +++ b/contracts.php @@ -22,6 +22,12 @@ if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){ header('location: index.php'); exit; } +//PAGE Security +$page_manage = 'contract_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'); + //Close Contracts when end_date expired closeContract(); @@ -68,7 +74,17 @@ $view = '

'.$contract_p .'

- '.$back_btn_orgin.' +
+ '.$back_btn_orgin; + +if ($create_allowed === 1){ + $view .= '+'; +} + +$view .= ' +
'; if (isset($success_msg)){ @@ -78,31 +94,34 @@ $view .= '
'; } + $view .= ' -
- '.$button_create_contract.' -
- -
- '.$general_filters.' -
- - +
'; diff --git a/equipment.php b/equipment.php index 7008a36..8944854 100644 --- a/equipment.php +++ b/equipment.php @@ -44,7 +44,7 @@ $media_responses = ioServer($api_url,''); //Decode Payload if (!empty($media_responses)){$media_responses = json_decode($media_responses,true);}else{$media_responses = null;} -$media_responses = $media_responses[0]; +$media_responses = $media_responses[0] ?? ''; //CALL TO API FOR History $api_url = '/v2/equipments/equipmentID='.$responses->equipmentID.'&type=ServiceReport&history=1'; @@ -314,7 +314,7 @@ $view .= '
'.($view_asset_data_text ?? '').'
-
'.$equipment_label2.'
+
@@ -347,7 +347,7 @@ if ($update_allowed === 1){ '.$view_asset_notes.' - + diff --git a/equipment_manage.php b/equipment_manage.php index 85a3064..3b23636 100644 --- a/equipment_manage.php +++ b/equipment_manage.php @@ -201,7 +201,7 @@ $view .= '
diff --git a/equipments.php b/equipments.php index 75263e0..2f4f7dd 100644 --- a/equipments.php +++ b/equipments.php @@ -117,7 +117,17 @@ $view = '

'.$assets_p.'

- '.$back_btn_orgin.' +
+ '.$back_btn_orgin; + +if ($create_allowed === 1){ + $view .= '+'; +} + +$view .= ' +
'; if (isset($success_msg)){ @@ -129,65 +139,62 @@ $view .= '
} $view .= ' -
'; - -if ($create_allowed ===1){ - $view .= ''.$button_create_asset.''; -} -$view .= ' -
- '.$filter.' -
- '.$general_filters.' -
- - '.$product_list.' - - '.$general_filters_clear.' -
-
-
- '.$general_sort.' -
- + + + + + + + + +
- - +
+ '.$product_list.' +
+ +
+ +
+ +
+ +
-
'; - + +
+ + X'; + //SHOW DOWNLOAD TO EXCELL OPTION ONLY TO ADMIN USERS if ($_SESSION['permission'] == 3 || $_SESSION['permission'] == 4){ - $view .='
- -
'; + $view .= ' + + '; } -$view .= ' - + +$view .= '
+ +
'; $view .= ' diff --git a/equipments_mass_update.php b/equipments_mass_update.php index f183148..500cf4f 100644 --- a/equipments_mass_update.php +++ b/equipments_mass_update.php @@ -229,7 +229,7 @@ if ($_SESSION['permission'] == 3 || $_SESSION['permission'] == 4){
- + " onclick="return confirm(\''.$mass_update_confirm_message.'\')" class="btn"> '; $view .=' diff --git a/histories.php b/histories.php index 5f56614..2aa3ba3 100644 --- a/histories.php +++ b/histories.php @@ -51,33 +51,41 @@ $view = '

'.$history_p.'

+
+ +
'; $view .= ' -
-
- -
- '.$general_filters.' -
- - +
'; diff --git a/media.php b/media.php index cca6bad..3bf00a7 100644 --- a/media.php +++ b/media.php @@ -96,6 +96,20 @@ $view = '

'.($media_p ?? 'View, manage, and search media details.').'

+
'; + +if ($create_allowed === 1 && isAllowed('media_scanner' ,$_SESSION['profile'],$_SESSION['permission'],'C') === 1){ + $view .= '📷'; +} + +if ($create_allowed === 1){ + $view .= '+'; +} + +$view .= ' +
'; if (isset($success_msg)){ @@ -105,40 +119,32 @@ $view .= '
'; } + $view .= ' -
'; -if ($create_allowed ===1 && isAllowed('media_scanner' ,$_SESSION['profile'],$_SESSION['permission'],'C') === 1){ - $view .= ''.($button_media_scanner ?? 'media_scanner').''; -} - -if ($create_allowed ===1){ - $view .= ' -
- - '; -} - -$view .= ' -
- -
- '.$general_filters.' -
- - +
'; diff --git a/orders.php b/orders.php index 18fc5c5..64019d3 100644 --- a/orders.php +++ b/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 = '

'.($orders_p ?? '').'

+
'; + +if ($create_allowed === 1){ + $view .= '+'; +} + +$view .= ' +
'; if (isset($success_msg)){ @@ -75,9 +90,27 @@ $view .= '
} $view .= ' -
- '.($button_create_orders ?? 'Create order').' + + +'; + +$view .= '
'.$view_asset_data_rowID.'
diff --git a/partners.php b/partners.php index d8f9faf..b348705 100644 --- a/partners.php +++ b/partners.php @@ -65,6 +65,16 @@ $view = '

'.$partners_p.'

+
'; + +if ($create_allowed === 1){ + $view .= '+'; +} + +$view .= ' +
'; if (isset($success_msg)){ @@ -74,32 +84,32 @@ $view .= '
'; } + $view .= ' -
'; -if ($create_allowed ===1){ - $view .= ''.$button_create_partner.''; -} -$view .= ' -
- -
- '.$general_filters.' -
- - +
'; diff --git a/pricelists.php b/pricelists.php index a83b070..3f1969c 100644 --- a/pricelists.php +++ b/pricelists.php @@ -19,6 +19,11 @@ if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){ header('location: index.php'); exit; } +//PAGE Security +$page_manage = 'pricelists_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; @@ -64,6 +69,16 @@ $view = '

'.($pricelists_p ?? 'Manage pricelists').'

+
'; + +if ($create_allowed === 1){ + $view .= '+'; +} + +$view .= ' +
'; if (isset($success_msg)){ @@ -73,18 +88,24 @@ $view .= '
'; } + $view .= ' -
- '.($button_create_pricelist ?? 'Create pricelist').' -
- - - + '; diff --git a/products.php b/products.php index 129b453..cda7274 100644 --- a/products.php +++ b/products.php @@ -19,6 +19,11 @@ if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){ header('location: index.php'); exit; } +//PAGE Security +$page_manage = 'product_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 +70,16 @@ $view = '

'.$products_p.'

+
'; + +if ($create_allowed === 1){ + $view .= '+'; +} + +$view .= ' +
'; if (isset($success_msg)){ @@ -74,29 +89,32 @@ $view .= '
'; } + $view .= ' -
- '.$button_create_product.' -
- -
- '.$general_filters.' -
- - +
'; diff --git a/products_attributes.php b/products_attributes.php index ee85fea..ef0df19 100644 --- a/products_attributes.php +++ b/products_attributes.php @@ -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 = '

'.($products_attributes_p ?? '').'

+
'; + +if ($create_allowed === 1){ + $view .= '+'; +} + +$view .= ' +
'; if (isset($success_msg)){ @@ -74,18 +88,24 @@ $view .= '
'; } + $view .= ' -
- '.($button_create_products_attribute ?? 'Create attribute').' -
- - - + '; diff --git a/products_software_versions.php b/products_software_versions.php index b533b2e..012e28c 100644 --- a/products_software_versions.php +++ b/products_software_versions.php @@ -29,6 +29,11 @@ if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){ header('location: index.php'); exit; } +//PAGE Security +$page_manage = 'products_software_version_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; @@ -75,6 +80,16 @@ $view = '

'.$software_versions_p.'

+
'; + +if ($create_allowed === 1){ + $view .= '+'; +} + +$view .= ' +
'; if (isset($success_msg)){ @@ -84,20 +99,29 @@ $view .= '
'; } + $view .= ' -
- '.$button_create_software_version.' -
- -
- '.$general_filters.' -
- - +
@@ -129,7 +129,7 @@ $view .= ' - + '; diff --git a/rmas.php b/rmas.php index 2a0c6ef..a6f5ba8 100644 --- a/rmas.php +++ b/rmas.php @@ -68,6 +68,16 @@ $view = '

'.($rmas_p ?? 'View, manage, and search RMA details.').'

+
'; + +if ($create_allowed === 1){ + $view .= '+'; +} + +$view .= ' +
'; if (isset($success_msg)){ @@ -77,38 +87,41 @@ $view .= '
'; } + $view .= ' -
'; -if ($create_allowed ===1){ - $view .= ''.($button_create_rma ?? 'Create RMA').''; -} -$view .= ' -
- -
- '.$general_filters.' -
- - + +
'; diff --git a/servicereport.php b/servicereport.php index af91735..426803e 100644 --- a/servicereport.php +++ b/servicereport.php @@ -27,11 +27,11 @@ if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){ //GET Details from URL $GET_VALUES = urlGETdetails($_GET) ?? ''; //CALL TO API FOR History -$api_url = '/v1/history/'.$GET_VALUES; +$api_url = '/v2/history/'.$GET_VALUES; $history = ioServer($api_url,''); //Decode Payload -if (!empty($history)){$history = decode_payload($history);}else{$history = null;} +if (!empty($history)){$history = json_decode($history);}else{$history = null;} template_header('Servicereport', 'servicereport','view'); $view = ' @@ -60,7 +60,6 @@ if (empty($history)){ $view .= '
'.$servicereport_details.' - '.$_GET['historyID'].' -
'.$service_events.'
diff --git a/servicereports.php b/servicereports.php index 2dbf311..287b25b 100644 --- a/servicereports.php +++ b/servicereports.php @@ -35,16 +35,16 @@ $url = 'index.php?page=servicereports'.$status.$search.$equipmentid; //GET Details from URL $GET_VALUES = urlGETdetails($_GET) ?? ''; //CALL TO API FOR History -$api_url = '/v1/history/type=ServiceReport&'.$GET_VALUES.''; +$api_url = '/v2/history/type=ServiceReport&'.$GET_VALUES.''; $history = ioServer($api_url,''); //Decode Payload -if (!empty($history)){$history = decode_payload($history);}else{$history = null;} +if (!empty($history)){$history = json_decode($history);}else{$history = null;} //Return QueryTotal from API -$api_url = '/v1/history/type=ServiceReport&'.$GET_VALUES.'&totals='; +$api_url = '/v2/history/type=ServiceReport&'.$GET_VALUES.'&totals='; $query_total = ioServer($api_url,''); //Decode Payload -if (!empty($query_total)){$query_total = decode_payload($query_total);}else{$query_total = null;} +if (!empty($query_total)){$query_total = json_decode($query_total);}else{$query_total = null;} template_header('Servicereports', 'servicereports','view'); $view = ' @@ -56,22 +56,33 @@ $view = '

'.$servicereports_p.'

- '.$back_btn_orgin.' +
+ '.$back_btn_orgin.' + +
'; $view .= ' -
-
- - - -
-'; +'; + //Get all related service events if (empty($history)){ $service_events = ' @@ -83,9 +94,6 @@ if (empty($history)){ } $view .= '
-
- '.$servicereports_details.' -
'.$service_events.'
'; diff --git a/style/admin.css b/style/admin.css index a616525..149c671 100644 --- a/style/admin.css +++ b/style/admin.css @@ -3,6 +3,7 @@ --color-light-green: #2FAC66; --color-green: #005655; --color-red: #a75151; + --color-gray: #f9fafb; --text-color: #555555; --text-color-accent: #4a5361; --text-color-accent-2:#606c7e; @@ -121,7 +122,6 @@ aside { position: fixed; z-index: 999999; height: 100%; - width: 260px; display: flex; flex-flow: column; background-color: var(--color-white); @@ -517,10 +517,15 @@ main .content-header .sort .list button:hover { main .content-block { background-color: var(--color-white); margin-top: 25px; - padding: 15px; - box-shadow: 0px 0px 5px 1px rgba(0, 0, 0, 0.03); + padding: 10px; + box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1), 0px 1px 2px 0px rgba(0, 0, 0, 0.06); overflow: hidden; - border-radius: 3px; + border-radius: 4px; + border: 1px solid #e2e8f0; +} + +main .content-block:has(.sortable) { + padding: 0px; } main .content-block .block-header { @@ -821,6 +826,7 @@ main .pagination { display: flex; align-items: center; padding: 25px 0; + justify-content: center; } main .pagination a { @@ -977,18 +983,28 @@ main .manage-order-table .delete-item:hover { .table { overflow-x: auto; - padding: 0 10px; + padding: 0; + border-radius: 8px; + overflow: hidden; } .table table { width: 100%; border-collapse: collapse; + background-color: var(--color-white); } +.table table thead th, .table table thead td { font-weight: 600; - font-size: 14px; - padding: 15px 0; + font-size: 13px; + padding: 16px 20px; + color: #64748b; + text-transform: uppercase; + letter-spacing: 0.5px; + background-color: #f8fafc; + border-bottom: 1px solid #e2e8f0; + text-align: left; } .table table thead td a { @@ -1002,12 +1018,24 @@ main .manage-order-table .delete-item:hover { padding-left: 5px; } -.table table tbody tr:first-child td { - padding-top: 10px; +.table table tbody tr { + border-bottom: 1px solid #f1f5f9; + transition: background-color 0.2s ease; +} + +.table table tbody tr:hover { + background-color: #f8fafc; +} + +.table table tbody tr:last-child { + border-bottom: none; } .table table tbody td { - padding: 5px; + padding: 16px 20px; + font-size: 14px; + color: #334155; + vertical-align: middle; } .table table tbody .img { @@ -1019,48 +1047,60 @@ main .manage-order-table .delete-item:hover { } .table table tbody .status { - padding: 4px 7px; - border-radius: 4px; - background-color: var(--color-indicator-3); + padding: 6px 12px; + border-radius: 6px; + background-color: #10b981; font-weight: 500; font-size: 12px; color: var(--color-white); + display: inline-block; + text-align: center; + min-width: 60px; } .table table tbody .status.enabled { - padding: 4px 7px; - border-radius: 4px; - background-color: var(--color-indicator-1); + padding: 6px 12px; + border-radius: 6px; + background-color: #10b981; font-weight: 500; font-size: 12px; color: var(--color-white); + display: inline-block; + text-align: center; + min-width: 60px; } .table table tbody .status.disabled { - padding: 4px 7px; - border-radius: 4px; - background-color: var(--color-indicator-2); + padding: 6px 12px; + border-radius: 6px; + background-color: #ef4444; font-weight: 500; font-size: 12px; color: var(--color-white); + display: inline-block; + text-align: center; + min-width: 60px; } .status { - padding: 4px 7px; - border-radius: 4px; - background-color: var(--color-indicator-3); + padding: 6px 12px; + border-radius: 6px; + background-color: #10b981; font-weight: 500; font-size: 12px; color: var(--color-white); + display: inline-block; + text-align: center; + min-width: 60px; } .status.enabled { - background-color: var(--color-indicator-1); + background-color: #10b981; } .status.disabled { - background-color: var(--color-indicator-2); + background-color: #ef4444; } .status.id4 { @@ -1255,11 +1295,9 @@ background-color: var(--color-indicator-1); color: var(--color-white); padding: 0 14px; font-size: 12px; - font-weight: 600; - border-radius: 4px; + border-radius: 3px; height: 38px; margin: 2px; - font-style: italic; } .btn2 { @@ -2869,4 +2907,86 @@ main .products .product .price, main .products .products-wrapper .product .price width: 25px; height: 25px; margin: 1px; +} + +/* Filter Panel Styles */ +.content-title { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 10px; +} + +.title-actions { + display: flex; + gap: 10px; + align-items: center; +} + +.filter-panel { + background: #f8f9fa; + border: 1px solid #dee2e6; + border-radius: 3px; +} + +.filter-content { + padding: 10px; +} + +.filter-row { + display: flex; + gap: 15px; + flex-wrap: wrap; + align-items: center; +} + +.filter-group { + flex: 1; + min-width: 150px; +} + +.search-group { + flex: 2; + min-width: 200px; +} + +.filter-group select, +.filter-group input { + width: 100%; + padding: 8px 8px; + border: 1px solid #ddd; + border-radius: 3px; + font-size: 12px; +} + +.filter-actions { + display: flex; + gap: 10px; + justify-content: flex-end; + flex-wrap: wrap; +} + +@media (max-width: 768px) { + .content-title { + flex-direction: column; + align-items: flex-start; + gap: 15px; + } + + .title-actions { + width: 100%; + justify-content: flex-end; + } + + .filter-row { + flex-direction: column; + } + + .filter-group { + width: 100%; + } + + .filter-actions { + justify-content: center; + } } \ No newline at end of file diff --git a/translations.php b/translations.php index 8c8f0ca..e0fc2fc 100644 --- a/translations.php +++ b/translations.php @@ -19,6 +19,11 @@ if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){ header('location: index.php'); exit; } +//PAGE Security +$page_manage = 'translation_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; @@ -64,6 +69,16 @@ $view = '

'.($text_variables_p ?? '').'

+
'; + +if ($create_allowed === 1){ + $view .= '+'; +} + +$view .= ' +
'; if (isset($success_msg)){ @@ -73,18 +88,25 @@ $view .= '
'; } + $view .= ' -
- '.($button_create_text_variable ?? '').' -
- - - + + '; diff --git a/users.php b/users.php index 589d9be..025e91c 100644 --- a/users.php +++ b/users.php @@ -72,7 +72,17 @@ $view = '

'.$users_p.'

- '.$back_btn_orgin.' +
+ '.$back_btn_orgin; + +if ($create_allowed === 1){ + $view .= '+'; +} + +$view .= ' +
'; if (isset($success_msg)){ @@ -82,32 +92,32 @@ $view .= '
'; } + $view .= ' -
'; -if ($create_allowed ===1){ - $view .= ''.$button_create_user.''; -} -$view .= ' -
- -
- '.$general_filters.' -
- - +
';