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 | xmlns:i18n="http://xml.zope.org/namespaces/i18n" |
---|
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 |
---|
121 | pages - for future reference. Use 'Check Keywords' button to check whether |
---|
122 | words you entered in this block as SEO keywords are present in content. |
---|
123 | </div> |
---|
124 | <input type="checkbox" |
---|
125 | id="seo_keywords_override" |
---|
126 | name="seo_keywords_override" |
---|
127 | tabindex="" |
---|
128 | tal:attributes="checked python:view.test(here.hasProperty('qSEO_keywords'), 'on', None); |
---|
129 | tabindex tabindex/next;" |
---|
130 | /> |
---|
131 | <label i18n:translate="label_override" for="seo_keywords_override"> |
---|
132 | Override |
---|
133 | </label> |
---|
134 | <br /> |
---|
135 | <textarea id="seo_keywords" |
---|
136 | name="seo_keywords:lines" |
---|
137 | rows="11" |
---|
138 | cols="15" |
---|
139 | wrap="off" |
---|
140 | tabindex="" |
---|
141 | tal:attributes="tabindex tabindex/next;" |
---|
142 | tal:define="keywords request/seo_keywords | here/@@seo_context/seo_keywords" |
---|
143 | tal:content="python:'\n'.join(keywords)" |
---|
144 | /> |
---|
145 | <br /> |
---|
146 | </div> |
---|
147 | <div class="field"> |
---|
148 | <label i18n:translate="label_html_comment" for="seo_html_commment"> |
---|
149 | HTML Comment |
---|
150 | </label> |
---|
151 | <div class="formHelp" i18n:translate="help_seo_html_comment"> |
---|
152 | Comments embedded into HTML header. |
---|
153 | </div> |
---|
154 | <input type="checkbox" |
---|
155 | id="seo_html_comment_override" |
---|
156 | name="seo_html_comment_override" |
---|
157 | tabindex="" |
---|
158 | tal:attributes="checked python:view.test(here.hasProperty('qSEO_html_comment'), 'on', None); |
---|
159 | tabindex tabindex/next;" |
---|
160 | /> |
---|
161 | <label i18n:translate="label_override" for="seo_html_comment_override"> |
---|
162 | Override |
---|
163 | </label> |
---|
164 | <br /> |
---|
165 | <textarea id="seo_html_comment" |
---|
166 | name="seo_html_comment" |
---|
167 | rows="5" |
---|
168 | cols="15" |
---|
169 | tabindex="" |
---|
170 | tal:attributes="tabindex tabindex/next;" |
---|
171 | tal:content="request/seo_html_comment | here/@@seo_context/seo_html_comment" |
---|
172 | /> |
---|
173 | </div> |
---|
174 | <div class="field"> |
---|
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" |
---|
185 | tabindex="" |
---|
186 | tal:attributes="checked python:view.test(here.hasProperty('qSEO_robots'), 'on', None); |
---|
187 | tabindex tabindex/next;" |
---|
188 | /> |
---|
189 | <label i18n:translate="label_override" for="seo_robots_override"> |
---|
190 | Override |
---|
191 | </label> |
---|
192 | <br /> |
---|
193 | <input type="text" |
---|
194 | id="seo_robots" |
---|
195 | name="seo_robots" |
---|
196 | size="25" |
---|
197 | value="" |
---|
198 | tabindex="" |
---|
199 | tal:attributes="value request/seo_robots | here/@@seo_context/seo_robots; |
---|
200 | tabindex tabindex/next;" |
---|
201 | /> |
---|
202 | </div> |
---|
203 | <div class="field"> |
---|
204 | <label i18n:translate="label_distribution_tag" for="seo_distribution"> |
---|
205 | Distribution Tag |
---|
206 | </label> |
---|
207 | <div class="formHelp" i18n:translate="help_seo_distribution"> |
---|
208 | Distribution meta tag to designate time and area distribution |
---|
209 | of the document. |
---|
210 | </div> |
---|
211 | <input type="checkbox" |
---|
212 | id="seo_distribution_override" |
---|
213 | name="seo_distribution_override" |
---|
214 | tabindex="" |
---|
215 | tal:attributes="checked python:view.test(here.hasProperty('qSEO_distribution'), 'on', None); |
---|
216 | tabindex tabindex/next;" |
---|
217 | /> |
---|
218 | <label i18n:translate="label_override" for="seo_distribution_override"> |
---|
219 | Override |
---|
220 | </label> |
---|
221 | <br /> |
---|
222 | <input type="text" |
---|
223 | id="seo_distribution" |
---|
224 | name="seo_distribution" |
---|
225 | size="25" |
---|
226 | value="" |
---|
227 | tabindex="" |
---|
228 | tal:attributes="value request/seo_distribution | here/@@seo_context/seo_distribution; |
---|
229 | tabindex tabindex/next;" |
---|
230 | /> |
---|
231 | </div> |
---|
232 | <div class="field" |
---|
233 | tal:define="error errors/seo_canonical|nothing;" |
---|
234 | tal:attributes="class python:view.test(error, 'field error', 'field')"> |
---|
235 | <label i18n:translate="label_canonical_tag" for="seo_canonical"> |
---|
236 | Canonical URL |
---|
237 | </label> |
---|
238 | <div class="formHelp" i18n:translate="help_seo_canonical"> |
---|
239 | Specify your canonical URL. |
---|
240 | If your site has identical or vastly similar content that's accessible through multiple URLs, |
---|
241 | this format provides you with more control over the URL returned in search results. |
---|
242 | </div> |
---|
243 | <input type="checkbox" |
---|
244 | id="seo_canonical_override" |
---|
245 | name="seo_canonical_override" |
---|
246 | tabindex="" |
---|
247 | tal:attributes="checked python:view.test(here.hasProperty('qSEO_canonical'), 'on', None); |
---|
248 | tabindex tabindex/next;" |
---|
249 | /> |
---|
250 | <label i18n:translate="label_override" for="seo_canonical_override"> |
---|
251 | Override |
---|
252 | </label> |
---|
253 | <br /> |
---|
254 | <div tal:content="error">Validation error output</div> |
---|
255 | <input type="text" |
---|
256 | id="seo_canonical" |
---|
257 | name="seo_canonical" |
---|
258 | size="55" |
---|
259 | value="" |
---|
260 | tabindex="" |
---|
261 | tal:attributes="value request/seo_canonical | here/@@seo_context/seo_canonical; |
---|
262 | tabindex tabindex/next;" |
---|
263 | /> |
---|
264 | </div> |
---|
265 | <div class="field" |
---|
266 | tal:define="fieldName string:seo_custommetatags; |
---|
267 | nonEmptylocalMetaTags here/@@seo_context/seo_nonEmptylocalMetaTags;"> |
---|
268 | <label i18n:translate="label_custom_metatags" for="seo_custom_metatags"> |
---|
269 | Custom Meta Tags |
---|
270 | </label> |
---|
271 | <div class="formHelp" i18n:translate="help_seo_custommetatags"> |
---|
272 | Here you can manage your custom meta tags. Specify local Meta Tags parameters to be added to the global Meta Tags. |
---|
273 | If metacontent field is empty, then a meta tag will not be present on this page. |
---|
274 | </div> |
---|
275 | <input type="checkbox" |
---|
276 | id="seo_custommetatags_override" |
---|
277 | name="seo_custommetatags_override" |
---|
278 | tabindex="" |
---|
279 | tal:attributes="checked python:view.test(nonEmptylocalMetaTags, 'on', None); |
---|
280 | tabindex tabindex/next;" |
---|
281 | /> |
---|
282 | <label i18n:translate="label_override" for="seo_custommetatags_override"> |
---|
283 | Override |
---|
284 | </label> |
---|
285 | <br /> |
---|
286 | <table class="custom-metatags-table" |
---|
287 | id="datagridwidget-table-seo_custommetatags" |
---|
288 | style="width: 100%" |
---|
289 | tal:define="columnNames python:['meta name', 'meta content']; |
---|
290 | columnIds python:['meta_name', 'meta_content']; |
---|
291 | globalMT here/@@seo_context/seo_globalWithoutLocalCustomMetaTags; |
---|
292 | localMT here/@@seo_context/seo_localCustomMetaTags;"> |
---|
293 | <thead> |
---|
294 | <tr> |
---|
295 | <th class="discreet" style="text-align: left" |
---|
296 | tal:repeat="columnName columnNames" |
---|
297 | tal:content="columnName" |
---|
298 | i18n:translate="">Column name</th> |
---|
299 | <th /> |
---|
300 | <th /> |
---|
301 | </tr> |
---|
302 | </thead> |
---|
303 | <tbody id="datagridwidget-tbody-seo_custommetatags"> |
---|
304 | <tal:row-loop tal:repeat="row globalMT"> |
---|
305 | <tr id="datagridwidget-row"> |
---|
306 | <tal:vars define="fieldId string:${fieldName}_${repeat/row/number}"> |
---|
307 | <td class="datagridwidget-cell" |
---|
308 | tal:repeat="column columnIds"> |
---|
309 | <tal:cell tal:define="cell_value python:row.get(column);"> |
---|
310 | <input type="text" |
---|
311 | id="columnId_fieldId" |
---|
312 | value="" |
---|
313 | name="fieldId.columnId:records" |
---|
314 | style="width: 100%;" |
---|
315 | tal:attributes="name string:${fieldName}.${column}:records; |
---|
316 | id string:${column}_${fieldId}; |
---|
317 | value cell_value"/> |
---|
318 | </tal:cell> |
---|
319 | </td> |
---|
320 | </tal:vars> |
---|
321 | </tr> |
---|
322 | </tal:row-loop> |
---|
323 | <tal:row-loop tal:repeat="row localMT"> |
---|
324 | <tr id="datagridwidget-row"> |
---|
325 | <tal:vars define="fieldId string:${fieldName}_${repeat/row/number}"> |
---|
326 | <td class="datagridwidget-cell" |
---|
327 | tal:repeat="column columnIds"> |
---|
328 | <tal:cell tal:define="cell_value python:row.get(column);"> |
---|
329 | <input type="text" |
---|
330 | id="columnId_fieldId" |
---|
331 | value="" |
---|
332 | name="fieldId.columnId:records" |
---|
333 | style="width: 100%;" |
---|
334 | tal:attributes="name string:${fieldName}.${column}:records; |
---|
335 | id string:${column}_${fieldId}; |
---|
336 | value cell_value"/> |
---|
337 | </tal:cell> |
---|
338 | </td> |
---|
339 | <td class="datagridwidget-manipulator"> |
---|
340 | <img alt="Delete row" |
---|
341 | onclick="customMetaTagsFunctions.removeFieldRow(this);return false" |
---|
342 | tal:attributes="src string:${portal_url}/delete_icon.gif;" /> |
---|
343 | </td> |
---|
344 | <td class="datagridwidget-hidden-data"> |
---|
345 | <input type="hidden" |
---|
346 | tal:attributes="name string:${fieldName}.orderindex_:records; |
---|
347 | id string:orderindex__${fieldId}; |
---|
348 | value repeat/row/number;" /> |
---|
349 | </td> |
---|
350 | </tal:vars> |
---|
351 | </tr> |
---|
352 | </tal:row-loop> |
---|
353 | <tr id="datagridwidget-empty-row" |
---|
354 | class="datagridwidget-empty-row" |
---|
355 | tal:define="fieldId string:${fieldName}_new"> |
---|
356 | <td class="datagridwidget-cell" |
---|
357 | tal:repeat="column columnIds"> |
---|
358 | <span> |
---|
359 | <input type="text" |
---|
360 | id="columnId_fieldName_new" |
---|
361 | value="" |
---|
362 | name="fieldName.columnId:records" |
---|
363 | style="width: 100%;" |
---|
364 | tal:attributes="id string:${column}_${fieldName}_new; |
---|
365 | name string:${fieldName}.${column}:records;" /> |
---|
366 | </span> |
---|
367 | </td> |
---|
368 | <td class="datagridwidget-manipulator"> |
---|
369 | <img alt="Delete row" |
---|
370 | onclick="customMetaTagsFunctions.removeFieldRow(this);return false" |
---|
371 | tal:attributes="src string:${portal_url}/delete_icon.gif;" /> |
---|
372 | </td> |
---|
373 | <td class="datagridwidget-hidden-data"> |
---|
374 | <input type="hidden" |
---|
375 | value="template_row_marker" |
---|
376 | tal:attributes="name string:${fieldName}.orderindex_:records; |
---|
377 | id string:orderindex__${fieldId};" /> |
---|
378 | </td> |
---|
379 | </tr> |
---|
380 | </tbody> |
---|
381 | </table> |
---|
382 | <input type="button" |
---|
383 | class="datagridwidget-add-button" |
---|
384 | id="datagridwidget-add-button" |
---|
385 | value="Add new row" |
---|
386 | tal:attributes="onclick string:customMetaTagsFunctions.addRow('${fieldName}')" /> |
---|
387 | </div> |
---|
388 | <div class="formControls" |
---|
389 | tal:define="process_creation request/process_creation|nothing;" |
---|
390 | i18n:domain="plone"> |
---|
391 | <input class="context" |
---|
392 | tabindex="" |
---|
393 | type="submit" |
---|
394 | name="form.button.Save" |
---|
395 | value="Save" |
---|
396 | i18n:attributes="value" |
---|
397 | tal:attributes="tabindex tabindex/next;" /> |
---|
398 | <input class="standalone" |
---|
399 | tabindex="" |
---|
400 | type="submit" |
---|
401 | name="form.button.Cancel" |
---|
402 | value="Cancel" |
---|
403 | i18n:attributes="value" |
---|
404 | tal:attributes="tabindex tabindex/next;" /> |
---|
405 | </div> |
---|
406 | </fieldset> |
---|
407 | <input type="hidden" name="form.submitted" value="1" /> |
---|
408 | </form> |
---|
409 | </div> |
---|
410 | </body> |
---|
411 | </html> |
---|