Changeset 755 in products
- Timestamp:
- Jan 15, 2007 4:46:55 PM (17 years ago)
- Location:
- qSEOptimizer/branches/js-statistics
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
qSEOptimizer/branches/js-statistics/Extensions/Install.py
r184 r755 6 6 from Products.CMFCore.DirectoryView import addDirectoryViews 7 7 from Products.qSEOptimizer import qSEO_globals 8 from Products.CMFCore.CMFCorePermissions import ManagePortal 8 9 from OFS.ObjectManager import BadRequestException 9 10 11 from Products.CMFPlone.migrations.migration_util import safeEditProperty 10 12 from Products.qSEOptimizer.config import * 11 12 try:13 #for Plone-2.5 and higher14 from Products.CMFCore.permissions import ManagePortal15 except ImportError:16 from Products.CMFCore.CMFCorePermissions import ManagePortal17 13 18 14 configlets = ({'id':'qSEOptimizer', … … 44 40 out.write('Skipped adding %s property sheet to portal_properties\n' % PROPERTY_SHEET) 45 41 sheet = getattr(portal_props, PROPERTY_SHEET) 46 47 if not sheet.hasProperty('stop_words'): 48 sheet._setProperty('stop_words', STOP_WORDS, 'lines') 49 out.write("Added 'stop_words' property field to %s property sheet\n" % PROPERTY_SHEET) 50 51 if not sheet.hasProperty('fields'): 52 sheet._setProperty('fields', FIELDS, 'lines') 53 out.write("Added 'fields' property field to %s property sheet\n" % PROPERTY_SHEET) 54 55 if not sheet.hasProperty('additional_keywords'): 56 sheet._setProperty('additional_keywords', [], 'lines') 57 out.write("Added 'additional_keywords' property field to %s property sheet\n" % PROPERTY_SHEET) 58 59 if not sheet.hasProperty('default_custom_metatags'): 60 sheet._setProperty('default_custom_metatags', DEFAULT_CUSTOM_METATAGS, 'lines') 61 out.write("Added 'default_custom_metatags' property field to %s property sheet\n" % PROPERTY_SHEET) 42 if not hasattr(sheet, 'stop_words'): 43 safeEditProperty(sheet, 'stop_words', STOP_WORDS, 'lines') 44 out.write('Added \'stop_words\' property field to %s property sheet\n' % PROPERTY_SHEET) 45 else: 46 out.write('Skipped adding \'stop_words\' property field to %s property sheet\n' % PROPERTY_SHEET) 47 if not hasattr(sheet, 'fields'): 48 safeEditProperty(sheet, 'fields', FIELDS, 'lines') 49 out.write('Added \'fields\' property field to %s property sheet\n' % PROPERTY_SHEET) 50 else: 51 out.write('Skipped adding \'fields\' property field to %s property sheet\n' % PROPERTY_SHEET) 62 52 63 53 def setupSkin(self, out, layers): … … 93 83 for l in original_path: 94 84 if (l == layer) or (l.startswith(layer+'/')): 95 85 continue 96 86 new_path.append(l) 97 87 skinstool.addSkinSelection(skinName, ','.join(new_path)) … … 104 94 if ptype.getId() in qSEO_TYPES: 105 95 #add the action for viewing versioning 106 try: 107 #for Plone-2.5 and higher 108 acts = filter(lambda x: x.id == 'seo_properties', ptype.listActions()) 109 action = acts and acts[0] or None 110 except AttributeError: 111 action = ptype.getActionById('seo_properties', default=None ) 112 96 action = ptype.getActionById( 'seo_properties', default=None ) 113 97 if action is None: 114 98 out.write( ' Added SEO Properties tab for %s\n' % ptype.getId() ) 115 ptype.addAction( 'seo_properties' ,116 'SEO Properties',117 'string:${object_url}/qseo_properties_edit_form',118 '',119 'Modify portal content',120 'object',121 99 ptype.addAction( 'seo_properties' 100 , 'SEO Properties' 101 , 'string:${object_url}/qseo_properties_edit_form' 102 , '' 103 , 'Modify portal content' 104 , 'object' 105 , visible=1 122 106 ) 123 107 def removeActions(self): … … 127 111 if ptype.getId() in qSEO_TYPES: 128 112 #delet the action for viewing versioning 129 try: 130 #for Plone-2.5 and higher 131 acts = filter(lambda x: x.id == 'seo_properties', ptype.listActions()) 132 action = acts and acts[0] or None 133 except AttributeError: 134 action = ptype.getActionById('seo_properties', default=None ) 113 action = ptype.getActionById( 'seo_properties', default=None ) 135 114 if action != None: 136 115 acts = list(ptype.listActions()) … … 157 136 out.write('found.\n') 158 137 Layers.append('qSEOptimizer/%s' % plone_version) 159 elif str(plone_version) < "3": 160 out.write("not found.\nLimited functionality mode. Upgrade" 161 "qSEOptimizer product or report to support@quintagroup.com" 162 "if uprade not available.\n\n") 138 else: 139 out.write("""not found.\nLimited functionality mode. Upgrade qSEOptimizer product or report to support@quintagroup.com if uprade not available.\n\n""") 163 140 out.write('Call setupSkin... \n') 164 141 setupSkin(self, out, Layers) -
qSEOptimizer/branches/js-statistics/skins/qSEOptimizer/qseo_properties_edit_form.cpt
r63 r755 7 7 <tal:border define="dummy python:request.set('enable_border',1)" /> 8 8 </metal:border> 9 <metal:style_head fill-slot="style_slot">10 <style type="text/css">11 tr.datagridwidget-empty-row {12 display:none;13 }14 </style>15 </metal:style_head>16 9 <metal:javascript_head fill-slot="javascript_head_slot"> 17 10 <script type="text/javascript" 18 11 tal:condition="python:exists('portal/statistics.js')" 19 tal:attributes="src string:${here/absolute_url}/statistics.js"> 20 </script> 21 <script type="text/javascript" 22 tal:condition="python:exists('portal/checkkeywords.js')" 23 tal:attributes="src string:${here/absolute_url}/checkkeywords.js"> 24 </script> 25 <script type="text/javascript" 26 tal:condition="python:exists('portal/custommetatags.js')" 27 tal:attributes="src string:${here/absolute_url}/custommetatags.js"> 12 tal:attributes="src string:$portal_url/statistics.js"> 28 13 </script> 29 14 </metal:javascript_head> … … 79 64 80 65 <input type="text" 81 id=" seo_title"66 id="title" 82 67 name="title" 83 68 size="40" … … 115 100 <textarea 116 101 type="text" 117 id=" seo_description"102 id="description" 118 103 name="description" 119 104 rows="5" … … 153 138 154 139 <textarea 155 id=" seo_keywords"140 id="keywords" 156 141 name="keywords:lines" 157 142 rows="11" … … 187 172 188 173 <textarea 189 id=" seo_html_comment"174 id="html_comment" 190 175 name="html_comment" 191 176 rows="5" … … 220 205 221 206 <input type="text" 222 id=" seo_robots"207 id="robots" 223 208 name="robots" 224 209 size="25" … … 253 238 254 239 <input type="text" 255 id=" seo_distribution"240 id="distribution" 256 241 name="distribution" 257 242 size="25" … … 261 246 tabindex tabindex/next;" 262 247 /> 263 </div>264 265 <div class="field"266 tal:define="fieldName string:custommetatags;">267 <label i18n:translate="label_custom_metatags" for="custom_metatags">268 Custom Meta Tags269 </label>270 271 <div class="formHelp" i18n:translate="help_seo_custommetatags">272 Here you can manage your custom meta tags.273 </div>274 275 <table class="custom-metatags-table"276 id="datagridwidget-table-custommetatags"277 style="width: 100%"278 tal:define="columnNames python:['meta name', 'meta content'];279 columnIds python:['meta_name', 'meta_content'];280 fielddata context/qSEO_CustomMetaTags|python:[];">281 <thead>282 <tr>283 <th class="discreet" style="text-align: left"284 tal:repeat="columnName columnNames"285 tal:content="columnName"286 i18n:translate="">Column name</th>287 <th />288 <th />289 </tr>290 </thead>291 <tbody id="datagridwidget-tbody-custommetatags">292 <tal:row-loop tal:repeat="row fielddata">293 <tr id="datagridwidget-row">294 <tal:vars define="fieldId string:${fieldName}_${repeat/row/number}">295 <td class="datagridwidget-cell"296 tal:repeat="column columnIds">297 <tal:cell tal:define="cell_value python:row.get(column);">298 <input type="text"299 id="columnId_fieldId"300 value=""301 name="fieldId.columnId:records"302 style="width: 100%;"303 tal:attributes="name string:${fieldName}.${column}:records;304 id string:${column}_${fieldId};305 value cell_value"/>306 </tal:cell>307 </td>308 <td class="datagridwidget-manipulator">309 <img alt="Delete row"310 onclick="customMetaTagsFunctions.removeFieldRow(this);return false"311 tal:attributes="src string:${portal_url}/delete_icon.gif;" />312 </td>313 <td class="datagridwidget-hidden-data">314 <input type="hidden"315 tal:attributes="name string:${fieldName}.orderindex_:records;316 id string:orderindex__${fieldId};317 value repeat/row/number;" />318 </td>319 </tal:vars>320 </tr>321 </tal:row-loop>322 <tr id="datagridwidget-empty-row"323 class="datagridwidget-empty-row"324 tal:define="fieldId string:${fieldName}_new">325 <td class="datagridwidget-cell"326 tal:repeat="column columnIds">327 <span>328 <input type="text"329 id="columnId_fieldName_new"330 value=""331 name="fieldName.columnId:records"332 style="width: 100%;"333 tal:attributes="id string:${column}_${fieldName}_new;334 name string:${fieldName}.${column}:records;" />335 </span>336 </td>337 <td class="datagridwidget-manipulator">338 <img alt="Delete row"339 onclick="customMetaTagsFunctions.removeFieldRow(this);return false"340 tal:attributes="src string:${portal_url}/delete_icon.gif;" />341 </td>342 <td class="datagridwidget-hidden-data">343 <input type="hidden"344 value="template_row_marker"345 tal:attributes="name string:${fieldName}.orderindex_:records;346 id string:orderindex__${fieldId};" />347 </td>348 </tr>349 </tbody>350 </table>351 352 <input type="button"353 class="datagridwidget-add-button"354 id="datagridwidget-add-button"355 value="Add new row"356 tal:attributes="onclick string:customMetaTagsFunctions.addRow('${fieldName}')" />357 358 248 </div> 359 249 -
qSEOptimizer/branches/js-statistics/version.txt
r614 r755 1 1.6.1 1 0.4.1-stats
Note: See TracChangeset
for help on using the changeset viewer.