Item14787: NatSkin: natTopicActions are changing in diff mode
Priority: Normal
Current State: No Action Required
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: NatSkin
Branches:
We have
NatSkin
5.01 and
Foswiki
2.1.6 in action.
If we want to look our old revisions of the topic, we are clicking on the revinfo link. After this we get a site where we can compare two different revisions in bin/diff. If we klick on
natTopicActions
on "previous", the action buttons are changing to the edit buttons.
I reviewed the source code a bit and I found out, that the diff script isn't mentioned in the
ThemeEngine.pm
at the regarding history part. So Foswiki doesn't change to history context and the action buttons are changing back to the edit buttons.
If I do the following:
commit 9b1ceb86b185aeaedad5096b3c81e6a31689892e
Author: Gino Naumann <gino.naumann@fu-berlin.de>
Date: Wed Nov 14 13:05:05 2018 +0100
Bugfix in diff
natHistoryTopicActions dissappeared if we interact with the action buttons
diff --git a/lib/Foswiki/Plugins/NatSkinPlugin/ThemeEngine.pm b/lib/Foswiki/Plugins/NatSkinPlugin/ThemeEngine.pm
index 0c260164..9befff07 100644
--- a/lib/Foswiki/Plugins/NatSkinPlugin/ThemeEngine.pm
+++ b/lib/Foswiki/Plugins/NatSkinPlugin/ThemeEngine.pm
@@ -285,7 +285,7 @@ sub init {
# switch on history context
my $curRev = ($request) ? $request->param('rev') : '';
- if ($curRev || $this->{skinState}{"action"} =~ /rdiff|compare/) {
+ if ($curRev || $this->{skinState}{"action"} =~ /diff|rdiff|compare/) {
$this->{skinState}{"history"} = 1;
} else {
$this->{skinState}{"history"} = 0;
The action buttons for diff interactions are working well and Foswiki keeps in history context.
For better understanding, I attached two images.
First diff
Second diff, after clicking on 'previous'
Do you have another solution for this? If not, can you change the source code to fix the problem?
Best wishes
--
GinoNaumann - 19 Nov 2018
TopicActions in diff mode have been reworked in the latest release.
--
MichaelDaum - 12 Feb 2019