show lightbox for links on images that do not lead to a child concept; provide info icon for resources that have the 'showInfo' flag set

This commit is contained in:
Helmut Merz 2011-10-07 20:56:57 +02:00
parent 26472a280e
commit c2410a830e
4 changed files with 40 additions and 4 deletions

View file

@ -547,6 +547,12 @@
class="loops.browser.node.ObjectInfo" class="loops.browser.node.ObjectInfo"
permission="zope.View" /> permission="zope.View" />
<page
name="meta_info.html"
for="loops.interfaces.INode"
class="loops.browser.node.MetaInfo"
permission="zope.View" />
<page <page
name="create_object.html" name="create_object.html"
for="loops.interfaces.INode" for="loops.interfaces.INode"

View file

@ -38,7 +38,29 @@
</tr> </tr>
<tr tal:repeat="info item/additionalInfos"> <tr tal:repeat="info item/additionalInfos">
<td><span i18n:translate="" <td><span i18n:translate=""
tal:content="info/label">Creators</span>:</td> tal:content="info/label">Meta</span>:</td>
<td tal:content="structure info/value"></td>
</tr>
<tr>
<td colspan="2"><br />
<input type="button" value="Close" onclick="closeDialog()"
i18n:attributes="value" />
</td>
</tr>
</table>
</metal:info>
<metal:info define-macro="meta_info"
tal:define="item nocall:view/item">
<table class="object_info" width="400">
<tr>
<td colspan="2">
<h2 tal:content="item/title">Information</h2></td>
</tr>
<tr tal:repeat="info item/additionalInfos">
<td><span i18n:translate=""
tal:content="info/label">Meta</span>:</td>
<td tal:content="structure info/value"></td> <td tal:content="structure info/value"></td>
</tr> </tr>
<tr> <tr>
@ -48,5 +70,4 @@
</td> </td>
</tr> </tr>
</table> </table>
</metal:info> </metal:info>

View file

@ -50,7 +50,7 @@
tal:attributes="class python:part.cssClass[0]"> tal:attributes="class python:part.cssClass[0]">
<metal:image use-macro="item/macros/image" /> <metal:image use-macro="item/macros/image" />
<span tal:condition="cell/img/showInfo|nothing"> <span tal:condition="cell/img/showInfo|nothing">
<a tal:define="url string:${cell/img/url}/object_info.html" <a tal:define="url string:${cell/img/url}/meta_info.html"
tal:attributes="href url; tal:attributes="href url;
onclick string:objectDialog('', '$url');; onclick string:objectDialog('', '$url');;
return false"> return false">
@ -82,7 +82,7 @@
<div class="legend"> <div class="legend">
<b tal:content="cell/title" /> <b tal:content="cell/title" />
<span tal:condition="cell/img/showInfo|nothing"> <span tal:condition="cell/img/showInfo|nothing">
<a tal:define="url string:${cell/img/url}/object_info.html" <a tal:define="url string:${cell/img/url}/meta_info.html"
tal:attributes="href url; tal:attributes="href url;
onclick string:objectDialog('', '$url');; onclick string:objectDialog('', '$url');;
return false"> return false">

View file

@ -607,6 +607,15 @@ class ObjectInfo(NodeView):
return self.request.get('dialog', 'object_info') return self.request.get('dialog', 'object_info')
class MetaInfo(ObjectInfo):
__call__ = innerHtml
@Lazy
def macro(self):
return self.macros['meta_info']
class InlineEdit(NodeView): class InlineEdit(NodeView):
""" Provides inline editor as inner HTML""" """ Provides inline editor as inner HTML"""