comparison doc/customizing.txt @ 1825:fad32dafc174

Replaced all uses of the 'nowrap' attribute with its CSS equivalent: 'white-space: nowrap;'.
author Johannes Gijsbers <jlgijsbers@users.sourceforge.net>
date Fri, 03 Oct 2003 16:57:28 +0000
parents 3d180e08fae0
children 4e4afbe3cd30
comparison
equal deleted inserted replaced
1824:24819ee5dfbc 1825:fad32dafc174
1 =================== 1 ===================
2 Customising Roundup 2 Customising Roundup
3 =================== 3 ===================
4 4
5 :Version: $Revision: 1.100 $ 5 :Version: $Revision: 1.101 $
6 6
7 .. This document borrows from the ZopeBook section on ZPT. The original is at: 7 .. This document borrows from the ZopeBook section on ZPT. The original is at:
8 http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx 8 http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
9 9
10 .. contents:: 10 .. contents::
1864 "classic" template issue item edit form - from the "issue.item.html" 1864 "classic" template issue item edit form - from the "issue.item.html"
1865 template):: 1865 template)::
1866 1866
1867 <table class="form"> 1867 <table class="form">
1868 <tr> 1868 <tr>
1869 <th nowrap>Title</th> 1869 <th>Title</th>
1870 <td colspan="3" tal:content="structure python:context.title.field(size=60)">title</td> 1870 <td colspan="3" tal:content="structure python:context.title.field(size=60)">title</td>
1871 </tr> 1871 </tr>
1872 1872
1873 <tr> 1873 <tr>
1874 <th nowrap>Priority</th> 1874 <th>Priority</th>
1875 <td tal:content="structure context/priority/menu">priority</td> 1875 <td tal:content="structure context/priority/menu">priority</td>
1876 <th nowrap>Status</th> 1876 <th>Status</th>
1877 <td tal:content="structure context/status/menu">status</td> 1877 <td tal:content="structure context/status/menu">status</td>
1878 </tr> 1878 </tr>
1879 1879
1880 <tr> 1880 <tr>
1881 <th nowrap>Superseder</th> 1881 <th>Superseder</th>
1882 <td> 1882 <td>
1883 <span tal:replace="structure python:context.superseder.field(showid=1, size=20)" /> 1883 <span tal:replace="structure python:context.superseder.field(showid=1, size=20)" />
1884 <span tal:replace="structure python:db.issue.classhelp('id,title')" /> 1884 <span tal:replace="structure python:db.issue.classhelp('id,title')" />
1885 <span tal:condition="context/superseder"> 1885 <span tal:condition="context/superseder">
1886 <br>View: <span tal:replace="structure python:context.superseder.link(showid=1)" /> 1886 <br>View: <span tal:replace="structure python:context.superseder.link(showid=1)" />
1887 </span> 1887 </span>
1888 </td> 1888 </td>
1889 <th nowrap>Nosy List</th> 1889 <th>Nosy List</th>
1890 <td> 1890 <td>
1891 <span tal:replace="structure context/nosy/field" /> 1891 <span tal:replace="structure context/nosy/field" />
1892 <span tal:replace="structure python:db.user.classhelp('username,realname,address,phone')" /> 1892 <span tal:replace="structure python:db.user.classhelp('username,realname,address,phone')" />
1893 </td> 1893 </td>
1894 </tr> 1894 </tr>
1895 1895
1896 <tr> 1896 <tr>
1897 <th nowrap>Assigned To</th> 1897 <th>Assigned To</th>
1898 <td tal:content="structure context/assignedto/menu"> 1898 <td tal:content="structure context/assignedto/menu">
1899 assignedto menu 1899 assignedto menu
1900 </td> 1900 </td>
1901 <td>&nbsp;</td> 1901 <td>&nbsp;</td>
1902 <td>&nbsp;</td> 1902 <td>&nbsp;</td>
1903 </tr> 1903 </tr>
1904 1904
1905 <tr> 1905 <tr>
1906 <th nowrap>Change Note</th> 1906 <th>Change Note</th>
1907 <td colspan="3"> 1907 <td colspan="3">
1908 <textarea name=":note" wrap="hard" rows="5" cols="60"></textarea> 1908 <textarea name=":note" wrap="hard" rows="5" cols="60"></textarea>
1909 </td> 1909 </td>
1910 </tr> 1910 </tr>
1911 1911
1912 <tr> 1912 <tr>
1913 <th nowrap>File</th> 1913 <th>File</th>
1914 <td colspan="3"><input type="file" name=":file" size="40"></td> 1914 <td colspan="3"><input type="file" name=":file" size="40"></td>
1915 </tr> 1915 </tr>
1916 1916
1917 <tr> 1917 <tr>
1918 <td>&nbsp;</td> 1918 <td>&nbsp;</td>
2339 will be the "name" variable of the current context (which is 2339 will be the "name" variable of the current context (which is
2340 "category"). The upshot of this is that when the user types something in 2340 "category"). The upshot of this is that when the user types something in
2341 to the form, a new category will be created with that name:: 2341 to the form, a new category will be created with that name::
2342 2342
2343 <tr> 2343 <tr>
2344 <th nowrap>Name</th> 2344 <th>Name</th>
2345 <td tal:content="structure python:context.name.field(size=60)"> 2345 <td tal:content="structure python:context.name.field(size=60)">
2346 name</td> 2346 name</td>
2347 </tr> 2347 </tr>
2348 2348
2349 Then a submit button so that the user can submit the new category:: 2349 Then a submit button so that the user can submit the new category::
2377 2377
2378 <table class="form"> 2378 <table class="form">
2379 <tr><th class="header" colspan="2">Category</th></tr> 2379 <tr><th class="header" colspan="2">Category</th></tr>
2380 2380
2381 <tr> 2381 <tr>
2382 <th nowrap>Name</th> 2382 <th>Name</th>
2383 <td tal:content="structure python:context.name.field(size=60)"> 2383 <td tal:content="structure python:context.name.field(size=60)">
2384 name</td> 2384 name</td>
2385 </tr> 2385 </tr>
2386 2386
2387 <tr> 2387 <tr>
2412 2412
2413 Just like ``category.issue.html`` this file defines a form which has a 2413 Just like ``category.issue.html`` this file defines a form which has a
2414 table to lay things out. It doesn't matter where in the table we add new 2414 table to lay things out. It doesn't matter where in the table we add new
2415 stuff, it is entirely up to your sense of aesthetics:: 2415 stuff, it is entirely up to your sense of aesthetics::
2416 2416
2417 <th nowrap>Category</th> 2417 <th>Category</th>
2418 <td><span tal:replace="structure context/category/field" /> 2418 <td><span tal:replace="structure context/category/field" />
2419 <span tal:replace="structure db/category/classhelp" /> 2419 <span tal:replace="structure db/category/classhelp" />
2420 </td> 2420 </td>
2421 2421
2422 First, we define a nice header so that the user knows what the next 2422 First, we define a nice header so that the user knows what the next
2576 db.issue.audit('set', checktransition) 2576 db.issue.audit('set', checktransition)
2577 2577
2578 4. in the ``issue.item.html`` template, change the status editing bit 2578 4. in the ``issue.item.html`` template, change the status editing bit
2579 from:: 2579 from::
2580 2580
2581 <th nowrap>Status</th> 2581 <th>Status</th>
2582 <td tal:content="structure context/status/menu">status</td> 2582 <td tal:content="structure context/status/menu">status</td>
2583 2583
2584 to:: 2584 to::
2585 2585
2586 <th nowrap>Status</th> 2586 <th>Status</th>
2587 <td> 2587 <td>
2588 <select tal:condition="context/id" name="status"> 2588 <select tal:condition="context/id" name="status">
2589 <tal:block tal:define="ok context/status/transitions" 2589 <tal:block tal:define="ok context/status/transitions"
2590 tal:repeat="state db/status/list"> 2590 tal:repeat="state db/status/list">
2591 <option tal:condition="python:state.id in ok" 2591 <option tal:condition="python:state.id in ok"
2611 <tr><th colspan="5" class="header">Messages</th></tr> 2611 <tr><th colspan="5" class="header">Messages</th></tr>
2612 <tr tal:repeat="msg context/messages"> 2612 <tr tal:repeat="msg context/messages">
2613 <td><a tal:attributes="href string:msg${msg/id}" 2613 <td><a tal:attributes="href string:msg${msg/id}"
2614 tal:content="string:msg${msg/id}"></a></td> 2614 tal:content="string:msg${msg/id}"></a></td>
2615 <td tal:content="msg/author">author</td> 2615 <td tal:content="msg/author">author</td>
2616 <td nowrap tal:content="msg/date/pretty">date</td> 2616 <td class="date" tal:content="msg/date/pretty">date</td>
2617 <td tal:content="msg/summary">summary</td> 2617 <td tal:content="msg/summary">summary</td>
2618 <td> 2618 <td>
2619 <a tal:attributes="href string:?@remove@messages=${msg/id}&@action=edit"> 2619 <a tal:attributes="href string:?@remove@messages=${msg/id}&@action=edit">
2620 remove</a> 2620 remove</a>
2621 </td> 2621 </td>
2718 Note that later in the form, I test the value of "cat" include form 2718 Note that later in the form, I test the value of "cat" include form
2719 elements that are appropriate. For example:: 2719 elements that are appropriate. For example::
2720 2720
2721 <tal:block tal:condition="python:cat in '6 10 13 14 15 16 17'.split()"> 2721 <tal:block tal:condition="python:cat in '6 10 13 14 15 16 17'.split()">
2722 <tr> 2722 <tr>
2723 <th nowrap>Operating System</th> 2723 <th>Operating System</th>
2724 <td tal:content="structure context/os/field"></td> 2724 <td tal:content="structure context/os/field"></td>
2725 </tr> 2725 </tr>
2726 <tr> 2726 <tr>
2727 <th nowrap>Web Browser</th> 2727 <th>Web Browser</th>
2728 <td tal:content="structure context/browser/field"></td> 2728 <td tal:content="structure context/browser/field"></td>
2729 </tr> 2729 </tr>
2730 </tal:block> 2730 </tal:block>
2731 2731
2732 ... the above section will only be displayed if the category is one 2732 ... the above section will only be displayed if the category is one
2929 items other than the template default item (see the cgi 2929 items other than the template default item (see the cgi
2930 documentation on `special form variables`_). In particular, we add a 2930 documentation on `special form variables`_). In particular, we add a
2931 field to capture a new timelog item's perdiod:: 2931 field to capture a new timelog item's perdiod::
2932 2932
2933 <tr> 2933 <tr>
2934 <th nowrap>Time Log</th> 2934 <th>Time Log</th>
2935 <td colspan=3><input type="text" name="timelog-1@period" /> 2935 <td colspan=3><input type="text" name="timelog-1@period" />
2936 <br />(enter as '3y 1m 4d 2:40:02' or parts thereof) 2936 <br />(enter as '3y 1m 4d 2:40:02' or parts thereof)
2937 </td> 2937 </td>
2938 </tr> 2938 </tr>
2939 2939
3187 </tr> 3187 </tr>
3188 <tr tal:repeat="msg context/messages"> 3188 <tr tal:repeat="msg context/messages">
3189 <td><a tal:attributes="href string:msg${msg/id}" 3189 <td><a tal:attributes="href string:msg${msg/id}"
3190 tal:content="string:msg${msg/id}"></a></td> 3190 tal:content="string:msg${msg/id}"></a></td>
3191 <td tal:content="msg/author">author</td> 3191 <td tal:content="msg/author">author</td>
3192 <td nowrap tal:content="msg/date/pretty">date</td> 3192 <td class="date" tal:content="msg/date/pretty">date</td>
3193 <td tal:content="msg/summary">summary</td> 3193 <td tal:content="msg/summary">summary</td>
3194 <td> 3194 <td>
3195 <a tal:attributes="href string:?@remove@messages=${msg/id}&@action=edit">remove</a> 3195 <a tal:attributes="href string:?@remove@messages=${msg/id}&@action=edit">remove</a>
3196 </td> 3196 </td>
3197 </tr> 3197 </tr>
3204 </th> 3204 </th>
3205 </tr> 3205 </tr>
3206 <tal:block tal:repeat="msg context/messages"> 3206 <tal:block tal:repeat="msg context/messages">
3207 <tr> 3207 <tr>
3208 <th tal:content="msg/author">author</th> 3208 <th tal:content="msg/author">author</th>
3209 <th nowrap tal:content="msg/date/pretty">date</th> 3209 <th class="date" tal:content="msg/date/pretty">date</th>
3210 <th style="text-align: right"> 3210 <th style="text-align: right">
3211 (<a tal:attributes="href string:?@remove@messages=${msg/id}&@action=edit">remove</a>) 3211 (<a tal:attributes="href string:?@remove@messages=${msg/id}&@action=edit">remove</a>)
3212 </th> 3212 </th>
3213 </tr> 3213 </tr>
3214 <tr><td colspan="3" tal:content="msg/content"></td></tr> 3214 <tr><td colspan="3" tal:content="msg/content"></td></tr>
3240 priority=Link("priority"), status=Link("status")) 3240 priority=Link("priority"), status=Link("status"))
3241 3241
3242 2. Add the new "blockers" property to the issue.item edit page, using 3242 2. Add the new "blockers" property to the issue.item edit page, using
3243 something like:: 3243 something like::
3244 3244
3245 <th nowrap>Waiting On</th> 3245 <th>Waiting On</th>
3246 <td> 3246 <td>
3247 <span tal:replace="structure python:context.blockers.field(showid=1, 3247 <span tal:replace="structure python:context.blockers.field(showid=1,
3248 size=20)" /> 3248 size=20)" />
3249 <span tal:replace="structure python:db.issue.classhelp('id,title')" /> 3249 <span tal:replace="structure python:db.issue.classhelp('id,title')" />
3250 <span tal:condition="context/blockers" 3250 <span tal:condition="context/blockers"

Roundup Issue Tracker: http://roundup-tracker.org/