pvollenweider    2005/04/12 12:14:04 CEST

  Modified files:        (Branch: JAHIA-4-1-BRANCH)
    src/view/jsp         blog_listing.jsp 
    src/view/jsp/include blog_declarations.inc blog_entries.inc 
                         declarations.inc 
  Log:
  - Remove entryId in session
  - Add "add entry" button
  
  Revision  Changes    Path
  1.1.2.13  +1 -1      corporate_portal_templates/src/view/jsp/blog_listing.jsp
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/blog_listing.jsp.diff?r1=1.1.2.12&r2=1.1.2.13&f=h
  1.1.2.4   +0 -17     
corporate_portal_templates/src/view/jsp/include/blog_declarations.inc
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/blog_declarations.inc.diff?r1=1.1.2.3&r2=1.1.2.4&f=h
  1.1.2.4   +17 -0     
corporate_portal_templates/src/view/jsp/include/blog_entries.inc
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/blog_entries.inc.diff?r1=1.1.2.3&r2=1.1.2.4&f=h
  1.6.4.4   +1 -1      
corporate_portal_templates/src/view/jsp/include/declarations.inc
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/declarations.inc.diff?r1=1.6.4.3&r2=1.6.4.4&f=h
  
  
  
  Index: blog_listing.jsp
  ===================================================================
  RCS file: 
/home/cvs/repository/corporate_portal_templates/src/view/jsp/Attic/blog_listing.jsp,v
  retrieving revision 1.1.2.12
  retrieving revision 1.1.2.13
  diff -u -r1.1.2.12 -r1.1.2.13
  --- blog_listing.jsp  12 Apr 2005 09:22:12 -0000      1.1.2.12
  +++ blog_listing.jsp  12 Apr 2005 10:14:03 -0000      1.1.2.13
  @@ -301,7 +301,7 @@
                           %>(<%=entriesCl.getFullSize()%>)<%
                       }
                   }
  -                // if iser is admin -> can delete blog
  +                // if user is admin -> can delete blog
                   if (jParams.getUser().isAdminMember( jParams.getSiteID() )) {
                       //let's get the parent container
                       PageBean blogPageBean = new PageBean(blogPage,jParams);
  
  
  
  Index: blog_declarations.inc
  ===================================================================
  RCS file: 
/home/cvs/repository/corporate_portal_templates/src/view/jsp/include/Attic/blog_declarations.inc,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- blog_declarations.inc     8 Apr 2005 09:01:08 -0000       1.1.2.3
  +++ blog_declarations.inc     12 Apr 2005 10:14:03 -0000      1.1.2.4
  @@ -169,18 +169,9 @@
           isNewPage = true;
       }
   }
  -session.setAttribute("pageId", new Integer(currentPageId));
  -
  -if(isNewPage){
  -    session.removeAttribute(currentPageId + "_entryId");
  -}
  -
  -// t is the choosen date. Default is now
  -// remove the entryId attribute in sesssion if t is set.
   long t = -1;
   try {
       t = Long.parseLong(request.getParameter("t"));
  -    session.removeAttribute(currentPageId + "_entryId");
   } catch (NumberFormatException nfe) {
       t = (Calendar.getInstance()).getTimeInMillis();
   }
  @@ -189,21 +180,13 @@
   int entryId = -1;
   try {
       entryId = Integer.parseInt(request.getParameter("entryId"));
  -    session.setAttribute(currentPageId + "_entryId",new Integer(entryId));
       logger.debug("Set attribute [" + currentPageId + "_entryId] to session 
with value [" + entryId +"]");
   } catch (NumberFormatException nfe) {
  -    Integer entryIdInteger = (Integer) session.getAttribute (currentPageId + 
"_entryId");
  -    if (entryIdInteger != null){
  -        entryId = entryIdInteger.intValue();
  -    }
   }
   String requestedCategory = request.getParameter("category");
   if (requestedCategory != null) {
       entryId = -1;
  -    session.removeAttribute(currentPageId + "_entryId");
   }
  -
  -
   logger.debug("entryId is [" + entryId +"]");
   String range = request.getParameter("range");
   if (range == null) {
  
  
  
  Index: blog_entries.inc
  ===================================================================
  RCS file: 
/home/cvs/repository/corporate_portal_templates/src/view/jsp/include/Attic/blog_entries.inc,v
  retrieving revision 1.1.2.3
  retrieving revision 1.1.2.4
  diff -u -r1.1.2.3 -r1.1.2.4
  --- blog_entries.inc  8 Apr 2005 09:01:08 -0000       1.1.2.3
  +++ blog_entries.inc  12 Apr 2005 10:14:04 -0000      1.1.2.4
  @@ -6,6 +6,23 @@
       jData.gui().html().drawBeginActionMenu(entriesBean ,
           null, null, true, "", "jahiatemplates.Corporate_portal_templates", 
null, out);
   
  +    if 
(entriesBean.getJahiaContainerList().checkWriteAccess(jParams.getUser())) {
  +        org.jahia.engines.JahiaEngine theAddContainerEngine =
  +            (org.jahia.engines.JahiaEngine) 
org.jahia.registries.EnginesRegistry.getInstance().getEngine( "addcontainer" );
  +        StringBuffer addContName = new StringBuffer("addContainer_");
  +        addContName.append(entriesBean.getId());
  +        
addContName.append(jData.gui().html().cleanSessionID(jParams.getSessionID()));
  +        String addContHtml = theAddContainerEngine.renderLink( jParams, 
entriesBean.getJahiaContainerList() );
  +        String launcher = 
"OpenJahiaScrollableWindow('"+addContHtml+"','"+addContName+"',640,480)";
  +        %>
  +        <a href="javascript:swithToEditMode();<%=launcher%>"><%=addButton%>
  +            Add entry
  +        </a>
  +        <%
  +    }
  +
  +
  +
       Enumeration entriesEnum = entries.getContainers();
       String ddMMyyyySaved = "";
       while (entriesEnum.hasMoreElements()) {
  
  
  
  Index: declarations.inc
  ===================================================================
  RCS file: 
/home/cvs/repository/corporate_portal_templates/src/view/jsp/include/declarations.inc,v
  retrieving revision 1.6.4.3
  retrieving revision 1.6.4.4
  diff -u -r1.6.4.3 -r1.6.4.4
  --- declarations.inc  8 Apr 2005 13:47:40 -0000       1.6.4.3
  +++ declarations.inc  12 Apr 2005 10:14:04 -0000      1.6.4.4
  @@ -345,6 +345,6 @@
   %>
   <logic:present parameter="addComment">
   <script language="javascript"type="text/javascript"><!--//--><![CDATA[//><!--
  -    window.location.href = '<%=bypassUrl%>';
  +    window.location.href = 
'<%=bypassUrl%>?entryId=<%=request.getParameter("entryId")%>';
   //--><!]]></script>
   </logic:present>
  

Reply via email to