pvollenweider    2005/04/26 17:16:53 CEST

  Modified files:        (Branch: JAHIA-4-1-BRANCH)
    src/view/jsp         blog_listing.jsp 
    src/view/jsp/include blog_entries.inc blog_entry.inc 
  Added files:           (Branch: JAHIA-4-1-BRANCH)
    src/view/jsp/include blog_addcomment_form.inc 
                         blog_view_comments.inc 
                         blog_view_pingurl.inc 
                         blog_view_trackbacks.inc 
  Log:
  Split blog_enty.jsp
  
  Revision  Changes    Path
  1.1.2.28  +6 -0      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.27&r2=1.1.2.28&f=h
  1.1.2.1   +42 -0     
corporate_portal_templates/src/view/jsp/include/blog_addcomment_form.inc (new)
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/blog_addcomment_form.inc?rev=1.1.2.1&content-type=text/plain
  1.1.2.18  +9 -1      
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.17&r2=1.1.2.18&f=h
  1.1.2.25  +40 -212   
corporate_portal_templates/src/view/jsp/include/blog_entry.inc
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/blog_entry.inc.diff?r1=1.1.2.24&r2=1.1.2.25&f=h
  1.1.2.1   +61 -0     
corporate_portal_templates/src/view/jsp/include/blog_view_comments.inc (new)
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/blog_view_comments.inc?rev=1.1.2.1&content-type=text/plain
  1.1.2.1   +28 -0     
corporate_portal_templates/src/view/jsp/include/blog_view_pingurl.inc (new)
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/blog_view_pingurl.inc?rev=1.1.2.1&content-type=text/plain
  1.1.2.1   +54 -0     
