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

From version Icon 97.1 Icon
edited by Super Admin
on 2026/03/20 18:10
Change comment: There is no comment for this version
To version Icon 106.1 Icon
edited by Super Admin
on 2026/03/22 02:12
Change comment: There is no comment for this version

Summary

Details

Icon Page properties
Content
... ... @@ -68,6 +68,7 @@
68 68  #set($activityPlace = $doc.getValue('activityPlace'))
69 69  #set($activityRoomEquipment = $doc.getValue('activityRoomEquipment'))
70 70  #set($activityRoomImage = $doc.getValue('activityRoomImage'))
71 +#set($ictTools = $doc.getValue('ictTools'))
71 71  #set($ictUsage = $doc.getValue('ictUsage'))
72 72  
73 73  ## --- 生徒総会 ---
... ... @@ -144,6 +144,7 @@
144 144  #set($isGuest = $viewerUser == 'XWiki.XWikiGuest')
145 145  #set($isViewerAdmin = false)
146 146  #set($viewerSchoolCode = '')
148 +#set($viewerSecondaryGraduated = false)
147 147  #if(!$isGuest)
148 148   #set($viewerDoc = $xwiki.getDocument($viewerUser))
149 149   #set($viewerAccountType = $!viewerDoc.getValue('accountType'))
... ... @@ -153,6 +153,24 @@
153 153   #if($viewerAccountType == 'admin')
154 154   #set($isViewerAdmin = true)
155 155   #end
158 + ## 第2所属校の在学年数超過チェック
159 + #set($viewerSecEnrollYear = $!viewerDoc.getValue('secondaryEnrollmentYear'))
160 + #if($viewerSecondarySchoolCode && $viewerSecondarySchoolCode != '' && $viewerSecEnrollYear && $viewerSecEnrollYear != '')
161 + #set($vNow = $datetool.date)
162 + #set($vCurYear = $mathtool.toInteger($datetool.format('yyyy', $vNow)))
163 + #set($vCurMonth = $mathtool.toInteger($datetool.format('MM', $vNow)))
164 + #if($vCurMonth >= 4)#set($vSchoolYear = $vCurYear)#else#set($vSchoolYear = $mathtool.sub($vCurYear, 1))#end
165 + #set($vSecEnroll = $mathtool.toInteger($viewerSecEnrollYear))
166 + #set($vSecMax = 3)
167 + #if($viewerSecondarySchoolCode.length() >= 2)
168 + #set($vSecType = $viewerSecondarySchoolCode.substring(0, 2))
169 + #if($vSecType == 'C2')#set($vSecMax = 9)#elseif($vSecType == 'D2')#set($vSecMax = 6)#end
170 + #end
171 + #set($vSecGrade = $mathtool.add($mathtool.sub($vSchoolYear, $vSecEnroll), 1))
172 + #if($vSecGrade > $vSecMax)
173 + #set($viewerSecondaryGraduated = true)
174 + #end
175 + #end
156 156  #end
157 157  
158 158  ## --- 関連校(中高一貫校)情報 ---
... ... @@ -162,7 +162,7 @@
162 162  #if($affiliatedSchoolCode && $affiliatedSchoolCode != '')
163 163   #if($viewerSchoolCode == $affiliatedSchoolCode)
164 164   #set($isAffiliated = true)
165 - #elseif($viewerSecondarySchoolCode && $viewerSecondarySchoolCode != '' && $viewerSecondarySchoolCode == $affiliatedSchoolCode)
185 + #elseif($viewerSecondarySchoolCode && $viewerSecondarySchoolCode != '' && $viewerSecondarySchoolCode == $affiliatedSchoolCode && !$viewerSecondaryGraduated)
166 166   #set($isAffiliated = true)
167 167   #end
168 168  #end
... ... @@ -172,7 +172,7 @@
172 172  #if(!$isGuest && $viewerUserRole != 'graduate')
173 173   #if($viewerSchoolCode == $schoolCode || $isAffiliated)
174 174   #set($isSchoolMember = true)
175 - #elseif($viewerSecondarySchoolCode && $viewerSecondarySchoolCode != '' && $viewerSecondarySchoolCode == $schoolCode)
195 + #elseif($viewerSecondarySchoolCode && $viewerSecondarySchoolCode != '' && $viewerSecondarySchoolCode == $schoolCode && !$viewerSecondaryGraduated)
176 176   #set($isSchoolMember = true)
177 177   #end
178 178  #end
... ... @@ -640,7 +640,7 @@
640 640   #end
641 641  
642 642   ## --- 活動環境 ---
643 - #set($hasActivityEnv = ($activityPlace && !$activityPlace.isEmpty()) || ($activityRoomEquipment && $activityRoomEquipment != '') || ($activityRoomImage && $activityRoomImage != '') || ($ictUsage && !$ictUsage.isEmpty()))
663 + #set($hasActivityEnv = ($activityPlace && !$activityPlace.isEmpty()) || ($activityRoomEquipment && $activityRoomEquipment != '') || ($activityRoomImage && $activityRoomImage != '') || ($ictTools && !$ictTools.isEmpty()) || ($ictUsage && !$ictUsage.isEmpty()))
644 644   #if($hasActivityEnv)
645 645   #set($canViewAE = true)
646 646   #if($visibilityActivityEnv == 'school' && ($isGuest || (!$isViewerAdmin && !$isSchoolMember))) #set($canViewAE = false)
... ... @@ -674,6 +674,40 @@
674 674   <span class="info-value"><div class="school-org-img-wrap"><img src="$doc.getAttachmentURL($activityRoomImage)" alt="活動場所の写真" class="org-chart-img" /></div></span>
675 675   </div>
676 676   #end
697 + #if($ictTools && !$ictTools.isEmpty())
698 + <div class="info-row">
699 + <span class="info-label">利用しているICTツール</span>
700 + <span class="info-value">
701 + #set($ictCatDisplay = [
702 + ["連絡ツール", ["メール","LINE","LINE WORKS","Discord","Slack","Microsoft Teams","Google Chat","InstagramのDM","XのDM","その他(連絡)"]],
703 + ["ドキュメント作成・共有", ["Googleドキュメント","Googleスプレッドシート","Googleスライド","Googleドライブ","Word","Excel","PowerPoint","OneDrive","SharePoint","Notion","Pages","Numbers","Keynote","Dropbox","Box","その他(ドキュメント)"]],
704 + ["タスク管理", ["Googleカレンダー","Google ToDoリスト","Trello","Asana","Excel等スプレッドシート","その他(タスク管理)"]],
705 + ["ビデオ会議ツール", ["Zoom","Google Meet","その他(ビデオ会議)"]],
706 + ["アンケート", ["Googleフォーム","Microsoft Forms","その他(アンケート)"]],
707 + ["デザイン・クリエイティブ", ["Canva","各種Adobe","CapCut","LumaFusion","AviUtl","ibisPaint","その他(デザイン)"]],
708 + ["その他", ["独自のWebシステム・自作アプリ"]]
709 + ])
710 + #foreach($catD in $ictCatDisplay)
711 + #set($catHasItems = false)
712 + #foreach($t in $catD.get(1))
713 + #if($ictTools.contains($t)) #set($catHasItems = true) #end
714 + #end
715 + #if($catHasItems)
716 + <div style="margin-bottom:6px">
717 + <span style="font-size:0.8em;font-weight:600;color:var(--text-mid)">$catD.get(0):</span>
718 + <div class="selection-display" style="margin-top:2px">
719 + #foreach($t in $catD.get(1))
720 + #if($ictTools.contains($t))
721 + <span class="selection-item">$!escapetool.xml($t)</span>
722 + #end
723 + #end
724 + </div>
725 + </div>
726 + #end
727 + #end
728 + </span>
729 + </div>
730 + #end
677 677   #if($ictUsage && !$ictUsage.isEmpty())
678 678   <div class="info-row">
679 679   <span class="info-label">ICT活用している場面</span>
... ... @@ -1503,7 +1503,15 @@
1503 1503   };
1504 1504   var toast = document.createElement('div');
1505 1505   toast.className = 'toast toast-' + type;
1506 - toast.innerHTML = (icons[type] || '') + '<span>' + message + '</span>';
1560 + var iconSvg = icons[type] || '';
1561 + if (iconSvg) {
1562 + var iconSpan = document.createElement('span');
1563 + iconSpan.innerHTML = iconSvg;
1564 + toast.appendChild(iconSpan);
1565 + }
1566 + var msgSpan = document.createElement('span');
1567 + msgSpan.textContent = message;
1568 + toast.appendChild(msgSpan);
1507 1507   container.appendChild(toast);
1508 1508   setTimeout(function() { toast.remove(); }, 3200);
1509 1509  }
... ... @@ -1542,6 +1542,7 @@
1542 1542   var html = '<textarea id="editContent_' + postObjNum + '">' + currentContent.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;') + '</textarea>';
1543 1543  
1544 1544   // コメント以外は添付ファイル編集を表示
1607 + function escAttr(s) { return s.replace(/&/g,'&amp;').replace(/"/g,'&quot;').replace(/'/g,'&#39;').replace(/</g,'&lt;').replace(/>/g,'&gt;'); }
1545 1545   if (postType !== 'comment') {
1546 1546   // 既存画像
1547 1547   html += '<div class="edit-attachments">';
... ... @@ -1551,10 +1551,10 @@
1551 1551   for (var i = 0; i < imgs.length; i++) {
1552 1552   var img = imgs[i].trim();
1553 1553   if (!img) continue;
1554 - html += '<div class="edit-attach-item" data-name="' + img.replace(/"/g,'&quot;') + '">' +
1617 + html += '<div class="edit-attach-item" data-name="' + escAttr(img) + '">' +
1555 1555   '<img src="/xwiki/bin/download/' + schoolPage.replace(/\./g,'/') + '/' + encodeURIComponent(img) + '" class="edit-attach-thumb" />' +
1556 1556   '<button type="button" class="edit-attach-remove" onclick="removeEditAttach(this)" title="削除">✕</button>' +
1557 - '<input type="hidden" name="keepImages" value="' + img.replace(/"/g,'&quot;') + '" />' +
1620 + '<input type="hidden" name="keepImages" value="' + escAttr(img) + '" />' +
1558 1558   '</div>';
1559 1559   }
1560 1560   html += '</div>';
... ... @@ -1568,10 +1568,10 @@
1568 1568   if (!f) continue;
1569 1569   var displayName = f;
1570 1570   if (/^file_\d{14}_\d+_/.test(f)) displayName = f.replace(/^file_\d{14}_\d+_/, '');
1571 - html += '<div class="edit-attach-item" data-name="' + f.replace(/"/g,'&quot;') + '">' +
1572 - '<span class="edit-attach-fname">' + displayName.replace(/</g,'&lt;').replace(/>/g,'&gt;') + '</span>' +
1634 + html += '<div class="edit-attach-item" data-name="' + escAttr(f) + '">' +
1635 + '<span class="edit-attach-fname">' + escAttr(displayName) + '</span>' +
1573 1573   '<button type="button" class="edit-attach-remove" onclick="removeEditAttach(this)" title="削除">✕</button>' +
1574 - '<input type="hidden" name="keepFiles" value="' + f.replace(/"/g,'&quot;') + '" />' +
1637 + '<input type="hidden" name="keepFiles" value="' + escAttr(f) + '" />' +
1575 1575   '</div>';
1576 1576   }
1577 1577   html += '</div>';