Changeset 3134 in products for quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/browser/seo_configlet.py
- Timestamp:
- Apr 18, 2011 2:32:21 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.seoptimizer/trunk/quintagroup/seoptimizer/browser/seo_configlet.py
r2889 r3134 27 27 exposeDCMetaTags = Bool( 28 28 title=_("label_exposeDCMetaTags", 29 default='Expose <abbr title="Dublin Core">DC</abbr> meta tags'), 29 default='Expose <abbr title="Dublin Core">DC</abbr> ' \ 30 'meta tags'), 30 31 description=_("description_seo_dc_metatags", 31 default='Controls if <abbr title="Dublin Core">DC</abbr>'32 'metatags are exposed to page header. They include '33 'DC.description, DC.type, DC.format, DC.creator and '34 'others.'),32 default='Controls if <abbr title="Dublin Core">DC</abbr>' 33 ' metatags are exposed to page header. They include ' 34 'DC.description, DC.type, DC.format, DC.creator and ' 35 'others.'), 35 36 default=True, 36 37 required=False) … … 40 41 default='Meta tags order in the page.'), 41 42 description=_("help_metatags_order", 42 default='Fill in meta tags (one per line) in the order in which'43 ' they will appear on site source pages. Example:'44 '"metaname accessor".'),43 default='Fill in meta tags (one per line) in the order ' 44 'in which they will appear on site source pages. ' 45 'Example: "metaname accessor".'), 45 46 required=False) 46 47 … … 56 57 57 58 default_custom_metatags = List( 58 title=_("label_default_custom_metatags", default='Default custom metatags.'), 59 title=_("label_default_custom_metatags", 60 default='Default custom metatags.'), 59 61 description=_("help_default_custom_metatags", 60 default='Fill in custom metatag names (one per line) which will ' 61 'appear on qseo_properties edit tab. Example: ' 62 '"metaname|metacontent" or "metaname".'), 63 required=False) 64 62 default='Fill in custom metatag names (one per line) ' \ 63 'which will appear on qseo_properties edit tab. ' \ 64 'Example: "metaname|metacontent" or "metaname".'), 65 required=False) 65 66 66 67 … … 75 76 76 77 fields = List( 77 title=_("label_fields", default='Fields for keywords statistic calculation.'), 78 description=_("help_fields", 79 default='Fill in filds (one per line) which statistics of keywords usage ' 80 'should be calculated for.'), 78 title=_("label_fields", default='Fields for keywords statistic ' 79 'calculation.'), 80 description=_("help_fields", default='Fill in filds (one per line)' 81 'which statistics of keywords usage should ' 82 'be calculated for.'), 81 83 required=False) 82 84 83 85 stop_words = List( 84 86 title=_("label_stop_words", default='Stop words.'), 85 description=_("help_stop_words", 86 default='Fill in stop words (one per line) which will'87 'be excluded from kewordsstatistics calculation.'),87 description=_("help_stop_words", default='Fill in stop words ' 88 '(one per line) which will be excluded from kewords ' 89 'statistics calculation.'), 88 90 required=False) 89 91 … … 120 122 self.encoding = pprop.site_properties.default_charset 121 123 122 123 124 def getExposeDC(self): 124 125 return self.siteprops.getProperty('exposeDCMetaTags') … … 146 147 147 148 exposeDCMetaTags = property(getExposeDC, setExposeDC) 148 default_custom_metatags = ProxyFieldProperty(ISEOConfigletSchema['default_custom_metatags']) 149 seo_default_custom_metatag = ISEOConfigletSchema['default_custom_metatags'] 150 default_custom_metatags = ProxyFieldProperty(seo_default_custom_metatag) 149 151 metatags_order = ProxyFieldProperty(ISEOConfigletSchema['metatags_order']) 150 152 types_seo_enabled = property(getTypesSEOEnabled, setTypesSEOEnabled) … … 152 154 fields = ProxyFieldProperty(ISEOConfigletSchema['fields']) 153 155 stop_words = ProxyFieldProperty(ISEOConfigletSchema['stop_words']) 154 external_keywords_test = ProxyFieldProperty(ISEOConfigletSchema['external_keywords_test']) 156 seo_external_keywords_test = ISEOConfigletSchema['external_keywords_test'] 157 external_keywords_test = ProxyFieldProperty(seo_external_keywords_test) 155 158 156 159 157 160 class Text2ListWidget(TextAreaWidget): 158 161 height = 5 159 splitter = re.compile(u'\\r?\\n', re.S |re.U)162 splitter = re.compile(u'\\r?\\n', re.S | re.U) 160 163 161 164 def _toFieldValue(self, input): … … 166 169 167 170 def _toFormValue(self, value): 168 if value == self.context.missing_value or value == self.context._type(): 171 if value == self.context.missing_value or \ 172 value == self.context._type(): 169 173 return self._missing 170 174 else: … … 181 185 advancedset.label = _(u'label_seoadvanced', default=u'Advanced') 182 186 187 183 188 class SEOConfiglet(ControlPanelForm): 184 189 185 190 form_fields = FormFieldsets(baseset, advancedset) 191 type_seo_enabled = MultiCheckBoxThreeColumnWidget 186 192 187 193 form_fields['default_custom_metatags'].custom_widget = Text2ListWidget 188 194 form_fields['metatags_order'].custom_widget = Text2ListWidget 189 form_fields['types_seo_enabled'].custom_widget = MultiCheckBoxThreeColumnWidget190 form_fields['types_seo_enabled'].custom_widget.cssClass ='label'195 form_fields['types_seo_enabled'].custom_widget = type_seo_enabled 196 form_fields['types_seo_enabled'].custom_widget.cssClass = 'label' 191 197 form_fields['fields'].custom_widget = Text2ListWidget 192 198 form_fields['stop_words'].custom_widget = Text2ListWidget … … 195 201 description = _("seo_configlet_description", default="You can select what " 196 202 "content types are qSEOptimizer-enabled, and control if " 197 "Dublin Core metatags are exposed in the header of content 198 " pages.")203 "Dublin Core metatags are exposed in the header of content" 204 " pages.") 199 205 form_name = _("")
Note: See TracChangeset
for help on using the changeset viewer.