|
|
@ -67,21 +67,34 @@ |
|
|
<div class="d-tabs" role="tablist" aria-label="Resource categories"> |
|
|
<div class="d-tabs" role="tablist" aria-label="Resource categories"> |
|
|
{php} |
|
|
{php} |
|
|
$download_cid = (string)input('cid', ''); |
|
|
$download_cid = (string)input('cid', ''); |
|
|
|
|
|
$download_all_id = (string)($current_cate['id'] ?? ''); |
|
|
if ($download_cid === '') { |
|
|
if ($download_cid === '') { |
|
|
$download_cid = (string)($current_cate['id'] ?? ''); |
|
|
|
|
|
|
|
|
$download_cid = $download_all_id; |
|
|
} |
|
|
} |
|
|
$download_all_id = (string)($current_cate['id'] ?? ''); |
|
|
|
|
|
|
|
|
$download_keywords = (string)input('keywords', ''); |
|
|
{/php} |
|
|
{/php} |
|
|
<button type="button" class="d-tabs__item{if $download_cid == $download_all_id} is-active{/if}" role="tab" data-tab="{$current_cate.id}" aria-selected="{if $download_cid == $download_all_id}true{else /}false{/if}">All</button> |
|
|
<button type="button" class="d-tabs__item{if $download_cid == $download_all_id} is-active{/if}" role="tab" data-tab="{$current_cate.id}" aria-selected="{if $download_cid == $download_all_id}true{else /}false{/if}">All</button> |
|
|
{volist name="sub_cates" id="vo"} |
|
|
{volist name="sub_cates" id="vo"} |
|
|
{php} |
|
|
{php} |
|
|
$count = getCategoryChildrenCount($vo['id']); |
|
|
$count = getCategoryChildrenCount($vo['id']); |
|
|
$vo_id = (string)($vo['id'] ?? ''); |
|
|
$vo_id = (string)($vo['id'] ?? ''); |
|
|
|
|
|
$group_active = false; |
|
|
|
|
|
$group_label = $vo['title'] ?? ''; |
|
|
|
|
|
if ($count > 0) { |
|
|
|
|
|
$group_children = (new \app\model\Category())->where('parent_id', $vo['id'])->field('id,title')->select()->toArray(); |
|
|
|
|
|
foreach ($group_children as $gc) { |
|
|
|
|
|
if ((string)($gc['id'] ?? '') === $download_cid) { |
|
|
|
|
|
$group_active = true; |
|
|
|
|
|
$group_label = $gc['title'] ?? $group_label; |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
{/php} |
|
|
{/php} |
|
|
{if $count > 0} |
|
|
{if $count > 0} |
|
|
<div class="d-tabs__group"> |
|
|
<div class="d-tabs__group"> |
|
|
<button type="button" class="d-tabs__item" role="tab" aria-selected="false" aria-expanded="false" data-dropdown-trigger data-tab="{$vo.id}"> |
|
|
|
|
|
<span>{$vo.title}</span> |
|
|
|
|
|
|
|
|
<button type="button" class="d-tabs__item{if $group_active} is-active{/if}" role="tab" aria-selected="{if $group_active}true{else /}false{/if}" aria-expanded="false" data-dropdown-trigger data-tab="{$vo.id}"> |
|
|
|
|
|
<span>{$group_label}</span> |
|
|
<svg class="d-tabs__chevron" viewBox="0 0 11.2728 6.90918" width="11" height="7" fill="none" aria-hidden="true"> |
|
|
<svg class="d-tabs__chevron" viewBox="0 0 11.2728 6.90918" width="11" height="7" fill="none" aria-hidden="true"> |
|
|
<path d="M0.636353 0.636272L5.63635 5.63627L10.6364 0.63623" stroke="currentColor" stroke-width="1.8" /> |
|
|
<path d="M0.636353 0.636272L5.63635 5.63627L10.6364 0.63623" stroke="currentColor" stroke-width="1.8" /> |
|
|
</svg> |
|
|
</svg> |
|
|
@ -99,7 +112,7 @@ |
|
|
</div> |
|
|
</div> |
|
|
<form class="s-search" role="search" data-tab-search> |
|
|
<form class="s-search" role="search" data-tab-search> |
|
|
<img class="s-search__icon" src="data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='24.000000'%20height='24.000000'%20fill='none'%3e%3crect%20id='搜索'%20width='24.000000'%20height='24.000000'%20x='0.000000'%20y='0.000000'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3cpath%20id='矢量%203'%20d='M15.8481%2017.1208C14.4808%2018.2114%2012.7482%2018.8633%2010.8633%2018.8633C6.44506%2018.8633%202.86328%2015.2816%202.86328%2010.8633C2.86328%206.445%206.44506%202.86328%2010.8633%202.86328C15.2815%202.86328%2018.8633%206.445%2018.8633%2010.8633C18.8633%2012.7482%2018.2114%2014.4808%2017.1208%2015.8481L21.136%2019.8633L19.8633%2021.136L15.8481%2017.1208ZM17.0632%2010.8633C17.0632%207.43908%2014.2874%204.66326%2010.8633%204.66326C7.4392%204.66326%204.66332%207.43908%204.66332%2010.8633C4.66332%2014.2875%207.4392%2017.0633%2010.8633%2017.0633C14.2874%2017.0633%2017.0632%2014.2875%2017.0632%2010.8633Z'%20fill='rgb(175,181,185)'%20fill-rule='evenodd'%20/%3e%3c/svg%3e" alt="" width="24" height="24" /> |
|
|
<img class="s-search__icon" src="data:image/svg+xml,%3csvg%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='24.000000'%20height='24.000000'%20fill='none'%3e%3crect%20id='搜索'%20width='24.000000'%20height='24.000000'%20x='0.000000'%20y='0.000000'%20fill='rgb(255,255,255)'%20fill-opacity='0'%20/%3e%3cpath%20id='矢量%203'%20d='M15.8481%2017.1208C14.4808%2018.2114%2012.7482%2018.8633%2010.8633%2018.8633C6.44506%2018.8633%202.86328%2015.2816%202.86328%2010.8633C2.86328%206.445%206.44506%202.86328%2010.8633%202.86328C15.2815%202.86328%2018.8633%206.445%2018.8633%2010.8633C18.8633%2012.7482%2018.2114%2014.4808%2017.1208%2015.8481L21.136%2019.8633L19.8633%2021.136L15.8481%2017.1208ZM17.0632%2010.8633C17.0632%207.43908%2014.2874%204.66326%2010.8633%204.66326C7.4392%204.66326%204.66332%207.43908%204.66332%2010.8633C4.66332%2014.2875%207.4392%2017.0633%2010.8633%2017.0633C14.2874%2017.0633%2017.0632%2014.2875%2017.0632%2010.8633Z'%20fill='rgb(175,181,185)'%20fill-rule='evenodd'%20/%3e%3c/svg%3e" alt="" width="24" height="24" /> |
|
|
<input class="s-search__input" type="search" name="keywords" placeholder="Search files to download" autocomplete="off" /> |
|
|
|
|
|
|
|
|
<input class="s-search__input" type="search" name="keywords" value="{$download_keywords}" placeholder="Search files to download" autocomplete="off" /> |
|
|
<button class="s-search__btn" type="submit">Search</button> |
|
|
<button class="s-search__btn" type="submit">Search</button> |
|
|
</form> |
|
|
</form> |
|
|
</div> |
|
|
</div> |
|
|
|