%
/**
* Copyright (c) 2000-2009 Liferay, Inc. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
%>
<%
String scheduleCMD = StringPool.BLANK;
String unscheduleCMD = StringPool.BLANK;
if (cmd.equals("copy_from_live")) {
scheduleCMD = "schedule_copy_from_live";
unscheduleCMD = "unschedule_copy_from_live";
}
else if (cmd.equals("publish_to_live")) {
scheduleCMD = "schedule_publish_to_live";
unscheduleCMD = "unschedule_publish_to_live";
}
else if (cmd.equals("publish_to_remote")) {
scheduleCMD = "schedule_publish_to_remote";
unscheduleCMD = "unschedule_publish_to_remote";
}
ResourceURL scheduledPublishEventsURL = renderResponse.createResourceURL();
scheduledPublishEventsURL.setParameter("struts_action", "/communities/edit_pages");
long targetGroupId = liveGroupId;
if (scheduleCMD.equals("schedule_copy_from_live")) {
targetGroupId = stagingGroupId;
}
scheduledPublishEventsURL.setParameter("groupId", String.valueOf(targetGroupId));
scheduledPublishEventsURL.setParameter("privateLayout", String.valueOf(privateLayout));
scheduledPublishEventsURL.setParameter("destinationName", localPublishing ? DestinationNames.LAYOUTS_LOCAL_PUBLISHER : DestinationNames.LAYOUTS_REMOTE_PUBLISHER);
%>
" onClick="