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 112.1 Icon
edited by Super Admin
on 2026/03/25 01:50
Change comment: There is no comment for this version

Summary

Details

Icon Page properties
Content
... ... @@ -1004,13 +1004,13 @@
1004 1004  
1005 1005  <div class="activity-toolbar">
1006 1006   <div class="activity-fy-tabs">
1007 - <button class="activity-fy-tab" onclick="switchActivityFY('$currentFYStr', this)">$currentFYStr 年度</button>
1007 + <button class="activity-fy-tab active" onclick="switchActivityFY('$currentFYStr', this)">$currentFYStr 年度</button>
1008 1008   #foreach($fy in $fySet)
1009 1009   #if($fy != $currentFYStr)
1010 1010   <button class="activity-fy-tab" onclick="switchActivityFY('$fy', this)">$fy 年度</button>
1011 1011   #end
1012 1012   #end
1013 - <button class="activity-fy-tab active" onclick="switchActivityFY('all', this)">全期間</button>
1013 + <button class="activity-fy-tab" onclick="switchActivityFY('all', this)">全期間</button>
1014 1014   </div>
1015 1015   <div class="activity-toolbar-right">
1016 1016   <button class="btn-view-toggle" id="btnViewToggle" onclick="toggleCompactView()" title="タイトルのみ表示">
... ... @@ -1049,47 +1049,22 @@
1049 1049  
1050 1050  {{/html}}
1051 1051  
1052 -## 活動を「年度降順 + 特色あり先頭」で並び替え
1053 -## Step1: fySet から年度を降順ソート($sorttool を使用)
1054 -#set($fyNums = [])
1055 -#foreach($fy in $fySet)
1056 - #if($fy && $fy != '' && $fy != 'unknown')
1057 - #set($discard = $fyNums.add($fy))
1058 - #end
1059 -#end
1060 -#set($fySorted = $sorttool.sort($fyNums))
1061 -#if(!$fySorted)#set($fySorted = $fyNums)#end
1062 -#set($fyDesc = [])
1063 -#foreach($fy in $fySorted)
1064 - #set($discard = $fyDesc.add(0, $fy))
1065 -#end
1066 -#if($fySet.contains('unknown'))
1067 - #set($discard = $fyDesc.add('unknown'))
1068 -#end
1069 -## Step2: 年度降順で featured → normal の順にインデックスを収集
1070 -#set($orderedActivityIndices = [])
1071 -#foreach($curFY in $fyDesc)
1072 - ## 同年度の特色あり活動を先頭に
1073 - #set($actIdx2 = 0)
1052 +## 特色ある活動を先頭に表示するため、並び替え用リストを作成
1053 +#set($featuredActivities = [])
1054 +#set($normalActivities = [])
1055 +#if($activities && $activities.size() > 0)
1074 1074   #foreach($act in $activities)
1075 - #set($aFY2 = $!act.getValue('fiscalYear'))
1076 - #if(!$aFY2 || $aFY2 == '') #set($aFY2 = 'unknown') #end
1077 - #if($aFY2 == $curFY && $act.getValue('featured') == '1')
1078 - #set($discard = $orderedActivityIndices.add($actIdx2))
1057 + #set($isFeatured = $!act.getValue('featured'))
1058 + #if($isFeatured == '1')
1059 + #set($discard = $featuredActivities.add($foreach.index))
1060 + #else
1061 + #set($discard = $normalActivities.add($foreach.index))
1079 1079   #end
1080 - #set($actIdx2 = $actIdx2 + 1)
1081 1081   #end
1082 - ## 同年度の通常活動
1083 - #set($actIdx2 = 0)
1084 - #foreach($act in $activities)
1085 - #set($aFY2 = $!act.getValue('fiscalYear'))
1086 - #if(!$aFY2 || $aFY2 == '') #set($aFY2 = 'unknown') #end
1087 - #if($aFY2 == $curFY && $act.getValue('featured') != '1')
1088 - #set($discard = $orderedActivityIndices.add($actIdx2))
1089 - #end
1090 - #set($actIdx2 = $actIdx2 + 1)
1091 - #end
1092 1092  #end
1065 +#set($orderedActivityIndices = [])
1066 +#set($discard = $orderedActivityIndices.addAll($featuredActivities))
1067 +#set($discard = $orderedActivityIndices.addAll($normalActivities))
1093 1093  
1094 1094  #if($activities && $activities.size() > 0)
1095 1095   #foreach($actIdx in $orderedActivityIndices)
... ... @@ -1619,7 +1619,7 @@
1619 1619   fyTabs.forEach(function(t) { tabContainer.appendChild(t); });
1620 1620   if (allTab) { tabContainer.appendChild(allTab); }
1621 1621   }
1622 - // デフォルトで全期間を表示
1597 + // デフォルトで現在の年度を表示
1623 1623   var defaultTab = document.querySelector('.activity-fy-tab.active');
1624 1624   if (defaultTab) { defaultTab.click(); }
1625 1625   // 保存成功時のトースト通知