corporate_portal_templates/src/view/jsp/include/blog_view_trackbacks.inc (new)
http://jahia.mine.nu:8080/cgi-bin/cvsweb.cgi/corporate_portal_templates/src/view/jsp/include/blog_view_trackbacks.inc?rev=1.1.2.1&content-type=text/plain
  
  
  
  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.27
  retrieving revision 1.1.2.28
  diff -u -r1.1.2.27 -r1.1.2.28
  --- blog_listing.jsp  26 Apr 2005 12:55:44 -0000      1.1.2.27
  +++ blog_listing.jsp  26 Apr 2005 15:16:52 -0000      1.1.2.28
  @@ -387,9 +387,13 @@
   
               Collections.sort(blogKeys);
               %><ul class="offsite"><%
  +            savedCacheStatus = jParams.getCacheStatus();
  +            jParams.setCacheStatus(ParamBean.CACHE_BYPASS);
  +
               for (int i = 0; i < blogKeys.size(); i++) {
                   String blogKey = (String) blogKeys.get(i);
                   JahiaPage blogPage = (JahiaPage) 
blogKeyToBlogPage.get(blogKey);
  +
                   %>
                   <li><a href="<%=blogPage.getURL(jParams)%>">
                       <%=blogPage.getTitle()%></a>
  @@ -416,6 +420,8 @@
                           null, null, false, "", 
"jahiatemplates.Corporate_portal_templates", null, out);
                   }
               }
  +            jParams.setCacheStatus(savedCacheStatus);
  +
               %></li>
               </ul>
               </jahiaHtml:actionMenu>
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  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.17
  retrieving revision 1.1.2.18
  diff -u -r1.1.2.17 -r1.1.2.18
  --- blog_entries.inc  26 Apr 2005 13:51:34 -0000      1.1.2.17
  +++ blog_entries.inc  26 Apr 2005 15:16:52 -0000      1.1.2.18
  @@ -27,6 +27,7 @@
       Enumeration entriesEnum = entries.getContainers();
       String ddMMyyyySaved = "";
       int entriesCounter = 0;
  +    boolean isDivDateClosed = true;
       while (entriesEnum.hasMoreElements()) {
           JahiaContainer entry = (JahiaContainer) entriesEnum.nextElement();
   
  @@ -70,7 +71,11 @@
           sdf.applyPattern("dd.MM.yyyy");
           String ddMMyyyy = sdf.format( new Date(dateLong) );
           if (! ddMMyyyy.equals(ddMMyyyySaved)) {
  -            %><h2><%=ddMMyyyy%></h2><%
  +            if (! isDivDateClosed){
  +                %></div><%
  +            }
  +            %><h2><%=ddMMyyyy%></h2><div style="padding-left:20px;"><%
  +            isDivDateClosed = false;
           }
           ddMMyyyySaved = ddMMyyyy;
   
  @@ -148,6 +153,9 @@
               null, null, true, "", 
"jahiatemplates.Corporate_portal_templates", null, out);
   
       }
  +    if (! isDivDateClosed) {
  +        %></div><%
  +    }
       if (entriesCounter == 0) {
           %>
           <br/><jahia:resourceBundle 
resourceBundle="jahiatemplates.Corporate_portal_templates"
  
  
  
  Index: blog_entry.inc
  ===================================================================
  RCS file: 
/home/cvs/repository/corporate_portal_templates/src/view/jsp/include/Attic/blog_entry.inc,v
  retrieving revision 1.1.2.24
  retrieving revision 1.1.2.25
  diff -u -r1.1.2.24 -r1.1.2.25
  --- blog_entry.inc    26 Apr 2005 13:51:35 -0000      1.1.2.24
  +++ blog_entry.inc    26 Apr 2005 15:16:52 -0000      1.1.2.25
  @@ -16,8 +16,6 @@
               entry = entryContainer.getJahiaContainer(jParams, 
jParams.getEntryLoadRequest());
           }
           ContainerBean entryBean = new ContainerBean(entry,jParams);
  -        jData.gui().html().drawBeginActionMenu(entryBean ,
  -            null, null, true, "", 
"jahiatemplates.Corporate_portal_templates", null, out);
           String title = entry.getFieldValue("title","");
           String body = entry.getFieldValue("body","");
           String author = entry.getFieldValue("author","");
  @@ -45,6 +43,10 @@
           }
           sdf.applyPattern("dd.MM.yyyy");
           String ddMMyyyy = sdf.format( new Date(dateLong) );
  +
  +        jData.gui().html().drawBeginActionMenu(entryBean ,
  +            null, null, true, "", 
"jahiatemplates.Corporate_portal_templates", null, out);
  +
           %>
           <h2><%=ddMMyyyy%></h2>
           <p class="posted-top">
  @@ -86,32 +88,35 @@
                   hasImage = attachement.isImage();
               }
           }
  -
           %>
           <div class="entry">
  -        <h1><%=title%></h1>
  -        <%
  -        if (hasImage) {
  -            %><img src="<%=attachement.getDownloadUrl()%>" 
alt="<%=attachement.getTitle()%>" align="left"/><%
  -        }
  -        %>
  -        <%=toEmotion(body,theURL + "/images/emotion/")%>
  -        <%
  -        if (hasAttachement) {
  -            String fileName = attachement.getFileFieldTitle();
  -            if ("".equals(fileName)){
  -                fileName = attachement.getRealName();
  +            <h1><%=title%></h1>
  +            <%
  +            if (hasImage) {
  +                %><img src="<%=attachement.getDownloadUrl()%>" 
alt="<%=attachement.getTitle()%>" align="left"/><%
               }
               %>
  -            <br/><br/>
  -            <a href="<%=attachement.getDownloadUrl()%>">
  -                <img 
src="<%=theURL%>/images/icons/standard/<%=getPicto(attachement.getDownloadUrl())%>.gif"
 alt="<%=getPicto(attachement.getDownloadUrl())%>" width="16" height="16" 
border="0"/>
  -                <%=fileName%>
  -            </a>
  +            <%=toEmotion(body,theURL + "/images/emotion/")%>
               <%
  -        }
  +            if (hasAttachement) {
  +                String fileName = attachement.getFileFieldTitle();
  +                if ("".equals(fileName)){
  +                    fileName = attachement.getRealName();
  +                }
  +                %>
  +                <br/><br/>
  +                <a href="<%=attachement.getDownloadUrl()%>">
  +                    <img 
src="<%=theURL%>/images/icons/standard/<%=getPicto(attachement.getDownloadUrl())%>.gif"
 alt="<%=getPicto(attachement.getDownloadUrl())%>" width="16" height="16" 
border="0"/>
  +                    <%=fileName%>
  +                </a>
  +                <%
  +            }
  +            %>
  +        </div>
  +        <%
  +        jData.gui().html().drawEndActionMenu(entryBean ,
  +            null, null, true, "", 
"jahiatemplates.Corporate_portal_templates", null, out);
           %>
  -
           <dd class="posted">
               <a href="<%=bypassUrl%>?entryId=<%=entry.getID()%>"
                   title="<jahia:resourceBundle 
resourceBundle="jahiatemplates.Corporate_portal_templates"
  @@ -139,206 +144,29 @@
                   %><a 
href="<%=bypassUrl%>?category=<%=categoryKey%>"><%=categoryTitle%></a> <%
               }
               %>
  +
               <a href="<%=bypassUrl%>?entryId=<%=entry.getID()%>#comments"
                   class="commentlink"><%=commentsCount%>
                   <jahia:resourceBundle 
