Skip to content

Instantly share code, notes, and snippets.

@ryanschuhler
Created June 7, 2013 22:12
Show Gist options
  • Save ryanschuhler/5732772 to your computer and use it in GitHub Desktop.
Save ryanschuhler/5732772 to your computer and use it in GitHub Desktop.
agenda pull template
<style type="text/css">
.printer-link {
display: block;
float: right;
padding-bottom: 1px;
width: 60px;
}
.print-text {
padding-left: 5px;
position: absolute;
vertical-align: top;
}
.print-text:hover {
text-decoration: underline;
}
#landingTab .tab-nav {
background: transparent;
}
#landingTab .aui-tab-content {
background: transparent;
border-width: 0;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
#landingTab .aui-tabview-list .first, #landingTab .aui-tabview-list .aui-tab:first-child {
border-left: none;
}
#landingTab .tab.aui-w50 {
margin: 0 1px 0 0;
width: 49.7%;
}
.mobile #landingTab .tab.aui-w50 {
width: 48.5%;
}
#landingTab .tab.aui-w33 {
margin: 0 4px;
width: 32%;
}
#landingTab .tab.aui-w50:last-child {
margin-right: 0;
}
#landingTab .aui-w20 {
margin: 0 16px;
}
#landingTab .aui-w40 {
margin: 0 34px;
}
#landingTab .heading {
vertical-align: middle;
width: 300px;
}
#landingTab .multi-event-row td:nth-child(2) {
border-left: 3px solid #1DA99E;
}
#landingTab .multi-event-row td:nth-child(3) {
border-left: 3px solid #E95B27;
}
#landingTab .multi-event-row td:nth-child(4) {
border-left: 3px solid #FAA325;
}
#landingTab .multi-event-row td:nth-child(5) {
border-left: 3px solid #662F8A;
}
#landingTab .multi-event-row td:nth-child(6) {
border-left: 3px solid #EE4036;
}
#list {
border: none;
margin: 0;
padding: 0;
}
#list .aui-tab-active {
background-color: #008BCE;
}
#list .aui-tab-active::after {
display: none;
}
#list .tab {
background: url(/documents/23142211/23202217/agenda-tab-100/f4007063-918b-4d1e-b31a-a97328404a60?t=1365886497000?t=1365886497000?t=1365886497000) no-repeat;
clear: right;
margin-right: 4px;
}
#list .tab:last-child {
margin-right: 0;
}
#list .tab-label {
color: #FFFFFF;
font-size: 16px;
font-weight: normal;
padding: 1px 40px;
position: absolute;
text-decoration: none;
text-shadow: none;
}
.tab {
background-color: #3B3E3F;
background-image: url(/image/image_gallery?uuid=06cf248f-f473-4a57-881b-a4e9747ad7d8&groupId=$groupId);
background-position: 96% 11px;
background-repeat: no-repeat;
height: 38px;
}
.tab-content {
border: 1px solid #E8E8E8;
padding: 15px;
}
.agenda {
color: #484C4B;
}
.agenda a {
color: #484C4B;
text-decoration: none;
}
.agenda .description {
vertical-align: top;
}
.agenda .double-session {
border-bottom-width: 0;
}
.agenda .first-col {
padding: 0 12px;
text-align: right;
width: 55px;
}
.agenda .single-line {
vertical-align: middle;
}
.agenda .sponsor-first {
background-image: url(/image/image_gallery?uuid=b2d53ad0-bb10-4f0c-a3d0-0c13d944a12e&groupId=$groupId);
background-repeat: no-repeat;
padding: 15px 0 15px 230px;
}
.agenda .sponsor-second {
background-image: url(/image/image_gallery?uuid=d573cb74-1e59-437b-b79f-be01005c4047&groupId=$groupId);
background-repeat: no-repeat;
padding: 15px 0 15px 95px;
}
.edit-only {
display: none;
}
.controls-visible .edit-only {
display: block;
}
.fifth-col {
border-left: 3px solid #008BCE;
}
.first .heading {
font-weight: bold;
text-align: center;
}
.first td {
border-left: 1px solid #FFFFFF;
color: #FFF;
}
.tabs .heading {
width: 150px;
}
.long-speaker .fifth-col {
border-bottom: none;
}
.long-speaker .fourth-col {
border-bottom: none;
}
.sponsor img {
float: left;
}
.agenda td {
border-bottom: 1px solid #58585A;
}
td.description {
padding: 10px;
}
td.selected {
background-color: #BCBCBC;
color: #FFFFFF;
font-weight: bold;
}
tr.first {
background-color: #58585A;
height: 25px;
}
.bad .first {
padding: 5px;
}
#infoPop {
background: white;
border: 2px solid #008BCE;
position: absolute;
left: 31%;
padding: 10px;
top: 50%;
width: 640px;
z-index: 99999;
}
#infoPop {
-moz-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}
#infoPop .close {
cursor: pointer;
float: right;
margin: -7px -5px;
}
#infoPop .first {
margin: 33px 0 0 -90px;
}
#infoPop .good {
float: left;
margin: 0 20px 0 10px;
}
#infoPop .standard {
margin: 40px 0 0 -70px;
}
.title img {
float: left;
}
.title .right {
float: left;
margin: 5px;
}
.pop .aui-overlaycontextpanel-pointer {
border-bottom-color: #008BCE;
display: none;
}
.pop .aui-overlaycontextpanel-pointer-inner {
border-bottom-color: #FFFFFF;
}
.pop .aui-overlay-content {
background: #FFFFFF;
border: 2px solid #008BCE;
padding: 12px 13px 35px;
position: relative;
width: 300px;
}
.pop .aui-overlay-content:after {
border-top: 30px solid #FFFFFF;
border-right: 26px solid transparent;
top: 0px;
left: 321px;
}
.pop .aui-overlay-content:before {
border-top: 33px solid #008BCE;
border-right: 28px solid transparent;
left: 323px;
top: -2px;
}
.pop .aui-widget-bd .name {
color: #008BCE;
font-size: 16px;
font-weight: normal;
margin: 5px 0;
}
.pop .column-heading {
color: #008BCE;
font-weight: normal;
margin: 5px 0;
}
.pop .close {
bottom: 5px;
cursor: pointer;
float: right;
position: absolute;
right: 5px;
}
.pop .content {
margin: 10px 0;
}
.pop p {
color: #484C4B;
font-weight: normal;
margin: 1em 0;
}
.pop .aui-widget-bd a {
color: #2BABE2;
}
.pop .aui-widget-bd a {
text-decoration: underline;
}
.pop .aui-widget-bd a:hover {
color: #2BABE2;
}
.agenda .pop.aui-widget {
display: block;
}
.trigger {
text-decoration: underline;
}
.trigger:hover {
cursor: pointer;
color: #2BABE2;
}
.print-date-heading {
display: none;
}
@media print {
body,
table,
td {
font-size: 8pt;
}
.agenda td.description {
padding: 4px;
}
.tab-content {
-moz-box-shadow: none;
-webkit-box-shadow: none;
background: #FFF;
border: 0;
box-shadow: none;
float: none;
}
tr.first {
background: #FFF;
}
.print-date-heading {
color: #000;
display: inline;
font-size: 12pt !important;
font-weight: bold;
}
.main-content-1 {
page-break-after: always !important;
}
td.selected {
background: #FFF;
color: #1DA99E;
}
.tab-nav,
.agenda td .pop,
.printer-link,
.print-hide {
display: none;
}
.close {
display: none;
}
}
#wrapper .loading-mask {
background: url('/osb-symposium-theme/images/progress_bar/loading_animation.gif') center no-repeat;
height: 55px;
width: 100%;
}
.aui-helper-hidden {
display: block !important;
}
#wrapper .aui-helper-hidden {
display: none !important;
}
</style>
#set ($listUtil = $portal.getClass().forName("com.liferay.portal.kernel.util.ListUtil"))
#set ($portalBeanLocator = $portal.getClass().forName("com.liferay.portal.kernel.bean.PortalBeanLocatorUtil"))
#set ($string = $portal.getClass().forName("java.lang.String"))
#set ($structureId = "$structure_id.data")
#set ($booleanQueryFactory = $portal.getClass().forName("com.liferay.portal.kernel.search.BooleanQueryFactoryUtil"))
#set ($searchContext = $portal.getClass().forName("com.liferay.portal.kernel.search.SearchContext").newInstance())
#set ($searchEngine = $portalBeanLocator.locate("com.liferay.portal.kernel.search.SearchEngineUtil"))
#set ($sortFactory = $portalBeanLocator.locate("com.liferay.portal.kernel.search.SortFactoryUtil"))
#set ($termQueryFactory = $portal.getClass().forName('com.liferay.portal.kernel.search.TermQueryFactoryUtil'))
#set ($query = $booleanQueryFactory.create($searchContext))
#set ($V = $query.addRequiredTerm("portletId", "15"))
#set ($V = $query.addRequiredTerm("structureId", $structureId))
#set ($sorts = [])
#set ($V = $sorts.add($sortFactory.create("web_content/time", 3, false)))
#set ($V = $sorts.add($sortFactory.create("web_content/room", 3, false)))
#set ($hits = $searchEngine.search($company.companyId, $query, $sortFactory.toArray($sorts), -1, -1))
#set ($days = [])
#set ($docCount = 0)
#set ($hitTime = 0)
#set ($tabDate = 0)
#set ($tabHeadings = ["headings"])
#set ($tabImages = ["images"])
#set ($baseUrl = $request.get('attributes').get('aui:a:scopedAttributes'))
#set ($baseUrl = $stringUtil.stripBetween($baseUrl, "{", "href="))
#set ($baseUrl = $stringUtil.replace($baseUrl, "}", ""))
#set ($layoutId = $request.get("theme-display").get("plid"))
#set ($layoutService = $serviceLocator.findService("com.liferay.portal.service.LayoutLocalService"))
#set ($layoutLong = $getterUtil.getLong($layoutId))
#set ($layout = $layoutService.getLayout($layoutLong))
#set ($userHasPermissions = $layoutPermission.contains($permissionChecker, $layout, "UPDATE"))
#foreach ($doc in $hits.docs)
#set ($date = $getterUtil.getString($doc.get("web_content/time")).substring(0,4))
#if ($tabDate == $date)
#set ($docNumber = $docCount - 1)
#set ($temp = $days.get($docNumber).add($doc))
#else
#set ($docCount = $docCount + 1)
#set ($tabDate = $date)
#set ($day = [])
#set ($temp = $day.add($doc))
#set ($temp = $days.add($day))
#end
#end
#foreach ($heading in $tab_heading.siblings)
#set ($temp = $tabHeadings.add($heading.data))
#set ($temp = $tabImages.add($heading.tab_image.data))
#end
<a class="printer-link responsive-hidden" href="/c/journal/view_article_content?groupId=$groupId&articleId=$reserved-article-id.data&version=$reserved-article-version.data" target="_blank"><img src="/documents/23142211/23202217/print-icon.png/8c2d6601-044a-42d3-8695-14634393153d?t=1366075159000?t=1366075159000?t=1366075159000" /><span class="print-text">Print</span></a>
<div id="tabs">
<div class="loading-mask"></div>
<div id="landingTab" class="aui-helper-hidden">
<ul class="tab-nav aui-tabview-list" id="list">
#set($col-num = $days.size())
#set($tab-width = 100 / $col-num)
#foreach ($day in $days)
<li class="tab tab-$velocityCount aui-w${tab-width} aui-tab"><a class="tab-label" href="javascript:;"><span class="heading">#if($tabHeadings.get($velocityCount))$tabHeadings.get($velocityCount)#end</span></a></li>
#end
</ul>
<div class="tab-content" id="tabContent">
#foreach ($day in $days)
<div class="main-content-$velocityCount">
<table class="agenda" width="100%">
<tbody>
#foreach ($doc in $day)
#set ($articleId = $getterUtil.getString($doc.get("articleId")))
#set ($border = $getterUtil.getBoolean($doc.get("web_content/border")))
#set ($continuedDoubleSession = $getterUtil.getBoolean($doc.get("web_content/continued_double_session")))
#set ($doubleSession = $getterUtil.getBoolean($doc.get("web_content/double_session")))
#set ($downloadLabel = $getterUtil.getString($doc.get("web_content/download_label")))
#if ($downloadLabel == "") #set ($downloadLabel = $getterUtil.getString($doc.get("web_content/download_label")))#end
#set ($downloadUrl = $getterUtil.getString($doc.get("web_content/downloald_url")))
#if ($downloadUrl == "") #set ($downloadUrl = $getterUtil.getString($doc.get("web_content/downloald_url")))#end
#set ($emptySession = $getterUtil.getBoolean($doc.get("web_content/empty_session")))
#set ($eventRowTime = $getterUtil.getString($doc.get("web_content/event_row_time")))
#if ($eventRowTime == "") #set ($eventRowTime = $getterUtil.getString($doc.get("web_content/event_row_time")))#end
#set ($eventType = $getterUtil.getString($doc.get("web_content/event_type")))
#if ($eventType == "") #set ($eventType = $getterUtil.getString($doc.get("web_content/event_type")))#end
#set ($otherEventType = $getterUtil.getString($doc.get("web_content/other_event_type")))
#if ($otherEventType == "") #set ($otherEventType = $getterUtil.getString($doc.get("web_content/other_event_type")))#end
#set ($highlight = $getterUtil.getBoolean($doc.get("web_content/highlight")))
#set ($popupBio = $getterUtil.getString($doc.get("web_content/popup_bio")))
#if ($popupBio == "") #set ($popupBio = $getterUtil.getString($doc.get("web_content/popup_bio")))#end
#set ($room = $getterUtil.getString($doc.get("web_content/room")))
#if ($room == "") #set ($room = $getterUtil.getString($doc.get("web_content/room")))#end
#set ($roomNames = $getterUtil.getString($doc.get("web_content/room_names")))
#if ($roomNames == "") #set ($roomNames = $getterUtil.getString($doc.get("web_content/room_names")))#end
#set ($speakerCompany = $getterUtil.getString($doc.get("web_content/speaker_company")))
#if ($speakerCompany == "") #set ($speakerCompany = $getterUtil.getString($doc.get("web_content/speaker_company")))#end
#set ($speakerName = $getterUtil.getString($doc.get("web_content/speaker_name")))
#if ($speakerName == "") #set ($speakerName = $getterUtil.getString($doc.get("web_content/speaker_name")))#end
#set ($speakerTitle = $getterUtil.getString($doc.get("web_content/speaker_title")))
#if ($speakerTitle == "") #set ($speakerTitle = $getterUtil.getString($doc.get("web_content/speaker_title")))#end
#set ($sponsorImage = $getterUtil.getString($doc.get("web_content/sponsor_image")))
#if ($sponsorImage == "") #set ($sponsorImage = $getterUtil.getString($doc.get("web_content/sponsor_image")))#end
#set ($sponsorImageUrl = $getterUtil.getString($doc.get("web_content/sponsor_image_url")))
#if ($sponsorImageUrl == "") #set ($sponsorImageUrl = $getterUtil.getString($doc.get("web_content/sponsor_image")))#end
#set ($time = $getterUtil.getString($doc.get("web_content/time")))
#if ($time == "") #set ($time = $getterUtil.getString($doc.get("web_content/time")))#end
#set ($title = $getterUtil.getString($doc.get("web_content/event_title_$locale")))
#if ($title == "") #set ($title = $getterUtil.getString($doc.get("web_content/event_title")))#end
#if ($title != '')
#if ($room == '')
#if ($velocityCount != 1)</tr>#end<tr>
<td class="first-col">$eventRowTime</td>
#if ($highlight == 'true')
<td colspan="4" class = "description #if ($popupBio != '')pop-up#end selected">
#else
<td colspan="4" class = "description #if ($popupBio != '')pop-up#end">
#end
#if ($otherEventType != "")
<span><b>$otherEventType:</b></span>#if ($highlight == 'false')<br />#end
#elseif($eventType != 'blank')
<span><b>$eventType:</b></span>#if ($highlight == 'false')<br />#end
#end
<span #if ($popupBio != '')class="trigger" onclick="_gaq.push(['_trackEvent', 'Conferences - France 2013', 'Agenda Session Clicks', '$title - $speakerName']);"#end>$title</span><br>
#if ($popupBio != '')
<div class="infoPop aui-helper-hidden">
<span class="data">
<img src="/image/image_gallery?uuid=a6a925c6-d51c-40b6-93ad-88a7a5db92cd&groupId=14392880" class="close" />
<h3 class="column-heading">$speakerName</h3>
#if ($speakerTitle != '')<p>$speakerTitle</p>#end
#if ($speakerCompany != '')<p><i>$speakerCompany</i></p>#end
$popupBio
</span>
</div>
<div class="pop"></div>
#end
#if ($speakerName != '')
<br />
<i>$speakerName, #if ($speakerCompany != '')$speakerCompany#end</i>
#end
#if($sponsorImage != '')
#if($sponsorImageUrl != '')
<a href="$sponsorImageUrl" target="_blank"><img src="$sponsorImage" style="max-height: 45px; padding-left: 10px;" /></a>
#else
<img src="$sponsorImage" style="max-height: 45px; padding-left: 10px;" />
#end
#end
#if ($userHasPermissions)
<a class="taglib-icon edit-only" href="$baseUrl&_15_articleId=$articleId">
<img class="icon" src="/documents/23142211/23149303/Edit+Icon/c6b6998f-eb05-4cd6-9a07-adf1b53feadd?t=1370026689613" alt="Edit Web Content" title="Edit Web Content">
</a>
#end
</td>
#end
#if ($room != '')
#if ($time != $hitTime)
#set ($hitTime = $time)
#set ($roomNumberCount = 0)
#if ($velocityCount != 1)</tr>#end<tr class="multi-event-row">
<td class="first-col">$eventRowTime</td>
#end
#set ($roomNumberCount = $roomNumberCount + 1)
#set ($integer = 0)
#set ($roomNumber = $integer.parseInt($room))
#if ($roomNumberCount < $roomNumber)
#set ($start = $roomNumberCount +1)
#set ($end = $roomNumber)
#set($range = [$start..$end])
#foreach($i in $range)
<td class="empty-session" style="border-left-width: 0;"></td>
#set ($roomNumberCount = $roomNumberCount + 1)
#end
#end
#if ($continuedDoubleSession == 'true')
<td class = "continued-session">
#if ($userHasPermissions)
<a class="taglib-icon edit-only" href="$baseUrl&_15_articleId=$articleId">
<img class="icon" src="/documents/23142211/23149303/Edit+Icon/c6b6998f-eb05-4cd6-9a07-adf1b53feadd?t=1370026689613" alt="Edit Web Content" title="Edit Web Content">
</a>
#end
</td>
#elseif ($emptySession == 'true')
<td class = "empty-session" style="border-left-width: 0;">
#if ($userHasPermissions)
<a class="taglib-icon edit-only" href="$baseUrl&_15_articleId=$articleId">
<img class="icon" src="/documents/23142211/23149303/Edit+Icon/c6b6998f-eb05-4cd6-9a07-adf1b53feadd?t=1370026689613" alt="Edit Web Content" title="Edit Web Content">
</a>
#end
</td>
#else
#if ($doubleSession == 'true')
<td class="description #if ($popupBio != '')pop-up#end double-session">
#else
<td class="description #if ($popupBio != '')pop-up#end">
#end
#if ($otherEventType != "")
<span><b>$otherEventType:</b></span><br />
#elseif($eventType != 'blank')
<span><b>$eventType:</b></span><br />
#end
<span #if ($popupBio != '')class="trigger" onclick="_gaq.push(['_trackEvent', 'Conferences - France 2013', 'Agenda Session Clicks', '$title - $speakerName']);"#end>$title</span><br>
#if ($popupBio != '')
<div class="infoPop aui-helper-hidden">
<span class="data">
<img src="/image/image_gallery?uuid=a6a925c6-d51c-40b6-93ad-88a7a5db92cd&groupId=14392880" class="close" />
<h3 class="column-heading">$speakerName</h3>
#if ($speakerTitle != '')<p>$speakerTitle</p>#end
#if ($speakerCompany != '')<p><i>$speakerCompany</i></p>#end
$popupBio
</span>
</div>
<div class="pop"></div>
#end
#if ($speakerName != '')
<br />
<i>$speakerName, #if ($speakerCompany != '')$speakerCompany#end</i>
#end
#if ($userHasPermissions)
<a class="taglib-icon edit-only" href="$baseUrl&_15_articleId=$articleId">
<img class="icon" src="/documents/23142211/23149303/Edit+Icon/c6b6998f-eb05-4cd6-9a07-adf1b53feadd?t=1370026689613" alt="Edit Web Content" title="Edit Web Content">
</a>
#end
</td>
#end
#end
#end
#if ($border == 'true' && $roomNames != '')
#if ($velocityCount != 1)</tr>#end<tr class="first">
<td></td>
#foreach ($name in $stringUtil.split($roomNames))
<td class="heading">$name
#if ($userHasPermissions)
<a class="taglib-icon edit-only" href="$baseUrl&_15_articleId=$articleId">
<img class="icon" src="/documents/23142211/23149303/Edit+Icon/c6b6998f-eb05-4cd6-9a07-adf1b53feadd?t=1370026689613" alt="Edit Web Content" title="Edit Web Content">
</a>
#end
</td>
#end
#elseif ($border == 'true' && $roomNames == '')
#if ($velocityCount != 1)</tr>#end<tr class="first">
<td colspan="5">
#if ($userHasPermissions)
<a class="taglib-icon edit-only" href="$baseUrl&_15_articleId=$articleId">
<img class="icon" src="/documents/23142211/23149303/Edit+Icon/c6b6998f-eb05-4cd6-9a07-adf1b53feadd?t=1370026689613" alt="Edit Web Content" title="Edit Web Content">
</a>
#end
</td>
#end
#end
</tr>
</tbody>
</table>
</div>
#end
</div>
</div>
</div>
<script>
AUI().ready('aui-tabs', 'substitute', function(A) {
var loadingmask = A.one(".loading-mask");
var tabs1 = new A.TabView(
{
boundingBox: '#landingTab',
listNode: '#list',
contentNode: '#tabContent'
}
);
tabs1.render();
loadingmask.toggle();
loadingmask.remove(true);
tabs1.show();
}
);
AUI().ready(
'aui-aria', 'aui-node', 'aui-overlay-context-panel', 'aui-overlay-manager', 'aui-overlay-mask',
function(A) {
var isIE7 = A.one('html.ie7');
A.all('.pop-up').each(function(node){
var pop = new A.OverlayContextPanel({
align: { node: '.trigger', points: [ 'cc', 'cc' ] },
bodyContent: node.one('.data').html(),
trigger: node.one('.trigger'),
cancellableHide: true,
hideDelay: 100,
hideOnDocumentClick: true,
boundingBox: node.one('.pop'),
anim: true
}).render();
var close = pop.bodyNode.one('.close');
if (close) {
close.on('click',
function(event) {
if(!isIE7) {
overlayMask.hide();
}
pop.hide();
}
);
}
});
if(!isIE7) {
var overlayMask = new A.OverlayMask().render();
var setTarget = function(elem) {
overlayMask.show();
};
var drop = A.one('.aui-overlaymask-content');
if (drop) {
drop.on('click',
function(event) {
overlayMask.hide();
}
);
}
A.on('click', A.bind(setTarget, null, document), '.description .trigger');
}
}
);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment