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