Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
show author page (instead of Member folder) on member search
- Loading branch information
Markos Gogoulos
committed
Feb 22, 2012
1 parent
ca2ec69
commit ac146b8
Showing
3 changed files
with
79 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
plumi/skin/skins/plumi_skin_custom_templates/member_search_results.pt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" | ||
xmlns:tal="http://xml.zope.org/namespaces/tal" | ||
xmlns:metal="http://xml.zope.org/namespaces/metal" | ||
xmlns:i18n="http://xml.zope.org/namespaces/i18n" | ||
lang="en" | ||
metal:use-macro="here/main_template/macros/master" | ||
i18n:domain="plone"> | ||
|
||
<metal:block fill-slot="top_slot" | ||
tal:define="dummy python:request.set('disable_border',1)" /> | ||
|
||
<metal:main fill-slot="main" | ||
tal:define="search_view here/@@pas_search; | ||
listing_allowed python: checkPermission('List portal members', here); | ||
results python:listing_allowed and search_view.searchUsersByRequest(request, sort_by='fullname') or []; | ||
Batch python:modules['Products.CMFPlone'].Batch; | ||
DateTime python:modules['DateTime'].DateTime; | ||
b_size python:12;b_start python:0;b_start request/b_start | b_start;"> | ||
|
||
<h1 class="documentFirstHeading" | ||
i18n:translate="heading_search_results">Search results</h1> | ||
|
||
<div id="content-core"> | ||
<p tal:condition="not: listing_allowed" | ||
i18n:translate="member_listing_not_allowed"> | ||
You are not allowed to list portal members. | ||
</p> | ||
<div tal:condition="results" | ||
tal:define="batch python:Batch(results, b_size, int(b_start), orphan=1)"> | ||
|
||
<strong i18n:translate="batch_x_items_matching_your_criteria"> | ||
<span i18n:name="number" tal:omit-tag="" tal:content="python:len(results)">234</span> items matching your search terms | ||
</strong> | ||
|
||
<div metal:use-macro="here/batch_macros/macros/navigation"/> | ||
|
||
<div tal:define="pm context/@@plone_tools/membership; | ||
portal_url context/@@plone_portal_state/portal_url"> | ||
<metal:block tal:repeat="result batch"> | ||
<div class="card" tal:define="userid result/userid | nothing; | ||
personal_info python:pm.getMemberInfo(userid) or {}; | ||
home python:pm.getHomeUrl(userid, verifyPermission=1); | ||
portrait python:pm.getPersonalPortrait(userid);"> | ||
|
||
<a href="#" | ||
tal:attributes="href python:'%s/author/%s' % (portal_url, userid) or home"> | ||
<img src="defaultUser.png" | ||
alt="" | ||
border="0" | ||
width="75" | ||
height="100" | ||
tal:attributes="src portrait/absolute_url" /> | ||
<br /> | ||
<span tal:content="python:personal_info.get('fullname', userid)">user id</span> | ||
</a> | ||
|
||
</div> | ||
</metal:block> | ||
</div> | ||
|
||
<div class="visualClear" id="clear-space-before-navigation"><!-- --></div> | ||
|
||
<div metal:use-macro="here/batch_macros/macros/navigation" /> | ||
|
||
<div class="visualClear" id="clear-space-after-navigation"><!-- --></div> | ||
|
||
</div> | ||
|
||
<div tal:condition="not: results"> | ||
<p><strong i18n:translate="description_no_results_found">No results were found.</strong></p> | ||
</div> | ||
</div> | ||
|
||
</metal:main> | ||
|
||
</html> |
2 changes: 2 additions & 0 deletions
2
plumi/skin/skins/plumi_skin_custom_templates/member_search_results.pt.metadata
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[default] | ||
title=Search for users |