Skip to content

Commit

Permalink
LPS-2932
Browse files Browse the repository at this point in the history
git-svn-id: svn://svn.liferay.com/repos/public/portal/trunk@30606 05bdf26c-840f-0410-9ced-eb539d925f36
  • Loading branch information
BrettSwaim committed Apr 29, 2009
1 parent 2027bce commit 1f7675d
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 1 deletion.
1 change: 1 addition & 0 deletions definitions/liferay-hook_5_1_0.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ my.places.show.organization.private.sites.with.no.layouts
my.places.show.organization.public.sites.with.no.layouts
my.places.show.user.private.sites.with.no.layouts
my.places.show.user.public.sites.with.no.layouts
search.container.summary.maximized.only
terms.of.use.required
theme.css.fast.load
theme.images.fast.load
Expand Down
1 change: 1 addition & 0 deletions definitions/liferay-hook_5_2_0.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ my.places.show.organization.private.sites.with.no.layouts
my.places.show.organization.public.sites.with.no.layouts
my.places.show.user.private.sites.with.no.layouts
my.places.show.user.public.sites.with.no.layouts
search.container.summary.maximized.only
terms.of.use.required
theme.css.fast.load
theme.images.fast.load
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -886,6 +886,7 @@ protected void resetPortalProperties(Properties portalProperties)
"my.places.show.organization.public.sites.with.no.layouts",
"my.places.show.user.private.sites.with.no.layouts",
"my.places.show.user.public.sites.with.no.layouts",
"search.container.summary.maximized.only",
"terms.of.use.required",
"theme.css.fast.load",
"theme.images.fast.load"
Expand Down
2 changes: 2 additions & 0 deletions portal-impl/src/com/liferay/portal/util/PropsKeys.java
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,8 @@ public interface PropsKeys {

public static final String SEARCH_CONTAINER_PAGE_DELTA_VALUES = "search.container.page.delta.values";

public static final String SEARCH_CONTAINER_SUMMARY_MAXIMIZED_ONLY = "search.container.summary.maximized.only";

public static final String SERVICE_BUILDER_SERVICE_READ_ONLY_PREFIXES = "service.builder.service.read.only.prefixes";

public static final String SERVLET_SERVICE_EVENTS_POST = "servlet.service.events.post";
Expand Down
4 changes: 4 additions & 0 deletions portal-impl/src/com/liferay/portal/util/PropsValues.java
Original file line number Diff line number Diff line change
Expand Up @@ -1145,6 +1145,10 @@ public class PropsValues {
GetterUtil.getIntegerValues(
PropsUtil.getArray(PropsKeys.SEARCH_CONTAINER_PAGE_DELTA_VALUES));

public static boolean SEARCH_CONTAINER_SUMMARY_MAXIMIZED_ONLY =
GetterUtil.getBoolean(
PropsUtil.get(PropsKeys.SEARCH_CONTAINER_SUMMARY_MAXIMIZED_ONLY));

public static final String[] SERVICE_BUILDER_SERVICE_READ_ONLY_PREFIXES =
PropsUtil.getArray(
PropsKeys.SERVICE_BUILDER_SERVICE_READ_ONLY_PREFIXES);
Expand Down
8 changes: 8 additions & 0 deletions portal-impl/src/portal.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4000,6 +4000,14 @@
#
search.container.page.delta.values=5,10,20,30,50,75

#
# Set this to false to show the "Showing X Results" message in all window
# states. If set to true, the message will only be shown when in a maximized
# window state.
#

search.container.summary.maximized.only=false

##
## Sharepoint
##
Expand Down
11 changes: 10 additions & 1 deletion portal-web/docroot/html/taglib/ui/page_iterator/start.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

<%@ include file="/html/taglib/init.jsp" %>

<portlet:defineObjects />

<%
String formName = namespace + request.getAttribute("liferay-ui:page-iterator:formName");
int cur = GetterUtil.getInteger((String)request.getAttribute("liferay-ui:page-iterator:cur"));
Expand Down Expand Up @@ -61,6 +63,13 @@ else {
String deltaURL = HttpUtil.removeParameter(url, namespace + deltaParam);
boolean showResultsSummary = true;
if (PropsValues.SEARCH_CONTAINER_SUMMARY_MAXIMIZED_ONLY &&
(renderRequest.getWindowState() != WindowState.MAXIMIZED)) {
showResultsSummary = false;
}
NumberFormat numberFormat = NumberFormat.getNumberInstance(locale);
%>

Expand Down Expand Up @@ -102,7 +111,7 @@ NumberFormat numberFormat = NumberFormat.getNumberInstance(locale);
<div class="taglib-page-iterator">
</c:if>

<c:if test='<%= type.equals("regular") %>'>
<c:if test='<%= showResultsSummary && type.equals("regular") %>'>
<div class="search-results">
<c:choose>
<c:when test="<%= total > resultRowsSize %>">
Expand Down

0 comments on commit 1f7675d

Please sign in to comment.