category
This commit is contained in:
@@ -28,8 +28,8 @@ function get_category_list($parentId=0, $currentCat="",$level=1, $prefix="", $ca
|
||||
$stt ++;
|
||||
$imgUrl = (strlen($cat_info["thumbnail"]) > 2) ? " <img src=\"".$cat_info["thumbnail"]."\" style=\"max-width:30px; max-height:30px;\" />" : "";
|
||||
|
||||
if($cat_info["status"]) $status = "<a href=\"javascript:update_status(".$cat_id.",'off')\">Hạ xuống</a>";
|
||||
else $status = "<a href=\"javascript:update_status(".$cat_id.",'on')\" style=\"background-color:#FFCC00;\">Hiển thị</a>";
|
||||
if($cat_info["status"]) $status = "<a href=\"javascript:update_status(".$cat_id.",'off')\" class='w-[30px] h-[30px] border-[1px] border-[#9E9E9E] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]'><i class='fa-regular fa-eye-slash text-[#9E9E9E]'></i></a>";
|
||||
else $status = "<a href=\"javascript:update_status(".$cat_id.",'on')\" class='w-[30px] h-[30px] border-[1px] border-[#0041E8] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]'><i class='fa-regular fa-eye text-[#0041E8]'></i></a>";
|
||||
|
||||
$edit_link ="/admin/product/category-form?id=".$cat_id;
|
||||
|
||||
@@ -49,41 +49,47 @@ function get_category_list($parentId=0, $currentCat="",$level=1, $prefix="", $ca
|
||||
<tr id='row_".$cat_id."' class='parent_".$parentId." row' ". $hide_this ."
|
||||
onmouseover=\"this.className='row-hover parent_".$parentId."'\" onmouseout=\"this.className='parent_".$parentId."'\">
|
||||
|
||||
<td>".$cat_id."</td>
|
||||
|
||||
<td>
|
||||
<a name='cat_".$cat_id."'></a>
|
||||
". $extra_space . $prefix . $stt.". ". $show_category_name . $imgUrl."
|
||||
</td>
|
||||
|
||||
<td>".$cat_info['item_count']." - <a href='/admin/product?category=".$cat_id."'>Xem</a></td>
|
||||
|
||||
<td>
|
||||
<a href='".$cat_info['request_path']."' title='Mở tại website' target='_blank'>Web</a>
|
||||
|
||||
<td>
|
||||
<a href='".$cat_info['request_path']."' title='Mở tại website' target='_blank'>Xem trang</a>
|
||||
</td>
|
||||
|
||||
|
||||
<td>".$cat_id."</td>
|
||||
<td>413787</td>
|
||||
<td><a href='/admin/product?category=".$cat_id."'>1292</a></td>
|
||||
<td>
|
||||
<input type=text id=order_".$cat_id." value='".$cat_info["ordering"]."' size=2 onchange=\"update_order(".$cat_id.",this.value)\" />
|
||||
<span class='status-ordering-".$cat_id."'></span>
|
||||
</td>
|
||||
<td>
|
||||
SP + Danh mục con
|
||||
</td>
|
||||
|
||||
";
|
||||
|
||||
if(IS_DEFAULT_LANGUAGE) {
|
||||
$categoryTree .= "
|
||||
<td>
|
||||
<a href='/admin/product/category-attribute?id=".$cat_id."&popup=1' class='pop-up'>Thuộc tính</a> (".$cat_info['attribute_count'].")
|
||||
<a href='/admin/product/category-attribute?id=".$cat_id."&popup=1' class='pop-up'>Tổng</a> (".$cat_info['attribute_count'].")
|
||||
</td>
|
||||
<td>
|
||||
<span id=status-".$cat_id.">".$status."</span> |
|
||||
<a href=\"".$edit_link."\">Sửa lại</a> |
|
||||
<span class='status-delete-".$cat_id."'><a href=\"javascript:deleteThis(".$cat_id.")\">Xóa</a></span>
|
||||
<div class='list-btn flex items-center'>
|
||||
<a href=\"".$edit_link."\" class='w-[30px] h-[30px] border-[1px] border-[#0041E8] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]'><i class='icons icon-edit'></i></a>
|
||||
<a class='w-[30px] h-[30px] border-[1px] border-[#0041E8] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]' href='javascript:set_category_feature(.$cat_id.,'off')'><i class='icons icon-feature'></i></a>
|
||||
<span id=status-".$cat_id.">".$status."</span>
|
||||
<span class='status-delete-".$cat_id."'><a href=\"javascript:deleteThis(".$cat_id.")\" class='w-[30px] h-[30px] border-[1px] border-[#9E9E9E] rounded-[4px] text-center leading-[30px] flex items-center justify-center mr-[5px]'><i class='icons icon-remove'></i></a></span>
|
||||
</div>
|
||||
</td>
|
||||
";
|
||||
|
||||
}else{
|
||||
$categoryTree .= "
|
||||
<td>
|
||||
<a href=\"".$edit_link."\">Sửa lại</a>
|
||||
<a href=\"".$edit_link."\"><i class='icons icon-edit'></i></a>
|
||||
</td>
|
||||
";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user