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

From version Icon 10.1 Icon
edited by XWikiGuest
on 2026/03/06 17:18
Change comment: There is no comment for this version
To version Icon 22.1 Icon
edited by XWikiGuest
on 2026/03/09 11:57
Change comment: There is no comment for this version

Summary

Details

Icon Page properties
Content
... ... @@ -291,7 +291,7 @@
291 291  </div>
292 292  
293 293  ## --- 生徒会情報アコーディオン ---
294 -<div style="margin:20px 0 16px;">
294 +<div class="school-section-divider">
295 295   <button class="shortcut-btn shortcut-btn-secondary" onclick="var sec=document.getElementById('seitokai-info-section');sec.classList.toggle('open');this.querySelector('.shortcut-arrow').textContent=sec.classList.contains('open')?'▲':'▼';">
296 296   <svg class="ico ico-md" viewBox="0 0 24 24"><path d="M3 21h18"/><path d="M5 21V7l7-4 7 4v14"/><path d="M9 21v-4h6v4"/></svg>
297 297   生徒会情報を見る <span class="shortcut-arrow">▼</span>
... ... @@ -313,7 +313,7 @@
313 313  <div class="school-section-card">
314 314   <div class="card-inner">
315 315   #if($orgChartImage && $orgChartImage != '')
316 - <div style="margin-bottom:12px;"><img src="$doc.getAttachmentURL($orgChartImage)" alt="組織図" class="org-chart-img" /></div>
316 + <div class="school-org-img-wrap"><img src="$doc.getAttachmentURL($orgChartImage)" alt="組織図" class="org-chart-img" /></div>
317 317   #end
318 318   #if($orgChart && $orgChart != '')$!escapetool.xml($orgChart)#end
319 319   </div>
... ... @@ -454,7 +454,7 @@
454 454   <div class="card-inner">
455 455   <div class="info-row">
456 456   <span class="info-label">見直しの有無(3年以内)</span>
457 - <span class="info-value"><span class="tag tag-primary" style="font-size:0.9em;">$!escapetool.xml($!ruleReviewStatus)</span></span>
457 + <span class="info-value"><span class="tag tag-primary tag-sm">$!escapetool.xml($!ruleReviewStatus)</span></span>
458 458   </div>
459 459   #if($ruleReviewContent && $ruleReviewContent != '')
460 460   <div class="info-row">
... ... @@ -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,16 +625,27 @@
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)">
631 631   <div class="activity-thread-header">
632 632   <div class="activity-thread-title">
633 - <h3 #if($actFeatured == '1')class="featured-title"#end>$!escapetool.xml($!actTitle) #if($actFeatured == '1')<svg class="ico ico-fixed-14" viewBox="0 0 24 24" fill="currentColor" stroke="none" style="vertical-align:-1px;margin-left:4px;"><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>#end</h3>
650 + <h3 #if($actFeatured == '1')class="featured-title"#end>$!escapetool.xml($!actTitle) #if($actFeatured == '1')<svg class="ico ico-fixed-14" viewBox="0 0 24 24" fill="currentColor" stroke="none" class="ico-star-offset"><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>#end</h3>
634 634   <span class="activity-meta">$!escapetool.xml($!actCommittee) | $!escapetool.xml($!actPeriod) #if($actFY != 'unknown')| $!escapetool.xml($actFY)年度#end</span>
635 635   </div>
636 - <div style="display:flex;align-items:center;gap:8px;">
637 - <span class="thread-post-count">${threadPosts.size()}件の投稿</span>
653 + <div class="thread-meta-row">
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'))
... ... @@ -695,7 +695,7 @@
695 695   #end
696 696   #if(!$canViewPost)
697 697   <div class="thread-post visibility-restricted-post">
698 - <div class="visibility-restricted-notice" style="margin:8px 0;"><svg class="ico" viewBox="0 0 24 24"><rect x="3" y="11" width="18" height="11" rx="2"/><path d="M7 11V7a5 5 0 0110 0v4"/></svg> この投稿は #if($postVis == 'members')登録ユーザー#else校内メンバー#end のみ閲覧可能です</div>
718 + <div class="visibility-restricted-notice"><svg class="ico" viewBox="0 0 24 24"><rect x="3" y="11" width="18" height="11" rx="2"/><path d="M7 11V7a5 5 0 0110 0v4"/></svg> この投稿は #if($postVis == 'members')登録ユーザー#else校内メンバー#end のみ閲覧可能です</div>
699 699   </div>
700 700   #else
701 701   ## 投稿者のアカウント種別に基づいたCSSクラス
... ... @@ -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>
... ... @@ -905,7 +905,7 @@
905 905  
906 906  ## --- 年度アーカイブ セクション ---
907 907  {{html clean="false"}}
908 -<div class="school-section-card" style="margin-top:24px;">
966 +<div class="school-section-card school-archive-card">
909 909   <h2 class="archive-section-title">
910 910   <svg class="ico ico-md" viewBox="0 0 24 24"><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>
911 911   年度アーカイブ
... ... @@ -923,7 +923,7 @@
923 923   #set($archivePages = $archiveQuery.execute())
924 924  
925 925   #if($archivePages && $archivePages.size() > 0)
926 - <div style="margin-bottom:12px;">
984 + <div class="archive-card-field-lg">
927 927   <div class="archive-list-label">過去の年度アーカイブ</div>
928 928   <div class="archive-list">
929 929   #foreach($archPage in $archivePages)
... ... @@ -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);