@@ -625,89 +625,151 @@ <h2><a name="custweb">Web Interface</a></h2>
625625newitem views. The newitem view is optional - the item view will be used if
626626the newitem view doesn't exist.
627627
628- < p >
629- < em > Next bit cut straight from the implementation guide</ em >
628+ < h3 > Displaying Properties</ h3 >
630629
631630< p >
632- < h3 > 8.2. Displaying Properties</ h3 >
633-
634- < p > Properties appear in the user interface in three contexts:
631+ Properties appear in the user interface in three contexts:
635632in indices, in editors, and as filters. For each type of
636633property, there are several display possibilities. For example,
637634in an index view, a string property may just be printed as
638635a plain string, but in an editor view, that property should
639636be displayed in an editable field.
640637
641- < p > The display of a property is handled by functions in
642- a < tt > displayers</ tt > module. Each function accepts at
643- least three standard arguments -- the database, class name,
644- and node id -- and returns a chunk of HTML.
638+ < p >
639+ The display of a property is handled by functions in
640+ the htmltemplate module.
645641
646- < p > Displayer functions are triggered by < tt > <display></ tt >
642+ < p >
643+ Displayer functions are triggered by < tt > <display></ tt >
647644tags in templates. The < tt > call</ tt > attribute of the tag
648645provides a Python expression for calling the displayer
649646function. The three standard arguments are inserted in
650647front of the arguments given. For example, the occurrence of
651648
652649< blockquote > < pre > < small
653- > <display call="plain('status', max=30 )">
650+ > <display call="plain('status')">
654651</ small > </ pre > </ blockquote >
655652
656- in a template triggers a call to
657-
658- < blockquote > < pre > < small
659- > plain(db, "issue", 13, "status", max=30)
660- </ small > </ pre > </ blockquote >
661-
662- when displaying item 13 in the "issue" class. The displayer
653+ in a template triggers a call the "plain" function. The displayer
663654functions can accept extra arguments to further specify
664655details about the widgets that should be generated. By defining new
665656displayer functions, the user interface can be highly customized.
666657
667- < p > Some of the standard displayer functions include:
658+ < p >
659+ < table border =1 cellspacing =0 >
660+ < tr > < th colspan =2 > The displayer functions are</ th > </ tr >
668661
669- < ul >
670- < li > < strong > plain</ strong > : display a String property directly;
671- display a Date property in a specified time zone with an option
672- to omit the time from the date stamp; for a Link or Multilink
662+ < tr > < td valign ="top "> < strong > plain</ strong > </ td >
663+ < td > Display a String property directly.
664+ < p >
665+ Display a Date property in a specified time zone with an option
666+ to omit the time from the date stamp.
667+ < p >
668+ For a Link or Multilink
673669property, display the key strings of the linked nodes (or the
674- ids if the linked class has no key property)
670+ ids if the linked class has no key property).
671+ < p >
672+ < em > Options:</ em > < br >
673+ escape (boolean) - HTML-escape the resulting text.
674+ </ td > </ tr >
675675
676- < li > < strong > field</ strong > : display a property like the
677- < strong > plain</ strong > displayer above, but in a text field
678- to be edited
676+ < tr > < td valign ="top "> < strong > field</ strong > </ td >
677+ < td > Display a property like the
678+ < strong > plain</ strong > displayer above, but in a form field
679+ to be edited. Strings, Dates and Intervals use TEXT fields, Links use
680+ SELECT fields and Multilinks use SELECT MULTIPLE fields.
681+ < p >
682+ < em > Options:</ em > < br >
683+ size (number) - width of TEXT fields.< br >
684+ height (number) - number of nows in SELECT MULTIPLE tags.< br >
685+ showid (boolean) - true includes the id of linked items in the SELECT
686+ MULTIPLE fields.
687+ </ td > </ tr >
679688
680- < li > < strong > menu</ strong > : for a Link property, display
681- a menu of the available choices
689+ < tr > < td valign ="top "> < strong > menu</ strong > </ td >
690+ < td > For a Links and Multilinks, display the same field as would be
691+ generated using < strong > field</ strong > .
692+ </ td > </ tr >
693+
694+ < tr > < td valign ="top "> < strong > link</ strong > </ td >
695+ < td > For a Link or Multilink property, display the names of the linked
696+ nodes, hyperlinked to the item views on those nodes. For other properties,
697+ link to this node with the property as the text.
698+ < p >
699+ < em > Options:</ em > < br >
700+ property (property name) - the property to use in the second case.
701+ </ td > </ tr >
682702
683- < li > < strong > link</ strong > : for a Link or Multilink property,
684- display the names of the linked nodes, hyperlinked to the
685- item views on those nodes
703+ < tr > < td valign ="top "> < strong > count</ strong > </ td >
704+ < td > For a Multilink property, display
705+ a count of the number of links in the list.
706+ < p >
707+ < em > Arguments:</ em > < br >
708+ property (property name) - the property to use.
686709
687- < li > < strong > count</ strong > : for a Multilink property, display
688- a count of the number of links in the list
710+ </ td > </ tr >
689711
690- < li > < strong > reldate</ strong > : display a Date property in terms
712+ < tr > < td valign ="top "> < strong > reldate</ strong > </ td >
713+ < td > Display a Date property in terms
691714of an interval relative to the current date (e.g. "+ 3w", "- 2d").
715+ < p >
716+ < em > Arguments:</ em > < br >
717+ property (property name) - the property to use.
718+ < p >
719+ < em > Options:</ em > < br >
720+ pretty (boolean) - display the relative date in an English form.
721+ </ td > </ tr >
692722
693- < li > < strong > download</ strong > : show a Link("file") or Multilink("file")
694- property using links that allow you to download files
723+ < tr > < td valign ="top "> < strong > download</ strong > </ td >
724+ < td > Show a Link("file") or Multilink("file")
725+ property using links that allow you to download files.
726+ < p >
727+ < em > Arguments:</ em > < br >
728+ property (property name) - the property to use.
729+ </ td > </ tr >
695730
696- < li > < strong > checklist</ strong > : for a Link or Multilink property,
697- display checkboxes for the available choices to permit filtering
698- </ ul >
731+ < tr > < td valign ="top "> < strong > checklist</ strong > </ td >
732+ < td > For a Link or Multilink property,
733+ display checkboxes for the available choices to permit filtering.
734+ < p >
735+ < em > Arguments:</ em > < br >
736+ property (property name) - the property to use.
737+ </ td > </ tr >
699738
700- < h3 > 8.3. Index Views</ h3 >
739+ < tr > < td valign ="top "> < strong > note</ strong > </ td >
740+ < td > Display the special notes field, which is a text area for entering a
741+ note to go along with a change.
742+ </ td > </ tr >
743+
744+ < tr > < td valign ="top "> < strong > list</ strong > </ td >
745+ < td > List the items specified by property using the standard index for
746+ the class.
747+ < p >
748+ < em > Arguments:</ em > < br >
749+ property (property name) - the property to use.
750+ </ td > </ tr >
751+
752+ < tr > < td valign ="top "> < strong > history</ strong > </ td >
753+ < td > List the history of the item.
754+ </ td > </ tr >
755+
756+ < tr > < td valign ="top "> < strong > submit</ strong > </ td >
757+ < td > Add a submit button for the item.
758+ </ td > </ tr >
759+
760+ </ table >
761+
762+ < h3 > Index Views</ h3 >
701763
702764< p > An index view contains two sections: a filter section
703765and an index section.
704766The filter section provides some widgets for selecting
705767which items appear in the index. The index section is
706768a table of items.
707769
708- < h4 > 8.3.1. Index View Specifiers</ h4 >
770+ < h4 > Index View Specifiers</ h4 >
709771
710- < p > An index view specifier looks like this (whitespace
772+ < p > An index view specifier (URL fragment) looks like this (whitespace
711773has been added for clarity):
712774
713775< blockquote > < pre > < small
@@ -757,7 +819,7 @@ <h4>8.3.1. Index View Specifiers</h4>
757819the default bug-tracker schema described above in
758820section 4.4.
759821
760- < h4 > 8.3.2. Filter Section</ h4 >
822+ < h4 > Filter Section</ h4 >
761823
762824< p > The template for a filter section provides the
763825filtering widgets at the top of the index view.
@@ -780,7 +842,12 @@ <h4>8.3.2. Filter Section</h4>
780842 <display call="menu('fixer')">
781843</property></ small > </ pre > </ blockquote >
782844
783- < h4 > 8.3.3. Index Section</ h4 >
845+ < p >
846+ The standard index generation code appends a section to the index pages
847+ which allows selection of the filters - from those which are defined in the
848+ filter template.
849+
850+ < h4 > Index Section</ h4 >
784851
785852< p > The template for an index section describes one row of
786853the index table.
@@ -805,7 +872,7 @@ <h4>8.3.3. Index Section</h4>
805872 </property>
806873</tr></ small > </ pre > </ blockquote >
807874
808- < h4 > 8.3.4. Sorting</ h4 >
875+ < h4 > Sorting</ h4 >
809876
810877< p > String and Date values are sorted in the natural way.
811878Link properties are sorted according to the value of the
@@ -814,21 +881,15 @@ <h4>8.3.4. Sorting</h4>
814881finally on the node ids. Multilink properties are
815882sorted according to how many links are present.
816883
817- < h3 > 8.4. Item Views</ h3 >
884+ < h3 > Item Views</ h3 >
818885
819886< p > An item view contains an editor section and a spool section.
820887At the top of an item view, links to superseding and superseded
821888items are always displayed.
822889
823- < h4 > 8.4.1. Item View Specifiers</ h4 >
824-
825- < p > An item view specifier is simply the item's designator:
826890
827- < blockquote > < pre > < small
828- > /patch23
829- </ small > </ pre > </ blockquote >
830891
831- < h4 > 8.4.2. Editor Section</ h4 >
892+ < h4 > Editor Section</ h4 >
832893
833894< p > The editor section is generated from a template
834895containing < tt > <display></ tt > tags to insert
@@ -873,30 +934,51 @@ <h4>8.4.2. Editor Section</h4>
873934
874935< p > When a change is submitted, the system automatically
875936generates a message describing the changed properties.
876- The message displays all of the property values on the
937+
938+ < p > If a note is given in the "note" field, the note is
939+ appended to the description. The message is then added
940+ to the item's message spool (thus triggering the standard
941+ detector to react by sending out this message to the nosy list).
942+
943+ < p >
944+ The message also displays all of the property values on the
877945item and indicates which ones have changed.
878946An example of such a message might be this:
879947
880- < blockquote > < pre > < small
881- > title: Polly Parrot is dead
948+ < blockquote > < pre >
949+ Polly's taken a turn for the worse - this is now really important!
950+ -----
951+ title: Polly Parrot is dead
882952priority: critical
883953status: unread -> in-progress
884- fixer: (none)
954+ fixer: terry
885955keywords: parrot,plumage,perch,nailed,dead
886- </ small > </ pre > </ blockquote >
887-
888- < p > If a note is given in the "note" field, the note is
889- appended to the description. The message is then added
890- to the item's message spool (thus triggering the standard
891- detector to react by sending out this message to the nosy list).
956+ </ pre > </ blockquote >
892957
893- < h4 > 8.4.3. Spool Section</ h4 >
958+ < h4 > Spool Section</ h4 >
894959
895960< p > The spool section lists messages in the item's "messages"
896961property. The index of messages displays the "date", "author",
897962and "summary" properties on the message nodes, and selecting a
898963message takes you to its content.
899964
965+ < p > The <property> tag used in the index may also be used here -
966+ it checks to see if the nominated Multilink property has any entries.
967+ This can be used to eliminate sections of the spool section if the
968+ property has no entries.
969+
970+ < blockquote > < pre >
971+ <property name="files">
972+ <tr class="strong-header">
973+ <td><b>Files</b></td>
974+ </tr>
975+
976+ <tr>
977+ <td><display call="list('files')"></td>
978+ </tr>
979+ </property>
980+ </ pre > </ blockquote >
981+
900982< p > < hr >
901983< h1 > < a name ="ack "> Acknowledgements</ a > </ h1 >
902984
@@ -905,7 +987,7 @@ <h1><a name="ack">Acknowledgements</a></h1>
905987
906988< p > </ p >
907989< hr >
908- $Id: index.html,v 1.5 2001-09-30 01:19:22 richard Exp $
990+ $Id: index.html,v 1.6 2001-10-01 04:58:33 richard Exp $
909991< p > </ p >
910992
911993</ body > </ html>
0 commit comments