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

From version Icon 69.1 Icon
edited by Super Admin
on 2026/03/18 11:44
Change comment: There is no comment for this version
To version Icon 71.1 Icon
edited by Super Admin
on 2026/03/18 20:48
Change comment: There is no comment for this version

Summary

Details

Icon Page properties
Content
... ... @@ -1,5 +1,11 @@
1 1  {{velocity}}
2 2  ## ===== 学校ページ テンプレート =====
3 +## ゲストが ?sheet= 付きURL(編集フォーム等)に直接アクセスした場合、ログインページへリダイレクト
4 +#if($xcontext.user == 'XWiki.XWikiGuest' && $request.sheet && $request.sheet != '')
5 + #set($currentUrl = $doc.getURL('view', "sheet=${request.sheet}"))
6 + $response.sendRedirect("/bin/login/XWiki/XWikiLogin?srid=$escapetool.url($currentUrl)")
7 + #stop
8 +#end
3 3  {{html clean="false"}}
4 4  ## メンテナンスバナー({{include}}ではなくインラインで記述し、<p>タグ挿入を回避)
5 5  #set($bannerDoc = $xwiki.getDocument('SeitokaiAdmin.MaintenanceBanner'))
... ... @@ -1060,6 +1060,27 @@
1060 1060  }
1061 1061  // ページ読み込み時の初期化
1062 1062  document.addEventListener('DOMContentLoaded', function() {
1069 + // 年度タブを降順にソート(「全期間」タブは末尾に固定)
1070 + var tabContainer = document.querySelector('.activity-fy-tabs');
1071 + if (tabContainer) {
1072 + var tabs = Array.from(tabContainer.querySelectorAll('.activity-fy-tab'));
1073 + var allTab = null;
1074 + var fyTabs = [];
1075 + tabs.forEach(function(t) {
1076 + var onclickStr = t.getAttribute('onclick') || '';
1077 + if (onclickStr.indexOf("'all'") !== -1) { allTab = t; }
1078 + else { fyTabs.push(t); }
1079 + });
1080 + // 年度タブを数値の降順でソート
1081 + fyTabs.sort(function(a, b) {
1082 + var aYear = parseInt(a.textContent) || 0;
1083 + var bYear = parseInt(b.textContent) || 0;
1084 + return bYear - aYear;
1085 + });
1086 + // DOM再配置
1087 + fyTabs.forEach(function(t) { tabContainer.appendChild(t); });
1088 + if (allTab) { tabContainer.appendChild(allTab); }
1089 + }
1063 1063   // デフォルトで現在の年度を表示
1064 1064   var defaultTab = document.querySelector('.activity-fy-tab.active');
1065 1065   if (defaultTab) { defaultTab.click(); }