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