| 5 | | tal:define="canonical_url_value request/canonical_url_value | python:modules['Products.qPingTool.util'].getCanonicalURL(here); |
|---|
| 6 | | hasCanonicalURL request/hasCanonicalURL | python:test(canonical_url_value, 1, 0); |
|---|
| 7 | | action python:test(hasCanonicalURL, 'Update', 'Add'); |
|---|
| | 5 | tal:define="portal here/portal_url/getPortalObject; |
|---|
| | 6 | canonical_url_value request/canonical_url_value | python:portal.getProperty('canonical_url'); |
|---|
| | 7 | hasCanonicalURL request/hasCanonicalURL | python:portal.hasProperty('canonical_url'); |
|---|
| 11 | | <div tal:condition="submitted" |
|---|
| 12 | | tal:omit-tag="string:"> |
|---|
| 13 | | <tal:common |
|---|
| 14 | | define="portal here/portal_url/getPortalObject;"> |
|---|
| 15 | | <div tal:condition="python:button=='Update'"> |
|---|
| 16 | | <tal:block define="result python:portal.manage_changeProperties(canonical_url=canonical_url_value)"/> |
|---|
| 17 | | </div> |
|---|
| 18 | | <div tal:condition="python:button=='Add'"> |
|---|
| 19 | | <tal:block define="result python:portal.manage_addProperty('canonical_url', canonical_url_value, 'string')"/> |
|---|
| 20 | | </div> |
|---|
| 21 | | </tal:common> |
|---|
| 22 | | </div> |
|---|
| | 22 | <h3>Overview</h3> |
|---|
| | 23 | <p> |
|---|
| | 24 | <strong>portal_pingtool</strong> is symple tool to enable pinging of external feed agregators. |
|---|
| | 25 | </p> |
|---|
| | 26 | <div tal:omit-tag="" |
|---|
| | 27 | tal:define="hasCanonicalURL request/hasCanonicalURL | python:portal.hasProperty('canonical_url'); |
|---|
| | 28 | action python:test(hasCanonicalURL, 'Update', 'Add');"> |
|---|
| | 29 | <h3 tal:content="string:$action Canonical URL">Update Canonical URL</h3> |
|---|
| | 30 | <p tal:condition="not:hasCanonicalURL">Until you setup canonical_url - Ping Tool will not work.</p> |
|---|
| 26 | | <p> <strong>portal_pingtool</strong> is symple tool to enable pinging of external feed agregators. |
|---|
| 27 | | </p> |
|---|
| 28 | | |
|---|
| 29 | | |
|---|
| 30 | | <h3 tal:content="string:$action Canonical URL">Update Canonical URL</h3> |
|---|
| 31 | | |
|---|
| 32 | | <p tal:condition="not:hasCanonicalURL">Until you setup canonical_url - Ping Tool will not work.</p> |
|---|
| 33 | | |
|---|
| 34 | | <form method="put" action="" tal:attributes="action template/getId"> |
|---|
| 35 | | <input type="hidden" name="submitted" value="1" /> |
|---|
| 36 | | |
|---|
| 37 | | <p class="form-help" |
|---|
| 38 | | tal:content="string:To $action the property, enter a canonical URL value and click the "$action" button"> |
|---|
| 39 | | To Add/Update the property, enter a canonical URL value |
|---|
| 40 | | and click the "Add/Update" button. |
|---|
| 41 | | </p> |
|---|
| 42 | | |
|---|
| 43 | | <table> |
|---|
| 44 | | <tr> |
|---|
| 45 | | <td align="left" valign="top"> |
|---|
| 46 | | <div class="form-label">Canonical URL</div> |
|---|
| 47 | | </td> |
|---|
| 48 | | <td align="left" valign="top"> |
|---|
| 49 | | <input type="text" size="30" value="" name="canonical_url_value" |
|---|
| 50 | | tal:attributes="value canonical_url_value | nothing"/> |
|---|
| 51 | | </tr> |
|---|
| 52 | | <tr> |
|---|
| 53 | | <td align="right" valign="top"> |
|---|
| 54 | | <div class="form-element"> |
|---|
| 55 | | <input class="form-element" type="submit" name="submit" value="Save" |
|---|
| 56 | | tal:attributes="value string:$action;" /> |
|---|
| 57 | | </div> |
|---|
| 58 | | </td> |
|---|
| 59 | | </tr> |
|---|
| 60 | | </table> |
|---|
| 61 | | </form> |
|---|
| | 39 | <table> |
|---|
| | 40 | <tr> |
|---|
| | 41 | <td align="left" valign="top"> |
|---|
| | 42 | <div class="form-label">Canonical URL</div> |
|---|
| | 43 | </td> |
|---|
| | 44 | <td align="left" valign="top"> |
|---|
| | 45 | <input type="text" size="30" value="" name="canonical_url_value" |
|---|
| | 46 | tal:attributes="value canonical_url_value | nothing"/> |
|---|
| | 47 | </tr> |
|---|
| | 48 | <tr> |
|---|
| | 49 | <td align="right" valign="top"> |
|---|
| | 50 | <div class="form-element"> |
|---|
| | 51 | <input class="form-element" type="submit" name="submit" value="Save" |
|---|
| | 52 | tal:attributes="value string:$action;" /> |
|---|
| | 53 | </div> |
|---|
| | 54 | </td> |
|---|
| | 55 | </tr> |
|---|
| | 56 | </table> |
|---|
| | 57 | </form> |
|---|
| | 58 | </div> |
|---|