<#-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <#macro renderBlog contentId="" targetPurpose="" stdWrapId=""> <#if contentId?has_content> <#assign contentIdx = contentId/> <#assign viewIdx = "" /> <#if requestParameters.viewIndex?has_content> <#assign viewIdx = requestParameters.viewIndex! /> <#assign viewSz = "" /> <#if requestParameters.viewSize?has_content> <#assign viewSz = requestParameters.viewSize! /> <#assign sz=0/> <@loopSubContent contentId=contentIdx viewIndex=viewIdx viewSize=viewSz contentAssocTypeId="PUBLISH_LINK" pickWhen="purposes.contains(\"ARTICLE\") && \"CTNT_PUBLISHED\".equals(content.get(\"statusId\"))" returnAfterPickWhen="purposes.contains(\"ARTICLE\")" followWhen="contentAssocTypeId != null && contentAssocTypeId.equals(\"never follow\")"> <#assign thisNodeTrailCsv=nodeTrailCsv!/> <#assign thisSubContentId=subContentId!/> <#assign thisNode=globalNodeTrail?last/> <#if thisNode?has_content> <#assign thisOwnerContentId=thisNode.value.ownerContentId!/> <#assign userLoginId=""/> <#if content?has_content && content.createdByUserLogin?has_content> <#assign userLoginId=content.createdByUserLogin/> <#assign authorName=Static["org.apache.ofbiz.content.ContentManagementWorker"].getUserName(request,userLoginId!)/> <@checkPermission mode="equals" entityOperation="_UPDATE" subContentId=content.contentId targetOperation="CONTENT_UPDATE" contentPurposeList="ARTICLE"> <#assign sz=listSize/> <#if sz == 0 > <@wrapSubContentCache subContentId=contentIdx wrapTemplateId=stdWrapId contentPurposeList="ARTICLE">
 
by:<#if authorName?has_content>${authorName!} <#else> <#if content?has_content>${content.createdByUserLogin!}   <#if thisNode?? && thisNode.fromDate??> <#assign nowTime = thisNode.fromDate?string /> <#assign shortTime = ""/> <#if nowTime?has_content> <#assign lastColon=nowTime?last_index_of(":") - 1/> <#assign shortTime=nowTime[0..lastColon]/> ${shortTime!}
<#if content?has_content>${content.contentName!} -- <#if content?has_content>${content.description!} ${uiLabelMap.CommonView} ${uiLabelMap.CommonEdit}
${uiLabelMap.CommonNoRecordFound}
<#assign targOp="HAS_USER_ROLE"/> <#assign pageTargOp=targetOperation!/> <#if pageTargOp?has_content> <#assign targOp=pageTargOp/> <@checkPermission mode="equals" entityOperation="_CREATE" subContentId=contentDept statusId="CTNT_PUBLISHED" targetOperation=targOp contentPurposeList="ARTICLE" quickCheckContentId=contentIdx> <@checkPermission mode="not-equals" entityOperation="_CREATE" subContentId=contentDept statusId="CTNT_PUBLISHED" targetOperation=targOp contentPurposeList="ARTICLE" quickCheckContentId=contentIdx>
${uiLabelMap.ProductNewArticle}
${uiLabelMap.EcommerceLoggedToPost}
<#-- <@checkPermission mode="not-equals" entityOperation="_CREATE" subContentId=contentIdx statusId="CTNT_PUBLISHED" targetOperation="HAS_USER_ROLE" contentPurposeList="ARTICLE"> ${permissionErrorMsg!} --> <#macro renderAncestryPath trail startIndex=0 endIndexOffset=0 buttonTitle="${uiLabelMap.CommonBackTo}"> <#local indent = ""> <#local csv = ""> <#local counter = 0> <#local len = trail?size> <#list trail as content> <#if counter < (len - endIndexOffset) && startIndex <= counter > <#if 0 < counter > <#local csv = csv + ","/> <#local csv = csv + content.contentId/> <#if counter < len && startIndex <= counter > <#local counter = counter + 1> <#if 20 < counter > <#break/>
${indent} <#if content.contentTypeId == "WEB_SITE_PUB_PT" > ${uiLabelMap.CommonBackTo}  ${content.contentName!} <#else> ${uiLabelMap.CommonBackTo} to  ${content.contentName!} <#local indent = indent + "    "> [${content.contentId!}]
<#macro nextPrev listSize requestURL queryString lowIndex=0 highIndex=10 viewSize=10 viewIndex=0 > <#assign lowIdx=lowIndex/> <#assign highIdx=highIndex/> <#assign viewSz=viewSize/> <#assign viewIdx=viewIndex/> <#assign listSz=listSize/> <#if !lowIdx?has_content><#assign lowIdx=0/> <#if !highIdx?has_content><#assign highIdx=0/> <#if !viewSz?has_content><#assign viewSz=10/> <#if !viewIdx?has_content><#assign viewIdx=10/> <#if !listSz?has_content><#assign listSz=0/> <#if queryString?has_content> <#assign queryString = Static["org.apache.ofbiz.base.util.UtilHttp"].stripViewParamsFromQueryString(queryString)/> <#assign lowIdxShow = lowIdx + 1 /> <#if highIdx < lowIdxShow > <#assign lowIdxShow = highIdx/>
<#if 0 < listSz?number> <#if 0 < viewIdx?number> ${uiLabelMap.CommonPrevious} <#else> ${uiLabelMap.CommonPrevious} <#if 0 < listSz> ${lowIdxShow} - ${highIdx!} ${uiLabelMap.CommonOf} ${listSz!} <#if highIdx!?number < listSz!?number> ${uiLabelMap.CommonNext} <#else> ${uiLabelMap.CommonNext}