Last modified by Super Admin on 2026/04/05 18:59

From version Icon 114.1 Icon
edited by Super Admin
on 2026/03/27 03:45
Change comment: There is no comment for this version
To version Icon 116.1 Icon
edited by Super Admin
on 2026/03/27 15:41
Change comment: There is no comment for this version

Summary

Details

Icon Page properties
Content
... ... @@ -1050,7 +1050,7 @@
1050 1050  {{/html}}
1051 1051  
1052 1052  ## 活動を「年度降順 + 特色あり先頭」で並び替え
1053 -## Step1: fySet から年度を降順ソート($sorttool を使用
1053 +## Step1: fySet から年度を降順ソート(Velocity ネイティブ実装
1054 1054  #set($fyNums = [])
1055 1055  #foreach($fy in $fySet)
1056 1056   #if($fy && $fy != '' && $fy != 'unknown')
... ... @@ -1057,15 +1057,32 @@
1057 1057   #set($discard = $fyNums.add($fy))
1058 1058   #end
1059 1059  #end
1060 -#set($fySorted = $sorttool.sort($fyNums))
1061 -#if(!$fySorted)#set($fySorted = $fyNums)#end
1060 +## 最大値を順番に取り出して降順リストを構築(最大20年度まで対応)
1062 1062  #set($fyDesc = [])
1063 -#foreach($fy in $fySorted)
1064 - #set($discard = $fyDesc.add(0, $fy))
1062 +#set($fyRemaining = [])
1063 +#foreach($fy in $fyNums)
1064 + #set($discard = $fyRemaining.add($fy))
1065 1065  #end
1066 -#if($fySet.contains('unknown'))
1067 - #set($discard = $fyDesc.add('unknown'))
1066 +#foreach($dummy in [1..20])
1067 + #if($fyRemaining.isEmpty())#break#end
1068 + #set($fyMax = $fyRemaining.get(0))
1069 + #foreach($fy in $fyRemaining)
1070 + #if($fy > $fyMax)#set($fyMax = $fy)#end
1071 + #end
1072 + #set($discard = $fyDesc.add($fyMax))
1073 + #set($fyNextRem = [])
1074 + #set($fyMaxRemoved = false)
1075 + #foreach($fy in $fyRemaining)
1076 + #if(!$fyMaxRemoved && $fy == $fyMax)
1077 + #set($fyMaxRemoved = true)
1078 + #else
1079 + #set($discard = $fyNextRem.add($fy))
1080 + #end
1081 + #end
1082 + #set($fyRemaining = $fyNextRem)
1068 1068  #end
1084 +## 年度未設定の活動は末尾に表示(fySetに'unknown'は入らないため無条件追加)
1085 +#set($discard = $fyDesc.add('unknown'))
1069 1069  ## Step2: 年度降順で featured → normal の順にインデックスを収集
1070 1070  #set($orderedActivityIndices = [])
1071 1071  #foreach($curFY in $fyDesc)
... ... @@ -1598,7 +1598,7 @@
1598 1598  }
1599 1599  // ページ読み込み時の初期化
1600 1600  document.addEventListener('DOMContentLoaded', function() {
1601 - // 年度タブを降順にソート(「全期間」タブは末尾に固定)
1618 + // 年度タブを降順にソート(「全期間」タブは先頭に固定)
1602 1602   var tabContainer = document.querySelector('.activity-fy-tabs');
1603 1603   if (tabContainer) {
1604 1604   var tabs = Array.from(tabContainer.querySelectorAll('.activity-fy-tab'));
... ... @@ -1615,9 +1615,9 @@
1615 1615   var bYear = parseInt(b.textContent) || 0;
1616 1616   return bYear - aYear;
1617 1617   });
1618 - // DOM再配置
1619 - fyTabs.forEach(function(t) { tabContainer.appendChild(t); });
1635 + // DOM再配置(全期間を先頭、年度タブを降順で続ける)
1620 1620   if (allTab) { tabContainer.appendChild(allTab); }
1637 + fyTabs.forEach(function(t) { tabContainer.appendChild(t); });
1621 1621   }
1622 1622   // デフォルトで全期間を表示
1623 1623   var defaultTab = document.querySelector('.activity-fy-tab.active');