From 373db8b1a6b7292094e0cbc4b4d67f8c33e1666d Mon Sep 17 00:00:00 2001 From: richard Date: Mon, 9 Sep 2002 01:59:43 +0000 Subject: [PATCH] more doc, more cleanup git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@1093 57a73879-2fb5-44c3-a270-3262357dd7e2 --- doc/customizing.txt | 180 +++++++++++--------- roundup/cgi/templating.py | 31 ++-- roundup/templates/classic/html/file.newitem | 14 +- roundup/templates/classic/html/issue.item | 36 ++-- roundup/templates/classic/html/issue.search | 9 +- roundup/templates/classic/html/msg.item | 56 +++--- roundup/templates/classic/html/style.css | 12 +- roundup/templates/classic/html/user.item | 14 +- 8 files changed, 175 insertions(+), 177 deletions(-) diff --git a/doc/customizing.txt b/doc/customizing.txt index 6a8b28b..1f4d65e 100644 --- a/doc/customizing.txt +++ b/doc/customizing.txt @@ -2,7 +2,7 @@ Customising Roundup =================== -:Version: $Revision: 1.20 $ +:Version: $Revision: 1.21 $ .. This document borrows from the ZopeBook section on ZPT. The original is at: http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx @@ -1016,6 +1016,9 @@ displayed in an editable field. Index Views ~~~~~~~~~~~ +This is one of the class context views. It is also the default view for +classes. The template used is "*classname*.index". + Index View Specifiers ::::::::::::::::::::: @@ -1058,109 +1061,120 @@ TODO Searching Views ~~~~~~~~~~~~~~~ +This is one of the class context views. The template used is typically +"*classname*.search". + TODO Item Views ~~~~~~~~~~ -An item view contains an editor section and a spool section. At the top of an -item view, links to superseding and superseded items are always displayed. +The basic view of a hyperdb item is provided by the "*classname*.item" +template. It generally has three sections; an "editor", a "spool" and a +"history" section. -Editor Section -:::::::::::::: -The editor section is generated from a template containing tags to -insert the appropriate widgets for editing properties. -Here's an example of a basic editor template.:: +Editor Section +:::::::::::::: - - - - - - - - - -
- -
- - - - - -
- -As shown in the example, the editor template can also request the display of a -"note" field, which is a text area for entering a note to go along with a -change. - -The tag used in the index may also be used here - it checks to see -if the nominated Multilink property has any entries. This can be used to -eliminate sections of the editor section if the property has no entries:: - - - - - -
View: -
+The editor section is used to manipulate the item - it may be a +static display if the user doesn't have permission to edit the item. + +Here's an example of a basic editor template (this is the default "classic" +template issue item edit form - from the "issue.item" template):: + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Titletitle
PrioritypriorityStatusstatus
Superseder + + + +
View: + +
Nosy List + + +
Assigned To + assignedto menu   
Change Note + +
File
  + submit button will go here +
