The Zope Bible phần 6

Mã này là gần như hoàn toàn giống với các tập tin , ngoại trừ cho các nhãn khác nhau về hình thức, và mục tiêu khác nhau (manage_addAddressit) về hình thức. Tiếp theo thêm một tập tin để cùng một thư mục, với mã từ Liệt kê 10-2. | Chapter 10 Creating a Multi-User AddressBook 295 td input type text name title td tr tr td colspan 2 input type submit value Add Addressit td tr table form dtml-var standard_html_footer This code is almost completely identical to the file except for different labels on the form and a different target manage_addAddressit for the form. Next add an i file to the same folder with the code from Listing 10-2. Listing 10-2 dtml-var standard_html_header dtml-unless SelectedGroup dtml-call SelectedGroup All dtml-unless dtml-unless start dtml-call start 1 dtml-unless dtml-unless sort_by dtml-call sort_by LastName FirstName MiddleInitial dtml-unless form action . method post table border 0 cellpadding 2 cellspacing 0 width 100 tr td colspan 5 table border 0 cellpadding 0 cellspacing 0 width 100 tr td align right input type submit name index_html method value View select size 1 name SelectedGroup option value All All Groups dtml-in listGroups option value dtml-sequence-item dtml-if SelectedGroup dtml-if - sequence- item SelectedGroup selected dtml-if dtml-if dtml-var sequence-item Continued 296 Part II Building Zope Products Listing 10-2 continued dtml-in select td tr table td tr tr td colspan 5 p align center dtml-in listEntriesByGroup _ SelectedGroup previous size 20 start start sort_expr sort_by dtml-in previous-batches mapping a href- dtml-absolute_url start dtml-batch-start- number sort_by dtml-sort_by SelectedGroup dtml- SelectedGroup dtml-var batch-start-number - dtml-var batch-end-number a dtml-in dtml-in dtml-in listEntriesByGroup _ SelectedGroup size 20 start start sort_expr sort_by dtml-if sequence-start dtml-var expr _ sequence-index 1 - dtml-if dtml-if sequence-end dtml-var expr _ sequence-index 1 dtml-if dtml-in dtml-in listEntriesByGroup _ SelectedGroup next size 20 start start sort_expr sort_by dtml-in next-batches mapping a href dtml-absolute_url start .

TỪ KHÓA LIÊN QUAN