resourceBundle="jahiatemplates.Corporate_portal_templates"
                       resourceName="blog.comments"/></a>
  -            <a href="#trackbacks" class="commentlink"><%=trackbacksCount%>
  -            <jahia:resourceBundle 
resourceBundle="jahiatemplates.Corporate_portal_templates"
  -                resourceName="blog.trackbacks"/></a>
  +
  +            <a href="<%=bypassUrl%>?entryId=<%=entry.getID()%>#trackbacks"
  +                class="commentlink"><%=trackbacksCount%>
  +                <jahia:resourceBundle 
resourceBundle="jahiatemplates.Corporate_portal_templates"
  +                    resourceName="blog.trackbacks"/></a>
  +
               <br/><jahia:resourceBundle 
resourceBundle="jahiatemplates.Corporate_portal_templates"
                   resourceName="blog.trackback"/> url: <%=trackBackURL%>
  +        </dd>
   
           <div id="comments">
  -            <%
  -            if (comments != null) {
  -                jData.gui().html().drawBeginActionMenu(commentsBean ,
  -                    null, null, true, "", 
"jahiatemplates.Corporate_portal_templates", null, out);
  -                if (commentsCount>0 || jData.gui().isEditMode()) {
  -                    %>
  -                    <h4>
  -                        <%=commentsCount%>
  -                        <jahia:resourceBundle 
resourceBundle="jahiatemplates.Corporate_portal_templates"
  -                            resourceName="blog.comments"/> 
<jahia:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates"
  -                        resourceName="blog.forFar"/> <span>
  -                        (<a href="#postcomment"><jahia:resourceBundle 
resourceBundle="jahiatemplates.Corporate_portal_templates"
  -                        resourceName="blog.postYourOwn"/></a>)</span>
  -                    </h4>
  -                    <dl>
  -                    <%
  -                }
  -                Enumeration commentsEnum = comments.getContainers();
  -                int counter = 0;
  -                while (commentsEnum.hasMoreElements()) {
  -                    JahiaContainer comment = (JahiaContainer) 
commentsEnum.nextElement();
  -                    ContainerBean commentBean = new 
ContainerBean(comment,jParams);
  -                    counter++;
  -                    String alt = counter % 2 == 1 ? "alt" : "alt2";
  -                    String commentAuthor = 
comment.getFieldValue("author","");
  -                    String commentTitle = comment.getFieldValue("title","");
  -                    String commentBody = comment.getFieldValue("body","");
  -                    String commentDate = comment.getFieldValue("date","");
  -                    long commentDateLong = -1;
  -                    try {
  -                        commentDateLong = 
Long.parseLong((String)comment.getFieldObject("date"));
  -                    } catch (NumberFormatException nfe) {
  -                    }
  -                    %>
  -                    <dt id="comment<%=counter%>" class="<%=alt%>">
  -                        <a href="#comment<%=counter%>" class="postno" 
title="Link to comment <%=counter%>"><%=counter%>.</a>
  -                        At
  -                        <% sdf.applyPattern("kk:mm z"); %><%=sdf.format( new 
Date(commentDateLong) )%>
  -                        on <%sdf.applyPattern("d MMM yyyy");%><%=sdf.format( 
new Date(commentDateLong) )%>, <%=commentAuthor%> wrote:
  -                    </dt>
  -                    <dd class="<%=alt%>">
  -                        <%
  -                        if (! "".equals(commentTitle)) {
  -                            %><h3><%=commentTitle%></h3><br/><%
  -                        }
  -                        %>
  -                        <%=toEmotion(commentBody,theURL + 
"/images/emotion/")%>
  -                        <%
  -                        jData.gui().html().drawBeginActionMenu(commentBean ,
  -                            null, null, false, "", 
"jahiatemplates.Corporate_portal_templates", null, out);
  -                        %>
  -                    </dd>
  -                    <%
  -                }
  -                %></dl><%
  -                jData.gui().html().drawEndActionMenu(commentsBean ,
  -                    null, null, true, "", 
"jahiatemplates.Corporate_portal_templates", null, out);
  -            }
  -
  -
  -            if (trackbacks != null) {
  -                ContainerListBean trackbacksBean = new 
ContainerListBean(trackbacks,jParams);
  -                jData.gui().html().drawBeginActionMenu(trackbacksBean ,
  -                    null, null, true, "", 
"jahiatemplates.Corporate_portal_templates", null, out);
  -                if (trackbacksCount>0 || jData.gui().isEditMode()) {
  -                    %><h4 id="trackbacks"><%=trackbacksCount%> 
<jahia:resourceBundle resourceBundle="jahiatemplates.Corporate_portal_templates"
  -                        resourceName="blog.trackbacks"/></h4>
  -                    <dl>
  -                    <%
  -                    Enumeration trackbacksEnum = trackbacks.getContainers();
  -                    int counter = 0;
  -                    while (trackbacksEnum.hasMoreElements()) {
  -                        JahiaContainer trackback = (JahiaContainer) 
trackbacksEnum.nextElement();
  -                        ContainerBean trackbackBean = new 
ContainerBean(trackback,jParams);
  -                        counter++;
  -                        String alt = counter % 2 == 1 ? "alt" : "alt2";
  -                        String trackBackTitle = 
trackback.getFieldValue("trackBackTitle","");
  -                        String trackBackExcerpt = 
trackback.getFieldValue("trackBackExcerpt","");
  -                        String trackBackUrl = 
trackback.getFieldValue("trackBackUrl","#");
  -                        String trackBackBlog_name = 
trackback.getFieldValue("trackBackBlog_name","#");
  -                        %>
  -                        <dt id="trackback<%=counter%>" class="<%=alt%>">
  -                            <a href="#trackback<%=counter%>" class="postno" 
title="Link to trackback <%=counter%>"><%=counter%>.</a>
  -                            <a href="<%=trackBackUrl%>" 
target="_blank"><%="".equals(trackBackBlog_name)?trackBackUrl:trackBackBlog_name%></a>
  -                        </dt>
  -                        <dd class="<%=alt%>">
  -                            <%
  -                            if (! "".equals(trackBackTitle)) {
  -                                %><h3><%=trackBackTitle%></h3><%
  -                            }
  -                            if (! "".equals(trackBackExcerpt)) {
  -                                %><%=trackBackExcerpt%><br/><%
  -                            }
  -                            %>
  -                            <a href="<%=trackBackUrl%>" 
target="_blank"><%="".equals(trackBackBlog_name)?trackBackUrl:trackBackBlog_name%></a>
  -                            <%
  -                            
jData.gui().html().drawBeginActionMenu(trackbackBean ,
  -                                null, null, false, "", 
"jahiatemplates.Corporate_portal_templates", null, out);
  -                            %>
  -                        </dd>
  -                        <%
  -                    }
  -                    %>
  -                    </dl>
  -                    <%
  -                }
  -                jData.gui().html().drawEndActionMenu(trackbacksBean ,
  -                    null, null, true, "", 
"jahiatemplates.Corporate_portal_templates", null, out);
  -
  -            }
  -
  -            %>
  -            <h4><jahia:resourceBundle 
