CMXX - Translations - updates
This commit is contained in:
@@ -34,24 +34,24 @@ $GET_VALUES = urlGETdetails($_GET) ?? '';
|
||||
$api_url = '/v2/translations/'.$GET_VALUES;
|
||||
$responses = ioServer($api_url,'');
|
||||
//Decode Payload
|
||||
if (!empty($responses)){$responses = decode_payload($responses);}else{$responses = null;}
|
||||
if (!empty($responses)){$responses = json_decode($responses,true);}else{$responses = null;}
|
||||
|
||||
//Return QueryTotal from API
|
||||
$api_url = '/v2/translations/'.$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,true);}else{$query_total = null;}
|
||||
|
||||
// Handle success messages
|
||||
if (isset($_GET['success_msg'])) {
|
||||
if ($_GET['success_msg'] == 1) {
|
||||
$success_msg = $message_pr_1;
|
||||
$success_msg = $message_tv_1;
|
||||
}
|
||||
if ($_GET['success_msg'] == 2) {
|
||||
$success_msg = $message_pr_2;
|
||||
$success_msg = $message_tv_2;
|
||||
}
|
||||
if ($_GET['success_msg'] == 3) {
|
||||
$success_msg = $message_pr_3;
|
||||
$success_msg = $message_tv_3;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,8 +61,8 @@ $view = '
|
||||
<div class="title">
|
||||
<i class="fa-solid fa-box-open"></i>
|
||||
<div class="txt">
|
||||
<h2>'.$products_h2.' ('.$query_total.')</h2>
|
||||
<p>'.$products_p.'</p>
|
||||
<h2>'.($text_variables_h2 ?? '').' ('.$query_total.')</h2>
|
||||
<p>'.($text_variables_p ?? '').'</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>';
|
||||
@@ -76,23 +76,12 @@ $view .= ' <div class="msg success">
|
||||
}
|
||||
$view .= '
|
||||
<div class="content-header responsive-flex-column pad-top-5">
|
||||
<a href="index.php?page=translation_manage" class="btn">'.$button_create_product.'</a>
|
||||
<a href="index.php?page=translation_manage" class="btn">'.($button_create_text_variable ?? '').'</a>
|
||||
<form action="" method="get">
|
||||
<input type="hidden" name="page" value="translations">
|
||||
<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>'.$prod_status_text.'</option>
|
||||
<option value="0"'.($status==0?' selected':'').'>'.$prod_status_0.'</option>
|
||||
<option value="1"'.($status==1?' selected':'').'>'.$prod_status_1.'</option>
|
||||
</select>
|
||||
<button type="submit">'.$button_apply.'</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search">
|
||||
<label for="search">
|
||||
<input id="search" type="text" name="search" placeholder="'.$product_search .'" value="" class="responsive-width-100">
|
||||
<input id="search" type="text" name="search" placeholder="'.($text_variable_search ?? '').'" value="" class="responsive-width-100">
|
||||
<i class="fas fa-search"></i>
|
||||
</label>
|
||||
</div>
|
||||
@@ -106,11 +95,9 @@ $view .= '
|
||||
<table class="sortable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>'.$product_code.'</th>
|
||||
<th>'.$product_category.'</th>
|
||||
<th>'.$product_parttype.'</th>
|
||||
<th class="responsive-hidden"></th>
|
||||
<th>'.$product_name.'</th>
|
||||
<th>'.($text_variable_rowID ?? '').'</th>
|
||||
<th>'.($text_variable_variable ?? '').'</th>
|
||||
<th class="responsive-hidden">'.$general_created.'</th>
|
||||
<th>'.$general_actions.'</th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -121,13 +108,19 @@ $view .= '
|
||||
|
||||
$view .= '
|
||||
<tr>
|
||||
<td colspan="8" style="text-align:center;">'.$message_no_products.'</td>
|
||||
<td colspan="8" style="text-align:center;">'.($message_no_text_variables ?? '').'</td>
|
||||
</tr>';
|
||||
}
|
||||
else {
|
||||
|
||||
var_dump($responses);
|
||||
foreach ($responses as $response){
|
||||
$view .= '
|
||||
<tr>
|
||||
<td>'.$response['rowID'].'</td>
|
||||
<td>'.$response['variable'].'</td>
|
||||
<td class="responsive-hidden">'.getRelativeTime($response['created']).'</td>
|
||||
<td><a href="index.php?page=translation_manage&rowID='.$response['rowID'].'" class="btn_link">'.$general_view .'</a></td>
|
||||
</tr>';
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user