Moved keyword view to table display

This commit is contained in:
David Convent 2013-04-13 14:18:49 +02:00
parent 6d55eb0bb4
commit a300313f0d
6 changed files with 103 additions and 9 deletions

View File

@ -24,7 +24,7 @@
for="collective.dms.thesaurus.dmskeyword.IDmsKeyword"
layer="plone.app.z3cform.interfaces.IPloneFormLayer"
class="collective.dms.thesaurus.browser.view.DmsKeywordView"
template="dmskeyword_view.pt"
template="dmskeyword_table_view.pt"
permission="zope2.View"
/>

View File

@ -0,0 +1,91 @@
<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="context/main_template/macros/master"
i18n:domain="plone.app.dexterity">
<body>
<metal:main fill-slot="main">
<h1 class="documentFirstHeading" tal:content="context/Title" />
<div tal:replace="structure provider:plone.belowcontenttitle" />
<table id="dmskeywords-navigation"
i18n:domain="collective.dms.thesaurus">
<tr id="dmskeywords-navigation-row">
<td id="dmskeywords-navigation-left-column">
<div id="dmskeywords-navigation-broader-field"
class="field"
tal:define="widget python:view.widgets.get('broader')">
<label tal:content="widget/label" />
<br />
<div tal:content="structure widget/render" />
</div>
<h1 class="documentFirstHeading" tal:content="context/Title" />
<p class="documentDescription"
tal:define="widget python:view.widgets.get('equivs')"
tal:condition="widget/terms"
><label tal:content="widget/label" /><br />
<tal:equivs content="structure widget/render" /></p>
<dl class="portalMessage warning"
tal:define="widget python:view.widgets.get('scope_note')"
tal:condition="widget/value"
><dt tal:content="widget/label"/><dd >
<span tal:replace="structure widget/render" />
</dd></dl>
<dl class="portalMessage info"
tal:define="widget python:view.widgets.get('historical_note')"
tal:condition="widget/value"
><dt tal:content="widget/label"/><dd >
<span tal:replace="structure widget/render" />
</dd></dl>
<div class="field" id="dmskeywords-navigation-narrower-field">
<label i18n:translate="">NT (Narrower Terms)</label>
<br />
<tal:list condition="view/children">
<ul id="" class=""
tal:attributes="id string:form-widgets-children;
class string:contenttree-widget narrowerthesauruskeywords-field;
"><li tal:repeat="value view/children"
><a href="#"
tal:content="value/label"
tal:attributes="href value/url"
/></li
></ul></tal:list>
<em tal:condition="not:view/children"
i18n:translate="">nothing</em>
</div>
</td>
<td id="dmskeywords-navigation-right-column">
<div class="field" id="dmskeywords-navigation-related-field">
<label i18n:translate="">RT (Related Terms)</label>
<br />
<tal:list condition="view/related">
<ul id="" class=""
tal:attributes="id string:form-widgets-related;
class string:contenttree-widget relatedthesauruskeywords-field;
"><li tal:repeat="value view/related"
><a href="#"
tal:content="value/label"
tal:attributes="href value/url"
/></li
></ul></tal:list>
<em tal:condition="not:view/related"
i18n:translate="">nothing</em>
</div>
</td>
</tr>
</table>
</metal:main>
</body>
</html>

View File

@ -1,10 +1,13 @@
.site-Plone.section-th
#dmskeywords-navigation {
float: left;
border: 1px solid gray;
margin: 1em 0;
padding: 1em;
width: 90%;
width: 100%;
}
#dmskeywords-navigation-left-column {
width: 75%;
}
#dmskeywords-navigation h1 {

View File

@ -42,11 +42,11 @@ msgid "NT (Narrower Terms)"
msgstr ""
#: ./dmskeyword.py
msgid "NH (Historical Note)"
msgid "HN (Historical Note)"
msgstr ""
#: ./dmskeyword.py
msgid "NA (Scope Note)"
msgid "SN (Scope Note)"
msgstr ""
#: ./browser/dmskeyword_view.pt

View File

@ -36,11 +36,11 @@ msgid "NT (Narrower Terms)"
msgstr ""
#: ./dmskeyword.py
msgid "NH (Historical Note)"
msgid "HN (Historical Note)"
msgstr ""
#: ./dmskeyword.py
msgid "NA (Scope Note)"
msgid "SN (Scope Note)"
msgstr ""
#: ./browser/dmskeyword_view.pt

View File

@ -40,11 +40,11 @@ msgid "NT (Narrower Terms)"
msgstr "NT (Termes spécifiques)"
#: ./dmskeyword.py
msgid "NH (Historical Note)"
msgid "HN (Historical Note)"
msgstr "NH (Note historique)"
#: ./dmskeyword.py
msgid "NA (Scope Note)"
msgid "SN (Scope Note)"
msgstr "NA (Note d'application)"
#: ./browser/dmskeyword_view.pt