Changeset 1240

Show
Ignore:
Timestamp:
09/11/08 11:14:18
Author:
liebster
Message:

Modernization view Ping Setup Details.Add checkbox select_all_items

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • qPingTool/branches/plone-3.1/browser/ping.py

    r1237 r1240  
    44from Products.Five import BrowserView 
    55from Products.CMFCore.utils import getToolByName 
     6 
    67 
    78class PingView(BrowserView): 
     
    5051            state = 'info' 
    5152        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 trueVal 
    59         else: 
    60             return falseVal 
  • qPingTool/branches/plone-3.1/browser/ping_setup.pt

    r1237 r1240  
    3434          <legend i18n:translate="legend_ping_setup">Ping Setup Details</legend> 
    3535 
    36           <div class="field"> 
     36          <table class="listing"> 
     37            <tr> 
     38            <th> 
    3739            <input type="checkbox" 
    3840                   id="enable_ping" 
     
    4042                   tal:attributes="checked python:pingProperties['enable_ping'] and 'checked' or None" 
    4143                   /> 
    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> 
    4449 
    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> 
    4788 
    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> 
    6292          <div class="formControls"  
    6393               tal:define="process_creation request/process_creation|nothing;">