data/TWiki/TWikiAttachDotPm.txt,v
changeset 0 414e01d06fd5
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/data/TWiki/TWikiAttachDotPm.txt,v	Sat Jan 26 15:50:53 2008 +0100
     1.3 @@ -0,0 +1,116 @@
     1.4 +head	1.3;
     1.5 +access;
     1.6 +symbols;
     1.7 +locks; strict;
     1.8 +comment	@# @;
     1.9 +
    1.10 +
    1.11 +1.3
    1.12 +date	2008.01.22.03.21.31;	author TWikiContributor;	state Exp;
    1.13 +branches;
    1.14 +next	1.2;
    1.15 +
    1.16 +1.2
    1.17 +date	2007.01.16.04.11.57;	author TWikiContributor;	state Exp;
    1.18 +branches;
    1.19 +next	1.1;
    1.20 +
    1.21 +1.1
    1.22 +date	2006.02.01.12.01.24;	author TWikiContributor;	state Exp;
    1.23 +branches;
    1.24 +next	;
    1.25 +
    1.26 +
    1.27 +desc
    1.28 +@new-topic
    1.29 +@
    1.30 +
    1.31 +
    1.32 +1.3
    1.33 +log
    1.34 +@buildrelease
    1.35 +@
    1.36 +text
    1.37 +@---+ Package =TWiki::Attach=
    1.38 +
    1.39 +A singleton object of this class is used to deal with attachments to topics.
    1.40 +
    1.41 +
    1.42 +%TOC%
    1.43 +
    1.44 +---++ ClassMethod *new* <tt>($session)</tt>
    1.45 +
    1.46 +Constructor.
    1.47 +
    1.48 +
    1.49 +
    1.50 +---++ ObjectMethod *finish* <tt>()</tt>
    1.51 +Break circular references.
    1.52 +
    1.53 +
    1.54 +
    1.55 +---++ ObjectMethod *renderMetaData* <tt>($web,$topic,$meta,$args) -> $text</tt>
    1.56 +
    1.57 +Generate a table of attachments suitable for the bottom of a topic
    1.58 +view, using templates for the header, footer and each row.
    1.59 +   * =$web= the web
    1.60 +   * =$topic= the topic
    1.61 +   * =$meta= meta-data hash for the topic
    1.62 +   * =$args= hash of attachment arguments
    1.63 +
    1.64 +
    1.65 +
    1.66 +---++ ObjectMethod *formatVersions* <tt>($web,$topic,$attrs) -> $text</tt>
    1.67 +
    1.68 +Generate a version history table for a single attachment
    1.69 +   * =$web= - the web
    1.70 +   * =$topic= - the topic
    1.71 +   * =$attrs= - Hash of meta-data attributes
    1.72 +
    1.73 +
    1.74 +
    1.75 +---++ ObjectMethod *getAttachmentLink* <tt>($user,$web,$topic,$name,$meta) -> $html</tt>
    1.76 +
    1.77 +   * =$user= - User doing the reading
    1.78 +   * =$web= - Name of the web
    1.79 +   * =$topic= - Name of the topic
    1.80 +   * =$name= - Name of the attachment
    1.81 +   * =$meta= - Meta object that contains the meta info
    1.82 +
    1.83 +Build a link to the attachment, suitable for insertion in the topic.
    1.84 +
    1.85 +
    1.86 +@
    1.87 +
    1.88 +
    1.89 +1.2
    1.90 +log
    1.91 +@buildrelease
    1.92 +@
    1.93 +text
    1.94 +@d10 6
    1.95 +a15 1
    1.96 +Constructor
    1.97 +a49 12
    1.98 +
    1.99 +---++ ObjectMethod *migrateToFileAttachmentMacro* <tt>($meta,$text) -> $text</tt>
   1.100 +
   1.101 +Migrate old HTML format
   1.102 +
   1.103 +
   1.104 +
   1.105 +---++ ObjectMethod *upgradeFrom1v0beta* <tt>($meta) -> $text</tt>
   1.106 +
   1.107 +CODE_SMELL: Is this really necessary? upgradeFrom1v0beta?
   1.108 +
   1.109 +
   1.110 +@
   1.111 +
   1.112 +
   1.113 +1.1
   1.114 +log
   1.115 +@buildrelease
   1.116 +@
   1.117 +text
   1.118 +@d9 1
   1.119 +@