data/TWiki/TWikiAttachDotPm.txt
author Colas Nahaboo <colas@nahaboo.net>
Sat, 26 Jan 2008 15:50:53 +0100
changeset 0 414e01d06fd5
permissions -rw-r--r--
RELEASE 4.2.0 freetown
colas@0
     1
---+ Package =TWiki::Attach=
colas@0
     2
colas@0
     3
A singleton object of this class is used to deal with attachments to topics.
colas@0
     4
colas@0
     5
colas@0
     6
%TOC%
colas@0
     7
colas@0
     8
---++ ClassMethod *new* <tt>($session)</tt>
colas@0
     9
colas@0
    10
Constructor.
colas@0
    11
colas@0
    12
colas@0
    13
colas@0
    14
---++ ObjectMethod *finish* <tt>()</tt>
colas@0
    15
Break circular references.
colas@0
    16
colas@0
    17
colas@0
    18
colas@0
    19
---++ ObjectMethod *renderMetaData* <tt>($web,$topic,$meta,$args) -> $text</tt>
colas@0
    20
colas@0
    21
Generate a table of attachments suitable for the bottom of a topic
colas@0
    22
view, using templates for the header, footer and each row.
colas@0
    23
   * =$web= the web
colas@0
    24
   * =$topic= the topic
colas@0
    25
   * =$meta= meta-data hash for the topic
colas@0
    26
   * =$args= hash of attachment arguments
colas@0
    27
colas@0
    28
colas@0
    29
colas@0
    30
---++ ObjectMethod *formatVersions* <tt>($web,$topic,$attrs) -> $text</tt>
colas@0
    31
colas@0
    32
Generate a version history table for a single attachment
colas@0
    33
   * =$web= - the web
colas@0
    34
   * =$topic= - the topic
colas@0
    35
   * =$attrs= - Hash of meta-data attributes
colas@0
    36
colas@0
    37
colas@0
    38
colas@0
    39
---++ ObjectMethod *getAttachmentLink* <tt>($user,$web,$topic,$name,$meta) -> $html</tt>
colas@0
    40
colas@0
    41
   * =$user= - User doing the reading
colas@0
    42
   * =$web= - Name of the web
colas@0
    43
   * =$topic= - Name of the topic
colas@0
    44
   * =$name= - Name of the attachment
colas@0
    45
   * =$meta= - Meta object that contains the meta info
colas@0
    46
colas@0
    47
Build a link to the attachment, suitable for insertion in the topic.
colas@0
    48
colas@0
    49