Skip to content

Commit 75bc13a

Browse files
author
Richard Jones
committed
some more documentation work
1 parent 76fc757 commit 75bc13a

File tree

7 files changed

+111
-97
lines changed

7 files changed

+111
-97
lines changed

doc/customizing.txt

Lines changed: 59 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Customising Roundup
33
===================
44

5-
:Version: $Revision: 1.135.2.1 $
5+
:Version: 1.135.2.1
66

77
.. This document borrows from the ZopeBook section on ZPT. The original is at:
88
http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
@@ -311,9 +311,10 @@ tracker is attempted.::
311311
Tracker Schema
312312
==============
313313

314-
Note: if you modify the schema, you'll most likely need to edit the
315-
`web interface`_ HTML template files and `detectors`_ to reflect
316-
your changes.
314+
.. note::
315+
If you modify the schema, you'll most likely need to edit the
316+
`web interface`_ HTML template files and `detectors`_ to reflect
317+
your changes.
317318

318319
A tracker schema defines what data is stored in the tracker's database.
319320
Schemas are defined using Python code in the ``dbinit.py`` module of your
@@ -380,7 +381,7 @@ You must never:
380381

381382
**Change the type of a property**
382383
Property types must *never* be changed - the database simply doesn't take
383-
this kind of action into account. Note that you can't just remove a
384+
this kind of action into account. You can't just remove a
384385
property and re-add it as a new type either. If you wanted to make the
385386
assignedto property a Multilink, you'd need to create a new property
386387
assignedto_list and remove the old assignedto property.
@@ -521,7 +522,7 @@ or::
521522

522523
roundup-admin set issue23 assignedto=richard
523524

524-
Note, the same thing can be done in the web and e-mail interfaces.
525+
The same thing can be done in the web and e-mail interfaces.
525526

526527
If a class does not have an "order" property, the key is also used to
527528
sort instances of the class when it is rendered in the user interface.
@@ -638,7 +639,7 @@ to use one, copy it to the ``'detectors'`` of your tracker instance:
638639
email errors!
639640
**creator_resolution.py**
640641
Catch attempts to set the status to "resolved" - if the assignedto
641-
user isn't the creator, then set the status to "confirm-done". Note that
642+
user isn't the creator, then set the status to "confirm-done".
642643
"classic" Roundup doesn't have that status, so you'll have to add it. If
643644
you don't want to though, it'll just use "in-progress" instead.
644645
**email_auditor.py**
@@ -697,9 +698,9 @@ is not required).
697698
Database Content
698699
================
699700

700-
Note: if you modify the content of definitional classes, you'll most
701-
likely need to edit the tracker `detectors`_ to reflect your
702-
changes.
701+
.. note::
702+
If you modify the content of definitional classes, you'll most
703+
likely need to edit the tracker `detectors`_ to reflect your changes.
703704

704705
Customisation of the special "definitional" classes (eg. status,
705706
priority, resolution, ...) may be done either before or after the
@@ -832,7 +833,7 @@ Example Scenarios
832833
By giving the "anonymous" user the "Email Registration" Role, any
833834
unidentified user will automatically be registered with the tracker
834835
(with no password, so they won't be able to log in through the web
835-
until an admin sets their password). Note: this is the default
836+
until an admin sets their password). This is the default
836837
behaviour in the tracker templates that ship with Roundup.
837838

838839
**anonymous access through the e-mail gateway**
@@ -1266,7 +1267,7 @@ of files in there. The *minimal* template includes:
12661267

12671268
The *classic* template has a number of additional templates.
12681269

1269-
Note: Remember that you can create any template extension you want to,
1270+
Remember that you can create any template extension you want to,
12701271
so if you just want to play around with the templating for new issues,
12711272
you can copy the current "issue.item" template to "issue.test", and then
12721273
access the test template using the "@template" URL argument::
@@ -1368,7 +1369,7 @@ TAL commands are:
13681369

13691370
Hello, world!
13701371

1371-
Note that the commands on a given tag are evaulated in the order above,
1372+
The commands on a given tag are evaulated in the order above,
13721373
so *define* comes before *condition*, and so on.
13731374

13741375
Additionally, you may include tags such as <tal:block>, which are
@@ -1497,15 +1498,15 @@ Language, or METAL. The macro commands are:
14971498
where the tag that fills the slot completely replaces the one defined
14981499
as the slot in the macro.
14991500

