Changeset 1708
- Timestamp:
- 25.10.2011 17:46:29 (7 months ago)
- File:
-
- 1 edited
-
ZMS/trunk/ZMSMetaobjManager.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ZMS/trunk/ZMSMetaobjManager.py
r1678 r1708 57 57 attr['custom'] = blob 58 58 elif ob.meta_type in [ 'Page Template']: 59 attr['custom'] = ob.read()59 attr['custom'] = unicode(ob.read()).encode('utf-8') 60 60 elif ob.meta_type in [ 'Script (Python)']: 61 61 attr['custom'] = ob.read() … … 1205 1205 tmpltName = 'Template: %s'%newValue['name'] 1206 1206 tmpltCustom = [] 1207 tmpltCustom.append('< dtml-comment>--// BO %s //--</dtml-comment>\n'%tmpltId)1207 tmpltCustom.append('<!-- %s -->\n'%tmpltId) 1208 1208 tmpltCustom.append('\n') 1209 tmpltCustom.append('<span tal:omit-tag="" tal:define="global\n') 1210 tmpltCustom.append('\t\tzmscontext options/zmscontext">\n') 1209 1211 if newValue['type'] == 'ZMSRecordSet': 1210 tmpltCustom.append(' <h2><dtml-var "getTitlealt(REQUEST)"></h2>\n') 1211 tmpltCustom.append(' <p class="description"><dtml-var "len(getObjProperty(getMetaobj(meta_id)[\'attrs\'][0][\'id\'],REQUEST))"> <dtml-var "getLangStr(\'ATTR_RECORDS\',lang)"></p>\n') 1212 tmpltCustom.append('\t<h2 tal:content="python:zmscontext.getTitlealt(request)">The title.alt</h2>\n') 1213 tmpltCustom.append('\t<p class="description" tal:content="python:\'%i %s\'%(len(zmscontext.attr(zmscontext.getMetaobj(zmscontext.meta_id)[\'attrs\'][0][\'id\'])),zmscontext.getLangStr(\'ATTR_RECORDS\',request[\'lang\']))">#N records</p>\n') 1214 tmpltCustom.append('</span>\n') 1212 1215 tmpltCustom.append('\n') 1213 tmpltCustom.append('< dtml-comment>--// EO %s //--</dtml-comment>\n'%tmpltId)1216 tmpltCustom.append('<!-- /%s -->\n'%tmpltId) 1214 1217 tmpltCustom = ''.join(tmpltCustom) 1215 message += self.setMetaobjAttr(id,None,tmpltId,tmpltName,0,0,0,' DTML Method',[],tmpltCustom)1218 message += self.setMetaobjAttr(id,None,tmpltId,tmpltName,0,0,0,'zpt',[],tmpltCustom) 1216 1219 message += self.getZMILangStr('MSG_INSERTED')%id 1217 1220 # Insert Attribute.
Note: See TracChangeset
for help on using the changeset viewer.
