head	1.3;
access;
symbols;
locks; strict;
comment	@# @;


1.3
date	2008.01.22.03.21.31;	author TWikiContributor;	state Exp;
branches;
next	1.2;

1.2
date	2007.01.16.04.11.57;	author TWikiContributor;	state Exp;
branches;
next	1.1;

1.1
date	2006.02.01.12.01.24;	author TWikiContributor;	state Exp;
branches;
next	;


desc
@new-topic
@


1.3
log
@buildrelease
@
text
@---+ Package =TWiki::Attach=

A singleton object of this class is used to deal with attachments to topics.


%TOC%

---++ ClassMethod *new* <tt>($session)</tt>

Constructor.



---++ ObjectMethod *finish* <tt>()</tt>
Break circular references.



---++ ObjectMethod *renderMetaData* <tt>($web,$topic,$meta,$args) -> $text</tt>

Generate a table of attachments suitable for the bottom of a topic
view, using templates for the header, footer and each row.
   * =$web= the web
   * =$topic= the topic
   * =$meta= meta-data hash for the topic
   * =$args= hash of attachment arguments



---++ ObjectMethod *formatVersions* <tt>($web,$topic,$attrs) -> $text</tt>

Generate a version history table for a single attachment
   * =$web= - the web
   * =$topic= - the topic
   * =$attrs= - Hash of meta-data attributes



---++ ObjectMethod *getAttachmentLink* <tt>($user,$web,$topic,$name,$meta) -> $html</tt>

   * =$user= - User doing the reading
   * =$web= - Name of the web
   * =$topic= - Name of the topic
   * =$name= - Name of the attachment
   * =$meta= - Meta object that contains the meta info

Build a link to the attachment, suitable for insertion in the topic.


@


1.2
log
@buildrelease
@
text
@d10 6
a15 1
Constructor
a49 12

---++ ObjectMethod *migrateToFileAttachmentMacro* <tt>($meta,$text) -> $text</tt>

Migrate old HTML format



---++ ObjectMethod *upgradeFrom1v0beta* <tt>($meta) -> $text</tt>

CODE_SMELL: Is this really necessary? upgradeFrom1v0beta?


@


1.1
log
@buildrelease
@
text
@d9 1
@
