You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by mo...@apache.org on 2003/06/10 19:48:09 UTC

cvs commit: jakarta-jetspeed/webapp/WEB-INF/templates/vm/portlets/html browser-portlet.vm

morciuch    2003/06/10 10:48:09

  Modified:    webapp/WEB-INF/templates/vm/portlets/html browser-portlet.vm
  Added:       webapp/WEB-INF/templates/jsp/layouts/html preview.jsp
               webapp/WEB-INF/templates/jsp/screens/html preview.jsp
  Log:
  Added missing preview template for JSP (see Bugzilla issue# 20078).
  
  Also, added preview in Portlet Browser.
  
  Revision  Changes    Path
  1.1                  jakarta-jetspeed/webapp/WEB-INF/templates/jsp/layouts/html/preview.jsp
  
  Index: preview.jsp
  ===================================================================
  <%@ taglib uri='/WEB-INF/templates/jsp/tld/template.tld' prefix='jetspeed'%>
  
  <%@ page import = "org.apache.turbine.util.RunData" %> 
  
  <% 
  String screenJsp = (String)request.getAttribute("screenJsp"); 
  RunData rundata = (RunData)request.getAttribute("rundata"); 
  %>
  
  <html>
    <head>
      <base href="<jetspeed:uriLookup type="BaseURL" />">
      <link href="css/default.css" type="text/css" rel="stylesheet">
    </head>
    <body bgcolor="#ffffff">
      <jsp:include page="<%= screenJsp %>" flush="true" /> 
      <br><br>
      <a href="javascript:void(0)" onClick="self.close()">Close window</a>    
    </body>
  </html>
  
  
  
  
  1.1                  jakarta-jetspeed/webapp/WEB-INF/templates/jsp/screens/html/preview.jsp
  
  Index: preview.jsp
  ===================================================================
  <%@ taglib uri='/WEB-INF/templates/jsp/tld/template.tld' prefix='jetspeed' %>
  
  <%@ page import = "org.apache.jetspeed.services.rundata.JetspeedRunData" %> 
  <%@ page import = "org.apache.jetspeed.util.template.JetspeedTool" %> 
  
  <% 
  JetspeedRunData rundata = (JetspeedRunData) request.getAttribute("rundata"); 
  String portlet = rundata.getRequest().getParameter("p");
  String control = rundata.getRequest().getParameter("c");
  if (portlet != null)
  {
      JetspeedTool jt = new JetspeedTool(rundata);
  %>
      <%=jt.getPortletFromRegistry(portlet, control)%>
  <%
  } 
  else
  {
  %>
      <p>Portlet name is missing</p>
  <%    
  }
  %>
  
  
  
  
  
  1.6       +10 -2     jakarta-jetspeed/webapp/WEB-INF/templates/vm/portlets/html/browser-portlet.vm
  
  Index: browser-portlet.vm
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/templates/vm/portlets/html/browser-portlet.vm,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- browser-portlet.vm	23 May 2003 17:03:17 -0000	1.5
  +++ browser-portlet.vm	10 Jun 2003 17:48:09 -0000	1.6
  @@ -1,7 +1,8 @@
   <table width="100%" cellpadding="3" cellspacing="1" BORDER="1">
     <tr>
       <th>Name</th>
  -    <th>Title</th>
  +    <th>Parent</th>
  +    <th>Title</th>    
       <th>Description</th>
       <th>Media Types</th>
       <th colspan="2">Actions</th>
  @@ -9,7 +10,14 @@
   #foreach ( $entry in $registry )
   #set ( $old = "" )
     <tr>
  -    <td>$entry.Name</td>
  +    <td>
  +                  #if ($config.getBoolean("customizer.preview.enable", false) == true && $entry.Type != "abstract")
  +                    <a target="_blank" TITLE="Preview" href="$jslink.setTemplate("preview").addQueryData("p",$entry.Name).addQueryData("c","ClearPortletControl")">$entry.Name</a>
  +                  #else
  +                    $entry.Name
  +                  #end  
  +    </TD>    
  +    <td>$!entry.Parent&nbsp;</td>    
       <td>$!entry.Title&nbsp;</td>
       <td>$!entry.Description&nbsp;</td>
       <td>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org