Refactor UI elements for consistency and clarity
- Updated action buttons across multiple files to use icons (e.g., "Save" to "💾+", "Delete" to "X").
- Replaced "Cancel" button text with a left arrow (←) for a more intuitive navigation experience.
- Removed unnecessary action columns from tables to streamline the interface.
- Enhanced table rows to be clickable for better user interaction, redirecting to relevant management pages.
- Adjusted font sizes and styles in CSS for improved readability and aesthetics.
- Standardized back button functionality to use a left arrow across various pages.
This commit is contained in:
14
product.php
14
product.php
@@ -14,7 +14,7 @@ $prev_page = $_SESSION['prev_origin'] ?? '';
|
||||
$page = 'product';
|
||||
|
||||
//create backbutton to prev_origin
|
||||
$back_btn_orgin = ($prev_page != '')? '<a href="'.$prev_page.'" class="btn alt mar-right-2">'.$button_back.'</a>':'';
|
||||
$back_btn_orgin = ($prev_page != '')? '<a href="'.$prev_page.'" class="btn alt mar-right-2">←</a>':'';
|
||||
|
||||
//Check if allowed
|
||||
if (isAllowed($page,$_SESSION['profile'],$_SESSION['permission'],'R') === 0){
|
||||
@@ -150,7 +150,7 @@ template_header('Product', 'product', 'view');
|
||||
$view = '
|
||||
<div class="content-title responsive-flex-wrap responsive-pad-bot-3">
|
||||
<h2 class="responsive-width-100">'.$responses->productcode.' - '.(${$responses->productname} ?? $responses->productname).'</h2>
|
||||
<a href="index.php?page='.$_SESSION['origin'].'&p='.$_SESSION['p'].'" class="btn alt mar-right-2">'.$button_cancel.'</a>
|
||||
<a href="index.php?page='.$_SESSION['origin'].'&p='.$_SESSION['p'].'" class="btn alt mar-right-2">←</a>
|
||||
';
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ $view = '
|
||||
//
|
||||
//------------------------------------
|
||||
if ($update_allowed_edit === 1){
|
||||
$view .= '<a href="index.php?page=product_manage&id='.$_GET['rowID'].'" class="btn">Edit</a>';
|
||||
$view .= '<a href="index.php?page=product_manage&id='.$_GET['rowID'].'" class="btn">✏️</a>';
|
||||
}
|
||||
|
||||
$view .= '</div>';
|
||||
@@ -261,18 +261,16 @@ $view .= '<div class="content-block">
|
||||
<th>'.$product_status.'</th>
|
||||
<th>'.$product_version_version.'</th>
|
||||
<th>'.($product_version_config ?? 'Config').'</th>
|
||||
<th>'.$general_actions.'</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
foreach ($product_versions as $version){
|
||||
|
||||
$view .= '<tr>
|
||||
$view .= '<tr onclick="window.location.href=\'index.php?page=products_versions&productrowid='.$_GET['rowID'].'&rowID='.$version->rowID.'\'" style="cursor: pointer;">
|
||||
<td>'.$version->rowID.'</td>
|
||||
<td>'.(($version->status == 1)? '<span class="status enabled">'.$prod_status_1:'<span class="status">'.$prod_status_0).'</td>
|
||||
<td>'.$version->version.'</td>
|
||||
<td>'.(!empty($version->config) ? ($general_yes ?? 'Y') : ($general_no ?? 'N')).'</td>
|
||||
<td><a href="index.php?page=products_versions&productrowid='.$_GET['rowID'].'&rowID='.$version->rowID.'" class="btn_link">'.$general_view.'</a></td>
|
||||
</tr>';
|
||||
}
|
||||
$view .= '
|
||||
@@ -301,17 +299,15 @@ if ($responses->configurable == 1){
|
||||
<th>'.($product_configuration_version ?? 'Config-version').'</th>
|
||||
<th>'.($product_configuration_assignment ?? 'Code').'</th>
|
||||
<th>'.($product_configuration_assignment ?? 'Name').'</th>
|
||||
<th>'.$general_actions.'</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
foreach ($products_configurations as $product_config){
|
||||
|
||||
$view .= '<tr>
|
||||
$view .= '<tr onclick="window.location.href=\'index.php?page=products_configurations&productrowid='.$_GET['rowID'].'&rowID='.$product_config['rowID'].'\'" style="cursor: pointer;">
|
||||
<td>'.$product_config['version'].'</td>
|
||||
<td>'.$product_config['assignment'].'</td>
|
||||
<td>'.(${$product_config['assignment_name']} ?? $product_config['assignment_name']).'</td>
|
||||
<td><a href="index.php?page=products_configurations&productrowid='.$_GET['rowID'].'&rowID='.$product_config['rowID'].'" class="btn_link">'.$general_view.'</a></td>
|
||||
</tr>';
|
||||
}
|
||||
$view .= '
|
||||
|
||||
Reference in New Issue
Block a user