member_search_results のソース
メンバー検索をデータベースから実行して、その結果を表示する Page Template のソースコードです。
サイズ 4.2 kB - File type text/htmlファイルのコンテンツ
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
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)" />
<div metal:fill-slot="main"
tal:define="results python:here.SQL.searchForMembers(request);
Batch python:modules['Products.CMFPlone'].Batch;
DateTime python:modules['DateTime'].DateTime;
b_size python:20;b_start python:0;b_start request/b_start | b_start;">
<h1 i18n:translate="heading_search_results">Search results</h1>
<div>
写真かユーザ名をクリックして、その人の詳細画面を参照できます。
</div>
<div tal:condition="results"
tal:define="batch python:Batch(results, b_size, int(b_start), orphan=1)">
<strong>
<span i18n:translate="batch_x_items_matching_your_criteria"><span i18n:name="number" tal:content="python:len(results)">234</span> items matching your criteria.</span>
</strong>
<br/>
<!-- Navigation -->
<div metal:use-macro="here/batch_macros/macros/navigation" />
<div>
<metal:block tal:repeat="result batch">
<div tal:define="name result/id;
home python:container.portal_membership.getHomeUrl(name, verifyPermission=1);">
<table cellspacing="0" style="padding: 0px; border: gray 1px solid;" width="100%" height="96px">
<tbody>
<tr>
<td rowspan="3" width="96" heigth="96" align="center" valign="middle">
<a href="#" tal:attributes="href home">
<tal:block tal:condition="result/portrait">
<img src="defaultUser.gif"
alt=""
border="0"
tal:attributes="src string:${result/portrait}/thumb?width=96&height=96" />
</tal:block>
<tal:block tal:condition="not: result/portrait"
tal:define="portrait python: here.portal_membership.getPersonalPortrait(name);">
<img src="defaultUser.gif"
alt=""
border="0"
tal:attributes="src string:${portrait/absolute_url}/thumb?width=96&height=96" />
</tal:block>
</a>
</td>
<td i18n:translate="label_user_name" width="100">Name</td>
<td>
<a href="#" tal:attributes="href home">
<span tal:replace="result/nickname" />
<span tal:condition="result/fullname"
tal:replace="string: (${result/fullname})" />
</a>
<a href="" tal:condition="result/email"
tal:attributes="href string:mailto:${result/email}">
mail</a>
</td>
<td width="150">
<span tal:replace="result/telno" />
<span tal:condition="result/telext"
tal:replace="string: (${result/telext})" />
</td>
</tr>
<tr>
<td i18n:translate="label_introduction">Introduction</td>
<td tal:content="python: result['introduction'][:300]"
colspan="2">introduction</td>
</tr>
<tr>
<td i18n:translate="label_organization">Organization</td>
<td tal:content="result/organization"
colspan="2">organization</td>
</tr>
</tbody>
</table>
<br />
</div>
</metal:block>
</div>
<!-- Navigation -->
<div metal:use-macro="here/batch_macros/macros/navigation" />
</div>
<div tal:condition="not: results">
<p><strong i18n:translate="description_no_results_found">No results were found.</strong></p>
</div>
</div>
</html>
Click here to get the file