renamed MySites in Go to
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portal/liferay62-plugins/social-dockbar-hook@128226 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
57cd7c7902
commit
7dafc9f479
|
@ -1,15 +0,0 @@
|
|||
<%--
|
||||
/**
|
||||
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation; either version 2.1 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
--%>
|
|
@ -1,25 +0,0 @@
|
|||
<%--
|
||||
/**
|
||||
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation; either version 2.1 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
--%>
|
||||
|
||||
<%@ include file="/html/portlet/init.jsp" %>
|
||||
|
||||
<%@ page import="com.liferay.portal.util.PortletCategoryUtil" %><%@
|
||||
page import="com.liferay.taglib.aui.AUIUtil" %>
|
||||
|
||||
<%@ page import="java.util.regex.Matcher" %><%@
|
||||
page import="java.util.regex.Pattern" %>
|
||||
|
||||
<%@ include file="/html/portlet/dockbar/init-ext.jsp" %>
|
|
@ -1,104 +0,0 @@
|
|||
<%--
|
||||
/**
|
||||
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation; either version 2.1 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
--%>
|
||||
|
||||
<%@ include file="/html/portlet/dockbar/init.jsp" %>
|
||||
|
||||
<div id="<portlet:namespace />devicePreviewContainer">
|
||||
<aui:button cssClass="close pull-right" name="closePanelPreview" value="×" />
|
||||
|
||||
<h1><liferay-ui:message key="preview" /></h1>
|
||||
|
||||
<aui:nav cssClass="nav-list">
|
||||
<aui:nav-item cssClass="autosize lfr-device-item" data-device="autosize">
|
||||
<div class="device-info">
|
||||
<span class="device-name"><liferay-ui:message key="autosize" /></span>
|
||||
<span class="device-dimensions">100%</span>
|
||||
</div>
|
||||
</aui:nav-item>
|
||||
|
||||
<aui:nav-item cssClass="lfr-device-item selected smartphone" data-device="smartphone">
|
||||
<div class="device-info">
|
||||
<span class="device-name"><liferay-ui:message key="smartphone" /></span>
|
||||
<span class="device-dimensions">768px</span>
|
||||
</div>
|
||||
</aui:nav-item>
|
||||
|
||||
<aui:nav-item cssClass="lfr-device-item tablet" data-device="tablet">
|
||||
<div class="device-info">
|
||||
<span class="device-name"><liferay-ui:message key="tablet" /></span>
|
||||
<span class="device-dimensions">1024px</span>
|
||||
</div>
|
||||
</aui:nav-item>
|
||||
|
||||
<aui:nav-item cssClass="desktop lfr-device-item" data-device="desktop">
|
||||
<div class="device-info">
|
||||
<span class="device-name"><liferay-ui:message key="desktop" /></span>
|
||||
<span class="device-dimensions">1280px</span>
|
||||
</div>
|
||||
</aui:nav-item>
|
||||
|
||||
<aui:nav-item cssClass="lfr-device-item" data-device="custom">
|
||||
<p><liferay-ui:message key="custom" /> (px)</p>
|
||||
|
||||
<aui:input cssClass="input-mini" inlineField="<%= true %>" label="" name="width" value="400" /><span> × </span><aui:input cssClass="input-mini" inlineField="<%= true %>" label="" name="height" value="400" />
|
||||
</aui:nav-item>
|
||||
</aui:nav>
|
||||
|
||||
<div class="alert">
|
||||
<small><liferay-ui:message key="preview-may-not-be-accurate" /></small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<aui:script use="liferay-dockbar-device-preview">
|
||||
var devicePreview = new Liferay.Dockbar.DevicePreview(
|
||||
{
|
||||
devices: {
|
||||
autosize: {
|
||||
skin: 'autosize'
|
||||
},
|
||||
custom: {
|
||||
height: '#<portlet:namespace />height',
|
||||
resizable: true,
|
||||
width: '#<portlet:namespace />width'
|
||||
},
|
||||
desktop: {
|
||||
height: 1050,
|
||||
width: 1300
|
||||
},
|
||||
smartphone: {
|
||||
height: 640,
|
||||
preventTransition: true,
|
||||
rotation: true,
|
||||
selected: true,
|
||||
skin: 'smartphone',
|
||||
width: 400
|
||||
},
|
||||
tablet: {
|
||||
height: 900,
|
||||
preventTransition: true,
|
||||
rotation: true,
|
||||
skin: 'tablet',
|
||||
width: 760
|
||||
}
|
||||
},
|
||||
inputHeight: '#<portlet:namespace />height',
|
||||
inputWidth: '#<portlet:namespace />width',
|
||||
namespace: '<portlet:namespace />'
|
||||
}
|
||||
);
|
||||
|
||||
Liferay.once('dockbarHidePanel', A.bind('destroy', devicePreview));
|
||||
</aui:script>
|
|
@ -14,9 +14,8 @@
|
|||
*/
|
||||
--%>
|
||||
|
||||
|
||||
<c:if test="<%= user.hasMySites() %>">
|
||||
<aui:nav-item cssClass="my-sites" dropdown="<%= true %>" id="mySites" label="my-sites" wrapDropDownMenu="<%= false %>">
|
||||
<aui:nav-item cssClass="my-sites" dropdown="<%= true %>" id="mySites" label="Go to" wrapDropDownMenu="<%= false %>">
|
||||
<liferay-ui:my-sites classNames="<%= new String[] {Group.class.getName(), Organization.class.getName()} %>" cssClass="dropdown-menu my-sites-menu" />
|
||||
</aui:nav-item>
|
||||
</c:if>
|
||||
|
|
|
@ -1,196 +0,0 @@
|
|||
<%--
|
||||
/**
|
||||
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation; either version 2.1 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
--%>
|
||||
|
||||
<%
|
||||
boolean customizableLayout = !(group.isLayoutPrototype() || group.isLayoutSetPrototype() || group.isStagingGroup() || group.isUserGroup()) && layoutTypePortlet.isCustomizable() && LayoutPermissionUtil.containsWithoutViewableGroup(permissionChecker, layout, false, ActionKeys.CUSTOMIZE);
|
||||
boolean linkedLayout = (!SitesUtil.isLayoutUpdateable(layout) || (layout.isLayoutPrototypeLinkActive() && !group.hasStagingGroup())) && LayoutPermissionUtil.containsWithoutViewableGroup(themeDisplay.getPermissionChecker(), layout, false, ActionKeys.UPDATE);
|
||||
boolean modifiedLayout = (layoutSet != null) && layoutSet.isLayoutSetPrototypeLinkActive() && SitesUtil.isLayoutModifiedSinceLastMerge(layout) && hasLayoutUpdatePermission;
|
||||
%>
|
||||
|
||||
<c:if test="<%= modifiedLayout || linkedLayout || customizableLayout %>">
|
||||
|
||||
<%
|
||||
boolean dockbarMessagesHidden = GetterUtil.getBoolean(SessionClicks.get(request, "dockbarMessagesHidden", "false"));
|
||||
%>
|
||||
|
||||
<aui:nav-item cssClass='<%= "info-items" + (dockbarMessagesHidden ? " hide" : StringPool.BLANK) %>'>
|
||||
<div class="page-customization-bar-container">
|
||||
<c:if test="<%= modifiedLayout %>">
|
||||
<div class="page-customization-bar">
|
||||
<div class="page-customization-bar-text">
|
||||
<span class="page-customization-bar-message">
|
||||
<liferay-ui:message key="this-page-has-been-changed-since-the-last-update-from-the-site-template-excerpt" />
|
||||
</span>
|
||||
|
||||
<liferay-ui:icon-help message="this-page-has-been-changed-since-the-last-update-from-the-site-template" />
|
||||
</div>
|
||||
|
||||
<div class="page-customization-bar-form">
|
||||
<liferay-portlet:actionURL portletName="<%= PortletKeys.LAYOUTS_ADMIN %>" var="resetPrototypeURL">
|
||||
<portlet:param name="struts_action" value="/layouts_admin/edit_layouts" />
|
||||
</liferay-portlet:actionURL>
|
||||
|
||||
<aui:form action="<%= resetPrototypeURL %>" cssClass="reset-prototype" name="resetFm" portletNamespace="<%= PortalUtil.getPortletNamespace(PortletKeys.LAYOUTS_ADMIN) %>">
|
||||
<aui:input name="<%= Constants.CMD %>" type="hidden" value="reset_prototype" />
|
||||
<aui:input name="redirect" type="hidden" value="<%= PortalUtil.getLayoutURL(themeDisplay) %>" />
|
||||
<aui:input name="groupId" type="hidden" value="<%= String.valueOf(themeDisplay.getSiteGroupId()) %>" />
|
||||
|
||||
<aui:button cssClass="btn-link" name="submit" type="submit" value="reset-changes" />
|
||||
</aui:form>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<c:if test="<%= linkedLayout %>">
|
||||
<div class="page-customization-bar">
|
||||
<div class="page-customization-bar-text">
|
||||
<c:choose>
|
||||
<c:when test="<%= layout.isLayoutPrototypeLinkActive() && !group.hasStagingGroup() %>">
|
||||
<liferay-ui:message key="this-page-is-linked-to-a-page-template" />
|
||||
</c:when>
|
||||
<c:when test="<%= layout instanceof VirtualLayout %>">
|
||||
<liferay-ui:message key="this-page-belongs-to-a-user-group" />
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<liferay-ui:message key="this-page-is-linked-to-a-site-template-which-does-not-allow-modifications-to-it" />
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</div>
|
||||
</div>
|
||||
</c:if>
|
||||
|
||||
<c:if test="<%= customizableLayout %>">
|
||||
<div class="page-customization-bar">
|
||||
<div class="page-customization-bar-text">
|
||||
<c:choose>
|
||||
<c:when test="<%= layoutTypePortlet.isCustomizedView() %>">
|
||||
|
||||
<span class="page-customization-bar-message">
|
||||
<liferay-ui:message key="you-can-customize-this-page" />
|
||||
</span>
|
||||
|
||||
<liferay-ui:icon-help message="customizable-user-help" />
|
||||
</c:when>
|
||||
<c:otherwise>
|
||||
<span class="page-customization-bar-message">
|
||||
<liferay-ui:message key="this-is-the-default-page-without-your-customizations" />
|
||||
</span>
|
||||
|
||||
<c:if test="<%= hasLayoutUpdatePermission %>">
|
||||
<liferay-ui:icon-help message="customizable-admin-help" />
|
||||
</c:if>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</div>
|
||||
|
||||
<div class="page-customization-bar-form">
|
||||
|
||||
<%
|
||||
String taglibImage = "search";
|
||||
String taglibMessage = "view-default-page";
|
||||
|
||||
if (!layoutTypePortlet.isCustomizedView()) {
|
||||
taglibMessage = "view-my-customized-page";
|
||||
}
|
||||
else if (layoutTypePortlet.isDefaultUpdated()) {
|
||||
taglibImage = "activate";
|
||||
taglibMessage = "the-defaults-for-the-current-page-have-been-updated-click-here-to-see-them";
|
||||
}
|
||||
%>
|
||||
|
||||
<liferay-ui:icon id="toggleCustomizedView" label="<%= true %>" message="<%= taglibMessage %>" url="javascript:;" />
|
||||
|
||||
<c:if test="<%= layoutTypePortlet.isCustomizedView() %>">
|
||||
<liferay-portlet:actionURL portletName="<%= PortletKeys.LAYOUTS_ADMIN %>" var="resetCustomizationViewURL">
|
||||
<portlet:param name="struts_action" value="/layouts_admin/edit_layouts" />
|
||||
<portlet:param name="groupId" value="<%= String.valueOf(themeDisplay.getSiteGroupId()) %>" />
|
||||
<portlet:param name="<%= Constants.CMD %>" value="reset_customized_view" />
|
||||
</liferay-portlet:actionURL>
|
||||
|
||||
<%
|
||||
String taglibURL = "javascript:if (confirm('" + UnicodeLanguageUtil.get(pageContext, "are-you-sure-you-want-to-reset-your-customizations-to-default") + "')){submitForm(document.hrefFm, '" + HttpUtil.encodeURL(resetCustomizationViewURL) + "');}";
|
||||
%>
|
||||
|
||||
<liferay-ui:icon label="<%= true %>" message="reset-my-customizations" url="<%= taglibURL %>" />
|
||||
</c:if>
|
||||
</div>
|
||||
|
||||
<aui:script>
|
||||
Liferay.provide(
|
||||
window,
|
||||
'<portlet:namespace />toggleCustomizedView',
|
||||
function(event) {
|
||||
var A = AUI();
|
||||
|
||||
A.io.request(
|
||||
themeDisplay.getPathMain() + '/portal/update_layout',
|
||||
{
|
||||
data: {
|
||||
cmd: 'toggle_customized_view',
|
||||
customized_view: '<%= String.valueOf(!layoutTypePortlet.isCustomizedView()) %>',
|
||||
p_auth: '<%= AuthTokenUtil.getToken(request) %>'
|
||||
},
|
||||
on: {
|
||||
success: function(event, id, obj) {
|
||||
window.location.href = themeDisplay.getLayoutURL();
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
['aui-io-request']
|
||||
);
|
||||
</aui:script>
|
||||
</div>
|
||||
|
||||
<aui:script use="aui-base">
|
||||
var toggleCustomizedView = A.one('#<portlet:namespace />toggleCustomizedView');
|
||||
|
||||
if (toggleCustomizedView) {
|
||||
toggleCustomizedView.on('click', <portlet:namespace />toggleCustomizedView);
|
||||
}
|
||||
</aui:script>
|
||||
</c:if>
|
||||
</div>
|
||||
|
||||
<aui:nav-item cssClass="info-link-container">
|
||||
<div class="info-button">
|
||||
<a class="info-link" href="javascript:;">
|
||||
<i class="icon-info"></i>
|
||||
</a>
|
||||
|
||||
<div class="diamond"></div>
|
||||
</div>
|
||||
</aui:nav-item>
|
||||
|
||||
<aui:script use="aui-base, liferay-store">
|
||||
A.one('.info-link-container').on(
|
||||
'click',
|
||||
function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
var navAccountControls = event.currentTarget.ancestor('.nav-account-controls');
|
||||
|
||||
var infoItems = navAccountControls.one('.info-items');
|
||||
|
||||
navAccountControls.one('.info-items').toggleClass('hide');
|
||||
|
||||
Liferay.Store('dockbarMessagesHidden', infoItems.hasClass('hide'));
|
||||
}
|
||||
);
|
||||
</aui:script>
|
||||
</aui:nav-item>
|
||||
</c:if>
|
|
@ -1,195 +0,0 @@
|
|||
<%--
|
||||
/**
|
||||
* Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU Lesser General Public License as published by the Free
|
||||
* Software Foundation; either version 2.1 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||
* details.
|
||||
*/
|
||||
--%>
|
||||
|
||||
<%@ include file="/html/portlet/dockbar/init.jsp" %>
|
||||
|
||||
<%
|
||||
boolean viewEntries = ParamUtil.getBoolean(request, "viewEntries");
|
||||
boolean viewPreview = ParamUtil.getBoolean(request, "viewPreview");
|
||||
%>
|
||||
|
||||
<c:choose>
|
||||
<c:when test="<%= viewEntries %>">
|
||||
<div id="<portlet:namespace />entries">
|
||||
|
||||
<%
|
||||
String displayStyleDefault = GetterUtil.getString(SessionClicks.get(request, "liferay_addpanel_displaystyle", "descriptive"));
|
||||
String displayStyle = ParamUtil.getString(request, "displayStyle", displayStyleDefault);
|
||||
String keywords = ParamUtil.getString(request, "keywords");
|
||||
|
||||
String panelTitle = "recent";
|
||||
|
||||
if (Validator.isNotNull(keywords)) {
|
||||
panelTitle = "search-results";
|
||||
}
|
||||
|
||||
String navListCssClass = "add-content nav-list ";
|
||||
|
||||
if (displayStyle.equals("icon")) {
|
||||
navListCssClass += "add-content-icon";
|
||||
}
|
||||
else if (displayStyle.equals("descriptive")) {
|
||||
navListCssClass += "add-content-descriptive";
|
||||
}
|
||||
else if (displayStyle.equals("icon")) {
|
||||
navListCssClass += "add-content-list";
|
||||
}
|
||||
%>
|
||||
|
||||
<liferay-ui:panel collapsible="<%= false %>" cssClass="clearfix lfr-component panel-page-category recent" extended="<%= true %>" id="manageRecentPanel" persistState="<%= true %>" title="<%= panelTitle %>">
|
||||
<aui:nav cssClass="<%= navListCssClass %>">
|
||||
|
||||
<%
|
||||
int deltaDefault = GetterUtil.getInteger(SessionClicks.get(request, "liferay_addpanel_numitems", "10"));
|
||||
int delta = ParamUtil.getInteger(request, "delta", deltaDefault);
|
||||
|
||||
long[] availableClassNameIds = AssetRendererFactoryRegistryUtil.getClassNameIds(company.getCompanyId());
|
||||
|
||||
for (long classNameId : availableClassNameIds) {
|
||||
AssetRendererFactory assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(PortalUtil.getClassName(classNameId));
|
||||
|
||||
if (!assetRendererFactory.isSelectable()) {
|
||||
availableClassNameIds = ArrayUtil.remove(availableClassNameIds, classNameId);
|
||||
}
|
||||
}
|
||||
|
||||
AssetEntryQuery assetEntryQuery = new AssetEntryQuery();
|
||||
|
||||
assetEntryQuery.setClassNameIds(availableClassNameIds);
|
||||
assetEntryQuery.setEnd(delta);
|
||||
assetEntryQuery.setGroupIds(new long[] {scopeGroupId});
|
||||
assetEntryQuery.setKeywords(keywords);
|
||||
assetEntryQuery.setOrderByCol1("modifiedDate");
|
||||
assetEntryQuery.setOrderByCol2("title");
|
||||
assetEntryQuery.setOrderByType1("DESC");
|
||||
assetEntryQuery.setOrderByType2("ASC");
|
||||
assetEntryQuery.setStart(0);
|
||||
|
||||
List<AssetEntry> results = null;
|
||||
|
||||
if (PropsValues.ASSET_PUBLISHER_SEARCH_WITH_INDEX && (assetEntryQuery.getLinkedAssetEntryId() == 0)) {
|
||||
Hits hits = AssetUtil.search(request, assetEntryQuery, 0, delta);
|
||||
|
||||
results = AssetUtil.getAssetEntries(hits);
|
||||
}
|
||||
else {
|
||||
results = AssetEntryServiceUtil.getEntries(assetEntryQuery);
|
||||
}
|
||||
|
||||
for (AssetEntry assetEntry : results) {
|
||||
String className = PortalUtil.getClassName(assetEntry.getClassNameId());
|
||||
long classPK = assetEntry.getClassPK();
|
||||
|
||||
AssetRendererFactory assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(className);
|
||||
|
||||
if (assetRendererFactory == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
AssetRenderer assetRenderer = null;
|
||||
|
||||
try {
|
||||
assetRenderer = assetRendererFactory.getAssetRenderer(classPK);
|
||||
}
|
||||
catch (Exception e) {
|
||||
}
|
||||
|
||||
if ((assetRenderer == null) || !assetRenderer.isDisplayable()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
String title = HtmlUtil.escape(StringUtil.shorten(assetRenderer.getTitle(themeDisplay.getLocale()), 60));
|
||||
|
||||
Map<String, Object> data = new HashMap<String, Object>();
|
||||
|
||||
data.put("class-name", assetEntry.getClassName());
|
||||
data.put("class-pk", assetEntry.getClassPK());
|
||||
data.put("draggable", true);
|
||||
data.put("instanceable", true);
|
||||
data.put("portlet-id", assetRenderer.getAddToPagePortletId());
|
||||
data.put("title", title);
|
||||
|
||||
String navItemCssClass="content-shortcut drag-content-item lfr-content-item ";
|
||||
|
||||
if (!displayStyle.equals("icon")) {
|
||||
navItemCssClass += "has-preview";
|
||||
}
|
||||
%>
|
||||
|
||||
<aui:nav-item cssClass='<%= navItemCssClass %>'
|
||||
data="<%= data %>"
|
||||
href=""
|
||||
iconCssClass='<%= displayStyle.equals("list") ? "icon-file" : StringPool.BLANK %>'
|
||||
label='<%= displayStyle.equals("list") ? title : "" %>'
|
||||
>
|
||||
<c:choose>
|
||||
<c:when test='<%= !displayStyle.equals("list") %>' >
|
||||
<div class="add-content-thumbnail <%= displayStyle.equals("descriptive") ? "span4" : StringPool.BLANK %>">
|
||||
<img alt="<liferay-ui:message key="thumbnail" />" src="<%= HtmlUtil.escapeAttribute(assetRenderer.getThumbnailPath(liferayPortletRequest)) %>" />
|
||||
</div>
|
||||
|
||||
<div class="add-content-details <%= displayStyle.equals("descriptive") ? "span8" : StringPool.BLANK %>">
|
||||
<div class="add-content-title">
|
||||
<%= title %>
|
||||
</div>
|
||||
|
||||
<div class="add-content-description">
|
||||
<%= HtmlUtil.escape(StringUtil.shorten(assetRenderer.getSummary(themeDisplay.getLocale()), 120)) %>
|
||||
</div>
|
||||
</div>
|
||||
</c:when>
|
||||
<c:otherwise >
|
||||
<div <%= AUIUtil.buildData(data) %> class="add-content-item">
|
||||
<liferay-ui:message key="add" />
|
||||
</div>
|
||||
</c:otherwise>
|
||||
</c:choose>
|
||||
</aui:nav-item>
|
||||
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
</aui:nav>
|
||||
</liferay-ui:panel>
|
||||
</div>
|
||||
</c:when>
|
||||
|
||||
<c:when test="<%= viewPreview %>">
|
||||
|
||||
<%
|
||||
long classPK = ParamUtil.getLong(request, "classPK");
|
||||
String className = ParamUtil.getString(request, "className");
|
||||
%>
|
||||
|
||||
<c:if test="<%= (classPK > 0) && Validator.isNotNull(className) %>">
|
||||
|
||||
<%
|
||||
AssetEntry assetEntry = AssetEntryLocalServiceUtil.getEntry(className, classPK);
|
||||
AssetRendererFactory assetRendererFactory = AssetRendererFactoryRegistryUtil.getAssetRendererFactoryByClassName(className);
|
||||
AssetRenderer assetRenderer = assetRendererFactory.getAssetRenderer(classPK);
|
||||
|
||||
request.setAttribute("add_panel.jsp-assetEntry", assetEntry);
|
||||
request.setAttribute("add_panel.jsp-assetRendererFactory", assetRendererFactory);
|
||||
request.setAttribute("add_panel.jsp-assetRenderer", assetRenderer);
|
||||
%>
|
||||
|
||||
<div id="<portlet:namespace />preview">
|
||||
<liferay-util:include page="<%= assetRenderer.getPreviewPath(liferayPortletRequest, liferayPortletResponse) %>" portletId="<%= assetRendererFactory.getPortletId() %>" servletContext="<%= application %>" />
|
||||
</div>
|
||||
</c:if>
|
||||
</c:when>
|
||||
</c:choose>
|
Loading…
Reference in New Issue