パーソナルツール
現在の場所: ホーム plone SNS風味 プロフィール portlet_profile のソース
書いた本
Plone 完全活用ガイド の Chapter 1, 2, 3, 11 を執筆しました。
plone のインストール、使い方から、機能・デザインのカスタマイズ、プロダクトの作り方まで、 plone のすべてがぎゅっと詰まっている書籍になっていると思います。
plone に興味がある人から、すでに使いこなしている方まで、ぜひ読んでみてください。
Plone 完全活用ガイドのサポートページ
ナビゲーション

 
文書操作

portlet_profile のソース

作成者 takanori 最終変更日時 2008年06月04日 12時38分

プロフィール情報を表示するポートレットのソースコードです。

Click here to get the file

サイズ 2.8 kB - File type text/html

ファイルのコンテンツ

<html xmlns:tal="http://xml.zope.org/namespaces/tal"
      xmlns:metal="http://xml.zope.org/namespaces/metal"
      i18n:domain="plone">

<body>

<!-- The Profile box -->

<div metal:define-macro="portlet"
     tal:omit-tag="">

  <tal:block tal:condition="python: not isAnon
	                    and not request.URL.endswith('Members/index_html')
                            and not request.URL.endswith('Members/member_search_results')" >

    <tal:block tal:define="creator here/Creator;
                           dispname python:here.getDispname(id=creator);
                           mem python:here.getMemberById(id=creator)">

      <div class="portlet" id="portlet-profile">
      <h5 tal:content="string:${dispname}さんのプロフィール">Member's profile</h5>
      <div class="portletBody">
        <div class="portletContent odd"
             style="text-align: center;"
             tal:define="portrait python:mtool.getPersonalPortrait(member_id=creator);">
          <img src="" alt=""
               class="portraitPhoto"
               tal:condition="python:portrait.id != 'defaultUser.gif'"
               tal:attributes="src string:${portrait/absolute_url}/thumb?width=192&height=192"
               />
          <img src="" alt=""
               class="portraitPhoto"
               tal:condition="python:portrait.id == 'defaultUser.gif'"
               tal:attributes="src string:${portrait/absolute_url}"
               />
        </div>
        <table cellpadding="2px" cellspacing="0" width="100%">
        <tbody>
          <tr class="even">
            <td i18n:translate="label_full_name">Full Name</td>
            <td tal:content="python:mem.getProperty('fullname')">fullname</td>
          </tr>
          <tr class="odd">
            <td><nobr i18n:translate="label_nick_name">Nick Name</nobr></td>
            <td tal:content="python:mem.getProperty('nickname')">nockname</td>
          </tr>
          <tr class="even">
            <td i18n:translate="label_email">Email</td>
            <td tal:define="email python:mem.getProperty('email')">
            <a href="" tal:content="email"
               tal:attributes="href string:mailto:${email}">email</a></td>
          </tr>
          <tr class="odd">
            <td i18n:translate="label_organization">Organization</td>
            <td tal:content="python:mem.getProperty('organization')">organization</td>
          </tr>
          <tr class="even">
            <td i18n:translate="label_sex">Sex</td>
            <td tal:content="python:mem.getProperty('sex')" i18n:translate="">sex</td>
          </tr>
          <tr class="odd">
            <td i18n:translate="label_blood">Blood</td>
            <td tal:content="python:mem.getProperty('blood')">blood</td>
          </tr>
        </tbody>
        </table>
      </div>
      </div>
    </tal:block>
  </tal:block>

</div>

</body>

</html>

Powered by vine linux, python, zope, plone, coreblog