Changeset 332
- Timestamp:
- 04/27/06 09:10:43
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
SimpleBlog/branches/plone-2.1-Blogging-APIs/BlogEntry.py
r331 r332 97 97 i18n_domain = "SimpleBlog", 98 98 description = 'Controls if the Entry (when published) shown as the first Entry. If not checked, the effective date is used.')), 99 100 99 LinesField('sendTrackBackURLs', 101 100 languageIndependent = True, … … 107 106 i18n_domain = "plone")), 108 107 109 108 BooleanField('enableTopAdsence', 109 widget = BooleanWidget(format = 'select', 110 label_msgid = "label_enable_top_adsence", 111 description_msgid = "help_enable_top_adsence", 112 i18n_domain = "SimpleBlog", 113 label = 'Enable top Adsence block', 114 description = None)), 115 StringField('topAdsence', 116 vocabulary = 'listAdesnceTemplates', 117 widget = SelectionWidget(format = 'select', 118 label_msgid = "label_top_adsence", 119 description_msgid = "help_top_adsence", 120 i18n_domain = "SimpleBlog", 121 label = 'Top Adsence', 122 description = None)), 123 BooleanField('enableBottomAdsence', 124 widget = BooleanWidget(format = 'select', 125 label_msgid = "label_enable_bottom_adsence", 126 description_msgid = "help_enable_bottom_adsence", 127 i18n_domain = "SimpleBlog", 128 label = 'Enable bottom Adsence block', 129 description = None)), 130 StringField('bottomAdsence', 131 vocabulary = 'listAdesnceTemplates', 132 widget = SelectionWidget(format = 'select', 133 label_msgid = "label_bottom_adsence", 134 description_msgid = "help_bottom_adsence", 135 i18n_domain = "SimpleBlog", 136 label = 'Bottom Adsence', 137 description = None)), 110 138 )) 111 139 … … 251 279 parent = self.aq_parent 252 280 portal = self.portal_url.getPortalObject() 253 254 281 while parent != portal: 255 282 if parent.portal_type == 'Blog': … … 259 286 return tuple(tags) 260 287 288 def listAdesnceTemplates(self): 289 """ return list of available adsence blocks """ 290 pp = getToolByName(self, 'portal_properties') 291 templates = () 292 try: 293 templates = pp.simpleblog_properties.getProperty('adsence_templates',()) 294 except: 295 pass 296 return templates 297 261 298 registerType(BlogEntry) SimpleBlog/branches/plone-2.1-Blogging-APIs/skins/SimpleBlog/blogentry_view.pt
r331 r332 15 15 <tal:block tal:define="obj python:here"> 16 16 17 18 <div metal:define-macro="full" tal:define="showReadMore python:0">19 20 <tal:block tal:define="size headerSize | python:1;title obj/title_or_id">21 <h1 class="noMargin">22 <img src="#" tal:attributes="src string:${here/portal_url}/${here/getIcon};alt title" />23 <span tal:replace="title"/>24 </h1>17 18 <div metal:define-macro="full" tal:define="showReadMore python:0"> 19 20 <tal:block tal:define="size headerSize | python:1;title obj/title_or_id"> 21 <h1 class="noMargin"> 22 <img src="#" tal:attributes="src string:${here/portal_url}/${here/getIcon};alt title" /> 23 <span tal:replace="title"/> 24 </h1> 25 25 </tal:block> 26 27 <div metal:use-macro="here/document_actions/macros/document_actions"> 28 Document actions (print, sendto etc) 29 </div> 30 31 <div class="documentDescription description" tal:content="structure python:obj.Description()"> 32 description 33 </div> 34 <div tal:replace="structure python:obj.getBody()" /><br/> 26 27 <div metal:use-macro="here/document_actions/macros/document_actions"> 28 Document actions (print, sendto etc) 29 </div> 30 31 <div class="documentDescription description" tal:content="structure python:obj.Description()"> 32 description 33 </div> 34 <div style="float:left;" 35 tal:condition="here/getEnableTopAdsence"> 36 <div tal:define="adsence here/getTopAdsence;" 37 tal:replace="structure python:path('/here/'+adsence)" 38 tal:on-error="string: "></div></div> 39 <div tal:replace="structure python:obj.getBody()" /> 40 <div style="float:left;" 41 tal:condition="here/getEnableBottomAdsence"> 42 <div tal:define="adsence here/getBottomAdsence;" 43 tal:replace="structure python:path('/here/'+adsence)" 44 tal:on-error="string: "></div></div><br/> 35 45 <tal:tags metal:use-macro="obj/SimpleBlog_macros/macros/technoratiTags"/> 36 46 <tal:byLine metal:use-macro="obj/SimpleBlog_macros/macros/ByLineFoot"/> 37 <div tal:define="batch here/getTrackbacks"47 <div tal:define="batch here/getTrackbacks" 38 48 tal:condition="batch" 39 49 id="trackbacks" class="field"> … … 49 59 </div> 50 60 </div> 51 <tal:commandline tal:condition="python:here.portal_type!='BlogEntry'">52 <div metal:use-macro="obj/SimpleBlog_macros/macros/commandLine"/>53 <div metal:use-macro="obj/SimpleBlog_macros/macros/commandLineNonStandard"/>54 </tal:commandline>55 </div>56 <a href="#comments"></a> 61 <tal:commandline tal:condition="python:here.portal_type!='BlogEntry'"> 62 <div metal:use-macro="obj/SimpleBlog_macros/macros/commandLine"/> 63 <div metal:use-macro="obj/SimpleBlog_macros/macros/commandLineNonStandard"/> 64 </tal:commandline> 65 </div> 66 <a href="#comments"></a> 57 67 </tal:block> 58 68 </tal:main-macro>
