Tags:
create new tag
, view all tags

Question

Looking for a TWikiVariable that will display links to the RCS diffs between current and previous revision.

For our weekly meeting, we edit the same MeetingMinutes topic over & over again. The PatternSkin has a link to Revisions: at the bottom of the page. However, not all readers are TWiki-savvy.

I'd like to put a quick link to diffs from the last meeting minutes at the top of the page. I tried to cheat by sneaking a peak at ../templates/view.pattern.tmpl

The %REVISIONS% variable used in the template does not work when used from the edit box of a TWikiTopic. Just appears in the page as %REVISIONS%

QUESTION? Is there a quick fix that lets me put links to rdiffs anywhere in the topic that I choose, instead of only those places provided by the Skin ?

Environment

TWiki version: TWikiRelease02Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: SuSE SLES 8
Web server: Apache/1.3.29 (Linux/SUSE)
Perl version: v5.8.3
Client OS: windoze 2000
Web Browser: IE 6
Categories: Topic revisions, Skin

-- KeithHelfrich - 22 Dec 2004

Answer

I don't think so. You could use links like this though:

[%SCRIPTURL%view%SCRIPTSUFFIX%/%WEB%/%TOPIC%?rev=1.32][Meeting on 2004-12-17]]

However you may be better off creating a new topic for each meeting. Take a look at Sandbox.MeetingMinutes. If that is too complecated then here's a more complicated setup with a simpler workflow. It should allow you to create a new topic using the previous meeting as a template.

Put this in a topic called MeetingMinutes:

<form name="new" action="%SCRIPTURLPATH%/edit%SCRIPTSUFFIX%/%WEB%/">
%SEARCH{"%TOPIC%20[0-9]+x" scope="topic" regex="on" nosearch="on" nosummary="on" nototal="on" reverse="on" format="   * $topic: $pattern(.*?\-\-\+\!\![^\n\r]*?Minutes[^\n\r]+?[\,\-]+([^\@\-\<\n\r]+).*) - $wikiusername - [[%SCRIPTURL%/rdiff%SCRIPTSUFFIX%/%WEB%/$topic][$date]] - $rev"}%
   * | *New Meeting Topic* | <input type="text" name="topic" value="%TOPIC%%SERVERTIME{"$yearx$mox$day"}%" size="32" /> |
     | *Template* | <input type="text" name="templatetopic" value="%SEARCH{"%TOPIC%20[0-9]+x" scope="topic" regex="on" nosearch="on" nosummary="on" nototal="on" reverse="on" limit="1" format="$topic"}%" /> \
     <input type="hidden" name="topicparent" value="%TOPIC%" /> \
     <input type="submit" value="Create New Minutes" /> |
</form>
Note that it uses the %TOPIC% variable so it relies on being in the MeetingMinutes topic.

It should look something like this:

-- SamHasler - 22 Dec 2004

You can use %REVINFO{"$rev"}% and some SpreadSheetPlugin magic. Edit the topic to see how.

r1.4 > r1.3 > r1.2

There is a catch though. Currently there is no formula to repeat something until a condition is met, so you get only a fixed number of diff links. We would need a new $WHILE(condition, action) formula.

-- PeterThoeny - 23 Dec 2004

Peter, Sam, thanks .. some very fancy stuff recommended there with the SpreadSheetPlugin.

However, for now and for simplicity, I've just put a hard-coded link to the rdiff Total Page History at the top of the meeting minutes.

It is actually quite advantageous in a company of our size to use the same MeetingMinutes topic over and over, again & again. For one, the RCS is very helpful. And also folks can bookmark the one MeetingMinutes page and always find them there.

I've not ever toyed with the SpreadSheetPlugin, but when I do I will be sure to come back and try your recommended magic.

Thanks.

-- KeithHelfrich - 23 Jan 2005

 
Topic revision: r4 - 2005-01-23 - KeithHelfrich
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.