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