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

From version Icon 118.1 Icon
edited by Super Admin
on 2026/04/01 17:36
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
... ... @@ -387,7 +387,7 @@
387 387  #end
388 388  #if($canEditSchool)
389 389  <div style="text-align:right; margin-bottom:12px;">
390 - <a href="$doc.getURL('view', 'sheet=SeitokaiCode.SchoolEditForm')" class="btn-school-edit"><svg class="ico" viewBox="0 0 24 24"><path d="M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z"/></svg> 情報を編集</a>
390 + <a href="$doc.getURL('view', 'sheet=SeitokaiCode.SchoolEditForm')" class="btn-school-edit"><svg class="ico" viewBox="0 0 24 24"><path d="M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z"/></svg> 基本情報を編集</a>
391 391  </div>
392 392  #end
393 393  
... ... @@ -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,67 +1049,22 @@
1049 1049  
1050 1050  {{/html}}
1051 1051  
1052 -## 活動を「年度降順 + 特色あり先頭」で並び替え
1053 -## Step1: fySet から年度を降順ソート(Velocity ネイティブ実装)
1054 -#set($fyNums = [])
1055 -#foreach($fy in $fySet)
1056 - #if($fy && $fy != '' && $fy != 'unknown')
1057 - #set($fyInt = $mathtool.toInteger($fy))
1058 - #if($fyInt)
1059 - #set($discard = $fyNums.add($fyInt))
1060 - #end
1061 - #end
1062 -#end
1063 -## 最大値を順番に取り出して降順リストを構築(最大20年度まで対応)
1064 -#set($fyDesc = [])
1065 -#set($fyRemaining = [])
1066 -#foreach($fy in $fyNums)
1067 - #set($discard = $fyRemaining.add($fy))
1068 -#end
1069 -#foreach($dummy in [1..20])
1070 - #if($fyRemaining.isEmpty())#break#end
1071 - #set($fyMax = $fyRemaining.get(0))
1072 - #foreach($fy in $fyRemaining)
1073 - #if($fy > $fyMax)#set($fyMax = $fy)#end
1074 - #end
1075 - #set($discard = $fyDesc.add($fyMax))
1076 - #set($fyNextRem = [])
1077 - #set($fyMaxRemoved = false)
1078 - #foreach($fy in $fyRemaining)
1079 - #if(!$fyMaxRemoved && $fy == $fyMax)
1080 - #set($fyMaxRemoved = true)
1052 +## 特色ある活動を先頭に表示するため、並び替え用リストを作成
1053 +#set($featuredActivities = [])
1054 +#set($normalActivities = [])
1055 +#if($activities && $activities.size() > 0)
1056 + #foreach($act in $activities)
1057 + #set($isFeatured = $!act.getValue('featured'))
1058 + #if($isFeatured == '1')
1059 + #set($discard = $featuredActivities.add($foreach.index))
1081 1081   #else
1082 - #set($discard = $fyNextRem.add($fy))
1061 + #set($discard = $normalActivities.add($foreach.index))
1083 1083   #end
1084 1084   #end
1085 - #set($fyRemaining = $fyNextRem)
1086 1086  #end
1087 -## 年度未設定の活動は末尾に表示(fySetに'unknown'は入らないため無条件追加)
1088 -#set($discard = $fyDesc.add('unknown'))
1089 -## Step2: 年度降順で featured → normal の順にインデックスを収集
1090 1090  #set($orderedActivityIndices = [])
1091 -#foreach($curFY in $fyDesc)
1092 - ## 同年度の特色あり活動を先頭に
1093 - #set($actIdx2 = 0)
1094 - #foreach($act in $activities)
1095 - #set($aFY2 = $!act.getValue('fiscalYear'))
1096 - #if(!$aFY2 || $aFY2 == '') #set($aFY2 = 'unknown') #end
1097 - #if($aFY2 == $curFY && $act.getValue('featured') == '1')
1098 - #set($discard = $orderedActivityIndices.add($actIdx2))
1099 - #end
1100 - #set($actIdx2 = $actIdx2 + 1)
1101 - #end
1102 - ## 同年度の通常活動
1103 - #set($actIdx2 = 0)
1104 - #foreach($act in $activities)
1105 - #set($aFY2 = $!act.getValue('fiscalYear'))
1106 - #if(!$aFY2 || $aFY2 == '') #set($aFY2 = 'unknown') #end
1107 - #if($aFY2 == $curFY && $act.getValue('featured') != '1')
1108 - #set($discard = $orderedActivityIndices.add($actIdx2))
1109 - #end
1110 - #set($actIdx2 = $actIdx2 + 1)
1111 - #end
1112 -#end
1066 +#set($discard = $orderedActivityIndices.addAll($featuredActivities))
1067 +#set($discard = $orderedActivityIndices.addAll($normalActivities))
1113 1113  
1114 1114  #if($activities && $activities.size() > 0)
1115 1115   #foreach($actIdx in $orderedActivityIndices)
... ... @@ -1618,7 +1618,7 @@
1618 1618  }
1619 1619  // ページ読み込み時の初期化
1620 1620  document.addEventListener('DOMContentLoaded', function() {
1621 - // 年度タブを降順にソート(「全期間」タブは先頭に固定)
1576 + // 年度タブを降順にソート(「全期間」タブは末尾に固定)
1622 1622   var tabContainer = document.querySelector('.activity-fy-tabs');
1623 1623   if (tabContainer) {
1624 1624   var tabs = Array.from(tabContainer.querySelectorAll('.activity-fy-tab'));
... ... @@ -1635,11 +1635,11 @@
1635 1635   var bYear = parseInt(b.textContent) || 0;
1636 1636   return bYear - aYear;
1637 1637   });
1638 - // DOM再配置(全期間を先頭、年度タブを降順で続ける)
1639 - if (allTab) { tabContainer.appendChild(allTab); }
1593 + // DOM再配置
1640 1640   fyTabs.forEach(function(t) { tabContainer.appendChild(t); });
1595 + if (allTab) { tabContainer.appendChild(allTab); }
1641 1641   }
1642 - // デフォルトで全期間を表示
1597 + // デフォルトで現在の年度を表示
1643 1643   var defaultTab = document.querySelector('.activity-fy-tab.active');
1644 1644   if (defaultTab) { defaultTab.click(); }
1645 1645   // 保存成功時のトースト通知