Skip to content

Commit

Permalink
LPS-89024 Add back taglibs still in use.
Browse files Browse the repository at this point in the history
  • Loading branch information
Preston-Crary authored and brianchandotcom committed Jan 15, 2019
1 parent 3333732 commit d45a50b
Show file tree
Hide file tree
Showing 19 changed files with 2,740 additions and 0 deletions.
2 changes: 2 additions & 0 deletions portal-web/docroot/html/common/init.jsp
Expand Up @@ -31,6 +31,8 @@ taglib uri="http://liferay.com/tld/util" prefix="liferay-util" %>
<%@ page import="com.liferay.asset.kernel.AssetRendererFactoryRegistryUtil" %><%@
page import="com.liferay.asset.kernel.model.AssetRenderer" %><%@
page import="com.liferay.asset.kernel.model.AssetRendererFactory" %><%@
page import="com.liferay.asset.kernel.model.AssetTag" %><%@
page import="com.liferay.asset.kernel.service.AssetTagServiceUtil" %><%@
page import="com.liferay.document.library.kernel.model.DLFileEntry" %><%@
page import="com.liferay.document.library.kernel.util.DLUtil" %><%@
page import="com.liferay.exportimport.kernel.staging.LayoutStagingUtil" %><%@
Expand Down
235 changes: 235 additions & 0 deletions portal-web/docroot/html/taglib/ui/app_view_entry/descriptive.jsp
@@ -0,0 +1,235 @@
<%--
/**
* Copyright (c) 2000-present 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/taglib/ui/app_view_entry/init.jsp" %>

<div class="app-view-entry app-view-entry-taglib display-<%= displayStyle %> entry-display-style <%= showCheckbox ? "selectable" : StringPool.BLANK %> <%= cssClass %>" <%= AUIUtil.buildData(data) %> data-draggable="<%= showCheckbox ? Boolean.TRUE.toString() : Boolean.FALSE.toString() %>" data-title="<%= HtmlUtil.escapeAttribute(shortTitle) %>">
<c:choose>
<c:when test="<%= Validator.isNull(url) %>">
<span class="entry-link" data-folder="<%= folder ? Boolean.TRUE.toString() : Boolean.FALSE.toString() %>" data-folder-id="<%= rowCheckerId %>" title="<%= linkTitle %>">
</c:when>
<c:otherwise>
<a class="entry-link" data-folder="<%= folder ? Boolean.TRUE.toString() : Boolean.FALSE.toString() %>" data-folder-id="<%= rowCheckerId %>" href="<%= HtmlUtil.escapeAttribute(url) %>" title="<%= linkTitle %>">
</c:otherwise>
</c:choose>

<c:if test="<%= Validator.isNotNull(iconCssClass) || Validator.isNotNull(thumbnailSrc) %>">
<div class="entry-thumbnail" style="<%= thumbnailDivStyle %>">
<c:choose>
<c:when test="<%= Validator.isNotNull(thumbnailSrc) %>">
<img alt="" class="img-thumbnail" src="<%= HtmlUtil.escapeAttribute(thumbnailSrc) %>" style="<%= thumbnailStyle %>" />
</c:when>
<c:when test="<%= Validator.isNotNull(iconCssClass) %>">
<i class="<%= iconCssClass %>" style="<%= thumbnailStyle %>"></i>
</c:when>
</c:choose>

<c:if test="<%= shortcut %>">
<img alt="<liferay-ui:message escapeAttribute="<%= true %>" key="shortcut" />" class="shortcut-icon" src="<%= themeDisplay.getPathThemeImages() %>/file_system/large/overlay_link.png" />
</c:if>

<c:if test="<%= locked %>">
<img alt="<liferay-ui:message escapeAttribute="<%= true %>" key="locked" />" class="locked-icon" src="<%= themeDisplay.getPathThemeImages() %>/file_system/large/overlay_lock.png" />
</c:if>

<c:if test="<%= !folder && (status != WorkflowConstants.STATUS_ANY) && (status != WorkflowConstants.STATUS_APPROVED) %>">
<aui:workflow-status showIcon="<%= false %>" showLabel="<%= false %>" status="<%= status %>" />
</c:if>
</div>
</c:if>

<div class="entry-metadata">
<span class="entry-title">
<span class="entry-title-text">
<%= HtmlUtil.escape(title) %>
</span>
<span class="entry-result-icon"></span>
</span>

<small>
<c:if test="<%= Validator.isNotNull(description) %>">
<span class="entry-description">
<%= HtmlUtil.escape(description) %>
</span>
</c:if>

<dl>
<c:if test="<%= Validator.isNotNull(classTypeName) %>">
<dt>
<liferay-ui:message key="type" />:
</dt>
<dd>
<%= classTypeName %>
</dd>
</c:if>

<c:if test="<%= (groupId > 0) && (groupId != scopeGroupId) %>">

<%
Group group = GroupLocalServiceUtil.getGroup(groupId);
%>

<c:if test="<%= !group.isLayout() || (group.getParentGroupId() != scopeGroupId) %>">
<dt>
<liferay-ui:message key="site" />:
</dt>
<dd>

<%
String groupDescriptiveName = null;
if (group.isLayout()) {
Group parentGroup = group.getParentGroup();
groupDescriptiveName = parentGroup.getDescriptiveName(locale);
}
else {
groupDescriptiveName = group.getDescriptiveName(locale);
}
%>

<%= HtmlUtil.escape(groupDescriptiveName) %>
</dd>
</c:if>

<c:if test="<%= group.isLayout() %>">
<dt>
<liferay-ui:message key="scope" />:
</dt>
<dd>
<%= group.getDescriptiveName(locale) %>
</dd>
</c:if>
</c:if>

<c:if test="<%= Validator.isNotNull(version) %>">
<dt>
<liferay-ui:message key="version" />:
</dt>
<dd>
<%= HtmlUtil.escape(version) %>
</dd>
</c:if>

<c:if test="<%= (createDate != null) && (modifiedDate != null) && Validator.isNotNull(author) %>">
<c:choose>
<c:when test="<%= modifiedDate.equals(createDate) %>">
<dt>
<liferay-ui:message key="created" />:
</dt>
</c:when>
<c:otherwise>
<dt>
<liferay-ui:message key="last-updated" />:
</dt>
</c:otherwise>
</c:choose>

<dd class="entry-author">
<liferay-ui:message arguments="<%= new String[] {LanguageUtil.getTimeDescription(locale, System.currentTimeMillis() - modifiedDate.getTime(), true), HtmlUtil.escape(author)} %>" key="x-ago-by-x" translateArguments="<%= false %>" />
</dd>
</c:if>

<%
Format dateFormatDateTime = FastDateFormatFactoryUtil.getDateTime(locale, timeZone);
%>

<c:if test="<%= displayDate != null %>">
<dt>
<liferay-ui:message key="display-date" />:
</dt>
<dd>
<%= HtmlUtil.escape(dateFormatDateTime.format(displayDate)) %>
</dd>
</c:if>

<c:if test="<%= expirationDate != null %>">
<dt>
<liferay-ui:message key="expiration-date" />:
</dt>
<dd>
<%= HtmlUtil.escape(dateFormatDateTime.format(expirationDate)) %>
</dd>
</c:if>

<c:if test="<%= reviewDate != null %>">
<dt>
<liferay-ui:message key="review-date" />:
</dt>
<dd>
<%= HtmlUtil.escape(dateFormatDateTime.format(reviewDate)) %>
</dd>
</c:if>
</dl>

<c:if test="<%= Validator.isNotNull(assetCategoryClassName) && (assetCategoryClassPK > 0) %>">
<span class="entry-categories">
<liferay-ui:asset-categories-summary
className="<%= assetCategoryClassName %>"
classPK="<%= assetCategoryClassPK %>"
/>
</span>
</c:if>

<c:if test="<%= Validator.isNotNull(assetTagClassName) && (assetTagClassPK > 0) %>">
<span class="entry-tags">
<liferay-ui:asset-tags-summary
className="<%= assetTagClassName %>"
classPK="<%= assetTagClassPK %>"
/>
</span>
</c:if>

<c:if test="<%= Validator.isNotNull(latestApprovedVersion) && (status > WorkflowConstants.STATUS_APPROVED) %>">
<dl class="entry-latest-approved-container">
<dt>
<liferay-ui:message key="latest-aproved-version" />
</dt>
<dd>
<%= HtmlUtil.escape(latestApprovedVersion) %>
</dd>
<dt>
<liferay-ui:message key="latest-aproved-version-author" />:
</dt>
<dd>
<%= HtmlUtil.escape(latestApprovedVersionAuthor) %>
</dd>
</dl>
</c:if>
</small>
</div>

<c:choose>
<c:when test="<%= Validator.isNull(url) %>">
</span>
</c:when>
<c:otherwise>
</a>
</c:otherwise>
</c:choose>

<%
if (!folder) {
request.removeAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
}
%>

<liferay-util:include page="<%= actionJsp %>" servletContext="<%= actionJspServletContext %>" />

<c:if test="<%= showCheckbox %>">
<aui:input cssClass="entry-selector overlay" id="<%= rowCheckerId %>" label="" name="<%= RowChecker.ROW_IDS + rowCheckerName %>" title='<%= LanguageUtil.format(request, "select-x", HtmlUtil.escapeAttribute(shortTitle)) %>' type="checkbox" value="<%= rowCheckerId %>" />
</c:if>
</div>
81 changes: 81 additions & 0 deletions portal-web/docroot/html/taglib/ui/app_view_entry/icon.jsp
@@ -0,0 +1,81 @@
<%--
/**
* Copyright (c) 2000-present 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/taglib/ui/app_view_entry/init.jsp" %>

<div class="app-view-entry app-view-entry-taglib display-<%= HtmlUtil.escapeAttribute(displayStyle) %> entry-display-style <%= showCheckbox ? "selectable" : StringPool.BLANK %> <%= cssClass %>" <%= AUIUtil.buildData(data) %> data-draggable="<%= showCheckbox ? Boolean.TRUE.toString() : Boolean.FALSE.toString() %>" data-title="<%= HtmlUtil.escapeAttribute(shortTitle) %>">
<c:if test="<%= showCheckbox %>">
<aui:input cssClass="entry-selector overlay" id="<%= rowCheckerId %>" label="" name="<%= RowChecker.ROW_IDS + rowCheckerName %>" title='<%= LanguageUtil.format(request, "select-x", HtmlUtil.escapeAttribute(shortTitle)) %>' type="checkbox" value="<%= rowCheckerId %>" />
</c:if>

<%
if (!folder) {
request.removeAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
}
%>

<liferay-util:include page="<%= actionJsp %>" servletContext="<%= actionJspServletContext %>" />

<c:choose>
<c:when test="<%= Validator.isNull(url) %>">
<span class="entry-link" data-folder="<%= folder ? Boolean.TRUE.toString() : Boolean.FALSE.toString() %>" <%= folder ? "data-folder-id=\"" + rowCheckerId + "\"" : StringPool.BLANK %> title="<%= linkTitle %>">
</c:when>
<c:otherwise>
<a class="entry-link" data-folder="<%= folder ? Boolean.TRUE.toString() : Boolean.FALSE.toString() %>" <%= folder ? "data-folder-id=\"" + rowCheckerId + "\"" : StringPool.BLANK %> href="<%= HtmlUtil.escapeAttribute(url) %>" title="<%= linkTitle %>">
</c:otherwise>
</c:choose>

<c:if test="<%= Validator.isNotNull(iconCssClass) || Validator.isNotNull(thumbnailSrc) %>">
<div class="entry-thumbnail" style="<%= thumbnailDivStyle %>">
<c:choose>
<c:when test="<%= Validator.isNotNull(thumbnailSrc) %>">
<img alt="" src="<%= HtmlUtil.escapeAttribute(thumbnailSrc) %>" style="<%= thumbnailStyle %>" />
</c:when>
<c:when test="<%= Validator.isNotNull(iconCssClass) %>">
<i class="<%= iconCssClass %>" style="<%= thumbnailStyle %>"></i>
</c:when>
</c:choose>

<c:if test="<%= shortcut %>">
<img alt="<liferay-ui:message escapeAttribute="<%= true %>" key="shortcut" />" class="shortcut-icon" src="<%= themeDisplay.getPathThemeImages() %>/file_system/large/overlay_link.png" />
</c:if>

<c:if test="<%= locked %>">
<img alt="<liferay-ui:message escapeAttribute="<%= true %>" key="locked" />" class="locked-icon" src="<%= themeDisplay.getPathThemeImages() %>/file_system/large/overlay_lock.png" />
</c:if>

<c:if test="<%= !folder && (status != WorkflowConstants.STATUS_ANY) && (status != WorkflowConstants.STATUS_APPROVED) %>">
<aui:workflow-status showIcon="<%= false %>" showLabel="<%= false %>" status="<%= status %>" />
</c:if>
</div>
</c:if>

<span class="entry-title">
<span class="entry-title-text">
<%= HtmlUtil.escape(shortTitle) %>
</span>
<span class="entry-result-icon"></span>
</span>

<c:choose>
<c:when test="<%= Validator.isNull(url) %>">
</span>
</c:when>
<c:otherwise>
</a>
</c:otherwise>
</c:choose>
</div>
67 changes: 67 additions & 0 deletions portal-web/docroot/html/taglib/ui/app_view_entry/init.jsp
@@ -0,0 +1,67 @@
<%--
/**
* Copyright (c) 2000-present 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/taglib/init.jsp" %>

<%
String actionJsp = (String)request.getAttribute("liferay-ui:app-view-entry:actionJsp");
ServletContext actionJspServletContext = (ServletContext)request.getAttribute("liferay-ui:app-view-entry:actionJspServletContext");
String assetCategoryClassName = GetterUtil.getString(request.getAttribute("liferay-ui:app-view-entry:assetCategoryClassName"));
long assetCategoryClassPK = GetterUtil.getLong(request.getAttribute("liferay-ui:app-view-entry:assetCategoryClassPK"));
String assetTagClassName = GetterUtil.getString(request.getAttribute("liferay-ui:app-view-entry:assetTagClassName"));
long assetTagClassPK = GetterUtil.getLong(request.getAttribute("liferay-ui:app-view-entry:assetTagClassPK"));
String author = GetterUtil.getString(request.getAttribute("liferay-ui:app-view-entry:author"));
String classTypeName = (String)request.getAttribute("liferay-ui:app-view-entry:classTypeName");
Date createDate = GetterUtil.getDate(request.getAttribute("liferay-ui:app-view-entry:createDate"), DateFormatFactoryUtil.getDate(locale), null);
String cssClass = GetterUtil.getString((String)request.getAttribute("liferay-ui:app-view-entry:cssClass"));
Date expirationDate = GetterUtil.getDate(request.getAttribute("liferay-ui:app-view-entry:expirationDate"), DateFormatFactoryUtil.getDate(locale), null);
Map<String, Object> data = (Map<String, Object>)request.getAttribute("liferay-ui:app-view-entry:data");
String description = (String)request.getAttribute("liferay-ui:app-view-entry:description");
Date displayDate = GetterUtil.getDate(request.getAttribute("liferay-ui:app-view-entry:displayDate"), DateFormatFactoryUtil.getDate(locale), null);
String displayStyle = (String)request.getAttribute("liferay-ui:app-view-entry:displayStyle");
boolean folder = GetterUtil.getBoolean(request.getAttribute("liferay-ui:app-view-entry:folder"));
long groupId = GetterUtil.getLong(request.getAttribute("liferay-ui:app-view-entry:groupId"));
String iconCssClass = (String)request.getAttribute("liferay-ui:app-view-entry:iconCssClass");
String latestApprovedVersion = GetterUtil.getString(request.getAttribute("liferay-ui:app-view-entry:latestApprovedVersion"));
String latestApprovedVersionAuthor = GetterUtil.getString(request.getAttribute("liferay-ui:app-view-entry:latestApprovedVersionAuthor"));
boolean locked = GetterUtil.getBoolean(request.getAttribute("liferay-ui:app-view-entry:locked"));
Date modifiedDate = GetterUtil.getDate(request.getAttribute("liferay-ui:app-view-entry:modifiedDate"), DateFormatFactoryUtil.getDate(locale), null);
Date reviewDate = GetterUtil.getDate(request.getAttribute("liferay-ui:app-view-entry:reviewDate"), DateFormatFactoryUtil.getDate(locale), null);
String rowCheckerId = (String)request.getAttribute("liferay-ui:app-view-entry:rowCheckerId");
String rowCheckerName = (String)request.getAttribute("liferay-ui:app-view-entry:rowCheckerName");
boolean shortcut = GetterUtil.getBoolean(request.getAttribute("liferay-ui:app-view-entry:shortcut"));
boolean showCheckbox = GetterUtil.getBoolean(request.getAttribute("liferay-ui:app-view-entry:showCheckbox"));
boolean showLinkTitle = GetterUtil.getBoolean(request.getAttribute("liferay-ui:app-view-entry:showLinkTitle"));
int status = GetterUtil.getInteger(request.getAttribute("liferay-ui:app-view-entry:status"), WorkflowConstants.STATUS_ANY);
String thumbnailDivStyle = (String)request.getAttribute("liferay-ui:app-view-entry:thumbnailDivStyle");
String thumbnailSrc = (String)request.getAttribute("liferay-ui:app-view-entry:thumbnailSrc");
String thumbnailStyle = (String)request.getAttribute("liferay-ui:app-view-entry:thumbnailStyle");
String title = (String)request.getAttribute("liferay-ui:app-view-entry:title");
String url = (String)request.getAttribute("liferay-ui:app-view-entry:url");
String version = GetterUtil.getString(request.getAttribute("liferay-ui:app-view-entry:version"));
String shortTitle = StringUtil.shorten(title, 60);
String linkTitle = StringPool.BLANK;
if (showLinkTitle) {
linkTitle = HtmlUtil.escapeAttribute(title);
if (Validator.isNotNull(description)) {
linkTitle += HtmlUtil.escapeAttribute(" - " + description);
}
}
%>

0 comments on commit d45a50b

Please sign in to comment.