Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ANR_Home
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Everett, Brad
ANR_Home
Commits
5a7542fa
Commit
5a7542fa
authored
8 years ago
by
Brad
Browse files
Options
Downloads
Patches
Plain Diff
Common Content Person Widget initial commit
parent
ec5b03f4
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
shared/vtl/widgets/common template/person-listing.vtl
+132
-0
132 additions, 0 deletions
shared/vtl/widgets/common template/person-listing.vtl
with
132 additions
and
0 deletions
shared/vtl/widgets/common template/person-listing.vtl
0 → 100644
+
132
−
0
View file @
5a7542fa
## --------------------------------------------------
## SETTING THE DEFAULT NUMBER OF RESULTS ------------
## --------------------------------------------------
#if (!$UtilMethods.isSet($numberOfResults))
#set($numberOfResults = 20)
#end
## --------------------------------------------------
## SETTING THE SORT ORDER ---------------------------
## --------------------------------------------------
#set ($sortBy = "Person.familyName asc")
## --------------------------------------------------
## SETTING RELATIONSHIP FILTERS ---------------------
## --------------------------------------------------
#if($UtilMethods.isSet($worksFor))
#set($worksForRel = '+Works-For:')
#set($worksForID = '$worksFor')
#end
#if($UtilMethods.isSet($memberOf))
#set($memberOfRel = '+Member-Of:')
#set($memberOfID = '$memberOf')
#end
#if($UtilMethods.isSet($workLocation))
#set($workLocationRel = '+Work-Location:')
#set($workLocationID = 'workLocation')
#end
#if($UtilMethods.isSet($dataset))
#set($datasetRel = '+Dataset-Person:')
#set($datasetID = 'dataset')
#end
## --------------------------------------------------
## SETTING CATEGORIES -------------------------------
## --------------------------------------------------
#if($UtilMethods.isSet($personType))
#set($cat = "+categories:$!{personType}")
#end
#if($pagination.contains('true'))
## SETTING ITEMS PER PAGE
#if ($UtilMethods.isSet($itemsPerPage))
#set($itemsPerPage = $webapi.parseInt($itemsPerPage))
#else
#set($itemsPerPage = 20)
#end
## GETTING PAGE NUMBER
#if($UtilMethods.isSet($request.getParameter('page')))
#set($page = $webapi.parseInt($request.getParameter('page')))
#else
#set($page = 1)
#end
#set($personListing = $dotcontent.pullPerPage("
+contentType:Person
+(conhost:$host.identifier)
$!{worksForRel}$!{worksForID}
$!{memberOfRel}$!{memberOfID}
$!{workLocationRel}$!{workLocationID}
$!{datasetRel}$!{datasetID}
$!{cat}
", $!{page}, $!{itemsPerPage},"$!{sortBy}"))
#else
#set($personListing = $dotcontent.pull("
+contentType:Person
+conhost:$host.identifier)
$!{worksForRel}$!{worksForID}
$!{memberOfRel}$!{memberOfID}
$!{workLocationRel}$!{workLocationID}
$!{datasetRel}$!{datasetID}
$!{cat}
", $!{numberOfResults}, "$!{sortBy}"))
#end
<section itemscope itemtype="http://schema.org/Person">
#if($UtilMethods.isSet($headline))
#if (!$UtilMethods.isSet($headlineFontSize))
#set ($headlineFontSize = '1')
#end
<h$!{headlineFontSize} itemprop="name">$!{headline}</h$!{headlineFontSize}>
#end
#if($personListing.size() > 0)
<ul class="">
#foreach($person in $personListing)
<li class="">
#editContentlet($person.inode)
#if($UtilMethods.isSet(${person.image}))
<a class="" href="${person.urlTitle}">
<img class="" src="/contentAsset/image/$!{person.image.identifier}/fileAsset/filter/Resize/resize_w/150" alt="$person.givenName $person.familyName">
</a>
#end
#if($UtilMethods.isSet($headlineFontSize))
##if headline is set this subtracts 1 from it
#set($nameFontSize = $math.sub($!{headlineFontSize}, 1).intValue())
#else
#set($nameFontSize = '2')
#end
<h$!{nameFontSize}><a href="${person.urlTitle}" itemprop="name">$person.givenName $person.familyName</a></h$!{nameFontSize}>
#if($UtilMethods.isSet($person.jobTitle))
<p class="title" itemprop="jobTitle">$person.jobTitle</p>
#end
#if($UtilMethods.isSet($person.email))
<p class="email"><a itemprop="email" href="mailto:${person.email}">${person.email}</a></p>
#end
#if($UtilMethods.isSet($person.telephone))
<p class="phone" itemprop="telephone">$person.telephone</p>
#end
</li>
#end
</ul>
#if($pagination.contains('true') && $personListing.totalPages > 1)
<ul class="pagination">
#if($personListing.previousPage)
<li><a href="$!{folderUrl}/?page=$!{math.sub($page, 1)}">«</a></li>
#end
#foreach($i in [1..$personListing.totalPages])
<li #if($page == $velocityCount)class="active"#end><a href="$!{folderUrl}/?page=${velocityCount}">$velocityCount</a></li>
#end
#if($personListing.nextPage)
<li><a href="$!{folderUrl}/?page=$!{math.add($page, 1)}">»</a></li>
#end
</ul>
#end
#else
## insert category name, maybe make a default to staff if no categories checked...
<p>There are no $!{categories} listed at this time.</p>
#end
</section>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment