Changes for page 学校ページ テンプレート
Last modified by Super Admin on 2026/04/05 18:59
From version
23.1
edited by Super Admin
on 2026/03/09 11:59
on 2026/03/09 11:59
Change comment:
There is no comment for this version
To version
19.1
edited by XWikiGuest
on 2026/03/08 09:23
on 2026/03/08 09:23
Change comment:
There is no comment for this version
Summary
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. superadmin1 +XWiki.XWikiGuest - Content
-
... ... @@ -546,12 +546,6 @@ 546 546 <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> 547 547 <span class="author-legend-item text-hint">※一般アカウントは所属未確認のため非表示</span> 548 548 </div> 549 - <div class="author-legend"> 550 - <span class="author-legend-title">役割:</span> 551 - <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> 552 - <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> 553 - <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> 554 - </div> 555 555 </div> 556 556 </div> 557 557 ... ... @@ -631,17 +631,6 @@ 631 631 #set($threadPosts = []) 632 632 #set($discard = $threadPosts.addAll($pinnedPosts)) 633 633 #set($discard = $threadPosts.addAll($normalPosts)) 634 - ## report/comment カウント 635 - #set($reportCount = 0) 636 - #set($commentCount = 0) 637 - #foreach($tp in $threadPosts) 638 - #set($tpType = $!tp.getValue('postType')) 639 - #if($tpType == 'comment') 640 - #set($commentCount = $commentCount + 1) 641 - #else 642 - #set($reportCount = $reportCount + 1) 643 - #end 644 - #end 645 645 646 646 {{html clean="false"}} 647 647 <div class="activity-thread" data-fiscal-year="$!escapetool.xml($actFY)"> ... ... @@ -651,7 +651,7 @@ 651 651 <span class="activity-meta">$!escapetool.xml($!actCommittee) | $!escapetool.xml($!actPeriod) #if($actFY != 'unknown')| $!escapetool.xml($actFY)年度#end</span> 652 652 </div> 653 653 <div class="thread-meta-row"> 654 - <span class="thread-post-count">${re portCount}件の報告 ・ ${commentCount}件のコメント</span>637 + <span class="thread-post-count">${threadPosts.size()}件の投稿</span> 655 655 #if($viewerAccountType == 'admin' || $viewerAccountType == 'verified' || $viewerAccountType == 'referred') 656 656 #if($actFeatured == '1') 657 657 <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> ... ... @@ -662,10 +662,7 @@ 662 662 </div> 663 663 </div> 664 664 665 - ## --- 活動報告セクション --- 666 666 #foreach($post in $threadPosts) 667 - #set($thisPostType = $!post.getValue('postType')) 668 - #if($thisPostType != 'comment') 669 669 #set($postContent = $post.getValue('content')) 670 670 #set($postAuthor = $post.getValue('author')) 671 671 #set($postAccountType = $!post.getValue('authorAccountType')) ... ... @@ -887,52 +887,14 @@ 887 887 #end## /canViewPost 888 888 #end## /postHidden 889 889 #end## /postDeleted 890 - #end## /postType != comment 891 - #end## /foreach reports 892 - 893 - ## --- コメントセクション(折りたたみ) --- 894 - #if($commentCount > 0) 895 - <details class="thread-comments-section"> 896 - <summary class="thread-comments-toggle"> 897 - <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}件のコメント 898 - </summary> 899 - #foreach($post in $threadPosts) 900 - #set($thisPostType = $!post.getValue('postType')) 901 - #if($thisPostType == 'comment') 902 - #set($postContent = $post.getValue('content')) 903 - #set($postAuthor = $post.getValue('author')) 904 - #set($postAccountType = $!post.getValue('authorAccountType')) 905 - #set($postDate = $post.getValue('createdDate')) 906 - #set($postDeleted = $!post.getValue('deleted')) 907 - #if($postDeleted == 1 || $postDeleted == '1') 908 - <div class="thread-comment thread-comment-deleted"> 909 - <span class="thread-comment-meta">このコメントは削除されました</span> 910 - </div> 911 - #else 912 - #set($postHidden = $!post.getValue('hidden')) 913 - #if($postHidden == 1 || $postHidden == '1') 914 - <div class="thread-comment thread-comment-hidden"> 915 - <span class="thread-comment-meta">このコメントは非表示にされました</span> 916 - </div> 917 - #else 918 - <div class="thread-comment"> 919 - <span class="thread-comment-author">$!escapetool.xml($postAuthor)</span> 920 - <span class="thread-comment-date">$!postDate</span> 921 - <div class="thread-comment-body">$!escapetool.xml($postContent)</div> 922 - </div> 923 - #end 924 - #end 925 - #end 926 - #end 927 - </details> 928 928 #end 929 929 930 930 #if($xcontext.user != "XWiki.XWikiGuest") 931 931 <div class="thread-add-post"> 932 - <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"> 933 933 + 活動報告を追加 934 934 </a> 935 - <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"> 936 936 <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> コメントを書く 937 937 </a> 938 938 </div> ... ... @@ -954,7 +954,7 @@ 954 954 #if($xcontext.user != "XWiki.XWikiGuest") 955 955 {{html clean="false"}} 956 956 <div class="activity-add-section"> 957 - <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"> 958 958 <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> 活動を追加 959 959 </a> 960 960 </div> ... ... @@ -1004,7 +1004,7 @@ 1004 1004 ## 新年度に移行ボタン(承認済み・管理者のみ) 1005 1005 #if($viewerAccountType == 'admin' || $viewerAccountType == 'verified') 1006 1006 <div class="archive-action"> 1007 - <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"> 1008 1008 <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> 1009 1009 ${pageFiscalYear}年度をアーカイブして新年度に移行 1010 1010 </a> ... ... @@ -1023,10 +1023,12 @@ 1023 1023 btn.classList.add('active'); 1024 1024 // 活動スレッドの表示切り替え 1025 1025 document.querySelectorAll('.activity-thread[data-fiscal-year]').forEach(function(thread) { 1026 - if (fy === 'all' || thread.getAttribute('data-fiscal-year') === fy) { 1027 - 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 = ''; 1028 1028 } else { 1029 - thread. classList.add('fy-hidden');973 + thread.style.display = 'none'; 1030 1030 } 1031 1031 }); 1032 1032 } ... ... @@ -1111,7 +1111,7 @@ 1111 1111 var csrfEl = document.querySelector('input[name="form_token"]'); 1112 1112 var csrfToken = csrfEl ? csrfEl.value : ''; 1113 1113 var xhr = new XMLHttpRequest(); 1114 - 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); 1115 1115 xhr.onload = function() { 1116 1116 try { 1117 1117 var res = JSON.parse(xhr.responseText); ... ... @@ -1131,7 +1131,7 @@ 1131 1131 function confirmDeletePost(schoolPage, postObjNum, token) { 1132 1132 if (!confirm('この投稿を削除しますか?\\n削除後は「この投稿は削除されました」と表示されます。')) return; 1133 1133 var xhr = new XMLHttpRequest(); 1134 - 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); 1135 1135 xhr.onload = function() { 1136 1136 try { 1137 1137 var res = JSON.parse(xhr.responseText);