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

From version Icon 16.1 Icon
edited by Super Admin
on 2026/03/07 15:24
Change comment: There is no comment for this version
To version Icon 23.1 Icon
edited by Super Admin
on 2026/03/09 11:59
Change comment: There is no comment for this version

Summary

Details

Icon Page properties
Content
... ... @@ -546,6 +546,12 @@
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>
549 549   </div>
550 550  </div>
551 551  
... ... @@ -625,6 +625,17 @@
625 625   #set($threadPosts = [])
626 626   #set($discard = $threadPosts.addAll($pinnedPosts))
627 627   #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
628 628  
629 629  {{html clean="false"}}
630 630  <div class="activity-thread" data-fiscal-year="$!escapetool.xml($actFY)">
... ... @@ -634,7 +634,7 @@
634 634   <span class="activity-meta">$!escapetool.xml($!actCommittee) | $!escapetool.xml($!actPeriod) #if($actFY != 'unknown')| $!escapetool.xml($actFY)年度#end</span>
635 635   </div>
636 636   <div class="thread-meta-row">
637 - <span class="thread-post-count">${threadPosts.size()}件の投稿</span>
654 + <span class="thread-post-count">${reportCount}件の報告 ・ ${commentCount}件のコメント</span>
638 638   #if($viewerAccountType == 'admin' || $viewerAccountType == 'verified' || $viewerAccountType == 'referred')
639 639   #if($actFeatured == '1')
640 640   <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>
... ... @@ -645,7 +645,10 @@
645 645   </div>
646 646   </div>
647 647  
665 + ## --- 活動報告セクション ---
648 648   #foreach($post in $threadPosts)
667 + #set($thisPostType = $!post.getValue('postType'))
668 + #if($thisPostType != 'comment')
649 649   #set($postContent = $post.getValue('content'))
650 650   #set($postAuthor = $post.getValue('author'))
651 651   #set($postAccountType = $!post.getValue('authorAccountType'))
... ... @@ -867,14 +867,52 @@
867 867   #end## /canViewPost
868 868   #end## /postHidden
869 869   #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>
870 870   #end
871 871  
872 872   #if($xcontext.user != "XWiki.XWikiGuest")
873 873   <div class="thread-add-post">
874 - <a href="/xwiki/bin/view/SeitokaiCode/ActivityPostForm?schoolPage=${doc.fullName}&activityIndex=${actIdx}&schoolCode=$!escapetool.url($schoolCode)&postType=report" class="btn-thread-add">
932 + <a href="/bin/view/SeitokaiCode/ActivityPostForm?schoolPage=${doc.fullName}&activityIndex=${actIdx}&schoolCode=$!escapetool.url($schoolCode)&postType=report" class="btn-thread-add">
875 875   + 活動報告を追加
876 876   </a>
877 - <a href="/xwiki/bin/view/SeitokaiCode/ActivityPostForm?schoolPage=${doc.fullName}&activityIndex=${actIdx}&schoolCode=$!escapetool.url($schoolCode)&postType=comment" class="btn-thread-comment">
935 + <a href="/bin/view/SeitokaiCode/ActivityPostForm?schoolPage=${doc.fullName}&activityIndex=${actIdx}&schoolCode=$!escapetool.url($schoolCode)&postType=comment" class="btn-thread-comment">
878 878   <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> コメントを書く
879 879   </a>
880 880   </div>
... ... @@ -896,7 +896,7 @@
896 896  #if($xcontext.user != "XWiki.XWikiGuest")
897 897  {{html clean="false"}}
898 898  <div class="activity-add-section">
899 - <a href="/xwiki/bin/view/SeitokaiCode/ActivityForm?schoolPage=${doc.fullName}&schoolCode=$!escapetool.url($schoolCode)" class="btn btn-primary btn-add-activity">
957 + <a href="/bin/view/SeitokaiCode/ActivityForm?schoolPage=${doc.fullName}&schoolCode=$!escapetool.url($schoolCode)" class="btn btn-primary btn-add-activity">
900 900   <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> 活動を追加
901 901   </a>
902 902  </div>
... ... @@ -946,7 +946,7 @@
946 946   ## 新年度に移行ボタン(承認済み・管理者のみ)
947 947   #if($viewerAccountType == 'admin' || $viewerAccountType == 'verified')
948 948   <div class="archive-action">
949 - <a href="/xwiki/bin/view/SeitokaiCode/YearArchiveAction?schoolPage=${doc.fullName}" class="btn-accent">
1007 + <a href="/bin/view/SeitokaiCode/YearArchiveAction?schoolPage=${doc.fullName}" class="btn-accent">
950 950   <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>
951 951   ${pageFiscalYear}年度をアーカイブして新年度に移行
952 952   </a>
... ... @@ -965,12 +965,10 @@
965 965   btn.classList.add('active');
966 966   // 活動スレッドの表示切り替え
967 967   document.querySelectorAll('.activity-thread[data-fiscal-year]').forEach(function(thread) {
968 - if (fy === 'all') {
969 - thread.style.display = '';
970 - } else if (thread.getAttribute('data-fiscal-year') === fy) {
971 - thread.style.display = '';
1026 + if (fy === 'all' || thread.getAttribute('data-fiscal-year') === fy) {
1027 + thread.classList.remove('fy-hidden');
972 972   } else {
973 - thread.style.display = 'none';
1029 + thread.classList.add('fy-hidden');
974 974   }
975 975   });
976 976  }
... ... @@ -1055,7 +1055,7 @@
1055 1055   var csrfEl = document.querySelector('input[name="form_token"]');
1056 1056   var csrfToken = csrfEl ? csrfEl.value : '';
1057 1057   var xhr = new XMLHttpRequest();
1058 - xhr.open('GET', '/xwiki/bin/view/SeitokaiCode/EditPost?outputSyntax=plain&schoolPage=' + encodeURIComponent(schoolPage) + '&postObj=' + postObjNum + '&newContent=' + encodeURIComponent(newContent) + '&form_token=' + encodeURIComponent(csrfToken), true);
1114 + xhr.open('GET', '/bin/view/SeitokaiCode/EditPost?outputSyntax=plain&schoolPage=' + encodeURIComponent(schoolPage) + '&postObj=' + postObjNum + '&newContent=' + encodeURIComponent(newContent) + '&form_token=' + encodeURIComponent(csrfToken), true);
1059 1059   xhr.onload = function() {
1060 1060   try {
1061 1061   var res = JSON.parse(xhr.responseText);
... ... @@ -1075,7 +1075,7 @@
1075 1075  function confirmDeletePost(schoolPage, postObjNum, token) {
1076 1076   if (!confirm('この投稿を削除しますか?\\n削除後は「この投稿は削除されました」と表示されます。')) return;
1077 1077   var xhr = new XMLHttpRequest();
1078 - xhr.open('GET', '/xwiki/bin/view/SeitokaiCode/DeletePost?outputSyntax=plain&schoolPage=' + encodeURIComponent(schoolPage) + '&postObj=' + postObjNum + '&form_token=' + encodeURIComponent(token), true);
1134 + xhr.open('GET', '/bin/view/SeitokaiCode/DeletePost?outputSyntax=plain&schoolPage=' + encodeURIComponent(schoolPage) + '&postObj=' + postObjNum + '&form_token=' + encodeURIComponent(token), true);
1079 1079   xhr.onload = function() {
1080 1080   try {
1081 1081   var res = JSON.parse(xhr.responseText);