[1460] | 1 | <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" |
---|
| 2 | xmlns:metal="http://xml.zope.org/namespaces/metal" |
---|
| 3 | xmlns:tal="http://xml.zope.org/namespaces/tal" |
---|
| 4 | lang="en-US" |
---|
| 5 | metal:use-macro="here/main_template/macros/master" |
---|
[1463] | 6 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
---|
[1460] | 7 | i18n:domain="quintagroup.seoptimizer"> |
---|
| 8 | <metal:border fill-slot="top_slot"> |
---|
| 9 | <tal:border define="dummy python:request.set('enable_border',1)" /> |
---|
| 10 | </metal:border> |
---|
| 11 | <metal:style_head fill-slot="style_slot"> |
---|
| 12 | <style type="text/css"> |
---|
| 13 | tr.datagridwidget-empty-row { |
---|
| 14 | display:none; |
---|
| 15 | } |
---|
| 16 | </style> |
---|
| 17 | </metal:style_head> |
---|
| 18 | <metal:javascript_head fill-slot="javascript_head_slot"> |
---|
| 19 | <script type="text/javascript" |
---|
| 20 | tal:condition="python:exists('portal/statistics.js')" |
---|
| 21 | tal:attributes="src string:${here/absolute_url}/statistics.js"> |
---|
| 22 | </script> |
---|
| 23 | <script type="text/javascript" |
---|
| 24 | tal:condition="python:exists('portal/checkkeywords.js')" |
---|
| 25 | tal:attributes="src string:${here/absolute_url}/checkkeywords.js"> |
---|
| 26 | </script> |
---|
| 27 | <script type="text/javascript" |
---|
| 28 | tal:condition="python:exists('portal/seo_custommetatags.js')" |
---|
| 29 | tal:attributes="src string:${here/absolute_url}/seo_custommetatags.js"> |
---|
| 30 | </script> |
---|
| 31 | </metal:javascript_head> |
---|
| 32 | <body> |
---|
| 33 | <div metal:fill-slot="main" |
---|
| 34 | tal:define="errors python:request.get('errors', {})"><!--TODO:implement validation and errors handling--> |
---|
| 35 | <h1 i18n:translate="heading_edit_seo_properties">Edit SEO Properties</h1> |
---|
| 36 | <div class="documentDescription" i18n:translate="description_edit_seo_properties"> |
---|
| 37 | This form allows you to edit html header meta tags that are produced by |
---|
| 38 | Plone CMS to incrase Search Engine visibility. The values generated by |
---|
| 39 | Plone are present as default values in input fields. To override default |
---|
| 40 | value, check corresponding checkbox and input value itself in the |
---|
| 41 | corresponding field. |
---|
| 42 | </div> |
---|
| 43 | <form name="edit_form" action="." method="post" enctype="multipart/form-data" |
---|
| 44 | tal:attributes="action string:${context/absolute_url}/@@seo-context-properties" > |
---|
| 45 | <!-- <form name="edit_form" |
---|
| 46 | action="" |
---|
| 47 | method="post" |
---|
| 48 | tal:attributes="action string:${here/absolute_url}/${template/getId}">--> |
---|
| 49 | <fieldset> |
---|
| 50 | <legend i18n:domain="plone" i18n:translate="legend_item_properties"> |
---|
| 51 | Item Properties |
---|
| 52 | </legend> |
---|
| 53 | |
---|
| 54 | <div class="field"> |
---|
| 55 | <label i18n:translate="label_page_title_tag" for="seo_title"> |
---|
| 56 | Page Title Tag |
---|
| 57 | </label> |
---|
| 58 | <div class="formHelp" i18n:translate="help_seo_title"> |
---|
| 59 | Text to be present in <TITLE> tag. It is displayed in |
---|
| 60 | browser title bar. Search engines display it as a title of the |
---|
| 61 | document. |
---|
| 62 | </div> |
---|
| 63 | <input type="checkbox" |
---|
| 64 | id="seo_title_override" |
---|
| 65 | name="seo_title_override" |
---|
| 66 | tabindex="" |
---|
| 67 | tal:attributes="checked python:view.test(here.hasProperty('qSEO_title'), 'on', None); |
---|
| 68 | tabindex tabindex/next;" |
---|
| 69 | /> |
---|
| 70 | <label i18n:translate="label_override" for="seo_title_override"> |
---|
| 71 | Override |
---|
| 72 | </label> |
---|
| 73 | <br /> |
---|
| 74 | <input type="text" |
---|
| 75 | id="seo_title" |
---|
| 76 | name="seo_title" |
---|
| 77 | size="40" |
---|
| 78 | value="" |
---|
| 79 | tabindex="" |
---|
| 80 | tal:attributes="value request/seo_title | here/@@seo_context/seo_title; |
---|
| 81 | tabindex tabindex/next;" |
---|
| 82 | /> |
---|
| 83 | </div> |
---|
| 84 | <div class="field"> |
---|
| 85 | <label i18n:translate="label_meta_description_tag" for="seo_description"> |
---|
| 86 | Meta Description Tag |
---|
| 87 | </label> |
---|
| 88 | <div class="formHelp" i18n:translate="help_seo_description"> |
---|
| 89 | Description of the document to be indexed by Search Engines. This text will be present in meta description tag in page HTML source. |
---|
| 90 | </div> |
---|
| 91 | <input type="checkbox" |
---|
| 92 | id="seo_description_override" |
---|
| 93 | name="seo_description_override" |
---|
| 94 | tabindex="" |
---|
| 95 | tal:attributes="checked python:view.test(here.hasProperty('qSEO_description'), 'on', None); |
---|
| 96 | tabindex tabindex/next;" |
---|
| 97 | /> |
---|
| 98 | <label i18n:translate="label_override" for="seo_description_override"> |
---|
| 99 | Override |
---|
| 100 | </label> |
---|
| 101 | <br /> |
---|
| 102 | <textarea type="text" |
---|
| 103 | id="seo_description" |
---|
| 104 | name="seo_description" |
---|
| 105 | rows="5" |
---|
| 106 | cols="15" |
---|
| 107 | tabindex="" |
---|
| 108 | tal:attributes="tabindex tabindex/next;" |
---|
| 109 | tal:content="request/seo_description | here/@@seo_context/seo_description" |
---|
| 110 | /> |
---|
| 111 | </div> |
---|
| 112 | <div class="field"> |
---|
| 113 | <label i18n:translate="label_meta_keywords_tag" for="seo_keywords"> |
---|
| 114 | Meta Keywords Tag |
---|
| 115 | </label> |
---|
| 116 | <div class="formHelp" i18n:translate="help_seo_keywords"> |
---|
| 117 | Keywords, the page will be indexed with. |
---|
| 118 | <strong>Enter each keyword in separate line, please.</strong> |
---|
| 119 | Though the relevance of listing meta keywords is of |
---|
| 120 | questionable value now, it is useful to set meta keywords for |
---|
[1556] | 121 | pages - for future reference. |
---|
[1460] | 122 | </div> |
---|
| 123 | <input type="checkbox" |
---|
| 124 | id="seo_keywords_override" |
---|
| 125 | name="seo_keywords_override" |
---|
| 126 | tabindex="" |
---|
| 127 | tal:attributes="checked python:view.test(here.hasProperty('qSEO_keywords'), 'on', None); |
---|
| 128 | tabindex tabindex/next;" |
---|
| 129 | /> |
---|
| 130 | <label i18n:translate="label_override" for="seo_keywords_override"> |
---|
| 131 | Override |
---|
| 132 | </label> |
---|
| 133 | <br /> |
---|
| 134 | <textarea id="seo_keywords" |
---|
| 135 | name="seo_keywords:lines" |
---|
| 136 | rows="11" |
---|
| 137 | cols="15" |
---|
| 138 | wrap="off" |
---|
| 139 | tabindex="" |
---|
| 140 | tal:attributes="tabindex tabindex/next;" |
---|
| 141 | tal:define="keywords request/seo_keywords | here/@@seo_context/seo_keywords" |
---|
| 142 | tal:content="python:'\n'.join(keywords)" |
---|
| 143 | /> |
---|
| 144 | <br /> |
---|
| 145 | </div> |
---|
| 146 | <div class="field"> |
---|
| 147 | <label i18n:translate="label_html_comment" for="seo_html_commment"> |
---|
| 148 | HTML Comment |
---|
| 149 | </label> |
---|
| 150 | <div class="formHelp" i18n:translate="help_seo_html_comment"> |
---|
| 151 | Comments embedded into HTML header. |
---|
| 152 | </div> |
---|
| 153 | <input type="checkbox" |
---|
| 154 | id="seo_html_comment_override" |
---|
| 155 | name="seo_html_comment_override" |
---|
| 156 | tabindex="" |
---|
| 157 | tal:attributes="checked python:view.test(here.hasProperty('qSEO_html_comment'), 'on', None); |
---|
| 158 | tabindex tabindex/next;" |
---|
| 159 | /> |
---|
| 160 | <label i18n:translate="label_override" for="seo_html_comment_override"> |
---|
| 161 | Override |
---|
| 162 | </label> |
---|
| 163 | <br /> |
---|
| 164 | <textarea id="seo_html_comment" |
---|
| 165 | name="seo_html_comment" |
---|
| 166 | rows="5" |
---|
| 167 | cols="15" |
---|
| 168 | tabindex="" |
---|
| 169 | tal:attributes="tabindex tabindex/next;" |
---|
| 170 | tal:content="request/seo_html_comment | here/@@seo_context/seo_html_comment" |
---|
| 171 | /> |
---|
| 172 | </div> |
---|
| 173 | <div class="field"> |
---|
| 174 | <label i18n:translate="label_robot_tag" for="seo_robots"> |
---|
| 175 | Robot Tag |
---|
| 176 | </label> |
---|
| 177 | <div class="formHelp" i18n:translate="help_seo_robots"> |
---|
| 178 | Robots meta tag value. Allows or denies indexing, following |
---|
| 179 | links, etc. for spiders indexing your content. |
---|
| 180 | </div> |
---|
| 181 | <input type="checkbox" |
---|
| 182 | id="seo_robots_override" |
---|
| 183 | name="seo_robots_override" |
---|
| 184 | tabindex="" |
---|
| 185 | tal:attributes="checked python:view.test(here.hasProperty('qSEO_robots'), 'on', None); |
---|
| 186 | tabindex tabindex/next;" |
---|
| 187 | /> |
---|
| 188 | <label i18n:translate="label_override" for="seo_robots_override"> |
---|
| 189 | Override |
---|
| 190 | </label> |
---|
| 191 | <br /> |
---|
| 192 | <input type="text" |
---|
| 193 | id="seo_robots" |
---|
| 194 | name="seo_robots" |
---|
| 195 | size="25" |
---|
| 196 | value="" |
---|
| 197 | tabindex="" |
---|
| 198 | tal:attributes="value request/seo_robots | here/@@seo_context/seo_robots; |
---|
| 199 | tabindex tabindex/next;" |
---|
| 200 | /> |
---|
| 201 | </div> |
---|
| 202 | <div class="field"> |
---|
| 203 | <label i18n:translate="label_distribution_tag" for="seo_distribution"> |
---|
| 204 | Distribution Tag |
---|
| 205 | </label> |
---|
| 206 | <div class="formHelp" i18n:translate="help_seo_distribution"> |
---|
[1556] | 207 | Distribution meta tag to designate time and area distribution |
---|
[1460] | 208 | of the document. |
---|
| 209 | </div> |
---|
| 210 | <input type="checkbox" |
---|
| 211 | id="seo_distribution_override" |
---|
| 212 | name="seo_distribution_override" |
---|
| 213 | tabindex="" |
---|
| 214 | tal:attributes="checked python:view.test(here.hasProperty('qSEO_distribution'), 'on', None); |
---|
| 215 | tabindex tabindex/next;" |
---|
| 216 | /> |
---|
| 217 | <label i18n:translate="label_override" for="seo_distribution_override"> |
---|
| 218 | Override |
---|
| 219 | </label> |
---|
| 220 | <br /> |
---|
| 221 | <input type="text" |
---|
| 222 | id="seo_distribution" |
---|
| 223 | name="seo_distribution" |
---|
| 224 | size="25" |
---|
| 225 | value="" |
---|
| 226 | tabindex="" |
---|
| 227 | tal:attributes="value request/seo_distribution | here/@@seo_context/seo_distribution; |
---|
| 228 | tabindex tabindex/next;" |
---|
| 229 | /> |
---|
| 230 | </div> |
---|
| 231 | <div class="field" |
---|
| 232 | tal:define="error errors/seo_canonical|nothing;" |
---|
| 233 | tal:attributes="class python:view.test(error, 'field error', 'field')"> |
---|
| 234 | <label i18n:translate="label_canonical_tag" for="seo_canonical"> |
---|
| 235 | Canonical URL |
---|
| 236 | </label> |
---|
| 237 | <div class="formHelp" i18n:translate="help_seo_canonical"> |
---|
| 238 | Specify your canonical URL. |
---|
| 239 | If your site has identical or vastly similar content that's accessible through multiple URLs, |
---|
| 240 | this format provides you with more control over the URL returned in search results. |
---|
| 241 | </div> |
---|
| 242 | <input type="checkbox" |
---|
| 243 | id="seo_canonical_override" |
---|
| 244 | name="seo_canonical_override" |
---|
| 245 | tabindex="" |
---|
| 246 | tal:attributes="checked python:view.test(here.hasProperty('qSEO_canonical'), 'on', None); |
---|
| 247 | tabindex tabindex/next;" |
---|
| 248 | /> |
---|
| 249 | <label i18n:translate="label_override" for="seo_canonical_override"> |
---|
| 250 | Override |
---|
| 251 | </label> |
---|
| 252 | <br /> |
---|
| 253 | <div tal:content="error">Validation error output</div> |
---|
| 254 | <input type="text" |
---|
| 255 | id="seo_canonical" |
---|
| 256 | name="seo_canonical" |
---|
| 257 | size="55" |
---|
| 258 | value="" |
---|
| 259 | tabindex="" |
---|
| 260 | tal:attributes="value request/seo_canonical | here/@@seo_context/seo_canonical; |
---|
| 261 | tabindex tabindex/next;" |
---|
| 262 | /> |
---|
| 263 | </div> |
---|
| 264 | <div class="field" |
---|
| 265 | tal:define="fieldName string:seo_custommetatags; |
---|
| 266 | nonEmptylocalMetaTags here/@@seo_context/seo_nonEmptylocalMetaTags;"> |
---|
| 267 | <label i18n:translate="label_custom_metatags" for="seo_custom_metatags"> |
---|
| 268 | Custom Meta Tags |
---|
| 269 | </label> |
---|
| 270 | <div class="formHelp" i18n:translate="help_seo_custommetatags"> |
---|
| 271 | Here you can manage your custom meta tags. Specify local Meta Tags parameters to be added to the global Meta Tags. |
---|
| 272 | If metacontent field is empty, then a meta tag will not be present on this page. |
---|
| 273 | </div> |
---|
| 274 | <input type="checkbox" |
---|
| 275 | id="seo_custommetatags_override" |
---|
| 276 | name="seo_custommetatags_override" |
---|
| 277 | tabindex="" |
---|
| 278 | tal:attributes="checked python:view.test(nonEmptylocalMetaTags, 'on', None); |
---|
| 279 | tabindex tabindex/next;" |
---|
| 280 | /> |
---|
| 281 | <label i18n:translate="label_override" for="seo_custommetatags_override"> |
---|
| 282 | Override |
---|
| 283 | </label> |
---|
| 284 | <br /> |
---|
| 285 | <table class="custom-metatags-table" |
---|
| 286 | id="datagridwidget-table-seo_custommetatags" |
---|
| 287 | style="width: 100%" |
---|
| 288 | tal:define="columnNames python:['meta name', 'meta content']; |
---|
| 289 | columnIds python:['meta_name', 'meta_content']; |
---|
| 290 | globalMT here/@@seo_context/seo_globalWithoutLocalCustomMetaTags; |
---|
| 291 | localMT here/@@seo_context/seo_localCustomMetaTags;"> |
---|
| 292 | <thead> |
---|
| 293 | <tr> |
---|
| 294 | <th class="discreet" style="text-align: left" |
---|
| 295 | tal:repeat="columnName columnNames" |
---|
| 296 | tal:content="columnName" |
---|
| 297 | i18n:translate="">Column name</th> |
---|
| 298 | <th /> |
---|
| 299 | <th /> |
---|
| 300 | </tr> |
---|
| 301 | </thead> |
---|
| 302 | <tbody id="datagridwidget-tbody-seo_custommetatags"> |
---|
| 303 | <tal:row-loop tal:repeat="row globalMT"> |
---|
| 304 | <tr id="datagridwidget-row"> |
---|
| 305 | <tal:vars define="fieldId string:${fieldName}_${repeat/row/number}"> |
---|
| 306 | <td class="datagridwidget-cell" |
---|
| 307 | tal:repeat="column columnIds"> |
---|
| 308 | <tal:cell tal:define="cell_value python:row.get(column);"> |
---|
| 309 | <input type="text" |
---|
| 310 | id="columnId_fieldId" |
---|
| 311 | value="" |
---|
| 312 | name="fieldId.columnId:records" |
---|
| 313 | style="width: 100%;" |
---|
| 314 | tal:attributes="name string:${fieldName}.${column}:records; |
---|
| 315 | id string:${column}_${fieldId}; |
---|
| 316 | value cell_value"/> |
---|
| 317 | </tal:cell> |
---|
| 318 | </td> |
---|
| 319 | </tal:vars> |
---|
| 320 | </tr> |
---|
| 321 | </tal:row-loop> |
---|
| 322 | <tal:row-loop tal:repeat="row localMT"> |
---|
| 323 | <tr id="datagridwidget-row"> |
---|
| 324 | <tal:vars define="fieldId string:${fieldName}_${repeat/row/number}"> |
---|
| 325 | <td class="datagridwidget-cell" |
---|
| 326 | tal:repeat="column columnIds"> |
---|
| 327 | <tal:cell tal:define="cell_value python:row.get(column);"> |
---|
| 328 | <input type="text" |
---|
| 329 | id="columnId_fieldId" |
---|
| 330 | value="" |
---|
| 331 | name="fieldId.columnId:records" |
---|
| 332 | style="width: 100%;" |
---|
| 333 | tal:attributes="name string:${fieldName}.${column}:records; |
---|
| 334 | id string:${column}_${fieldId}; |
---|
| 335 | value cell_value"/> |
---|
| 336 | </tal:cell> |
---|
| 337 | </td> |
---|
| 338 | <td class="datagridwidget-manipulator"> |
---|
| 339 | <img alt="Delete row" |
---|
| 340 | onclick="customMetaTagsFunctions.removeFieldRow(this);return false" |
---|
| 341 | tal:attributes="src string:${portal_url}/delete_icon.gif;" /> |
---|
| 342 | </td> |
---|
| 343 | <td class="datagridwidget-hidden-data"> |
---|
| 344 | <input type="hidden" |
---|
| 345 | tal:attributes="name string:${fieldName}.orderindex_:records; |
---|
| 346 | id string:orderindex__${fieldId}; |
---|
| 347 | value repeat/row/number;" /> |
---|
| 348 | </td> |
---|
| 349 | </tal:vars> |
---|
| 350 | </tr> |
---|
| 351 | </tal:row-loop> |
---|
| 352 | <tr id="datagridwidget-empty-row" |
---|
| 353 | class="datagridwidget-empty-row" |
---|
| 354 | tal:define="fieldId string:${fieldName}_new"> |
---|
| 355 | <td class="datagridwidget-cell" |
---|
| 356 | tal:repeat="column columnIds"> |
---|
| 357 | <span> |
---|
| 358 | <input type="text" |
---|
| 359 | id="columnId_fieldName_new" |
---|
| 360 | value="" |
---|
| 361 | name="fieldName.columnId:records" |
---|
| 362 | style="width: 100%;" |
---|
| 363 | tal:attributes="id string:${column}_${fieldName}_new; |
---|
| 364 | name string:${fieldName}.${column}:records;" /> |
---|
| 365 | </span> |
---|
| 366 | </td> |
---|
| 367 | <td class="datagridwidget-manipulator"> |
---|
| 368 | <img alt="Delete row" |
---|
| 369 | onclick="customMetaTagsFunctions.removeFieldRow(this);return false" |
---|
| 370 | tal:attributes="src string:${portal_url}/delete_icon.gif;" /> |
---|
| 371 | </td> |
---|
| 372 | <td class="datagridwidget-hidden-data"> |
---|
| 373 | <input type="hidden" |
---|
| 374 | value="template_row_marker" |
---|
| 375 | tal:attributes="name string:${fieldName}.orderindex_:records; |
---|
| 376 | id string:orderindex__${fieldId};" /> |
---|
| 377 | </td> |
---|
| 378 | </tr> |
---|
| 379 | </tbody> |
---|
| 380 | </table> |
---|
| 381 | <input type="button" |
---|
| 382 | class="datagridwidget-add-button" |
---|
| 383 | id="datagridwidget-add-button" |
---|
| 384 | value="Add new row" |
---|
| 385 | tal:attributes="onclick string:customMetaTagsFunctions.addRow('${fieldName}')" /> |
---|
| 386 | </div> |
---|
| 387 | <div class="formControls" |
---|
| 388 | tal:define="process_creation request/process_creation|nothing;" |
---|
| 389 | i18n:domain="plone"> |
---|
| 390 | <input class="context" |
---|
| 391 | tabindex="" |
---|
| 392 | type="submit" |
---|
| 393 | name="form.button.Save" |
---|
| 394 | value="Save" |
---|
| 395 | i18n:attributes="value" |
---|
| 396 | tal:attributes="tabindex tabindex/next;" /> |
---|
| 397 | <input class="standalone" |
---|
| 398 | tabindex="" |
---|
| 399 | type="submit" |
---|
| 400 | name="form.button.Cancel" |
---|
| 401 | value="Cancel" |
---|
| 402 | i18n:attributes="value" |
---|
| 403 | tal:attributes="tabindex tabindex/next;" /> |
---|
| 404 | </div> |
---|
| 405 | </fieldset> |
---|
| 406 | <input type="hidden" name="form.submitted" value="1" /> |
---|
| 407 | </form> |
---|
| 408 | </div> |
---|
| 409 | </body> |
---|
| 410 | </html> |
---|