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
100.1
edited by Super Admin
on 2026/03/21 17:40
on 2026/03/21 17:40
Change comment:
There is no comment for this version
Summary
Details
- Page properties
-
- Content
-
... ... @@ -1403,11 +1403,11 @@ 1403 1403 #if($xcontext.user != "XWiki.XWikiGuest") 1404 1404 <div class="thread-add-post"> 1405 1405 #if($isSchoolMember || $isAlumniOfSchool || $isViewerAdmin) 1406 - <a href="/bin/SeitokaiCode/ActivityPostForm?schoolPage=${doc.fullName}&activityIndex=${actIdx}&schoolCode=$!escapetool.url($schoolCode)&postType=report" class="btn-thread-add"> 1406 + <a href="/bin/view/SeitokaiCode/ActivityPostForm?schoolPage=${doc.fullName}&activityIndex=${actIdx}&schoolCode=$!escapetool.url($schoolCode)&postType=report" class="btn-thread-add"> 1407 1407 + 活動報告を追加 1408 1408 </a> 1409 1409 #end 1410 - <a href="/bin/SeitokaiCode/ActivityPostForm?schoolPage=${doc.fullName}&activityIndex=${actIdx}&schoolCode=$!escapetool.url($schoolCode)&postType=comment" class="btn-thread-comment"> 1410 + <a href="/bin/view/SeitokaiCode/ActivityPostForm?schoolPage=${doc.fullName}&activityIndex=${actIdx}&schoolCode=$!escapetool.url($schoolCode)&postType=comment" class="btn-thread-comment"> 1411 1411 <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> コメントを書く 1412 1412 </a> 1413 1413 </div> ... ... @@ -1429,7 +1429,7 @@ 1429 1429 #if($xcontext.user != "XWiki.XWikiGuest") 1430 1430 {{html clean="false"}} 1431 1431 <div class="activity-add-section"> 1432 - <a href="/bin/SeitokaiCode/ActivityForm?schoolPage=${doc.fullName}&schoolCode=$!escapetool.url($schoolCode)" class="btn btn-primary btn-add-activity"> 1432 + <a href="/bin/view/SeitokaiCode/ActivityForm?schoolPage=${doc.fullName}&schoolCode=$!escapetool.url($schoolCode)" class="btn btn-primary btn-add-activity"> 1433 1433 <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> 活動を追加 1434 1434 </a> 1435 1435 </div> ... ... @@ -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); 1560 + 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) + '">' +1608 + 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) + '" />' +1611 + '<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>' +1625 + html += '<div class="edit-attach-item" data-name="' + f.replace(/"/g,'"') + '">' + 1626 + '<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) + '" />' +1628 + '<input type="hidden" name="keepFiles" value="' + f.replace(/"/g,'"') + '" />' + 1638 1638 '</div>'; 1639 1639 } 1640 1640 html += '</div>';