Skip to content

Commit

Permalink
display_type fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
zmsdev committed Jul 21, 2023
1 parent 94650ea commit ba3a29b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Products/zms/ZMSMetaobjManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ def getMetaobjIds(self, sort=None, excl_ids=[]):
ids = [x for x in ids if x not in excl_ids]
# sort
if sort == True:
ids = sorted(ids,key=lambda x:self.display_type(self.REQUEST, x))
ids = sorted(ids,key=lambda x:self.display_type(meta_id=x))
elif sort == False:
ids = sorted(ids,key=lambda x:obs[x].get('name',x))
return ids
Expand Down
2 changes: 1 addition & 1 deletion Products/zms/_objchildren.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def manage_initObjChild(self, id, type, lang, REQUEST, RESPONSE=None):

# Return with message.
if RESPONSE is not None:
message = self.getZMILangStr('MSG_INSERTED')%obj.display_type(W)
message = self.getZMILangStr('MSG_INSERTED')%obj.display_type(meta_id=obj.meta_id)
message = standard.url_quote(message)
target = REQUEST.get('manage_target', '%s/manage_main'%obj.id)
RESPONSE.redirect('%s?lang=%s&manage_tabs_message=%s'%(target, lang, message))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
if len(titlealt) < 24:
return titlealt
else:
return '%s...'%(titlealt)
return '%s...'%titlealt
else:
return img.getFilename()
except:
return zmscontext.display_type(zmscontext.REQUEST)
return zmscontext.display_type()

# --// EO titlealt //--
4 changes: 2 additions & 2 deletions Products/zms/zmscustom.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def manage_addZMSCustom(self, meta_id, lang, _sort_id, btn, REQUEST, RESPONSE):
# Normalize Sort-Ids
self.normalizeSortIds(id_prefix)
# Message
message = self.getZMILangStr('MSG_INSERTED')%obj.display_type(W)
message = self.getZMILangStr('MSG_INSERTED')%obj.display_type(meta_id=obj.meta_id)
except:
message = standard.writeError(self, "[manage_addZMSCustom]")
messagekey = 'manage_tabs_error_message'
Expand Down Expand Up @@ -679,7 +679,7 @@ def manage_import(self, file, lang, REQUEST, RESPONSE=None):

else:
ob = _importable.importFile( self, file, REQUEST, _importable.importContent)
message = self.getZMILangStr('MSG_IMPORTED')%('<em>%s</em>'%ob.display_type(W))
message = self.getZMILangStr('MSG_IMPORTED')%('<em>%s</em>'%ob.display_type())

# Return with message.
if RESPONSE is not None:
Expand Down
4 changes: 2 additions & 2 deletions Products/zms/zmslinkelement.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,8 @@ def getTitlealt(self, REQUEST):
else:
proxy = self.getProxy()
rtn = self.getTitlealtPROXY( proxy, REQUEST)
if len(rtn) == 0:
rtn = self.display_type(W)
if not rtn:
rtn = self.display_type(meta_id=self.meta_id)
return rtn


Expand Down

0 comments on commit ba3a29b

Please sign in to comment.