From e1ff531245a0b772670dd2f8a3af7f3066f384a4 Mon Sep 17 00:00:00 2001 From: Miguel Moquillon Date: Tue, 14 Jan 2025 15:05:50 +0100 Subject: [PATCH] Bug #14481 Fix the bug by adding the missing Javascript function topicGoTo(String) Refactor the modelUsedList.jsp to replace Java code by JSTL tags. --- .../main/webapp/kmelia/jsp/modelUsedList.jsp | 224 +++++++++--------- 1 file changed, 106 insertions(+), 118 deletions(-) diff --git a/kmelia/kmelia-war/src/main/webapp/kmelia/jsp/modelUsedList.jsp b/kmelia/kmelia-war/src/main/webapp/kmelia/jsp/modelUsedList.jsp index 5918564de9..313974d5b1 100644 --- a/kmelia/kmelia-war/src/main/webapp/kmelia/jsp/modelUsedList.jsp +++ b/kmelia/kmelia-war/src/main/webapp/kmelia/jsp/modelUsedList.jsp @@ -24,122 +24,110 @@ along with this program. If not, see . --%> -<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> -<%@ taglib uri="http://www.silverpeas.com/tld/viewGenerator" prefix="view"%> +<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> +<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %> +<%@ taglib uri="http://www.silverpeas.com/tld/viewGenerator" prefix="view" %> +<%@ taglib uri="http://www.silverpeas.com/tld/silverFunctions" prefix="silfn" %> +<%@ taglib prefix="slifn" uri="http://www.silverpeas.com/tld/silverFunctions" %> <%@ include file="checkKmelia.jsp" %> - -<% -List xmlForms = (List) request.getAttribute("XMLForms"); -Collection modelUsed = (Collection) request.getAttribute("ModelUsed"); - -String linkedPathString = kmeliaScc.getSessionPath(); - -// declaration des boutons -Button validateButton = gef.getFormButton(resources.getString("GML.validate"), "javascript:onClick=sendData();", false); -Button cancelButton = gef.getFormButton(resources.getString("GML.cancel"), "GoToCurrentTopic", false); - -%> - - - - - - -<% - Window window = gef.getWindow(); - Frame frame = gef.getFrame(); - Board board = gef.getBoard(); - - BrowseBar browseBar = window.getBrowseBar(); - browseBar.setDomainName(spaceLabel); - browseBar.setComponentName(componentLabel, "Main"); - browseBar.setPath(linkedPathString); - - out.println(window.printBefore()); - - out.println(frame.printBefore()); - out.println(board.printBefore()); -%> -
- - - - -<% - int nb = 0; - out.println(""); - if (xmlForms != null) { - PublicationTemplate xmlForm; - String thumbnail = ""; - Iterator iterator = xmlForms.iterator(); - while (iterator.hasNext()) { - xmlForm = (PublicationTemplate) iterator.next(); - - if (nb != 0 && nb%3==0) - out.println(""); - - nb++; - // recherche si le mod�le est dans la liste - boolean used = false; - if (modelUsed.contains(xmlForm.getFileName())) - { - used = true; - } - String usedCheck = ""; - if (used) - usedCheck = "checked"; - - thumbnail = xmlForm.getThumbnail(); - if (!StringUtil.isDefined(thumbnail)) - { - thumbnail = PublicationTemplate.DEFAULT_THUMBNAIL; - } - - out.println(""); - } - } - - if (nb != 0 && nb%3 == 0) - out.println(""); - // recherche si le mod�le est dans la liste - boolean used = false; - Iterator it = modelUsed.iterator(); - if (modelUsed.contains("WYSIWYG")) - { - used = true; - } - String usedCheck = ""; - if (used) - usedCheck = "checked"; - - out.println(""); - out.println(""); - -%> - - -
<%=resources.getString("kmelia.ModelList")%>
\""+xmlForm.getDescription()+"\"/
"+xmlForm.getName()+"
\"Wysiwyg\"/
WYSIWYG
- -<% - out.println(board.printAfter()); - ButtonPane buttonPane = gef.getButtonPane(); - buttonPane.addButton(validateButton); - buttonPane.addButton(cancelButton); - out.println("
"+buttonPane.print()+"

"); - out.println(frame.printAfter()); -%> - -<% out.println(window.printAfter()); %> - - \ No newline at end of file + + + + + + + + + + + + + + + + <fmt:message key="kmelia.ModelUsed"/> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + <%= PublicationTemplate.DEFAULT_THUMBNAIL %> + + + + + + + + + + + + +
+ +
+ ${template.description}
+ ${silfn:escapeHtml(template.name)}
+ +
+ Wysiwyg
+ WYSIWYG
+ +
+
+ +
+ + + + +
+
+
> +
\ No newline at end of file