Code

- added a favicon
[roundup.git] / doc / customizing.txt
index afc7f6ec1b509730e927f5b7e431eca9edd0576d..243eb0335ffdabce601a7231826244bd6a96df2f 100644 (file)
@@ -2,7 +2,7 @@
 Customising Roundup
 ===================
 
-:Version: $Revision: 1.129 $
+:Version: $Revision: 1.132 $
 
 .. This document borrows from the ZopeBook section on ZPT. The original is at:
    http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx
@@ -1602,6 +1602,8 @@ hasPermission   specific to the "user" class - determine whether the
 is_edit_ok      is the user allowed to Edit the current item?
 is_view_ok      is the user allowed to View the current item?
 is_retired      is the item retired?
+download_url    generates a url-quoted link for download of FileClass
+                item contents (ie. file<id>/<name>)
 =============== ========================================================
 
 Note that if you have a property of the same name as one of the above
@@ -1713,6 +1715,7 @@ menu        only on Link and Multilink properties - render a form select
             list for this property
 reverse     only on Multilink properties - produce a list of the linked
             items in reverse order
+isset       returns True if the property has been set to a value
 =========== ================================================================
 
 All of the above functions perform checks for permissions required to
@@ -1862,6 +1865,8 @@ as described below.
 Method          Description
 =============== ========================================================
 Batch           return a batch object using the supplied list
+url_quote       quote some text as safe for a URL (ie. space, %, ...)
+html_quote      quote some text as safe in HTML (ie. <, >, ...)
 =============== ========================================================
 
 You may add additional utility methods by writing them in your tracker
@@ -2839,7 +2844,7 @@ Tracking different types of issues
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 Sometimes you will want to track different types of issues - developer,
-customer support, systems, sales leads, etc. A single Rounup tracker is
+customer support, systems, sales leads, etc. A single Roundup tracker is
 able to support multiple types of issues. This example demonstrates adding
 a customer support issue class to a tracker.
 
@@ -2856,34 +2861,40 @@ a customer support issue class to a tracker.
                     status=Link("status"), deadline=Date(),
                     affects=Multilink("system"))
 
-3. We're going to restrict the users able to access this new class to just
-   the users with a new "SysAdmin" Role. To do this, we add some security
-   declarations::
-
-    p = db.security.getPermission('View', 'support')
-    db.security.addPermissionToRole('SysAdmin', p)
-    p = db.security.getPermission('Edit', 'support')
-    db.security.addPermissionToRole('SysAdmin', p)
-
-   You would then (as an "admin" user) edit the details of the appropriate
-   users, and add "SysAdmin" to their Roles list.
-
-4. Copy the existing "issue.*" (item, search and index) templates in the
+3. Copy the existing "issue.*" (item, search and index) templates in the
    tracker's "html" to "support.*". Edit them so they use the properties
    defined in the "support" class. Be sure to check for hidden form
    variables like "required" to make sure they have the correct set of
    required properties.
 
-5. Edit the modules in the "detectors", adding lines to their "init"
+4. Edit the modules in the "detectors", adding lines to their "init"
    functions where appropriate. Look for "audit" and "react" registrations
    on the "issue" class, and duplicate them for "support".
 
-6. Create a new sidebar box for the new support class. Duplicate the
+5. Create a new sidebar box for the new support class. Duplicate the
    existing issues one, changing the "issue" class name to "support".
 
 6. Re-start your tracker and start using the new "support" class.
 
 
+Optionally, you might want to restrict the users able to access this new
+class to just the users with a new "SysAdmin" Role. To do this, we add
+some security declarations::
+
+    p = db.security.getPermission('View', 'support')
+    db.security.addPermissionToRole('SysAdmin', p)
+    p = db.security.getPermission('Edit', 'support')
+    db.security.addPermissionToRole('SysAdmin', p)
+
+You would then (as an "admin" user) edit the details of the appropriate
+users, and add "SysAdmin" to their Roles list.
+
+Alternatively, you might want to change the Edit/View permissions granted
+for the "issue" class so that it's only available to users with the "System"
+or "Developer" Role, and then the new class you're adding is available to
+all with the "User" Role.
+
+
 Using External User Databases
 -----------------------------