1500-
Note that you may not mix METAL and TAL commands on the same tag, but
1501+
You may not mix METAL and TAL commands on the same tag, but
15011502
TAL commands may be used freely inside METAL-using tags (so your
15021503
*fill-slots* tags may have all manner of TAL inside them).
15031504

15041505

15051506
Information available to templates
15061507
----------------------------------
15071508

1508-
Note: this is implemented by
1509+
The following behaviour is implemented by
15091510
``roundup.cgi.templating.RoundupPageTemplate``
15101511

15111512
The following variables are available to templates.
@@ -1583,7 +1584,7 @@ item. The only real difference between cases 2 and 3 above are:
15831584
Hyperdb class wrapper
15841585
:::::::::::::::::::::
15851586

1586-
Note: this is implemented by the ``roundup.cgi.templating.HTMLClass``
1587+
This is implemented by the ``roundup.cgi.templating.HTMLClass``
15871588
class.
15881589

15891590
This wrapper object provides access to a hyperb class. It is used
@@ -1617,7 +1618,7 @@ is_edit_ok is the user allowed to Edit the current class?
16171618
is_view_ok is the user allowed to View the current class?
16181619
=========== =============================================================
16191620

1620-
Note that if you have a property of the same name as one of the above
1621+
If you have a property of the same name as one of the above
16211622
methods, you'll need to access it using a python "item access"
16221623
expression. For example::
16231624

@@ -1629,8 +1630,7 @@ will access the "list" property, rather than the list method.
16291630
Hyperdb item wrapper
16301631
::::::::::::::::::::
16311632

1632-
Note: this is implemented by the ``roundup.cgi.templating.HTMLItem``
1633-
class.
1633+
This is implemented by the ``roundup.cgi.templating.HTMLItem`` class.
16341634

16351635
This wrapper object provides access to a hyperb item.
16361636

@@ -1658,7 +1658,7 @@ download_url generates a url-quoted link for download of FileClass
16581658
item contents (ie. file<id>/<name>)
16591659
=============== ========================================================
16601660

1661-
Note that if you have a property of the same name as one of the above
1661+
If you have a property of the same name as one of the above
16621662
methods, you'll need to access it using a python "item access"
16631663
expression. For example::
16641664

@@ -1670,7 +1670,7 @@ will access the "journal" property, rather than the journal method.
16701670
Hyperdb property wrapper
16711671
::::::::::::::::::::::::
16721672

1673-
Note: this is implemented by subclasses of the
1673+
This is implemented by subclasses of the
16741674
``roundup.cgi.templating.HTMLProperty`` class (``HTMLStringProperty``,
16751675
``HTMLNumberProperty``, and so on).
16761676

@@ -1718,14 +1718,14 @@ plain render a "plain" representation of the property. This method
17181718

17191719
hyperlink
17201720
If true, turn URLs, email addresses and hyperdb item
1721-
designators in the text into hyperlinks (default: no). Note
1722-
that you'll need to use the "structure" TAL option if you
1721+
designators in the text into hyperlinks (default: no).
1722+
You'll need to use the "structure" TAL option if you
17231723
want to use this ``tal:content`` expression::
17241724

17251725
"structure python:msg.content.plain(hyperlink=1)"
17261726

1727-
Note also that the text is automatically HTML-escaped before
1728-
the hyperlinking transformation.
1727+
The text is automatically HTML-escaped before the hyperlinking
1728+
transformation done in the plain() method.
17291729
hyperlinked The same as msg.content.plain(hyperlink=1), but nicer::
17301730

17311731
"structure msg/content/hyperlinked"
@@ -1786,8 +1786,7 @@ have permission to view the information.
17861786
The request variable
17871787
~~~~~~~~~~~~~~~~~~~~
17881788

1789-
Note: this is implemented by the ``roundup.cgi.templating.HTMLRequest``
1790-
class.
1789+
This is implemented by the ``roundup.cgi.templating.HTMLRequest`` class.
17911790

17921791
The request variable is packed with information about the current
17931792
request.
@@ -1851,8 +1850,8 @@ or the python expression::
18511850

18521851
python:request.form['name'].value
18531852

