data/TWiki/TWikiAttachDotPm.txt,v
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
head	1.3;
colas@0
     2
access;
colas@0
     3
symbols;
colas@0
     4
locks; strict;
colas@0
     5
comment	@# @;
colas@0
     6
colas@0
     7
colas@0
     8
1.3
colas@0
     9
date	2008.01.22.03.21.31;	author TWikiContributor;	state Exp;
colas@0
    10
branches;
colas@0
    11
next	1.2;
colas@0
    12
colas@0
    13
1.2
colas@0
    14
date	2007.01.16.04.11.57;	author TWikiContributor;	state Exp;
colas@0
    15
branches;
colas@0
    16
next	1.1;
colas@0
    17
colas@0
    18
1.1
colas@0
    19
date	2006.02.01.12.01.24;	author TWikiContributor;	state Exp;
colas@0
    20
branches;
colas@0
    21
next	;
colas@0
    22
colas@0
    23
colas@0
    24
desc
colas@0
    25
@new-topic
colas@0
    26
@
colas@0
    27
colas@0
    28
colas@0
    29
1.3
colas@0
    30
log
colas@0
    31
@buildrelease
colas@0
    32
@
colas@0
    33
text
colas@0
    34
@---+ Package =TWiki::Attach=
colas@0
    35
colas@0
    36
A singleton object of this class is used to deal with attachments to topics.
colas@0
    37
colas@0
    38
colas@0
    39
%TOC%
colas@0
    40
colas@0
    41
---++ ClassMethod *new* <tt>($session)</tt>
colas@0
    42
colas@0
    43
Constructor.
colas@0
    44
colas@0
    45
colas@0
    46
colas@0
    47
---++ ObjectMethod *finish* <tt>()</tt>
colas@0
    48
Break circular references.
colas@0
    49
colas@0
    50
colas@0
    51
colas@0
    52
---++ ObjectMethod *renderMetaData* <tt>($web,$topic,$meta,$args) -> $text</tt>
colas@0
    53
colas@0
    54
Generate a table of attachments suitable for the bottom of a topic
colas@0
    55
view, using templates for the header, footer and each row.
colas@0
    56
   * =$web= the web
colas@0
    57
   * =$topic= the topic
colas@0
    58
   * =$meta= meta-data hash for the topic
colas@0
    59
   * =$args= hash of attachment arguments
colas@0
    60
colas@0
    61
colas@0
    62
colas@0
    63
---++ ObjectMethod *formatVersions* <tt>($web,$topic,$attrs) -> $text</tt>
colas@0
    64
colas@0
    65
Generate a version history table for a single attachment
colas@0
    66
   * =$web= - the web
colas@0
    67
   * =$topic= - the topic
colas@0
    68
   * =$attrs= - Hash of meta-data attributes
colas@0
    69
colas@0
    70
colas@0
    71
colas@0
    72
---++ ObjectMethod *getAttachmentLink* <tt>($user,$web,$topic,$name,$meta) -> $html</tt>
colas@0
    73
colas@0
    74
   * =$user= - User doing the reading
colas@0
    75
   * =$web= - Name of the web
colas@0
    76
   * =$topic= - Name of the topic
colas@0
    77
   * =$name= - Name of the attachment
colas@0
    78
   * =$meta= - Meta object that contains the meta info
colas@0
    79
colas@0
    80
Build a link to the attachment, suitable for insertion in the topic.
colas@0
    81
colas@0
    82
colas@0
    83
@
colas@0
    84
colas@0
    85
colas@0
    86
1.2
colas@0
    87
log
colas@0
    88
@buildrelease
colas@0
    89
@
colas@0
    90
text
colas@0
    91
@d10 6
colas@0
    92
a15 1
colas@0
    93
Constructor
colas@0
    94
a49 12
colas@0
    95
colas@0
    96
---++ ObjectMethod *migrateToFileAttachmentMacro* <tt>($meta,$text) -> $text</tt>
colas@0
    97
colas@0
    98
Migrate old HTML format
colas@0
    99
colas@0
   100
colas@0
   101
colas@0
   102
---++ ObjectMethod *upgradeFrom1v0beta* <tt>($meta) -> $text</tt>
colas@0
   103
colas@0
   104
CODE_SMELL: Is this really necessary? upgradeFrom1v0beta?
colas@0
   105
colas@0
   106
colas@0
   107
@
colas@0
   108
colas@0
   109
colas@0
   110
1.1
colas@0
   111
log
colas@0
   112
@buildrelease
colas@0
   113
@
colas@0
   114
text
colas@0
   115
@d9 1
colas@0
   116
@