ワークフローを表示するポートレットの制作

ワークフローを表示するポートレットを作ってみた。
例 portal_skins/custom フォルダ内にPage Template を追加する。

名前は、portlet_workflow とする。

以下のコードをエディットエリア内にコピペして、保存をする。

<span tal:content=”python:putils.getReviewStateTitleFor(here)”
tal:attributes=”class python:’state-‘+normalizeString(review_state)”
i18n:translate=””>
Workflow state
</span>
</dt>
<dd class=”portletItemSingle odd”>
<ul>
<tal:block repeat=”transition transitions”>
<li>
<a href=”#”
i18n:translate=””
tal:content=”transition/name”
i18n:attributes=”title”
tal:attributes=”href string:$here_url/content_status_modify?workflow_action=${transition/id};
title transition/name”>File Menu Item 1</a>
</li>
</tal:block>
</ul>
</dd>
<dd class=”portletFooter”>
<a href=”#”
tal:attributes=”href string:$here_url/content_status_history”
i18n:translate=”label_advanced”>Advanced</a>
</dd>

</dl>
</tal:block>
</div>
</body>
</html>

次に、Portlのルートに移り、Properties タブをクリックする。

プロパティ項目 left_slots に以下の文を追加。

 here/portlet_workflow/macros/portlet

Save Chenges ボタンをおす。

以上で、出来上がり。