Changes for page 学校ページ テンプレート
Last modified by Super Admin on 2026/04/05 18:59
From version
25.1
edited by Super Admin
on 2026/03/09 12:37
on 2026/03/09 12:37
Change comment:
There is no comment for this version
To version
17.1
edited by XWikiGuest
on 2026/03/08 00:02
on 2026/03/08 00:02
Change comment:
There is no comment for this version
Summary
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. superadmin1 +XWiki.XWikiGuest - Content
-
... ... @@ -4,7 +4,7 @@ 4 4 5 5 ## メンテナンスバナー 6 6 {{include reference="SeitokaiCode.MaintenanceBannerInclude" /}} 7 - {{html clean="false"}}7 + 8 8 ## --- 学校基本情報フィールド --- 9 9 #set($schoolCode = $doc.getValue('schoolCode')) 10 10 #set($schoolName = $doc.getValue('schoolName')) ... ... @@ -174,8 +174,7 @@ 174 174 #set($authorEnrollmentYear = $!lastAuthorDoc.getValue('enrollmentYear')) 175 175 #set($authorDisplayName = $!lastAuthorDoc.getValue('displayName')) 176 176 #if(!$authorDisplayName || $authorDisplayName == '') 177 - ## false引数でプレーンテキスト(HTMLリンクなし)を取得 178 - #set($authorDisplayName = $xwiki.getUserName($doc.author, false)) 177 + #set($authorDisplayName = $xwiki.getUserName($doc.author)) 179 179 #end 180 180 ## --- 学年の動的計算(学校種別対応) --- 181 181 ## 日本の学校年度: 4月始まり。currentSchoolYear = (月>=4) ? 今年 : 去年 ... ... @@ -214,6 +214,7 @@ 214 214 #end 215 215 216 216 ## --- 信頼性バッジ + ユーザー情報 --- 216 +{{html clean="false"}} 217 217 <div class="seitokai-badge-container"> 218 218 ## 承認バッジ 219 219 #if($authorAccountType == 'admin') ... ... @@ -251,7 +251,10 @@ 251 251 #end 252 252 <span class="badge-info">最終編集: $!escapetool.xml($authorDisplayName) ($xwiki.formatDate($doc.date, "yyyy/MM/dd"))</span> 253 253 </div> 254 +{{/html}} 254 254 256 +{{html clean="false"}} 257 + 255 255 ## --- ① 学校基本情報 + 連絡先(左右グリッド・折りたたみ対応) --- 256 256 <div class="school-info-grid"> 257 257 <div class="school-info-card mobile-collapse" id="card-basic-info"> ... ... @@ -264,7 +264,7 @@ 264 264 <tr><th>共学・別学</th><td>$!escapetool.xml($!coeducation)</td></tr> 265 265 <tr><th>設置者</th><td>$!escapetool.xml($!establishment)</td></tr> 266 266 <tr><th>学校種</th><td>$!escapetool.xml($!schoolLevel)</td></tr> 267 - <tr><th>課程</th><td> #if($schoolSystem && $schoolSystem!= '' && $schoolSystem != '[]')$!escapetool.xml($!schoolSystem)#end</td></tr>270 + <tr><th>課程</th><td>$!escapetool.xml($!schoolSystem)</td></tr> 268 268 <tr><th>公式サイト</th><td>#if($website && $website != '')<a href="$!escapetool.xml($website)" target="_blank" rel="noopener">$!escapetool.xml($website)</a>#else<span class="text-placeholder">未登録</span>#end</td></tr> 269 269 </table> 270 270 #set($infoEditDate = $!doc.getValue('lastInfoEditedDate')) ... ... @@ -543,12 +543,6 @@ 543 543 <span class="author-legend-item"><span class="badge badge-school-external badge-sm"><svg class="ico" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"/><path d="M2 12h20"/><path d="M12 2a15.3 15.3 0 014 10 15.3 15.3 0 01-4 10 15.3 15.3 0 01-4-10 15.3 15.3 0 014-10z"/></svg> 他校</span> 他校所属</span> 544 544 <span class="author-legend-item text-hint">※一般アカウントは所属未確認のため非表示</span> 545 545 </div> 546 - <div class="author-legend"> 547 - <span class="author-legend-title">役割:</span> 548 - <span class="author-legend-item"><span class="badge badge-role-student badge-sm"><svg class="ico" viewBox="0 0 24 24"><path d="M22 10v6M2 10l10-5 10 5-10 5z"/><path d="M6 12v5c0 2 4 3 6 3s6-1 6-3v-5"/></svg> 生徒</span></span> 549 - <span class="author-legend-item"><span class="badge badge-role-officer badge-sm"><svg class="ico" viewBox="0 0 24 24"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg> 役員</span></span> 550 - <span class="author-legend-item"><span class="badge badge-role-teacher badge-sm"><svg class="ico" viewBox="0 0 24 24"><path d="M20 21v-2a4 4 0 00-4-4H8a4 4 0 00-4 4v2"/><circle cx="12" cy="7" r="4"/></svg> 教員</span></span> 551 - </div> 552 552 </div> 553 553 </div> 554 554 ... ... @@ -628,17 +628,6 @@ 628 628 #set($threadPosts = []) 629 629 #set($discard = $threadPosts.addAll($pinnedPosts)) 630 630 #set($discard = $threadPosts.addAll($normalPosts)) 631 - ## report/comment カウント 632 - #set($reportCount = 0) 633 - #set($commentCount = 0) 634 - #foreach($tp in $threadPosts) 635 - #set($tpType = $!tp.getValue('postType')) 636 - #if($tpType == 'comment') 637 - #set($commentCount = $commentCount + 1) 638 - #else 639 - #set($reportCount = $reportCount + 1) 640 - #end 641 - #end 642 642 643 643 {{html clean="false"}} 644 644 <div class="activity-thread" data-fiscal-year="$!escapetool.xml($actFY)"> ... ... @@ -648,7 +648,7 @@ 648 648 <span class="activity-meta">$!escapetool.xml($!actCommittee) | $!escapetool.xml($!actPeriod) #if($actFY != 'unknown')| $!escapetool.xml($actFY)年度#end</span> 649 649 </div> 650 650 <div class="thread-meta-row"> 651 - <span class="thread-post-count">${re portCount}件の報告 ・ ${commentCount}件のコメント</span>637 + <span class="thread-post-count">${threadPosts.size()}件の投稿</span> 652 652 #if($viewerAccountType == 'admin' || $viewerAccountType == 'verified' || $viewerAccountType == 'referred') 653 653 #if($actFeatured == '1') 654 654 <a href="$doc.getURL('view', "action=unfeature&actObj=${actIdx}&form_token=${services.csrf.getToken()}")" class="btn-featured-toggle btn-unfeature" title="特色ある活動の選定を解除"><svg class="ico ico-fixed-14" viewBox="0 0 24 24" fill="currentColor" stroke="none"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg> 特色解除</a> ... ... @@ -659,10 +659,7 @@ 659 659 </div> 660 660 </div> 661 661 662 - ## --- 活動報告セクション --- 663 663 #foreach($post in $threadPosts) 664 - #set($thisPostType = $!post.getValue('postType')) 665 - #if($thisPostType != 'comment') 666 666 #set($postContent = $post.getValue('content')) 667 667 #set($postAuthor = $post.getValue('author')) 668 668 #set($postAccountType = $!post.getValue('authorAccountType')) ... ... @@ -884,52 +884,14 @@ 884 884 #end## /canViewPost 885 885 #end## /postHidden 886 886 #end## /postDeleted 887 - #end## /postType != comment 888 - #end## /foreach reports 889 - 890 - ## --- コメントセクション(折りたたみ) --- 891 - #if($commentCount > 0) 892 - <details class="thread-comments-section"> 893 - <summary class="thread-comments-toggle"> 894 - <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> ${commentCount}件のコメント 895 - </summary> 896 - #foreach($post in $threadPosts) 897 - #set($thisPostType = $!post.getValue('postType')) 898 - #if($thisPostType == 'comment') 899 - #set($postContent = $post.getValue('content')) 900 - #set($postAuthor = $post.getValue('author')) 901 - #set($postAccountType = $!post.getValue('authorAccountType')) 902 - #set($postDate = $post.getValue('createdDate')) 903 - #set($postDeleted = $!post.getValue('deleted')) 904 - #if($postDeleted == 1 || $postDeleted == '1') 905 - <div class="thread-comment thread-comment-deleted"> 906 - <span class="thread-comment-meta">このコメントは削除されました</span> 907 - </div> 908 - #else 909 - #set($postHidden = $!post.getValue('hidden')) 910 - #if($postHidden == 1 || $postHidden == '1') 911 - <div class="thread-comment thread-comment-hidden"> 912 - <span class="thread-comment-meta">このコメントは非表示にされました</span> 913 - </div> 914 - #else 915 - <div class="thread-comment"> 916 - <span class="thread-comment-author">$!escapetool.xml($postAuthor)</span> 917 - <span class="thread-comment-date">$!postDate</span> 918 - <div class="thread-comment-body">$!escapetool.xml($postContent)</div> 919 - </div> 920 - #end 921 - #end 922 - #end 923 - #end 924 - </details> 925 925 #end 926 926 927 927 #if($xcontext.user != "XWiki.XWikiGuest") 928 928 <div class="thread-add-post"> 929 - <a href="/bin/view/SeitokaiCode/ActivityPostForm?schoolPage=${doc.fullName}&activityIndex=${actIdx}&schoolCode=$!escapetool.url($schoolCode)&postType=report" class="btn-thread-add"> 874 + <a href="/xwiki/bin/view/SeitokaiCode/ActivityPostForm?schoolPage=${doc.fullName}&activityIndex=${actIdx}&schoolCode=$!escapetool.url($schoolCode)&postType=report" class="btn-thread-add"> 930 930 + 活動報告を追加 931 931 </a> 932 - <a href="/bin/view/SeitokaiCode/ActivityPostForm?schoolPage=${doc.fullName}&activityIndex=${actIdx}&schoolCode=$!escapetool.url($schoolCode)&postType=comment" class="btn-thread-comment"> 877 + <a href="/xwiki/bin/view/SeitokaiCode/ActivityPostForm?schoolPage=${doc.fullName}&activityIndex=${actIdx}&schoolCode=$!escapetool.url($schoolCode)&postType=comment" class="btn-thread-comment"> 933 933 <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> コメントを書く 934 934 </a> 935 935 </div> ... ... @@ -951,7 +951,7 @@ 951 951 #if($xcontext.user != "XWiki.XWikiGuest") 952 952 {{html clean="false"}} 953 953 <div class="activity-add-section"> 954 - <a href="/bin/view/SeitokaiCode/ActivityForm?schoolPage=${doc.fullName}&schoolCode=$!escapetool.url($schoolCode)" class="btn btn-primary btn-add-activity"> 899 + <a href="/xwiki/bin/view/SeitokaiCode/ActivityForm?schoolPage=${doc.fullName}&schoolCode=$!escapetool.url($schoolCode)" class="btn btn-primary btn-add-activity"> 955 955 <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> 活動を追加 956 956 </a> 957 957 </div> ... ... @@ -1001,7 +1001,7 @@ 1001 1001 ## 新年度に移行ボタン(承認済み・管理者のみ) 1002 1002 #if($viewerAccountType == 'admin' || $viewerAccountType == 'verified') 1003 1003 <div class="archive-action"> 1004 - <a href="/bin/view/SeitokaiCode/YearArchiveAction?schoolPage=${doc.fullName}" class="btn-accent"> 949 + <a href="/xwiki/bin/view/SeitokaiCode/YearArchiveAction?schoolPage=${doc.fullName}" class="btn-accent"> 1005 1005 <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> 1006 1006 ${pageFiscalYear}年度をアーカイブして新年度に移行 1007 1007 </a> ... ... @@ -1020,10 +1020,12 @@ 1020 1020 btn.classList.add('active'); 1021 1021 // 活動スレッドの表示切り替え 1022 1022 document.querySelectorAll('.activity-thread[data-fiscal-year]').forEach(function(thread) { 1023 - if (fy === 'all' || thread.getAttribute('data-fiscal-year') === fy) { 1024 - thread.classList.remove('fy-hidden'); 968 + if (fy === 'all') { 969 + thread.style.display = ''; 970 + } else if (thread.getAttribute('data-fiscal-year') === fy) { 971 + thread.style.display = ''; 1025 1025 } else { 1026 - thread. classList.add('fy-hidden');973 + thread.style.display = 'none'; 1027 1027 } 1028 1028 }); 1029 1029 } ... ... @@ -1108,7 +1108,7 @@ 1108 1108 var csrfEl = document.querySelector('input[name="form_token"]'); 1109 1109 var csrfToken = csrfEl ? csrfEl.value : ''; 1110 1110 var xhr = new XMLHttpRequest(); 1111 - xhr.open('GET', '/bin/view/SeitokaiCode/EditPost?outputSyntax=plain&schoolPage=' + encodeURIComponent(schoolPage) + '&postObj=' + postObjNum + '&newContent=' + encodeURIComponent(newContent) + '&form_token=' + encodeURIComponent(csrfToken), true); 1058 + xhr.open('GET', '/xwiki/bin/view/SeitokaiCode/EditPost?outputSyntax=plain&schoolPage=' + encodeURIComponent(schoolPage) + '&postObj=' + postObjNum + '&newContent=' + encodeURIComponent(newContent) + '&form_token=' + encodeURIComponent(csrfToken), true); 1112 1112 xhr.onload = function() { 1113 1113 try { 1114 1114 var res = JSON.parse(xhr.responseText); ... ... @@ -1128,7 +1128,7 @@ 1128 1128 function confirmDeletePost(schoolPage, postObjNum, token) { 1129 1129 if (!confirm('この投稿を削除しますか?\\n削除後は「この投稿は削除されました」と表示されます。')) return; 1130 1130 var xhr = new XMLHttpRequest(); 1131 - xhr.open('GET', '/bin/view/SeitokaiCode/DeletePost?outputSyntax=plain&schoolPage=' + encodeURIComponent(schoolPage) + '&postObj=' + postObjNum + '&form_token=' + encodeURIComponent(token), true); 1078 + xhr.open('GET', '/xwiki/bin/view/SeitokaiCode/DeletePost?outputSyntax=plain&schoolPage=' + encodeURIComponent(schoolPage) + '&postObj=' + postObjNum + '&form_token=' + encodeURIComponent(token), true); 1132 1132 xhr.onload = function() { 1133 1133 try { 1134 1134 var res = JSON.parse(xhr.responseText);