Changes for page 学校ページ テンプレート
Last modified by Super Admin on 2026/04/05 18:59
From version
106.1
edited by Super Admin
on 2026/03/22 02:12
on 2026/03/22 02:12
Change comment:
There is no comment for this version
To version
97.1
edited by Super Admin
on 2026/03/20 18:10
on 2026/03/20 18:10
Change comment:
There is no comment for this version
Summary
Details
- Page properties
-
- Content
-
... ... @@ -68,7 +68,6 @@ 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')) 72 72 #set($ictUsage = $doc.getValue('ictUsage')) 73 73 74 74 ## --- 生徒総会 --- ... ... @@ -145,7 +145,6 @@ 145 145 #set($isGuest = $viewerUser == 'XWiki.XWikiGuest') 146 146 #set($isViewerAdmin = false) 147 147 #set($viewerSchoolCode = '') 148 -#set($viewerSecondaryGraduated = false) 149 149 #if(!$isGuest) 150 150 #set($viewerDoc = $xwiki.getDocument($viewerUser)) 151 151 #set($viewerAccountType = $!viewerDoc.getValue('accountType')) ... ... @@ -155,24 +155,6 @@ 155 155 #if($viewerAccountType == 'admin') 156 156 #set($isViewerAdmin = true) 157 157 #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 176 176 #end 177 177 178 178 ## --- 関連校(中高一貫校)情報 --- ... ... @@ -182,7 +182,7 @@ 182 182 #if($affiliatedSchoolCode && $affiliatedSchoolCode != '') 183 183 #if($viewerSchoolCode == $affiliatedSchoolCode) 184 184 #set($isAffiliated = true) 185 - #elseif($viewerSecondarySchoolCode && $viewerSecondarySchoolCode != '' && $viewerSecondarySchoolCode == $affiliatedSchoolCode && !$viewerSecondaryGraduated)165 + #elseif($viewerSecondarySchoolCode && $viewerSecondarySchoolCode != '' && $viewerSecondarySchoolCode == $affiliatedSchoolCode) 186 186 #set($isAffiliated = true) 187 187 #end 188 188 #end ... ... @@ -192,7 +192,7 @@ 192 192 #if(!$isGuest && $viewerUserRole != 'graduate') 193 193 #if($viewerSchoolCode == $schoolCode || $isAffiliated) 194 194 #set($isSchoolMember = true) 195 - #elseif($viewerSecondarySchoolCode && $viewerSecondarySchoolCode != '' && $viewerSecondarySchoolCode == $schoolCode && !$viewerSecondaryGraduated)175 + #elseif($viewerSecondarySchoolCode && $viewerSecondarySchoolCode != '' && $viewerSecondarySchoolCode == $schoolCode) 196 196 #set($isSchoolMember = true) 197 197 #end 198 198 #end ... ... @@ -660,7 +660,7 @@ 660 660 #end 661 661 662 662 ## --- 活動環境 --- 663 - #set($hasActivityEnv = ($activityPlace && !$activityPlace.isEmpty()) || ($activityRoomEquipment && $activityRoomEquipment != '') || ($activityRoomImage && $activityRoomImage != '') || ($ict Tools && !$ictTools.isEmpty()) || ($ictUsage && !$ictUsage.isEmpty()))643 + #set($hasActivityEnv = ($activityPlace && !$activityPlace.isEmpty()) || ($activityRoomEquipment && $activityRoomEquipment != '') || ($activityRoomImage && $activityRoomImage != '') || ($ictUsage && !$ictUsage.isEmpty())) 664 664 #if($hasActivityEnv) 665 665 #set($canViewAE = true) 666 666 #if($visibilityActivityEnv == 'school' && ($isGuest || (!$isViewerAdmin && !$isSchoolMember))) #set($canViewAE = false) ... ... @@ -694,40 +694,6 @@ 694 694 <span class="info-value"><div class="school-org-img-wrap"><img src="$doc.getAttachmentURL($activityRoomImage)" alt="活動場所の写真" class="org-chart-img" /></div></span> 695 695 </div> 696 696 #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 731 731 #if($ictUsage && !$ictUsage.isEmpty()) 732 732 <div class="info-row"> 733 733 <span class="info-label">ICT活用している場面</span> ... ... @@ -1557,15 +1557,7 @@ 1557 1557 }; 1558 1558 var toast = document.createElement('div'); 1559 1559 toast.className = 'toast toast-' + type; 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); 1506 + toast.innerHTML = (icons[type] || '') + '<span>' + message + '</span>'; 1569 1569 container.appendChild(toast); 1570 1570 setTimeout(function() { toast.remove(); }, 3200); 1571 1571 } ... ... @@ -1604,7 +1604,6 @@ 1604 1604 var html = '<textarea id="editContent_' + postObjNum + '">' + currentContent.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>') + '</textarea>'; 1605 1605 1606 1606 // コメント以外は添付ファイル編集を表示 1607 - function escAttr(s) { return s.replace(/&/g,'&').replace(/"/g,'"').replace(/'/g,''').replace(/</g,'<').replace(/>/g,'>'); } 1608 1608 if (postType !== 'comment') { 1609 1609 // 既存画像 1610 1610 html += '<div class="edit-attachments">'; ... ... @@ -1614,10 +1614,10 @@ 1614 1614 for (var i = 0; i < imgs.length; i++) { 1615 1615 var img = imgs[i].trim(); 1616 1616 if (!img) continue; 1617 - html += '<div class="edit-attach-item" data-name="' + e scAttr(img) + '">' +1554 + html += '<div class="edit-attach-item" data-name="' + img.replace(/"/g,'"') + '">' + 1618 1618 '<img src="/xwiki/bin/download/' + schoolPage.replace(/\./g,'/') + '/' + encodeURIComponent(img) + '" class="edit-attach-thumb" />' + 1619 1619 '<button type="button" class="edit-attach-remove" onclick="removeEditAttach(this)" title="削除">✕</button>' + 1620 - '<input type="hidden" name="keepImages" value="' + e scAttr(img) + '" />' +1557 + '<input type="hidden" name="keepImages" value="' + img.replace(/"/g,'"') + '" />' + 1621 1621 '</div>'; 1622 1622 } 1623 1623 html += '</div>'; ... ... @@ -1631,10 +1631,10 @@ 1631 1631 if (!f) continue; 1632 1632 var displayName = f; 1633 1633 if (/^file_\d{14}_\d+_/.test(f)) displayName = f.replace(/^file_\d{14}_\d+_/, ''); 1634 - html += '<div class="edit-attach-item" data-name="' + e scAttr(f) + '">' +1635 - '<span class="edit-attach-fname">' + escAttr(displayName) + '</span>' +1571 + html += '<div class="edit-attach-item" data-name="' + f.replace(/"/g,'"') + '">' + 1572 + '<span class="edit-attach-fname">' + displayName.replace(/</g,'<').replace(/>/g,'>') + '</span>' + 1636 1636 '<button type="button" class="edit-attach-remove" onclick="removeEditAttach(this)" title="削除">✕</button>' + 1637 - '<input type="hidden" name="keepFiles" value="' + e scAttr(f) + '" />' +1574 + '<input type="hidden" name="keepFiles" value="' + f.replace(/"/g,'"') + '" />' + 1638 1638 '</div>'; 1639 1639 } 1640 1640 html += '</div>';