1854-
Note the "item" access used in the python case, and also note the
1855-
explicit "value" attribute we have to access. That's because the form
1853+
We use the "item" access used in the python case with an explicit "value"
1854+
attribute we have to access. That's because the form
18561855
variables are stored as MiniFieldStorages. If there's more than one
18571856
"name" value in the form, then the above will break since
18581857
``request/form/name`` is actually a *list* of MiniFieldStorages. So it's
@@ -1862,8 +1861,7 @@ best to know beforehand what you're dealing with.
18621861
The db variable
18631862
~~~~~~~~~~~~~~~
18641863

1865-
Note: this is implemented by the ``roundup.cgi.templating.HTMLDatabase``
1866-
class.
1864+
This is implemented by the ``roundup.cgi.templating.HTMLDatabase`` class.
18671865

18681866
Allows access to all hyperdb classes as attributes of this variable. If
18691867
you want access to the "user" class, for example, you would use::
@@ -1881,8 +1879,7 @@ The access results in a `hyperdb class wrapper`_.
18811879
The templates variable
18821880
~~~~~~~~~~~~~~~~~~~~~~
18831881

1884-
Note: this is implemented by the ``roundup.cgi.templating.Templates``
1885-
class.
1882+
This is implemented by the ``roundup.cgi.templating.Templates`` class.
18861883

18871884
This variable doesn't have any useful methods defined. It supports being
18881885
used in expressions to access the templates, and consequently the
@@ -1909,9 +1906,8 @@ or the python expression::
19091906
The utils variable
19101907
~~~~~~~~~~~~~~~~~~
19111908

1912-
Note: this is implemented by the
1913-
``roundup.cgi.templating.TemplatingUtils`` class, but it may be extended
1914-
as described below.
1909+
This is implemented by the ``roundup.cgi.templating.TemplatingUtils``
1910+
class, but it may be extended as described below.
19151911

19161912
=============== ========================================================
19171913
Method Description
@@ -1960,7 +1956,7 @@ addition, it has several more attributes:
19601956
=============== ========================================================
19611957
Attribute Description
19621958
=============== ========================================================
1963-
start indicates the start index of the batch. *Note: unlike
1959+
start indicates the start index of the batch. *unlike
19641960
the argument, is a 1-based index (I know, lame)*
19651961
first indicates the start index of the batch *as a 0-based
19661962
index*
@@ -2050,9 +2046,10 @@ descending order. The filter section shows filters for the "status" and
20502046
Searching Views
20512047
---------------
20522048

2053-
Note: if you add a new column to the ``:columns`` form variable
2054-
potentials then you will need to add the column to the appropriate
2055-
`index views`_ template so that it is actually displayed.
2049+
.. note::
2050+
If you add a new column to the ``:columns`` form variable
2051+
potentials then you will need to add the column to the appropriate
2052+
`index views`_ template so that it is actually displayed.
20562053

20572054
This is one of the class context views. The template used is typically
20582055
"*classname*.search". The form on this page should have "search" as its
@@ -2081,8 +2078,8 @@ The two special form values on search pages which are handled by the
20812078
:query_name
20822079
If supplied, the search parameters (including :search_text) will be
20832080
saved off as a the query item and registered against the user's
2084-
queries property. Note that the *classic* template schema has this
2085-
ability, but the *minimal* template schema does not.
2081+
queries property. The *classic* template schema has this ability, but
2082+
the *minimal* template schema does not.
20862083

20872084

20882085
Item Views
@@ -2535,7 +2532,7 @@ the "category" objects - is matched. If they do have permission then
25352532
they will get a link to another page which will let the user add new
25362533
categories.
25372534

2538-
Note that if you have permission to *view* but not to *edit* categories,
2535+
If you have permission to *view* but not to *edit* categories,
25392536
then all you will see is a "Categories" header with nothing underneath
25402537
it. This is obviously not very good interface design, but will do for
25412538
now. I just claim that it is so I can add more links in this section
@@ -2803,7 +2800,7 @@ be able to give a summary of the total time spent on a particular issue.
28032800
# storage for time logging
28042801
timelog = Class(db, "timelog", period=Interval())
28052802

2806-
Note that we automatically get the date of the time log entry
2803+
We automatically get the date of the time log entry
28072804
creation through the standard property "creation".
28082805

