Changes for page 学校ページ テンプレート
Last modified by Super Admin on 2026/04/05 18:59
From version
42.1
edited by Super Admin
on 2026/03/12 12:20
on 2026/03/12 12:20
Change comment:
There is no comment for this version
To version
34.1
edited by Super Admin
on 2026/03/10 14:35
on 2026/03/10 14:35
Change comment:
There is no comment for this version
Summary
Details
- Page properties
-
- Content
-
... ... @@ -19,6 +19,10 @@ 19 19 ## --- 学校基本情報フィールド --- 20 20 #set($schoolCode = $doc.getValue('schoolCode')) 21 21 #set($schoolName = $doc.getValue('schoolName')) 22 +## ページタイトルを学校名に設定(デフォルトでは学校コードが表示されるため) 23 +#if($schoolName && $schoolName != '') 24 +$!doc.setTitle($schoolName) 25 +#end 22 22 #set($prefecture = $doc.getValue('prefecture')) 23 23 #set($city = $doc.getValue('city')) 24 24 #set($classCount = $doc.getValue('classCount')) ... ... @@ -224,12 +224,6 @@ 224 224 #end 225 225 #end 226 226 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 - 233 233 ## --- 編集ボタン(権限があるユーザーのみ表示) --- 234 234 #set($canEditSchool = false) 235 235 #if(!$isGuest && ($isViewerAdmin || $viewerSchoolCode == $schoolCode)) ... ... @@ -915,10 +915,10 @@ 915 915 916 916 #if($xcontext.user != "XWiki.XWikiGuest") 917 917 <div class="thread-add-post"> 918 - <a href="/bin/SeitokaiCode/ActivityPostForm?schoolPage=${doc.fullName}&activityIndex=${actIdx}&schoolCode=$!escapetool.url($schoolCode)&postType=report" class="btn-thread-add"> 916 + <a href="/bin/view/SeitokaiCode/ActivityPostForm?schoolPage=${doc.fullName}&activityIndex=${actIdx}&schoolCode=$!escapetool.url($schoolCode)&postType=report" class="btn-thread-add"> 919 919 + 活動報告を追加 920 920 </a> 921 - <a href="/bin/SeitokaiCode/ActivityPostForm?schoolPage=${doc.fullName}&activityIndex=${actIdx}&schoolCode=$!escapetool.url($schoolCode)&postType=comment" class="btn-thread-comment"> 919 + <a href="/bin/view/SeitokaiCode/ActivityPostForm?schoolPage=${doc.fullName}&activityIndex=${actIdx}&schoolCode=$!escapetool.url($schoolCode)&postType=comment" class="btn-thread-comment"> 922 922 <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> コメントを書く 923 923 </a> 924 924 </div> ... ... @@ -940,7 +940,7 @@ 940 940 #if($xcontext.user != "XWiki.XWikiGuest") 941 941 {{html clean="false"}} 942 942 <div class="activity-add-section"> 943 - <a href="/bin/SeitokaiCode/ActivityForm?schoolPage=${doc.fullName}&schoolCode=$!escapetool.url($schoolCode)" class="btn btn-primary btn-add-activity"> 941 + <a href="/bin/view/SeitokaiCode/ActivityForm?schoolPage=${doc.fullName}&schoolCode=$!escapetool.url($schoolCode)" class="btn btn-primary btn-add-activity"> 944 944 <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> 活動を追加 945 945 </a> 946 946 </div> ... ... @@ -990,7 +990,7 @@ 990 990 ## 新年度に移行ボタン(承認済み・管理者のみ) 991 991 #if($viewerAccountType == 'admin' || $viewerAccountType == 'verified') 992 992 <div class="archive-action"> 993 - <a href="/bin/SeitokaiCode/YearArchiveAction?schoolPage=${doc.fullName}" class="btn-accent"> 991 + <a href="/bin/view/SeitokaiCode/YearArchiveAction?schoolPage=${doc.fullName}" class="btn-accent"> 994 994 <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> 995 995 ${pageFiscalYear}年度をアーカイブして新年度に移行 996 996 </a> ... ... @@ -1016,9 +1016,8 @@ 1016 1016 } 1017 1017 }); 1018 1018 } 1019 -// ページ読み込み時の 初期化1017 +// ページ読み込み時にデフォルトで現在の年度を表示 1020 1020 document.addEventListener('DOMContentLoaded', function() { 1021 - // デフォルトで現在の年度を表示 1022 1022 var defaultTab = document.querySelector('.activity-fy-tab.active'); 1023 1023 if (defaultTab) { defaultTab.click(); } 1024 1024 // 保存成功時のトースト通知 ... ... @@ -1091,9 +1091,7 @@ 1091 1091 var csrfEl = document.querySelector('input[name="form_token"]'); 1092 1092 var csrfToken = csrfEl ? csrfEl.value : ''; 1093 1093 var xhr = new XMLHttpRequest(); 1094 - xhr.open('POST', '/bin/SeitokaiCode/EditPost?outputSyntax=plain', true); 1095 - xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 1096 - var editPostData = 'schoolPage=' + encodeURIComponent(schoolPage) + '&postObj=' + postObjNum + '&newContent=' + encodeURIComponent(newContent) + '&form_token=' + encodeURIComponent(csrfToken); 1091 + xhr.open('GET', '/bin/view/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); ... ... @@ -1106,7 +1106,7 @@ 1106 1106 } catch(e) { alert('編集に失敗しました'); } 1107 1107 }; 1108 1108 xhr.onerror = function() { alert('通信エラーが発生しました'); }; 1109 - xhr.send( editPostData);1104 + xhr.send(); 1110 1110 } 1111 1111 1112 1112 // 投稿の削除(確認ダイアログ付き) ... ... @@ -1113,9 +1113,7 @@ 1113 1113 function confirmDeletePost(schoolPage, postObjNum, token) { 1114 1114 if (!confirm('この投稿を削除しますか?\\n削除後は「この投稿は削除されました」と表示されます。')) return; 1115 1115 var xhr = new XMLHttpRequest(); 1116 - xhr.open('POST', '/bin/SeitokaiCode/DeletePost?outputSyntax=plain', true); 1117 - xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); 1118 - var deletePostData = 'schoolPage=' + encodeURIComponent(schoolPage) + '&postObj=' + postObjNum + '&form_token=' + encodeURIComponent(token); 1111 + xhr.open('GET', '/bin/view/SeitokaiCode/DeletePost?outputSyntax=plain&schoolPage=' + encodeURIComponent(schoolPage) + '&postObj=' + postObjNum + '&form_token=' + encodeURIComponent(token), true); 1119 1119 xhr.onload = function() { 1120 1120 try { 1121 1121 var res = JSON.parse(xhr.responseText); ... ... @@ -1128,7 +1128,7 @@ 1128 1128 } catch(e) { alert('削除に失敗しました'); } 1129 1129 }; 1130 1130 xhr.onerror = function() { alert('通信エラーが発生しました'); }; 1131 - xhr.send( deletePostData);1124 + xhr.send(); 1132 1132 } 1133 1133 </script> 1134 1134 {{/html}}