Browse Source

add all link for months

master
filesite 2 months ago
parent
commit
6dca807f60
  1. 50
      themes/beauty/views/list/bydate.php

50
themes/beauty/views/list/bydate.php

@ -156,9 +156,9 @@ echo <<<eof
eof; eof;
?> ?>
<div class="im_mainl row"> <div class="im_mainl row">
<?php <?php
//显示图片、视频、音乐筛选链接 //显示图片、视频、音乐筛选链接
$arrShowTypes = array( $arrShowTypes = array(
'all' => '所有', 'all' => '所有',
'image' => '照片', 'image' => '照片',
@ -179,22 +179,34 @@ eof;
//显示月份导航菜单 //显示月份导航菜单
if (!empty($viewData['para_year']) && !empty($viewData['cacheData_keys'][$viewData['para_year']])) { if (!empty($viewData['para_year']) && !empty($viewData['cacheData_keys'][$viewData['para_year']])) {
echo '<ul class="nav nav-pills ml-1 mb-1">'; echo '<ul class="nav nav-pills ml-1 mb-1">';
$months = $viewData['cacheData_keys'][$viewData['para_year']];
asort($months); //排序 $activedClass = empty($viewData['para_month']) ? 'active' : '';
foreach ($months as $month) { $monthLink = Html::getLinkByParams(FSC::$app['requestUrl'], array(
$intMonth = str_replace('m', '', $month); 'show' => $viewData['showType'],
$activedClass = $month == $viewData['para_month'] ? 'active' : ''; 'page' => 1,
$monthLink = Html::getLinkByParams(FSC::$app['requestUrl'], array( 'month' => ''
'show' => $viewData['showType'], ));
'page' => 1, echo <<<eof
'month' => $month, <li role="presentation" class="{$activedClass}"><a href="{$monthLink}">所有</a></li>
)); eof;
echo <<<eof
<li role="presentation" class="{$activedClass}"><a href="{$monthLink}">{$intMonth}月</a></li> $months = $viewData['cacheData_keys'][$viewData['para_year']];
asort($months); //排序
foreach ($months as $month) {
$intMonth = str_replace('m', '', $month);
$activedClass = $month == $viewData['para_month'] ? 'active' : '';
$monthLink = Html::getLinkByParams(FSC::$app['requestUrl'], array(
'show' => $viewData['showType'],
'page' => 1,
'month' => $month,
));
echo <<<eof
<li role="presentation" class="{$activedClass}"><a href="{$monthLink}">{$intMonth}月</a></li>
eof; eof;
} }
echo '</ul>';
echo '</ul>';
} }
@ -274,7 +286,7 @@ eof;
} }
if ($file['extension'] == 'm3u8') { if ($file['extension'] == 'm3u8') {
$linkUrl .= "&name=" . urlencode($file['filename']); $linkUrl .= "&name=" . urlencode($file['filename']);
} }
echo <<<eof echo <<<eof
@ -334,7 +346,7 @@ eof;
} }
} }
?> ?>
</div><!--im_mainl--> </div><!--im_mainl-->
</div><!--img_main--> </div><!--img_main-->
<div class="text-center"> <div class="text-center">

Loading…
Cancel
Save