[ZDP] changes
Tom Deprez
tom.deprez@uz.kuleuven.ac.be
Wed, 26 Jan 2000 12:05:06 +0100
Hi,
I've changed the ListParts, ListChapters thanks to the hints of Maik.
Here is one of source (ListChapters)
<dtml-in "objectValues(['DraftSubmissionFolder'])">
<dtml-in "objectValues(['Draft'])" reverse>
<dtml-if sequence-start>
<font color="Purple">
<b>
<dtml-var name>
</b>
</font>
<P><dtml-var Main>
</dtml-if>
</dtml-in>
<dtml-else>
<table>
<dtml-in "objectValues(['Chapter'])" sort=nickname>
<dtml-if sequence-start>
</dtml-if>
<tr>
<td width="20">
<dtml-var nickname>
</td>
<td>
<A HREF="<dtml-var "_[id].absolute_url()">">
<dtml-var name>
</A>
</td>
</tr>
<dtml-if sequence-end>
</dtml-if>
</dtml-in>
</table>
</dtml-in>
Now, what it does :
* It looks into the Chapter object.
* If there exists a DraftSubmissionFolder, it looks into this folder and
retrieves the latest draft and shows it.
* If there isn't a DraftSubmissionFolder, it shows the all subchapters.
Bottom-line:
A reader has to browse to the chapter, if their are drafts, the latest
version is displayed. If he wants to see the previous drafts, he has to
click on [drafts] (= the draftsubmissionfolder)
Future enhancements (I'll look into it, need your comments) :
1. We should make views which enables to parse several chapters/subchapters
into each other. This way a reader can ask for eg the whole part I. Part I
is then showed with one click and as one text.
2. This would also allow to easely print it. Thus we make a way to only
print the text (and not the whole ZDP layout with it)
Today, I'll post my drafts as an example.
Regards, Tom.