Changes for page 学校ページ テンプレート
Last modified by Super Admin on 2026/04/05 18:59
From version
26.1
edited by Super Admin
on 2026/03/09 12:38
on 2026/03/09 12:38
Change comment:
There is no comment for this version
To version
21.1
edited by Super Admin
on 2026/03/08 18:52
on 2026/03/08 18:52
Change comment:
There is no comment for this version
Summary
Details
- Page properties
-
- Content
-
... ... @@ -3,7 +3,8 @@ 3 3 ## このテンプレートは学校ページの表示と入力フォームを制御します。 4 4 5 5 ## メンテナンスバナー 6 -{{include reference="SeitokaiCode.MaintenanceBannerInclude" /}}{{html clean="false"}} 6 +{{include reference="SeitokaiCode.MaintenanceBannerInclude" /}} 7 + 7 7 ## --- 学校基本情報フィールド --- 8 8 #set($schoolCode = $doc.getValue('schoolCode')) 9 9 #set($schoolName = $doc.getValue('schoolName')) ... ... @@ -173,8 +173,7 @@ 173 173 #set($authorEnrollmentYear = $!lastAuthorDoc.getValue('enrollmentYear')) 174 174 #set($authorDisplayName = $!lastAuthorDoc.getValue('displayName')) 175 175 #if(!$authorDisplayName || $authorDisplayName == '') 176 - ## false引数でプレーンテキスト(HTMLリンクなし)を取得 177 - #set($authorDisplayName = $xwiki.getUserName($doc.author, false)) 177 + #set($authorDisplayName = $xwiki.getUserName($doc.author)) 178 178 #end 179 179 ## --- 学年の動的計算(学校種別対応) --- 180 180 ## 日本の学校年度: 4月始まり。currentSchoolYear = (月>=4) ? 今年 : 去年 ... ... @@ -213,6 +213,7 @@ 213 213 #end 214 214 215 215 ## --- 信頼性バッジ + ユーザー情報 --- 216 +{{html clean="false"}} 216 216 <div class="seitokai-badge-container"> 217 217 ## 承認バッジ 218 218 #if($authorAccountType == 'admin') ... ... @@ -250,7 +250,10 @@ 250 250 #end 251 251 <span class="badge-info">最終編集: $!escapetool.xml($authorDisplayName) ($xwiki.formatDate($doc.date, "yyyy/MM/dd"))</span> 252 252 </div> 254 +{{/html}} 253 253 256 +{{html clean="false"}} 257 + 254 254 ## --- ① 学校基本情報 + 連絡先(左右グリッド・折りたたみ対応) --- 255 255 <div class="school-info-grid"> 256 256 <div class="school-info-card mobile-collapse" id="card-basic-info"> ... ... @@ -263,7 +263,7 @@ 263 263 <tr><th>共学・別学</th><td>$!escapetool.xml($!coeducation)</td></tr> 264 264 <tr><th>設置者</th><td>$!escapetool.xml($!establishment)</td></tr> 265 265 <tr><th>学校種</th><td>$!escapetool.xml($!schoolLevel)</td></tr> 266 - <tr><th>課程</th><td> #if($schoolSystem && $schoolSystem!= '' && $schoolSystem != '[]')$!escapetool.xml($!schoolSystem)#end</td></tr>270 + <tr><th>課程</th><td>$!escapetool.xml($!schoolSystem)</td></tr> 267 267 <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> 268 268 </table> 269 269 #set($infoEditDate = $!doc.getValue('lastInfoEditedDate')) ... ... @@ -542,12 +542,6 @@ 542 542 <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> 543 543 <span class="author-legend-item text-hint">※一般アカウントは所属未確認のため非表示</span> 544 544 </div> 545 - <div class="author-legend"> 546 - <span class="author-legend-title">役割:</span> 547 - <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> 548 - <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> 549 - <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> 550 - </div> 551 551 </div> 552 552 </div> 553 553 ... ... @@ -627,17 +627,6 @@ 627 627 #set($threadPosts = []) 628 628 #set($discard = $threadPosts.addAll($pinnedPosts)) 629 629 #set($discard = $threadPosts.addAll($normalPosts)) 630 - ## report/comment カウント 631 - #set($reportCount = 0) 632 - #set($commentCount = 0) 633 - #foreach($tp in $threadPosts) 634 - #set($tpType = $!tp.getValue('postType')) 635 - #if($tpType == 'comment') 636 - #set($commentCount = $commentCount + 1) 637 - #else 638 - #set($reportCount = $reportCount + 1) 639 - #end 640 - #end 641 641 642 642 {{html clean="false"}} 643 643 <div class="activity-thread" data-fiscal-year="$!escapetool.xml($actFY)"> ... ... @@ -647,7 +647,7 @@ 647 647 <span class="activity-meta">$!escapetool.xml($!actCommittee) | $!escapetool.xml($!actPeriod) #if($actFY != 'unknown')| $!escapetool.xml($actFY)年度#end</span> 648 648 </div> 649 649 <div class="thread-meta-row"> 650 - <span class="thread-post-count">${re portCount}件の報告 ・ ${commentCount}件のコメント</span>637 + <span class="thread-post-count">${threadPosts.size()}件の投稿</span> 651 651 #if($viewerAccountType == 'admin' || $viewerAccountType == 'verified' || $viewerAccountType == 'referred') 652 652 #if($actFeatured == '1') 653 653 <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> ... ... @@ -658,10 +658,7 @@ 658 658 </div> 659 659 </div> 660 660 661 - ## --- 活動報告セクション --- 662 662 #foreach($post in $threadPosts) 663 - #set($thisPostType = $!post.getValue('postType')) 664 - #if($thisPostType != 'comment') 665 665 #set($postContent = $post.getValue('content')) 666 666 #set($postAuthor = $post.getValue('author')) 667 667 #set($postAccountType = $!post.getValue('authorAccountType')) ... ... @@ -883,44 +883,6 @@ 883 883 #end## /canViewPost 884 884 #end## /postHidden 885 885 #end## /postDeleted 886 - #end## /postType != comment 887 - #end## /foreach reports 888 - 889 - ## --- コメントセクション(折りたたみ) --- 890 - #if($commentCount > 0) 891 - <details class="thread-comments-section"> 892 - <summary class="thread-comments-toggle"> 893 - <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}件のコメント 894 - </summary> 895 - #foreach($post in $threadPosts) 896 - #set($thisPostType = $!post.getValue('postType')) 897 - #if($thisPostType == 'comment') 898 - #set($postContent = $post.getValue('content')) 899 - #set($postAuthor = $post.getValue('author')) 900 - #set($postAccountType = $!post.getValue('authorAccountType')) 901 - #set($postDate = $post.getValue('createdDate')) 902 - #set($postDeleted = $!post.getValue('deleted')) 903 - #if($postDeleted == 1 || $postDeleted == '1') 904 - <div class="thread-comment thread-comment-deleted"> 905 - <span class="thread-comment-meta">このコメントは削除されました</span> 906 - </div> 907 - #else 908 - #set($postHidden = $!post.getValue('hidden')) 909 - #if($postHidden == 1 || $postHidden == '1') 910 - <div class="thread-comment thread-comment-hidden"> 911 - <span class="thread-comment-meta">このコメントは非表示にされました</span> 912 - </div> 913 - #else 914 - <div class="thread-comment"> 915 - <span class="thread-comment-author">$!escapetool.xml($postAuthor)</span> 916 - <span class="thread-comment-date">$!postDate</span> 917 - <div class="thread-comment-body">$!escapetool.xml($postContent)</div> 918 - </div> 919 - #end 920 - #end 921 - #end 922 - #end 923 - </details> 924 924 #end 925 925 926 926 #if($xcontext.user != "XWiki.XWikiGuest") ... ... @@ -1019,10 +1019,12 @@ 1019 1019 btn.classList.add('active'); 1020 1020 // 活動スレッドの表示切り替え 1021 1021 document.querySelectorAll('.activity-thread[data-fiscal-year]').forEach(function(thread) { 1022 - if (fy === 'all' || thread.getAttribute('data-fiscal-year') === fy) { 1023 - 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 = ''; 1024 1024 } else { 1025 - thread. classList.add('fy-hidden');973 + thread.style.display = 'none'; 1026 1026 } 1027 1027 }); 1028 1028 }