- Changed edit-mode attribute to conf-mode - Added a use-private attribute. This is "true" by default but can be set to "fasle" if the include-portal-page must render a specific PortalPage without checking if a derived private PortalPage copy exists (i.e. in PortalPageAdmin screens) - Fixed Portlet attributes retrieval. After each portlet rendering the attributes are removed from the context so that another instance of the same portlet in the same PortalPage that has no attribute value specified falls back to default values and not to the values of the previous portlet. - The up/down/left/right portlet icons use the same service used for the Portlet Drag and Drop. (This is not working yet. Needs a next commit) - Few portlet style and labels updates git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1023197 13f79535-47bb-0310-9956-ffa450edef68
296 lines
16 KiB
Plaintext
296 lines
16 KiB
Plaintext
<#--
|
|
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 renderScreenBegin>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
</#macro>
|
|
|
|
<#macro renderScreenEnd>
|
|
</#macro>
|
|
|
|
<#macro renderSectionBegin boundaryComment>
|
|
<#if boundaryComment?has_content>
|
|
<!-- ${boundaryComment} -->
|
|
</#if>
|
|
</#macro>
|
|
|
|
<#macro renderSectionEnd boundaryComment>
|
|
<#if boundaryComment?has_content>
|
|
<!-- ${boundaryComment} -->
|
|
</#if>
|
|
</#macro>
|
|
|
|
<#macro renderContainerBegin id style autoUpdateLink autoUpdateInterval>
|
|
<#if autoUpdateLink?has_content>
|
|
<script type="text/javascript">ajaxUpdateAreaPeriodic('${id}', '${autoUpdateLink}', '', '${autoUpdateInterval}');</script>
|
|
</#if>
|
|
<div<#if id?has_content> id="${id}"</#if><#if style?has_content> class="${style}"</#if>>
|
|
</#macro>
|
|
<#macro renderContainerEnd></div></#macro>
|
|
<#macro renderContentBegin editRequest enableEditValue editContainerStyle><#if editRequest?has_content && enableEditValue == "true"><div class=${editContainerStyle}></#if></#macro>
|
|
<#macro renderContentBody></#macro>
|
|
<#macro renderContentEnd urlString editMode editContainerStyle editRequest enableEditValue>
|
|
<#if editRequest?exists && enableEditValue == "true">
|
|
<#if urlString?exists><a href="${urlString}">${editMode}</a><#rt/></#if>
|
|
<#if editContainerStyle?exists></div><#rt/></#if>
|
|
</#if>
|
|
</#macro>
|
|
<#macro renderSubContentBegin editContainerStyle editRequest enableEditValue><#if editRequest?exists && enableEditValue == "true"><div class="${editContainerStyle}"></#if></#macro>
|
|
<#macro renderSubContentBody></#macro>
|
|
<#macro renderSubContentEnd urlString editMode editContainerStyle editRequest enableEditValue>
|
|
<#if editRequest?exists && enableEditValue == "true">
|
|
<#if urlString?exists><a href="${urlString}">${editMode}</a><#rt/></#if>
|
|
<#if editContainerStyle?exists></div><#rt/></#if>
|
|
</#if>
|
|
</#macro>
|
|
|
|
<#macro renderHorizontalSeparator id style><hr<#if id?has_content> id="${id}"</#if><#if style?has_content> class="${style}"</#if>/></#macro>
|
|
|
|
<#macro renderLabel text id style>
|
|
<#if text?has_content>
|
|
<#-- Label is considered block level element in screen widget. There is not reason to render text outside of any html element. Use of style element has set pattern and we'll use style
|
|
to determine appropriate html element to use -->
|
|
<#if style?has_content>
|
|
<#if style=="h1">
|
|
<h1
|
|
<#elseif style=="h2">
|
|
<h2
|
|
<#elseif style=="h3">
|
|
<h3
|
|
<#elseif style=="h4">
|
|
<h4
|
|
<#elseif style=="h5">
|
|
<h5
|
|
<#elseif style=="h6">
|
|
<h6
|
|
<#else>
|
|
<p class="${style}"
|
|
</#if>
|
|
<#else>
|
|
<p
|
|
</#if>
|
|
<#if id?has_content >
|
|
<#if id?has_content> id="${id}"</#if>
|
|
</#if>
|
|
>${text}
|
|
<#if style?has_content>
|
|
<#if style=="h1">
|
|
</h1>
|
|
<#elseif style=="h2">
|
|
</h2>
|
|
<#elseif style=="h3">
|
|
</h3>
|
|
<#elseif style=="h4">
|
|
</h4>
|
|
<#elseif style=="h5">
|
|
</h5>
|
|
<#elseif style=="h6">
|
|
</h6>
|
|
<#else>
|
|
</p>
|
|
</#if>
|
|
<#else>
|
|
</p>
|
|
</#if>
|
|
</#if>
|
|
</#macro>
|
|
|
|
<#macro renderLink parameterList targetWindow target uniqueItemName linkType actionUrl id style name linkUrl text imgStr>
|
|
<#if "hidden-form" == linkType>
|
|
<form method="post" action="${actionUrl}" <#if targetWindow?has_content>target="${targetWindow}"</#if> onsubmit="javascript:submitFormDisableSubmits(this)" name="${uniqueItemName}"><#rt/>
|
|
<#list parameterList as parameter>
|
|
<input name="${parameter.name}" value="${parameter.value}" type="hidden"/><#rt/>
|
|
</#list>
|
|
</form><#rt/>
|
|
</#if>
|
|
<a <#if id?has_content>id="${id}"</#if> <#if style?has_content>class="${style}"</#if> <#if name?has_content>name="${name}"</#if> <#if targetWindow?has_content>target="${targetWindow}"</#if> href="<#if "hidden-form"==linkType>javascript:document.${uniqueItemName}.submit()<#else>${linkUrl}</#if>"><#rt/>
|
|
<#if imgStr?has_content>${imgStr}<#else><#if text?has_content>${text}</#if></#if></a>
|
|
</#macro>
|
|
<#macro renderImage src id style wid hgt border alt urlString>
|
|
<#if src?has_content>
|
|
<img <#if id?has_content>id="${id}"</#if><#if style?has_content> class="${style}"</#if><#if wid?has_content> width="${wid}"</#if><#if hgt?has_content> height="${hgt}"</#if><#if border?has_content> border="${border}"</#if> alt="<#if alt?has_content>${alt}</#if>" src="${urlString}" />
|
|
</#if>
|
|
</#macro>
|
|
|
|
<#macro renderContentFrame fullUrl width height border><iframe src="${fullUrl}" width="${width}" height="${height}" <#if border?has_content>border="${border}"</#if> /></#macro>
|
|
<#macro renderScreenletBegin id title collapsible saveCollapsed collapsibleAreaId expandToolTip collapseToolTip fullUrlString padded menuString showMore collapsed javaScriptEnabled>
|
|
<div class="screenlet"<#if id?has_content> id="${id}"</#if>><#rt/>
|
|
<#if showMore>
|
|
<div class="screenlet-title-bar"><ul><#if title?has_content><li class="h3">${title}</li></#if>
|
|
<#if collapsible>
|
|
<li class="<#rt/>
|
|
<#if collapsed>
|
|
collapsed"><a <#if javaScriptEnabled>onclick="javascript:toggleScreenlet(this, '${collapsibleAreaId}', '${saveCollapsed?string}', '${expandToolTip}', '${collapseToolTip}');"<#else>href="${fullUrlString}"</#if><#if expandToolTip?has_content> title="${expandToolTip}"</#if>
|
|
<#else>
|
|
expanded"><a <#if javaScriptEnabled>onclick="javascript:toggleScreenlet(this, '${collapsibleAreaId}', '${saveCollapsed?string}', '${expandToolTip}', '${collapseToolTip}');"<#else>href="${fullUrlString}"</#if><#if expandToolTip?has_content> title="${expandToolTip}"</#if>
|
|
</#if>
|
|
> </a></li>
|
|
</#if>
|
|
<#if !collapsed>
|
|
${menuString}
|
|
</#if>
|
|
</ul><br class="clear" /></div>
|
|
</#if>
|
|
<div <#if collapsibleAreaId?has_content> id="${collapsibleAreaId}" <#if collapsed> style="display: none;"</#if></#if><#if padded> class="screenlet-body"<#else> class="screenlet-body no-padding"</#if>>
|
|
</#macro>
|
|
<#macro renderScreenletSubWidget></#macro>
|
|
<#macro renderScreenletEnd></div></div></#macro>
|
|
<#macro renderScreenletPaginateMenu lowIndex actualPageSize ofLabel listSize paginateLastStyle lastLinkUrl paginateLastLabel paginateNextStyle nextLinkUrl paginateNextLabel paginatePreviousStyle paginatePreviousLabel previousLinkUrl paginateFirstStyle paginateFirstLabel firstLinkUrl>
|
|
<li class="${paginateLastStyle}<#if !lastLinkUrl?has_content> disabled</#if>"><#if lastLinkUrl?has_content><a href="${lastLinkUrl}">${paginateLastLabel}</a><#else>${paginateLastLabel}</#if></li>
|
|
<li class="${paginateNextStyle}<#if !nextLinkUrl?has_content> disabled</#if>"><#if nextLinkUrl?has_content><a href="${nextLinkUrl}">${paginateNextLabel}</a><#else>${paginateNextLabel}</#if></li>
|
|
<#if (listSize?number > 0) ><li>${lowIndex?number + 1} - ${lowIndex?number + actualPageSize?number} ${ofLabel} ${listSize}</li><#rt/></#if>
|
|
<li class="${paginatePreviousStyle?default("nav-previous")}<#if !previousLinkUrl?has_content> disabled</#if>"><#if previousLinkUrl?has_content><a href="${previousLinkUrl}">${paginatePreviousLabel}</a><#else>${paginatePreviousLabel}</#if></li>
|
|
<li class="${paginateFirstStyle?default("nav-first")}<#if !firstLinkUrl?has_content> disabled</#if>"><#if firstLinkUrl?has_content><a href="${firstLinkUrl}">${paginateFirstLabel}</a><#else>${paginateFirstLabel}</#if></li>
|
|
</#macro>
|
|
|
|
<#macro renderPortalPageBegin originalPortalPageId portalPageId confMode="false" addColumnLabel="Add column" addColumnHint="Add a new column to this portal">
|
|
<#if confMode == "true">
|
|
<a class="buttontext" href="javascript:document.addColumn_${portalPageId}.submit()" title="${addColumnHint}">${addColumnLabel}</a> <b>PortalPageId: ${portalPageId}</b>
|
|
<form method="post" action="addPortalPageColumn" name="addColumn_${portalPageId}">
|
|
<input name="portalPageId" value="${portalPageId}" type="hidden"/>
|
|
</form>
|
|
</#if>
|
|
<table width="100%">
|
|
<tr>
|
|
</#macro>
|
|
|
|
<#macro renderPortalPageEnd>
|
|
</tr>
|
|
</table>
|
|
</#macro>
|
|
|
|
<#macro renderPortalPageColumnBegin originalPortalPageId portalPageId columnSeqId confMode="false" width="auto" delColumnLabel="Delete column" delColumnHint="Delete this column" addPortletLabel="Add portlet" addPortletHint="Add a new portlet to this column" colWidthLabel="Col. width:" setColumnSizeHint="Set column size">
|
|
<#assign columnKey = portalPageId+columnSeqId>
|
|
<#assign columnKeyFields = '<input name="portalPageId" value="' + portalPageId + '" type="hidden"/><input name="columnSeqId" value="' + columnSeqId + '" type="hidden"/>'>
|
|
<td class="portal-column<#if confMode == "true">-config</#if>" style="vertical-align: top; <#if width?has_content> width:${width};</#if>" id="portalColumn_${columnSeqId}">
|
|
<#if confMode == "true">
|
|
<div class="portal-column-config-title-bar">
|
|
<ul>
|
|
<li>
|
|
<form method="post" action="deletePortalPageColumn" name="delColumn_${columnKey}">
|
|
${columnKeyFields}
|
|
</form>
|
|
<a class="buttontext" href="javascript:document.delColumn_${columnKey}.submit()" title="${delColumnHint}">${delColumnLabel}</a>
|
|
</li>
|
|
<li>
|
|
<form method="post" action="addPortlet" name="addPortlet_${columnKey}">
|
|
${columnKeyFields}
|
|
</form>
|
|
<a class="buttontext" href="javascript:document.addPortlet_${columnKey}.submit()" title="${addPortletHint}">${addPortletLabel}</a>
|
|
</li>
|
|
<li>
|
|
<form method="post" action="editPortalPageColumnWidth" name="setColumnSize_${columnKey}">
|
|
${columnKeyFields}
|
|
</form>
|
|
<a class="buttontext" href="javascript:document.setColumnSize_${columnKey}.submit()" title="${setColumnSizeHint}">${colWidthLabel}: ${width}</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<br class="clear"/>
|
|
</#if>
|
|
</#macro>
|
|
|
|
<#macro renderPortalPageColumnEnd>
|
|
</td>
|
|
</#macro>
|
|
|
|
<#macro renderPortalPagePortletBegin originalPortalPageId portalPageId portalPortletId portletSeqId prevPortletId="" prevPortletSeqId="" nextPortletId="" nextPortletSeqId="" prevColumnSeqId="" nextColumnSeqId="" confMode="false" delPortletHint="Remove this portlet" editAttribute="false" editAttributeHint="Edit portlet parameters">
|
|
<#assign portletKey = portalPageId+portalPortletId+portletSeqId>
|
|
<#assign portletKeyFields = '<input name="portalPageId" value="' + portalPageId + '" type="hidden"/><input name="portalPortletId" value="' + portalPortletId + '" type="hidden"/><input name="portletSeqId" value="' + portletSeqId + '" type="hidden"/>'>
|
|
<div id="PP_${portletKey}" name="portalPortlet" class="noClass">
|
|
<#if confMode == "true">
|
|
<div class="portlet-config" id="PPCFG_${portletKey}">
|
|
<div class="portlet-config-title-bar">
|
|
<ul>
|
|
<li class="title">Portlet : [${portalPortletId}]</li>
|
|
<li class="remove">
|
|
<form method="post" action="deletePortalPagePortlet" name="delPortlet_${portletKey}">
|
|
${portletKeyFields}
|
|
</form>
|
|
<a href="javascript:document.delPortlet_${portletKey}.submit()" title="${delPortletHint}"> </a>
|
|
</li>
|
|
<#if editAttribute == "true">
|
|
<li class="edit">
|
|
<form method="post" action="editPortalPortletAttributes" name="editPortlet_${portletKey}">
|
|
${portletKeyFields}
|
|
</form>
|
|
<a href="javascript:document.editPortlet_${portletKey}.submit()" title="${editAttributeHint}"> </a>
|
|
</li>
|
|
</#if>
|
|
<#if prevColumnSeqId?has_content>
|
|
<li class="move-left">
|
|
<form method="post" action="updatePortletSeqDragDrop" name="movePortletLeft_${portletKey}">
|
|
<input name="o_portalPageId" value="${portalPageId}" type="hidden"/>
|
|
<input name="o_portalPortletId" value="${portalPortletId}" type="hidden"/>
|
|
<input name="o_portletSeqId" value="${portletSeqId}" type="hidden"/>
|
|
<input name="destinationColumn" value="${prevColumnSeqId}" type="hidden"/>
|
|
<input name="mode" value="DRAGDROPBOTTOM" type="hidden"/>
|
|
</form>
|
|
<a href="javascript:document.movePortletLeft_${portletKey}.submit()"> </a></li>
|
|
</#if>
|
|
<#if nextColumnSeqId?has_content>
|
|
<li class="move-right">
|
|
<form method="post" action="updatePortletSeqDragDrop" name="movePortletRight_${portletKey}">
|
|
<input name="o_portalPageId" value="${portalPageId}" type="hidden"/>
|
|
<input name="o_portalPortletId" value="${portalPortletId}" type="hidden"/>
|
|
<input name="o_portletSeqId" value="${portletSeqId}" type="hidden"/>
|
|
<input name="destinationColumn" value="${nextColumnSeqId}" type="hidden"/>
|
|
<input name="mode" value="DRAGDROPBOTTOM" type="hidden"/>
|
|
</form>
|
|
<a href="javascript:document.movePortletRight_${portletKey}.submit()"> </a></li>
|
|
</#if>
|
|
<#if prevPortletId?has_content>
|
|
<li class="move-up">
|
|
<form method="post" action="updatePortletSeqDragDrop" name="movePortletUp_${portletKey}">
|
|
<input name="o_portalPageId" value="${portalPageId}" type="hidden"/>
|
|
<input name="o_portalPortletId" value="${portalPortletId}" type="hidden"/>
|
|
<input name="o_portletSeqId" value="${portletSeqId}" type="hidden"/>
|
|
<input name="d_portalPageId" value="${portalPageId}" type="hidden"/>
|
|
<input name="d_portalPortletId" value="${prevPortletId}" type="hidden"/>
|
|
<input name="d_portletSeqId" value="${prevPortletSeqId}" type="hidden"/>
|
|
<input name="mode" value="DRAGDROPBEFORE" type="hidden"/>
|
|
</form>
|
|
<a href="javascript:document.movePortletUp_${portletKey}.submit()"> </a></li>
|
|
</#if>
|
|
<#if nextPortletId?has_content>
|
|
<li class="move-down">
|
|
<form method="post" action="updatePortletSeqDragDrop" name="movePortletDown_${portletKey}">
|
|
<input name="o_portalPageId" value="${portalPageId}" type="hidden"/>
|
|
<input name="o_portalPortletId" value="${portalPortletId}" type="hidden"/>
|
|
<input name="o_portletSeqId" value="${portletSeqId}" type="hidden"/>
|
|
<input name="d_portalPageId" value="${portalPageId}" type="hidden"/>
|
|
<input name="d_portalPortletId" value="${nextPortletId}" type="hidden"/>
|
|
<input name="d_portletSeqId" value="${nextPortletSeqId}" type="hidden"/>
|
|
<input name="mode" value="DRAGDROPAFTER" type="hidden"/>
|
|
</form>
|
|
<a href="javascript:document.movePortletDown_${portletKey}.submit()"> </a></li>
|
|
</#if>
|
|
</ul>
|
|
<br class="clear"/>
|
|
</div>
|
|
</#if>
|
|
</#macro>
|
|
|
|
<#macro renderPortalPagePortletEnd confMode="false">
|
|
</div>
|
|
<#if confMode == "true">
|
|
</div>
|
|
</#if>
|
|
</#macro>
|