Changeset 1240
- Timestamp:
- 09/11/08 11:14:18
- Files:
-
- qPingTool/branches/plone-3.1/browser/ping.py (modified) (2 diffs)
- qPingTool/branches/plone-3.1/browser/ping_setup.pt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
qPingTool/branches/plone-3.1/browser/ping.py
r1237 r1240 4 4 from Products.Five import BrowserView 5 5 from Products.CMFCore.utils import getToolByName 6 6 7 7 8 class PingView(BrowserView): … … 50 51 state = 'info' 51 52 return state 52 53 def test(self, value, trueVal, falseVal):54 """55 helper method, mainly for setting html attributes.56 """57 if value:58 return trueVal59 else:60 return falseValqPingTool/branches/plone-3.1/browser/ping_setup.pt
r1237 r1240 34 34 <legend i18n:translate="legend_ping_setup">Ping Setup Details</legend> 35 35 36 <div class="field"> 36 <table class="listing"> 37 <tr> 38 <th> 37 39 <input type="checkbox" 38 40 id="enable_ping" … … 40 42 tal:attributes="checked python:pingProperties['enable_ping'] and 'checked' or None" 41 43 /> 42 <label for="enable_ping" i18n:translate="label_enable_ping">Enable Ping</label> 43 </div> 44 <label for="enable_ping" class="hiddenStructure">Enable Ping</label> 45 </th> 46 <th i18n:translate="label_enable_ping">Enable Ping</th> 47 </tr> 48 </table> 44 49 45 <div class="field" 46 tal:define="ping_sites python:pingProperties['ping_sites']"> 50 <table class="listing" summary="Ping Site Listing" tal:define="ping_sites python:pingProperties['ping_sites']"> 51 <tr> 52 <th> 53 <input class="noborder" 54 type="checkbox" 55 id="select_all_items" 56 src="select_all_icon.gif" 57 name="selectButton" 58 title="Select all items" 59 onClick="toggleSelect(this, 'ping_sites:list');" 60 tal:attributes="src string:$portal_url/select_all_icon.gif" 61 alt="Select all items" 62 i18n:attributes="title label_select_all_items; 63 alt label_select_all_items;" 64 /> 65 <label for="select_all_items" class="hiddenStructure">Ping Site</label> 66 </th> 67 <th i18n:translate="listingheader_group_user_name">Ping Site</th> 68 </tr> 69 <tal:block tal:repeat="id here/portal_pingtool/objectIds"> 70 <tr tal:define="check python:(id in ping_sites) and True or False" 71 tal:attributes="class python:check and 'even' or 'odd'"> 72 <td class="listingCheckbox"> 73 <input type="checkbox" 74 id="id" 75 class="noborder notify" 76 name="ping_sites:list" 77 tal:attributes="checked python:check and 'checked' or None; 78 value id; 79 id id; " 80 /> 81 <label for="id" 82 tal:content="python:here.portal_pingtool[id].Title()" 83 tal:attributes="for id" 84 class="hiddenStructure">Site name</label> 85 </td> 86 <td tal:content="python:here.portal_pingtool[id].Title()" 87 tal:attributes="for id" >Site name</td> 47 88 48 <tal:block repeat="id here/portal_pingtool/objectIds"> 49 <input type="checkbox" 50 id="id" 51 name="ping_sites:list" 52 tal:attributes="checked python:id in ping_sites and 'checked' or None; 53 value id; 54 id id; " 55 /> 56 <label for="id" 57 tal:content="python:here.portal_pingtool[id].Title()" 58 tal:attributes="for id" >Site name</label><br/> 59 </tal:block> 60 </div> 61 89 </tr> 90 </tal:block> 91 </table> 62 92 <div class="formControls" 63 93 tal:define="process_creation request/process_creation|nothing;">
