custom template for document views (#898)
This commit is contained in:
parent
9ef16f3c63
commit
8ead6d5667
|
@ -25,4 +25,13 @@
|
|||
permission="zope2.View"
|
||||
/>
|
||||
|
||||
<browser:page
|
||||
for="tabellio.documents.document.IDocument"
|
||||
name="view"
|
||||
class=".document.View"
|
||||
template="document.pt"
|
||||
permission="zope2.View"
|
||||
/>
|
||||
|
||||
|
||||
</configure>
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr"
|
||||
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="fr"
|
||||
metal:use-macro="context/main_template/macros/master"
|
||||
i18n:domain="tabellio.pcfviews">
|
||||
<body>
|
||||
|
||||
<metal:main fill-slot="main">
|
||||
<tal:main-macro metal:define-macro="main">
|
||||
|
||||
<div tal:replace="structure provider:plone.abovecontenttitle" />
|
||||
<h1 metal:use-macro="context/kss_generic_macros/macros/generic_title_view">Title</h1>
|
||||
<div tal:replace="structure provider:plone.belowcontenttitle" />
|
||||
|
||||
<div tal:replace="structure provider:plone.abovecontentbody" />
|
||||
|
||||
<div tal:condition="context/file" class="document-download">
|
||||
<a href="@@download/file">Télécharger le fichier</a>
|
||||
</div>
|
||||
|
||||
<div tal:condition="context/no" class="field">
|
||||
<label>Numéro</label>
|
||||
<div>
|
||||
<span tal:content="context/no"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div tal:condition="context/session" class="field">
|
||||
<label>Session</label>
|
||||
<div>
|
||||
<span tal:content="context/session"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div tal:condition="context/authors" class="field">
|
||||
<label>Auteurs</label>
|
||||
<div>
|
||||
<ul>
|
||||
<li tal:repeat="author context/authors"><a tal:attributes="href author/to_object/absolute_url" tal:content="author/to_object/Title">Céline Delforge</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div tal:condition="context/polgroups" class="field">
|
||||
<label>Groupes politiques</label>
|
||||
<div>
|
||||
<ul>
|
||||
<li tal:repeat="polgroup context/polgroups"><span tal:content="polgroup/to_object/Title">Ecolo</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div tal:replace="structure provider:plone.belowcontentbody" />
|
||||
|
||||
</tal:main-macro>
|
||||
</metal:main>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
from Products.Five import BrowserView
|
||||
|
||||
class View(BrowserView):
|
||||
pass
|
||||
|
Reference in New Issue