You are here: Foswiki>Tasks Web>Item14787 (12 Feb 2019, MichaelDaum)Edit Attach

Item14787: NatSkin: natTopicActions are changing in diff mode

pencil
Priority: Normal
Current State: No Action Required
Released In: n/a
Target Release: n/a
Applies To: Extension
Component: NatSkin
Branches:
Reported By: GinoNaumann
Waiting For:
Last Change By: MichaelDaum

Item14787

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.

diff1.png
First diff

diff2.png
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
 

ItemTemplate edit

Summary NatSkin: natTopicActions are changing in diff mode
ReportedBy GinoNaumann
Codebase
SVN Range
AppliesTo Extension
Component NatSkin
Priority Normal
CurrentState No Action Required
WaitingFor
Checkins
TargetRelease n/a
ReleasedIn n/a
CheckinsOnBranches
trunkCheckins
masterCheckins
ItemBranchCheckins
Release02x01Checkins
Release02x00Checkins
Release01x01Checkins
I Attachment Action Size Date Who Comment
diff1.pngpng diff1.png manage 17 K 19 Nov 2018 - 15:37 GinoNaumann first diff
diff2.pngpng diff2.png manage 18 K 19 Nov 2018 - 15:38 GinoNaumann second diff, after interact with natTopicActions
Topic revision: r2 - 12 Feb 2019, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy