Skip to content

Commit

Permalink
ZMSIndex: reindex missing nodes (UniBE)
Browse files Browse the repository at this point in the history
svn path=/ZMS/branches/zms4/; revision=5922
  • Loading branch information
zmsdev committed Nov 1, 2020
1 parent 61d8874 commit 74060ed
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
7 changes: 4 additions & 3 deletions Products/zms/import/com.zms.foundation-4.0.0.metaobj.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1855,8 +1855,9 @@ return ''
<dictionary>
<item key="custom"><![CDATA[<!-- ZMSGraphic.standard_html -->
<tal:block tal:define="global
zmscontext options/zmscontext;
<tal:block tal:define="
standard modules/Products/zms/standard;
zmscontext options/zmscontext;
subclass python:[zmscontext.meta_id];
text python:zmscontext.getText(request);
format python:zmscontext.attr('format');
Expand All @@ -1868,7 +1869,7 @@ return ''
imgurl python:zmscontext.getLinkUrl(zmscontext.attr('attr_url'),request);
isimghires python:zmscontext.attr('imghires');
imgthumb python:request['URL'].find('/manage')>0;
imgspecial python:zmscontext.attr('img_attrs_spec')">
imgspecial python:standard.pystr(zmscontext.attr('img_attrs_spec'));">
<tal:block tal:condition="python:imgurl and isimghires">
<tal:block
tal:define="global text python:text+'\n<span class=\042imgurl\042>'+zmscontext.getLangStr('HREF_MORE',request['lang'])%(' href=\042%s\042'%imgurl)+'</span>';
Expand Down
4 changes: 2 additions & 2 deletions Products/zms/import/default.metacmd.xml
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ invalid syntax (PythonExpr, line 1) in expression u"python:[[x,here.display_type
</html>]]>
</item>
<item key="description"></item>
<item key="execution" type="int">False</item>
<item key="execution" type="int">0</item>
<item key="icon_clazz"><![CDATA[fas fa-cogs]]></item>
<item key="id"><![CDATA[manage_tab_search]]></item>
<item key="meta_type"><![CDATA[Page Template]]></item>
Expand Down Expand Up @@ -289,7 +289,7 @@ invalid syntax (PythonExpr, line 1) in expression u"python:[[x,here.display_type
</html>]]>
</item>
<item key="description"></item>
<item key="execution" type="int">False</item>
<item key="execution" type="int">0</item>
<item key="icon_clazz"><![CDATA[fas fa-cogs]]></item>
<item key="id"><![CDATA[manage_tab_tasks]]></item>
<item key="meta_type"><![CDATA[Page Template]]></item>
Expand Down
1 change: 1 addition & 0 deletions Products/zms/standard.py
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,7 @@ def set_session_value(context, key, value):
return value


security.declarePublic('triggerEvent')
def triggerEvent(context, *args, **kwargs):
"""
Hook for trigger of custom event (if there is one)
Expand Down
17 changes: 14 additions & 3 deletions Products/zms/zpt/ZMSObject/input_fields.zpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<!-- ZMSObject/input_fields -->
<tal:block tal:define="global

<tal:block tal:define="
standard modules/Products.zms/standard;
action options/action;
meta_id options/meta_id;
dummy0 python:request.set('ZMS_HIDE_ELEMENTS',[]);
Expand Down Expand Up @@ -66,8 +68,17 @@
<span title="This Node Contains ..." tal:content="python:'%i %s'%(len(here.getChildNodes(request)),here.getZMILangStr('ATTR_OBJECTS'))">%i Objects</span>,
<span title="Data Size" class="get_size" tal:content="python:here.getDataSizeStr(here.get_size())">%i Bytes</span>,
<span title="Unique ID: Click to Clipboard Copy" class="get_uid"
tal:attributes="onclick python:'$ZMI.CopyToClipboard(\'{$%s}\')'%(here.get_uid())"
tal:content="python:'ID:%s'%(here.get_uid())">unique-id</span>
tal:define="
cataloged python:here.getLinkObj('{$%s}'%here.get_uid()) is not None;"
tal:attributes="
onclick python:'$ZMI.CopyToClipboard(\'{$%s}\')'%(here.get_uid());
class python:' '.join(['get_uid']+[['text-danger'],[]][cataloged]);">
<tal:block tal:condition="not:cataloged">
<tal:block tal:define="dummy0 python:standard.triggerEvent(here,'*.ObjectAdded')">
<i class="text-danger fas fa-ambulance"></i>
</tal:block>
</tal:block>
<tal:block tal:content="python:'ID:%s'%(here.get_uid())">unique-id</tal:block></span>
</span>
</div><!-- .col-sm-8 -->
</div><!-- .form-group -->
Expand Down

0 comments on commit 74060ed

Please sign in to comment.