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

From version Icon 36.1 Icon
edited by Super Admin
on 2026/03/10 14:40
Change comment: There is no comment for this version
To version Icon 41.1 Icon
edited by Super Admin
on 2026/03/10 22:25
Change comment: There is no comment for this version

Summary

Details

Icon Page properties
Content
... ... @@ -1,13 +1,5 @@
1 1  {{velocity}}
2 2  ## ===== 学校ページ テンプレート =====
3 -## ページタイトルを学校名に設定({{html}}ブロックの前で実行する必要あり)
4 -#set($__titleObj = $doc.getObject('SeitokaiCode.SchoolClass'))
5 -#if($__titleObj)
6 - #set($__titleName = $__titleObj.getValue('schoolName'))
7 - #if($__titleName && $__titleName != '')
8 - $doc.setTitle($__titleName)
9 - #end
10 -#end
11 11  {{html clean="false"}}
12 12  ## メンテナンスバナー({{include}}ではなくインラインで記述し、<p>タグ挿入を回避)
13 13  #set($bannerDoc = $xwiki.getDocument('SeitokaiAdmin.MaintenanceBanner'))
... ... @@ -232,6 +232,12 @@
232 232   #end
233 233  #end
234 234  
227 +## --- 学校名見出し(XWikiデフォルトタイトルを非表示にし、学校名を表示) ---
228 +#if($schoolName && $schoolName != '')
229 +<style>.document-header { display: none !important; }</style>
230 +<h1 class="school-page-title">$!escapetool.xml($schoolName)</h1>
231 +#end
232 +
235 235  ## --- 編集ボタン(権限があるユーザーのみ表示) ---
236 236  #set($canEditSchool = false)
237 237  #if(!$isGuest && ($isViewerAdmin || $viewerSchoolCode == $schoolCode))
... ... @@ -917,10 +917,10 @@
917 917  
918 918   #if($xcontext.user != "XWiki.XWikiGuest")
919 919   <div class="thread-add-post">
920 - <a href="/bin/view/SeitokaiCode/ActivityPostForm?schoolPage=${doc.fullName}&activityIndex=${actIdx}&schoolCode=$!escapetool.url($schoolCode)&postType=report" class="btn-thread-add">
918 + <a href="/bin/SeitokaiCode/ActivityPostForm?schoolPage=${doc.fullName}&activityIndex=${actIdx}&schoolCode=$!escapetool.url($schoolCode)&postType=report" class="btn-thread-add">
921 921   + 活動報告を追加
922 922   </a>
923 - <a href="/bin/view/SeitokaiCode/ActivityPostForm?schoolPage=${doc.fullName}&activityIndex=${actIdx}&schoolCode=$!escapetool.url($schoolCode)&postType=comment" class="btn-thread-comment">
921 + <a href="/bin/SeitokaiCode/ActivityPostForm?schoolPage=${doc.fullName}&activityIndex=${actIdx}&schoolCode=$!escapetool.url($schoolCode)&postType=comment" class="btn-thread-comment">
924 924   <svg class="ico" viewBox="0 0 24 24"><path d="M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"/></svg> コメントを書く
925 925   </a>
926 926   </div>
... ... @@ -942,7 +942,7 @@
942 942  #if($xcontext.user != "XWiki.XWikiGuest")
943 943  {{html clean="false"}}
944 944  <div class="activity-add-section">
945 - <a href="/bin/view/SeitokaiCode/ActivityForm?schoolPage=${doc.fullName}&schoolCode=$!escapetool.url($schoolCode)" class="btn btn-primary btn-add-activity">
943 + <a href="/bin/SeitokaiCode/ActivityForm?schoolPage=${doc.fullName}&schoolCode=$!escapetool.url($schoolCode)" class="btn btn-primary btn-add-activity">
946 946   <svg class="ico" viewBox="0 0 24 24" stroke-width="2.5"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg> 活動を追加
947 947   </a>
948 948  </div>
... ... @@ -992,7 +992,7 @@
992 992   ## 新年度に移行ボタン(承認済み・管理者のみ)
993 993   #if($viewerAccountType == 'admin' || $viewerAccountType == 'verified')
994 994   <div class="archive-action">
995 - <a href="/bin/view/SeitokaiCode/YearArchiveAction?schoolPage=${doc.fullName}" class="btn-accent">
993 + <a href="/bin/SeitokaiCode/YearArchiveAction?schoolPage=${doc.fullName}" class="btn-accent">
996 996   <svg class="ico" viewBox="0 0 24 24" stroke-width="2.5"><path d="M19 21H5a2 2 0 01-2-2V5a2 2 0 012-2h11l5 5v11a2 2 0 01-2 2z"/><polyline points="17 21 17 13 7 13 7 21"/><polyline points="7 3 7 8 15 8"/></svg>
997 997   ${pageFiscalYear}年度をアーカイブして新年度に移行
998 998   </a>
... ... @@ -1093,7 +1093,7 @@
1093 1093   var csrfEl = document.querySelector('input[name="form_token"]');
1094 1094   var csrfToken = csrfEl ? csrfEl.value : '';
1095 1095   var xhr = new XMLHttpRequest();
1096 - xhr.open('GET', '/bin/view/SeitokaiCode/EditPost?outputSyntax=plain&schoolPage=' + encodeURIComponent(schoolPage) + '&postObj=' + postObjNum + '&newContent=' + encodeURIComponent(newContent) + '&form_token=' + encodeURIComponent(csrfToken), true);
1094 + xhr.open('GET', '/bin/SeitokaiCode/EditPost?outputSyntax=plain&schoolPage=' + encodeURIComponent(schoolPage) + '&postObj=' + postObjNum + '&newContent=' + encodeURIComponent(newContent) + '&form_token=' + encodeURIComponent(csrfToken), true);
1097 1097   xhr.onload = function() {
1098 1098   try {
1099 1099   var res = JSON.parse(xhr.responseText);
... ... @@ -1113,7 +1113,7 @@
1113 1113  function confirmDeletePost(schoolPage, postObjNum, token) {
1114 1114   if (!confirm('この投稿を削除しますか?\\n削除後は「この投稿は削除されました」と表示されます。')) return;
1115 1115   var xhr = new XMLHttpRequest();
1116 - xhr.open('GET', '/bin/view/SeitokaiCode/DeletePost?outputSyntax=plain&schoolPage=' + encodeURIComponent(schoolPage) + '&postObj=' + postObjNum + '&form_token=' + encodeURIComponent(token), true);
1114 + xhr.open('GET', '/bin/SeitokaiCode/DeletePost?outputSyntax=plain&schoolPage=' + encodeURIComponent(schoolPage) + '&postObj=' + postObjNum + '&form_token=' + encodeURIComponent(token), true);
1117 1117   xhr.onload = function() {
1118 1118   try {
1119 1119   var res = JSON.parse(xhr.responseText);