-The "View: " part with the links will only display if the superseder property -has values. When a change is submitted, the system automatically generates a message -describing the changed properties. +describing the changed properties. As shown in the example, the editor +template can use the "__note" and "__file" fields, which are added to the +standard change note message generated by Roundup. -If a note is given in the "note" field, the note is appended to the -description. The message is then added to the item's message spool (thus -triggering the standard detector to react by sending out this message to the -nosy list). +Spool Section +::::::::::::: -The message also displays all of the property values on the item and indicates -which ones have changed. An example of such a message might be this:: +The spool section lists related information like the messages and files of +an issue. - Polly's taken a turn for the worse - this is now really important! - ----- - title: Polly Parrot is dead - priority: critical - status: unread -> in-progress - fixer: terry - keywords: parrot,plumage,perch,nailed,dead +TODO -Spool Section -::::::::::::: -The spool section lists messages in the item's "messages" property. The index -of messages displays the "date", "author", and "summary" properties on the -message nodes, and selecting a message takes you to its content. +History Section +::::::::::::::: + +The final section displayed is the history of the item - its database journal. +This is generally generated with the template:: + + + +*To be done:* -The tag used in the index may also be used here - it checks to see -if the nominated Multilink property has any entries. This can be used to -eliminate sections of the spool section if the property has no entries:: +*The actual history entries of the node may be accessed for manual templating +through the "journal" method of the item*:: - - - Files - + + a journal entry + - - - - +*where each journal entry is an HTMLJournalEntry.* Access Controls diff --git a/roundup/cgi/templating.py b/roundup/cgi/templating.py index d8a4f69..5209442 100644 --- a/roundup/cgi/templating.py +++ b/roundup/cgi/templating.py @@ -414,12 +414,14 @@ class HTMLItem: # XXX this probably should just return the history items, not the HTML def history(self, direction='descending'): - l = ['', - '', - _(''), - _(''), - _(''), - _(''), + l = ['
DateUserActionArgs
' + '', + _(''), + _(''), + _(''), + _(''), ''] comments = {} history = self.klass.history(self.nodeid) @@ -550,9 +552,8 @@ class HTMLItem: handled by the history display!''') arg_s = '' + str(args) + '' date_s = date_s.replace(' ', ' ') - l.append('' - ''%(date_s, - user, action, arg_s)) + l.append(''%( + date_s, user, action, arg_s)) if comments: l.append(_('')) for entry in comments.values(): @@ -560,10 +561,6 @@ class HTMLItem: l.append('
', + _('History'), + '
DateUserActionArgs
%s%s%s%s
%s%s%s%s
Note:
') return '\n'.join(l) - def remove(self): - # XXX do what? - return '' - class HTMLUser(HTMLItem): ''' Accesses through the *user* (a special case of item) ''' @@ -758,10 +755,6 @@ class LinkHTMLProperty(HTMLProperty): value = cgi.escape(value) return value - # XXX most of the stuff from here down is of dubious utility - it's easy - # enough to do in the template by hand (and in some cases, it's shorter - # and clearer... - def field(self): linkcl = self.db.getclass(self.prop.classname) if linkcl.getprops().has_key('order'): @@ -900,10 +893,6 @@ class MultilinkHTMLProperty(HTMLProperty): value = cgi.escape(value) return value - # XXX most of the stuff from here down is of dubious utility - it's easy - # enough to do in the template by hand (and in some cases, it's shorter - # and clearer... - def field(self, size=30, showid=0): sortfunc = make_sort_function(self.db, self.prop.classname) linkcl = self.db.getclass(self.prop.classname) diff --git a/roundup/templates/classic/html/file.newitem b/roundup/templates/classic/html/file.newitem index 6776d08..32d5149 100644 --- a/roundup/templates/classic/html/file.newitem +++ b/roundup/templates/classic/html/file.newitem @@ -1,18 +1,18 @@ - +
- + - - - + + + - + - +
File upload details
File:
File:
 
diff --git a/roundup/templates/classic/html/issue.item b/roundup/templates/classic/html/issue.item index 70ff043..be47a15 100644 --- a/roundup/templates/classic/html/issue.item +++ b/roundup/templates/classic/html/issue.item @@ -4,20 +4,20 @@ - +
- + - + - + - + - + - + - - + - - + - + - + - @@ -97,10 +95,8 @@ changed ${context/activity}.">activity info
Titletitletitle
Priorityprioritypriority Statusstatusstatus
Superseder @@ -33,32 +33,30 @@
Assigned To + assignedto menu    
Change Note +
File - -
  + submit button will go here
- - - -
History
history
+ + diff --git a/roundup/templates/classic/html/issue.search b/roundup/templates/classic/html/issue.search index 3bd1ca1..0444c62 100644 --- a/roundup/templates/classic/html/issue.search +++ b/roundup/templates/classic/html/issue.search @@ -8,9 +8,12 @@ defgroup python:['priority']; defdisp python:'id activity title status assignedto'.split()"> - -   - Filter onDisplaySort onGroup on + +   + Filter on + Display + Sort on + Group on diff --git a/roundup/templates/classic/html/msg.item b/roundup/templates/classic/html/msg.item index abf69d8..0160a9e 100644 --- a/roundup/templates/classic/html/msg.item +++ b/roundup/templates/classic/html/msg.item @@ -1,42 +1,40 @@ - +
- - - + + + - - - + + + - - - + + + - - + + - - - - - - - +
Author
Author
Recipients
Recipients
Date
Date
-

- 
Files
- dld link - - creator's name, - creation date -
+ + + + + + +
Files
File nameUploaded
+ dld link + + creator's name, + creation date +
-History -history + diff --git a/roundup/templates/classic/html/style.css b/roundup/templates/classic/html/style.css index e1278d9..10a31ef 100644 --- a/roundup/templates/classic/html/style.css +++ b/roundup/templates/classic/html/style.css @@ -58,35 +58,36 @@ p.error-message { /* style for forms */ table.form { + padding: 2; border-spacing: 0px; border-collapse: separate; } -.form th { +table.form th { font-weight: bold; color: #333388; text-align: right; vertical-align: top; } -.form-header th { +table.form th.header { font-weight: bold; color: #333388; background-color: #eeeeff; text-align: left; } -.form td.optional { +table.form td.optional { font-weight: bold; font-style: italic; color: #333333; } -.form td { +table.form td { color: #333333; } -.form td.html { +table.form td.html { color: #777777; } @@ -219,6 +220,7 @@ table.history th { table.history td { font-size: 90%; + vertical-align: top; } /* style for "other" displays */ diff --git a/roundup/templates/classic/html/user.item b/roundup/templates/classic/html/user.item index 2968d78..96b3926 100644 --- a/roundup/templates/classic/html/user.item +++ b/roundup/templates/classic/html/user.item @@ -28,9 +28,9 @@ You are not allowed to view this page. Roles - roles - + @@ -58,7 +58,7 @@ You are not allowed to view this page. - + @@ -66,12 +66,8 @@ You are not allowed to view this page.
Queries
- - - - - -
History
history
+ +
-- 2.30.2