Personal tools
person_folder_listing
Customized version of generic folder_listing template that can be applied to a member's folder to provide info about that member in addition to allowing the user to add additional content. Requires getMemberProperties python script.
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
lang="en"
metal:use-macro="here/main_template/macros/master"
i18n:domain="plone">
<body>
<div metal:fill-slot="main">
<metal:main-macro define-macro="main"
tal:define="member here/id;
portrait python: mtool.getPersonalPortrait(member);
memberinfo python: context.getMemberProperties(member);">
<div
metal:use-macro="here/document_actions/macros/document_actions">
Document actions (print, sendto etc)
</div>
<h1
class="documentFirstHeading"><span tal:content="object_title"
/><span tal:condition="memberinfo/degree">, <span
tal:replace="memberinfo/degree" /></span><span
tal:condition="memberinfo/deginstitution"> (<span
tal:replace="memberinfo/deginstitution" />)</span>
</h1>
<img
src=""
alt=""
class="portraitPhoto"
width="75"
style="float: right; margin: 1em; vertical-align: top;"
tal:attributes="src portrait/absolute_url" />
<a href=""
class="link-parent"
tal:define="parent_url python:here.navigationParent(here,
template_id)"
tal:condition="parent_url"
tal:attributes="href parent_url"
i18n:translate="go_to_parent_url">
Up one level
</a>
<div
class="documentDescription">
<div class="discreet">
<span tal:condition="memberinfo/workingtitle">
<span tal:replace="memberinfo/workingtitle" />, Center for Mind
and Brain
<br /></span>
<span tal:condition="python: memberinfo['hometitle'] is not '' and
memberinfo['homedepartment'] is not ''">
<span tal:replace="memberinfo/hometitle" />, <span
tal:replace="memberinfo/homedepartment" />
<br /></span>
<span tal:condition="memberinfo/location">Office:
<span tal:replace="memberinfo/location" />
<br /></span>
<span tal:condition="memberinfo/phone">Telephone:
<span tal:replace="memberinfo/phone" />
<br /> </span>
<span tal:condition="memberinfo/email"><table border="0"
cellpadding="0" cellspacing="1"><tr><td>Email:
</td>
<span tal:replace="structure
python:context.parseEmail(memberinfo['email'])" />
</tr></table><br /></span>
<span tal:condition="memberinfo/keywords">Keywords:
<span tal:replace="memberinfo/keywords" />
</span><br /><br />
</div>
<div class="documentDescription"
tal:content="memberinfo/description">
Author description.
</div><hr />
</div>
<metal:listingmacro
define-macro="listing">
<tal:foldercontents
define="contentFilter
contentFilter|request/contentFilter|nothing;
limit_display limit_display|request/limit_display|nothing;
more_url more_url|request/more_url|string:folder_contents;
contentsMethod python:test(here.portal_type=='Topic',
here.queryCatalog, here.getFolderContents);
folderContents
folderContents|python:contentsMethod(contentFilter);
use_view_action
site_properties/typesUseViewActionInListings|python:();
over_limit python: limit_display and len(folderContents) >
limit_display;
folderContents python: (over_limit and folderContents[:limit_display])
or folderContents;
show_about python:not isAnon or
site_properties.allowAnonymousViewAbout">
<tal:listing
condition="folderContents">
<dl>
<tal:entry tal:repeat="item folderContents">
<tal:block tal:define="item_url item/getURL|item/absolute_url;
item_id item/getId|item/id;
item_title_or_id item/pretty_title_or_id;
item_description item/Description;
item_type item/portal_type;
item_type_title item/Type;
item_modified item/ModificationDate;
item_created item/CreationDate;
item_type_class python: 'visualIcon contenttype-' +
normalizeString(item_type);
item_wf_state
item/review_state|python: wtool.getInfoFor(item, 'review_state',
'');
item_wf_state_class python:'state-' +
normalizeString(item_wf_state);
item_creator item/Creator;
item_start item/start/ISO|item/StartDate|nothing;
item_end item/end/ISO|item/EndDate|nothing;
">
<dt metal:define-macro="listitem"
tal:attributes="class python:test(item_type == 'Event', 'vevent',
'')">
<span tal:attributes="class string:$item_type_class summary"
tal:condition="python:item_type != 'Link'">
<a href="#"
tal:attributes="href python:test(item_type in use_view_action,
item_url+'/view', item_url+'/');
class string:$item_wf_state_class visualIconPadding url"
tal:content="item_title_or_id">
Item Title
</a>
</span>
<tal:to_external condition="python:item_type == 'Link'">
<span tal:attributes="class item_type_class">
<a href="#"
tal:content="item_title_or_id"
tal:attributes="href item/getRemoteUrl;
class string:${item_wf_state_class} visualIconPadding">
External Link
</a>
</span>
</tal:to_external>
<span class="documentByLine">
<span tal:condition="python: item_type == 'Event'"
i18n:translate="label_event_byline">
(<span tal:content="string:${item/location}"
class="location"
i18n:name="location">Oslo</span>, from
<abbr class="dtstart"
tal:attributes="title python:item_start"
tal:content="python:toLocalizedTime(item_start,long_format=1)"
i18n:name="start">from date</abbr> to
<abbr class="dtend"
tal:attributes="title python:item_end"
tal:content="python:toLocalizedTime(item_end,long_format=1)"
i18n:name="end">to date</abbr>)
</span>
<tal:byline condition="show_about">
—
<tal:name tal:condition="item_creator"
tal:define="author python:mtool.getMemberInfo(item_creator)">
<span i18n:translate="label_by_author">
by
<a href="#"
tal:attributes="href string:${portal_url}/author/${item_creator}"
tal:content="python:author and author['fullname'] or
item_creator"
tal:omit-tag="not:author"
i18n:name="author">
Bob Dobalina
</a>
</span>
</tal:name>
<tal:modified condition="python: item_type != 'Event'">
—
<tal:mod i18n:translate="box_last_modified">
last modified
</tal:mod>
<span
tal:replace="python:toLocalizedTime(item_modified,long_format=1)">
August 16, 2001 at 23:35:59
</span>
</tal:modified>
<metal:description define-slot="description_slot">
<tal:comment replace="nothing">
Place custom listing info for custom types here
</tal:comment>
</metal:description>
</tal:byline>
</span>
</dt>
<dd>
<span tal:omit-tag="" tal:condition="not:item_description">
</span>
<span class="description" tal:content="item_description">
description
</span>
</dd>
</tal:block>
</tal:entry>
</dl>
</tal:listing>
<metal:empty
metal:define-slot="no_items_in_listing">
<p class="discreet"
tal:condition="not: folderContents"
i18n:translate="description_no_items_in_folder">
</p>
</metal:empty>
</tal:foldercontents>
</metal:listingmacro>
</metal:main-macro>
</div>
</body>
</html>