resourceBundle="jahiatemplates.Corporate_portal_templates"
  -                resourceName="blog.postYourOwn"/></h4>
  -            <content:formContentMapperHandler listName="commentsBean" 
submitMarker="addComment"
  -                immediatePublication="true"/>
  -            <form id="postcomment" 
action="<%=bypassUrl%>?entryId=<%=entryId%>" name="submitToContainerList" 
method="post">
  -                <table width="100%">
  -                <tr>
  -                    <td>
  -                        <jahia:resourceBundle 
resourceBundle="jahiatemplates.Corporate_portal_templates"
  -                            resourceName="blog.title"/>
  -                    </td>
  -                    <td><input type="text" name="title" style="width:80%;" 
value="Re: <%=title%>"></td>
  -                </tr>
  -                <tr>
  -                    <td>
  -                        <jahia:resourceBundle 
resourceBundle="jahiatemplates.Corporate_portal_templates"
  -                            resourceName="blog.author"/>
  -                    </td>
  -                    <td><input type="text" name="author" style="width:80%;" 
value="<%=jParams.getUser().getUsername()%>"></td>
  -                </tr>
  -                <tr>
  -                    <td>
  -                        <jahia:resourceBundle 
resourceBundle="jahiatemplates.Corporate_portal_templates"
  -                            resourceName="blog.body"/>
  -                    </td>
  -                    <td><textarea name="body" cols="40" rows="50" 
