mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Ensure consistent handling of duration_new setting
https://xetown.com/questions/1800973
This commit is contained in:
parent
a6a45bcf76
commit
337f2974f6
2 changed files with 26 additions and 16 deletions
|
|
@ -1,23 +1,32 @@
|
|||
<load target="board.default.css" />
|
||||
<load target="board.default.js" type="body" />
|
||||
<!--@if($order_type == "desc")-->
|
||||
{@ $order_type = "asc"; }
|
||||
<!--@else-->
|
||||
{@ $order_type = "desc"; }
|
||||
<!--@end-->
|
||||
<block cond="!$module_info->duration_new = (int)$module_info->duration_new">{@ $module_info->duration_new = 12 }</block>
|
||||
{@ $cate_list = array(); $current_key = null; }
|
||||
<!--@foreach($category_list as $key=>$val)-->
|
||||
<!--@if(!$val->depth)-->
|
||||
{@
|
||||
|
||||
{@
|
||||
if (isset($order_type) && $order_type == 'desc'):
|
||||
$order_type = 'asc';
|
||||
else:
|
||||
$order_type = 'desc';
|
||||
endif;
|
||||
|
||||
$module_info->duration_new = intval($module_info->duration_new ?? 0);
|
||||
if (!$module_info->duration_new):
|
||||
$module_info->duration_new = 12;
|
||||
endif;
|
||||
|
||||
$cate_list = [];
|
||||
$current_key = null;
|
||||
$category_list = $category_list ?? [];
|
||||
foreach ($category_list as $key => $val):
|
||||
if (!$val->depth):
|
||||
$cate_list[$key] = $val;
|
||||
$cate_list[$key]->children = array();
|
||||
$current_key = $key;
|
||||
}
|
||||
<!--@elseif($current_key)-->
|
||||
{@ $cate_list[$current_key]->children[] = $val }
|
||||
<!--@end-->
|
||||
<!--@end-->
|
||||
elseif ($current_key):
|
||||
$cate_list[$current_key]->children[] = $val;
|
||||
endif;
|
||||
endforeach;
|
||||
}
|
||||
|
||||
<div class="board">
|
||||
<!--@if($m && $module_info->mobile_header_text)-->
|
||||
{$module_info->mobile_header_text}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,8 @@
|
|||
$order_type = 'desc';
|
||||
endif;
|
||||
|
||||
if (!empty($module_info->duration_new)):
|
||||
$module_info->duration_new = intval($module_info->duration_new ?? 0);
|
||||
if (!$module_info->duration_new):
|
||||
$module_info->duration_new = 12;
|
||||
endif;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue