Mercurial > p > roundup > code
comparison doc/customizing.txt @ 3039:70c9954f619f maint-0.8
formatting fixes
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Mon, 03 Jan 2005 23:07:03 +0000 |
| parents | 714f2a60a97e |
| children | abdeb9b0e53a |
comparison
equal
deleted
inserted
replaced
| 3037:714f2a60a97e | 3039:70c9954f619f |
|---|---|
| 1 =================== | 1 =================== |
| 2 Customising Roundup | 2 Customising Roundup |
| 3 =================== | 3 =================== |
| 4 | 4 |
| 5 :Version: $Revision: 1.161.2.1 $ | 5 :Version: $Revision: 1.161.2.2 $ |
| 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:: |
| 283 | 283 |
| 284 | 284 |
| 285 Tracker Schema | 285 Tracker Schema |
| 286 ============== | 286 ============== |
| 287 | 287 |
| 288 Note: if you modify the schema, you'll most likely need to edit the | 288 .. note:: |
| 289 `web interface`_ HTML template files and `detectors`_ to reflect | 289 if you modify the schema, you'll most likely need to edit the |
| 290 your changes. | 290 `web interface`_ HTML template files and `detectors`_ to reflect |
| 291 your changes. | |
| 291 | 292 |
| 292 A tracker schema defines what data is stored in the tracker's database. | 293 A tracker schema defines what data is stored in the tracker's database. |
| 293 Schemas are defined using Python code in the ``schema.py`` module of your | 294 Schemas are defined using Python code in the ``schema.py`` module of your |
| 294 tracker. | 295 tracker. |
| 295 | 296 |
| 690 | 691 |
| 691 | 692 |
| 692 Database Content | 693 Database Content |
| 693 ================ | 694 ================ |
| 694 | 695 |
| 695 Note: if you modify the content of definitional classes, you'll most | 696 .. note:: |
| 696 likely need to edit the tracker `detectors`_ to reflect your | 697 if you modify the content of definitional classes, you'll most |
| 697 changes. | 698 likely need to edit the tracker `detectors`_ to reflect your changes. |
| 698 | 699 |
| 699 Customisation of the special "definitional" classes (eg. status, | 700 Customisation of the special "definitional" classes (eg. status, |
| 700 priority, resolution, ...) may be done either before or after the | 701 priority, resolution, ...) may be done either before or after the |
| 701 tracker is initialised. The actual method of doing so is completely | 702 tracker is initialised. The actual method of doing so is completely |
| 702 different in each case though, so be careful to use the right one. | 703 different in each case though, so be careful to use the right one. |
| 899 | 900 |
| 900 **automatic registration of users in the e-mail gateway** | 901 **automatic registration of users in the e-mail gateway** |
| 901 By giving the "anonymous" user the "Email Registration" Role, any | 902 By giving the "anonymous" user the "Email Registration" Role, any |
| 902 unidentified user will automatically be registered with the tracker | 903 unidentified user will automatically be registered with the tracker |
| 903 (with no password, so they won't be able to log in through the web | 904 (with no password, so they won't be able to log in through the web |
| 904 until an admin sets their password). Note: this is the default | 905 until an admin sets their password). This is the default behaviour |
| 905 behaviour in the tracker templates that ship with Roundup. | 906 in the tracker templates that ship with Roundup. |
| 906 | 907 |
| 907 **anonymous access through the e-mail gateway** | 908 **anonymous access through the e-mail gateway** |
| 908 Give the "anonymous" user the "Email Access" and ("Edit", "issue") | 909 Give the "anonymous" user the "Email Access" and ("Edit", "issue") |
| 909 Roles but do not not give them the "Email Registration" Role. This | 910 Roles but do not not give them the "Email Registration" Role. This |
| 910 means that when an unknown user sends email into the tracker, they're | 911 means that when an unknown user sends email into the tracker, they're |
| 1330 **style.css.html** | 1331 **style.css.html** |
| 1331 a static file that is served up as-is | 1332 a static file that is served up as-is |
| 1332 | 1333 |
| 1333 The *classic* template has a number of additional templates. | 1334 The *classic* template has a number of additional templates. |
| 1334 | 1335 |
| 1335 Note: Remember that you can create any template extension you want to, | 1336 Remember that you can create any template extension you want to, |
| 1336 so if you just want to play around with the templating for new issues, | 1337 so if you just want to play around with the templating for new issues, |
| 1337 you can copy the current "issue.item" template to "issue.test", and then | 1338 you can copy the current "issue.item" template to "issue.test", and then |
| 1338 access the test template using the "@template" URL argument:: | 1339 access the test template using the "@template" URL argument:: |
| 1339 | 1340 |
| 1340 http://your.tracker.example/tracker/issue?@template=test | 1341 http://your.tracker.example/tracker/issue?@template=test |
| 1584 http://dev.zope.org/Wikis/DevSite/Projects/ZPT/METAL%20Specification%201.0 | 1585 http://dev.zope.org/Wikis/DevSite/Projects/ZPT/METAL%20Specification%201.0 |
| 1585 | 1586 |
| 1586 Information available to templates | 1587 Information available to templates |
| 1587 ---------------------------------- | 1588 ---------------------------------- |
| 1588 | 1589 |
| 1589 Note: this is implemented by | 1590 This is implemented by ``roundup.cgi.templating.RoundupPageTemplate`` |
| 1590 ``roundup.cgi.templating.RoundupPageTemplate`` | |
| 1591 | 1591 |
| 1592 The following variables are available to templates. | 1592 The following variables are available to templates. |
| 1593 | 1593 |
| 1594 **context** | 1594 **context** |
| 1595 The current context. This is either None, a `hyperdb class wrapper`_ | 1595 The current context. This is either None, a `hyperdb class wrapper`_ |
| 1679 "context/id". | 1679 "context/id". |
| 1680 | 1680 |
| 1681 Hyperdb class wrapper | 1681 Hyperdb class wrapper |
| 1682 ::::::::::::::::::::: | 1682 ::::::::::::::::::::: |
| 1683 | 1683 |
| 1684 Note: this is implemented by the ``roundup.cgi.templating.HTMLClass`` | 1684 This is implemented by the ``roundup.cgi.templating.HTMLClass`` |
| 1685 class. | 1685 class. |
| 1686 | 1686 |
| 1687 This wrapper object provides access to a hyperb class. It is used | 1687 This wrapper object provides access to a hyperb class. It is used |
| 1688 primarily in both index view and new item views, but it's also usable | 1688 primarily in both index view and new item views, but it's also usable |
| 1689 anywhere else that you wish to access information about a class, or the | 1689 anywhere else that you wish to access information about a class, or the |
| 1735 | 1735 |
| 1736 | 1736 |
| 1737 Hyperdb item wrapper | 1737 Hyperdb item wrapper |
| 1738 :::::::::::::::::::: | 1738 :::::::::::::::::::: |
| 1739 | 1739 |
| 1740 Note: this is implemented by the ``roundup.cgi.templating.HTMLItem`` | 1740 This is implemented by the ``roundup.cgi.templating.HTMLItem`` |
| 1741 class. | 1741 class. |
| 1742 | 1742 |
| 1743 This wrapper object provides access to a hyperb item. | 1743 This wrapper object provides access to a hyperb item. |
| 1744 | 1744 |
| 1745 We allow access to properties. There will be no "id" property. The value | 1745 We allow access to properties. There will be no "id" property. The value |
| 1781 | 1781 |
| 1782 | 1782 |
| 1783 Hyperdb property wrapper | 1783 Hyperdb property wrapper |
| 1784 :::::::::::::::::::::::: | 1784 :::::::::::::::::::::::: |
| 1785 | 1785 |
| 1786 Note: this is implemented by subclasses of the | 1786 This is implemented by subclasses of the |
| 1787 ``roundup.cgi.templating.HTMLProperty`` class (``HTMLStringProperty``, | 1787 ``roundup.cgi.templating.HTMLProperty`` class (``HTMLStringProperty``, |
| 1788 ``HTMLNumberProperty``, and so on). | 1788 ``HTMLNumberProperty``, and so on). |
| 1789 | 1789 |
| 1790 This wrapper object provides access to a single property of a class. Its | 1790 This wrapper object provides access to a single property of a class. Its |
| 1791 value may be either: | 1791 value may be either: |
| 1918 | 1918 |
| 1919 | 1919 |
| 1920 The request variable | 1920 The request variable |
| 1921 ~~~~~~~~~~~~~~~~~~~~ | 1921 ~~~~~~~~~~~~~~~~~~~~ |
| 1922 | 1922 |
| 1923 Note: this is implemented by the ``roundup.cgi.templating.HTMLRequest`` | 1923 This is implemented by the ``roundup.cgi.templating.HTMLRequest`` |
| 1924 class. | 1924 class. |
| 1925 | 1925 |
| 1926 The request variable is packed with information about the current | 1926 The request variable is packed with information about the current |
| 1927 request. | 1927 request. |
| 1928 | 1928 |
| 1994 | 1994 |
| 1995 | 1995 |
| 1996 The db variable | 1996 The db variable |
| 1997 ~~~~~~~~~~~~~~~ | 1997 ~~~~~~~~~~~~~~~ |
| 1998 | 1998 |
| 1999 Note: this is implemented by the ``roundup.cgi.templating.HTMLDatabase`` | 1999 This is implemented by the ``roundup.cgi.templating.HTMLDatabase`` |
| 2000 class. | 2000 class. |
| 2001 | 2001 |
| 2002 Allows access to all hyperdb classes as attributes of this variable. If | 2002 Allows access to all hyperdb classes as attributes of this variable. If |
| 2003 you want access to the "user" class, for example, you would use:: | 2003 you want access to the "user" class, for example, you would use:: |
| 2004 | 2004 |
| 2013 | 2013 |
| 2014 | 2014 |
| 2015 The templates variable | 2015 The templates variable |
| 2016 ~~~~~~~~~~~~~~~~~~~~~~ | 2016 ~~~~~~~~~~~~~~~~~~~~~~ |
| 2017 | 2017 |
| 2018 Note: this is implemented by the ``roundup.cgi.templating.Templates`` | 2018 This is implemented by the ``roundup.cgi.templating.Templates`` |
| 2019 class. | 2019 class. |
| 2020 | 2020 |
| 2021 This variable doesn't have any useful methods defined. It supports being | 2021 This variable doesn't have any useful methods defined. It supports being |
| 2022 used in expressions to access the templates, and consequently the | 2022 used in expressions to access the templates, and consequently the |
| 2023 template macros. You may access the templates using the following path | 2023 template macros. You may access the templates using the following path |
| 2069 | 2069 |
| 2070 | 2070 |
| 2071 The utils variable | 2071 The utils variable |
| 2072 ~~~~~~~~~~~~~~~~~~ | 2072 ~~~~~~~~~~~~~~~~~~ |
| 2073 | 2073 |
| 2074 Note: this is implemented by the | 2074 This is implemented by the |
| 2075 ``roundup.cgi.templating.TemplatingUtils`` class, but it may be extended | 2075 ``roundup.cgi.templating.TemplatingUtils`` class, but it may be extended |
| 2076 as described below. | 2076 as described below. |
| 2077 | 2077 |
| 2078 =============== ======================================================== | 2078 =============== ======================================================== |
| 2079 Method Description | 2079 Method Description |
| 2120 addition, it has several more attributes: | 2120 addition, it has several more attributes: |
| 2121 | 2121 |
| 2122 =============== ======================================================== | 2122 =============== ======================================================== |
| 2123 Attribute Description | 2123 Attribute Description |
| 2124 =============== ======================================================== | 2124 =============== ======================================================== |
| 2125 start indicates the start index of the batch. *Note: unlike | 2125 start indicates the start index of the batch. *Unlike |
| 2126 the argument, is a 1-based index (I know, lame)* | 2126 the argument, is a 1-based index (I know, lame)* |
| 2127 first indicates the start index of the batch *as a 0-based | 2127 first indicates the start index of the batch *as a 0-based |
| 2128 index* | 2128 index* |
| 2129 length the actual number of elements in the batch | 2129 length the actual number of elements in the batch |
| 2130 sequence_length the length of the original, unbatched, sequence. | 2130 sequence_length the length of the original, unbatched, sequence. |
| 2229 | 2229 |
| 2230 | 2230 |
| 2231 Searching Views | 2231 Searching Views |
| 2232 --------------- | 2232 --------------- |
| 2233 | 2233 |
| 2234 Note: if you add a new column to the ``@columns`` form variable | 2234 .. note:: |
| 2235 potentials then you will need to add the column to the appropriate | 2235 if you add a new column to the ``@columns`` form variable potentials |
| 2236 `index views`_ template so that it is actually displayed. | 2236 then you will need to add the column to the appropriate `index views`_ |
| 2237 template so that it is actually displayed. | |
| 2237 | 2238 |
| 2238 This is one of the class context views. The template used is typically | 2239 This is one of the class context views. The template used is typically |
| 2239 "*classname*.search". The form on this page should have "search" as its | 2240 "*classname*.search". The form on this page should have "search" as its |
| 2240 ``@action`` variable. The "search" action: | 2241 ``@action`` variable. The "search" action: |
| 2241 | 2242 |
| 3669 | 3670 |
| 3670 <a href="issue?:sort=-activity&:group=priority&:filter=status,blockers& | 3671 <a href="issue?:sort=-activity&:group=priority&:filter=status,blockers& |
| 3671 blockers=-1&:columns=id,activity,title,creator,assignedto,status& | 3672 blockers=-1&:columns=id,activity,title,creator,assignedto,status& |
| 3672 status=-1,1,2,3,4,5,6,7">Show All</a><br> | 3673 status=-1,1,2,3,4,5,6,7">Show All</a><br> |
| 3673 | 3674 |
| 3674 :Note: the above examples are line-wrapped on the trailing & and should | 3675 The above examples are line-wrapped on the trailing & and should |
| 3675 be unwrapped. | 3676 be unwrapped. |
| 3676 | 3677 |
| 3677 That's it. You should now be able to set blockers on your issues. Note | 3678 That's it. You should now be able to set blockers on your issues. Note |
| 3678 that if you want to know whether an issue has any other issues dependent | 3679 that if you want to know whether an issue has any other issues dependent |
| 3679 on it (i.e. it's in their blockers list) you can look at the journal | 3680 on it (i.e. it's in their blockers list) you can look at the journal |
| 3680 history at the bottom of the issue page - look for a "link" event to | 3681 history at the bottom of the issue page - look for a "link" event to |
