archive_me1Add my vote for this tag create new tag
, view all tags

Attach link not struck out in PatternSkin

When viewing an earlier revision, the "Attach image or document" link is not rendered struck out and disabled as link using PatternSkin.

Originator: ThomasWeigert

In addition, there are other ways how one can make changes that should be ruled out for previous versions:

  • Using the "more" link one can rename or delete topics
  • Using the "manage" link on an existing attachment one can attach new files.

We need to either rule all these out as well, or come up with a different model on how to deal with edits on previous topics.

Test case

Just try any page.


TWiki version: TWikiRelease02Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  

-- ThomasWeigert - 19 Feb 2005

Impact and Available Solutions

Follow up

Fix record

This is due to that in lib/TWiki/UI/View.pm the code only looks for "Attach" to strike out (so this works for the toolbar), but PatternSkin uses a different wording in the topic action bar.

This can easily be fixed, but I'd rather take care of this as a comprehensive solution for MakeViewTopicActionsCustomizable.

Anyway, here is the patch:

Index: lib/TWiki/UI/View.pm
RCS file: /e/www/CVS/twiki-cairo/lib/TWiki/UI/View.pm,v
retrieving revision 1.3
diff -r1.3 View.pm
<     $tmpl =~ s/<a [^>]*?>Attach<\/a>/<strike>Attach<\/strike>/goi;
>     $tmpl =~ s/<a [^>]*?>(Attach.*?)<\/a>/<strike>$1<\/strike>/goi;

-- ThomasWeigert - 19 Feb 2005

The above is for Cairo. Dakar has already a slightly different fix in SVN.

In Dakar, also the edit link in the topbar was not struck out. Fix is in SVN 4200.

-- ThomasWeigert - 01 May 2005

Note that there are still many ways of changing the topic other than using edit or attach link. These need to be handled or rationalized away.

-- ThomasWeigert - 01 May 2005


Handled by ContextInTemplatesAndPlugins - SVN 4303

-- CrawfordCurrie - 22 May 2005

Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r3 - 2005-05-22 - CrawfordCurrie
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.