data/TWiki/TWikiAttachDotPm.txt
changeset 0 414e01d06fd5
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/data/TWiki/TWikiAttachDotPm.txt	Sat Jan 26 15:50:53 2008 +0100
     1.3 @@ -0,0 +1,49 @@
     1.4 +---+ Package =TWiki::Attach=
     1.5 +
     1.6 +A singleton object of this class is used to deal with attachments to topics.
     1.7 +
     1.8 +
     1.9 +%TOC%
    1.10 +
    1.11 +---++ ClassMethod *new* <tt>($session)</tt>
    1.12 +
    1.13 +Constructor.
    1.14 +
    1.15 +
    1.16 +
    1.17 +---++ ObjectMethod *finish* <tt>()</tt>
    1.18 +Break circular references.
    1.19 +
    1.20 +
    1.21 +
    1.22 +---++ ObjectMethod *renderMetaData* <tt>($web,$topic,$meta,$args) -> $text</tt>
    1.23 +
    1.24 +Generate a table of attachments suitable for the bottom of a topic
    1.25 +view, using templates for the header, footer and each row.
    1.26 +   * =$web= the web
    1.27 +   * =$topic= the topic
    1.28 +   * =$meta= meta-data hash for the topic
    1.29 +   * =$args= hash of attachment arguments
    1.30 +
    1.31 +
    1.32 +
    1.33 +---++ ObjectMethod *formatVersions* <tt>($web,$topic,$attrs) -> $text</tt>
    1.34 +
    1.35 +Generate a version history table for a single attachment
    1.36 +   * =$web= - the web
    1.37 +   * =$topic= - the topic
    1.38 +   * =$attrs= - Hash of meta-data attributes
    1.39 +
    1.40 +
    1.41 +
    1.42 +---++ ObjectMethod *getAttachmentLink* <tt>($user,$web,$topic,$name,$meta) -> $html</tt>
    1.43 +
    1.44 +   * =$user= - User doing the reading
    1.45 +   * =$web= - Name of the web
    1.46 +   * =$topic= - Name of the topic
    1.47 +   * =$name= - Name of the attachment
    1.48 +   * =$meta= - Meta object that contains the meta info
    1.49 +
    1.50 +Build a link to the attachment, suitable for insertion in the topic.
    1.51 +
    1.52 +