28092806
2. Link to the new class from your issue class (again, in
@@ -2880,8 +2877,8 @@ be able to give a summary of the total time spent on a particular issue.
28802877
</tr>
28812878
</table>
28822879

2883-
I put this just above the Messages log in my issue display. Note our
2884-
use of the ``totalTimeSpent`` method which will total up the times
2880+
I put this just above the Messages log in my issue display. We use
2881+
the ``totalTimeSpent`` method which will total up the times
28852882
for the issue and return a new Interval. That will be automatically
28862883
displayed in the template as text like "+ 1y 2:40" (1 year, 2 hours
28872884
and 40 minutes).
@@ -3075,7 +3072,7 @@ Now we map the UN*X group numbers to the Roles that users should have::
30753072
'505': 'User', # marketing
30763073
}
30773074

3078-
Now we do all the work. Note that the body of the script (where we have
3075+
Now we do all the work. The body of the script (where we have
30793076
the tracker database open) is wrapped in a ``try`` / ``finally`` clause,
30803077
so that we always close the database cleanly when we're finished. So, we
30813078
now do all the work::
@@ -3265,8 +3262,7 @@ vacation". Not very useful, and relatively easy to stop.
32653262
except roundupdb.MessageSendError, message:
32663263
raise roundupdb.DetectorError, message
32673264

3268-
Note that this is the standard nosy reaction code, with the small
3269-
addition of::
3265+
This is the standard nosy reaction code, with the small addition of::
32703266

32713267
# filter out the people on vacation
32723268
sendto = [i for i in sendto if not users.get(i, 'vacation', 0)]
@@ -3460,9 +3456,14 @@ resolved. To achieve this:
34603456

34613457
4. Finally, and this is an optional step, modify the tracker web page
34623458
URLs so they filter out issues with any blockers. You do this by
3463-
adding an additional filter on "blockers" for the value "-1". For
3464-
example, the existing "Show All" link in the "page" template (in the
3465-
tracker's "html" directory) looks like this::
3459+
adding an additional filter on "blockers" for the value "-1".
3460+
3461+
.. note::
3462+
the following examples are line-wrapped on the trailing & and
3463+
should be unwrapped.
3464+
3465+
For example, the existing "Show All" link in the "page" template (in
3466+
the tracker's "html" directory) looks like this::
34663467

34673468
<a href="issue?:sort=-activity&:group=priority&:filter=status&
34683469
:columns=id,activity,title,creator,assignedto,status&
@@ -3475,12 +3476,9 @@ resolved. To achieve this:
34753476
blockers=-1&:columns=id,activity,title,creator,assignedto,status&
34763477
status=-1,1,2,3,4,5,6,7">Show All</a><br>
34773478

3478-
:Note: the above examples are line-wrapped on the trailing & and should
3479-
be unwrapped.
3480-
3481-
That's it. You should now be able to set blockers on your issues. Note
3482-
that if you want to know whether an issue has any other issues dependent
3483-
on it (i.e. it's in their blockers list) you can look at the journal
3479+
That's it. You should now be able to set blockers on your issues. If you
3480+
want to know whether an issue has any other issues dependent on it
3481+
(i.e. it's in their blockers list) you can look at the journal
34843482
history at the bottom of the issue page - look for a "link" event to
34853483
another issue's "blockers" property.
34863484

@@ -3767,7 +3765,7 @@ Finally we add a new *auditor* to the ``detectors`` directory called
37673765
db.issue.audit('retire', audit_provisionaluser)
37683766
db.issue.audit('restore', audit_provisionaluser)
37693767

3770-
Note that some older trackers might also want to change the ``page.html``
3768+
Some older trackers might also want to change the ``page.html``
37713769
template as follows::
37723770

37733771
<p class="classblock"
@@ -3777,8 +3775,7 @@ template as follows::
37773775
<tal:block tal:condition="python:request.user.hasPermission('Edit', None)">
37783776
<a href="home?:template=classlist">Class List</a><br>
37793777

3780-
(note that the "-" indicates a removed line, and the "+" indicates an added
3781-
line).
3778+
(the "-" indicates a removed line, and the "+" indicates an added line).
37823779

37833780

37843781
Changes to the Web User Interface
@@ -3974,7 +3971,7 @@ Setting up a "wizard" (or "druid") for controlled adding of issues
39743971
.
39753972
</form>
39763973

3977-
Note that later in the form, I test the value of "cat" include form
3974+
Later in the form, I test the value of "cat" include form
39783975
elements that are appropriate. For example::
39793976

39803977
<tal:block tal:condition="python:cat in '6 10 13 14 15 16 17'.split()">

0 commit comments

Comments
 (0)