style="width:80%;height:100px;"></textarea></td>
  -                </tr>
  -                <tr>
  -                    <td>&nbsp;</td>
  -                    <td>
  -                        <a 
href="javascript:document.submitToContainerList.submit()"
  -                            style="border:1px solid #515C6A;padding:2px 5px 
2px 5px;">
  -                            <jahia:resourceBundle 
resourceBundle="jahiatemplates.Corporate_portal_templates"
  -                                resourceName="blog.addComment"/></a>
  -                    </td>
  -                </tr>
  -                </table>
  -                <input type="hidden" name="addComment" value="Submit"/>
  -                <input type="hidden" name="date" 
value="<%=System.currentTimeMillis()%>"/>
  -            </form>
  -
  -            <br/>
  -
  -            <%
  -            if (jData.gui().isEditMode()) {
  -                %><h4><jahia:resourceBundle 
resourceBundle="jahiatemplates.Corporate_portal_templates"
  -                            resourceName="blog.sentPingUrl"/></h4><%
  -                JahiaContainerList pingURLs = entry.getContainerList( 
"trackBackPingURLs" );
  -                ContainerListBean pingURLsBean = new 
ContainerListBean(pingURLs,jParams);
  -
  -                jData.gui().html().drawBeginActionMenu(pingURLsBean ,
  -                    null, null, true, "", 
"jahiatemplates.Corporate_portal_templates", null, out);
  -
  -                if (pingURLs != null) {
  -                    Enumeration pingURLEnum = pingURLs.getContainers();
  -                    while (pingURLEnum.hasMoreElements()) {
  -                        JahiaContainer pingURL = 
(JahiaContainer)pingURLEnum.nextElement();
  -                        String pingURLValue = 
pingURL.getFieldValue("pingURL","");
  -                        ContainerBean pingURLBean = new 
ContainerBean(pingURL,jParams);
  -                        %>
  -                        <%=pingURLValue%>
  -                        <%jData.gui().html().drawBeginActionMenu(pingURLBean,
  -                            null, null, false, "", 
"jahiatemplates.Corporate_portal_templates", null, out);%>
  -                        <br/>
  -                        <%
  -                    }
  -                }
  -                jData.gui().html().drawEndActionMenu(pingURLsBean ,
  -                    null, null, true, "", 
"jahiatemplates.Corporate_portal_templates", null, out);
  -            }
  -            %>
  -
  +            <%@ include file="blog_view_comments.inc"%>
  +            <%@ include file="blog_view_trackbacks.inc"%>
  +            <%@ include file="blog_addcomment_form.inc"%>
  +            <%@ include file="blog_view_pingurl.inc"%>
           </div>
  -        <%
  -        jData.gui().html().drawEndActionMenu(entryBean ,
  -            null, null, true, "", 
"jahiatemplates.Corporate_portal_templates", null, out);
   
  +        <%
       }
   } else {
       %>
  

Reply via email to