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.
Environment
--
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
206c206
< $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
Discussion
Handled by
ContextInTemplatesAndPlugins -
SVN 4303
--
CrawfordCurrie - 22 May 2005