Hi!

 Please find attached the diff I promised for the events pages, to make
the reports more visible.  It will be added to the index pages at the
end of the line as [Report].

 It includes two ways to see if there is a report for that event:
-) First is to grep through the event page and look for a
   <a href="$(WML_SRC_BASENAME)-report"> link, extract the URL from
   there.
-) Second is for special cases reports that are linked offsite. I
   introduced a new tag for them, called rep.  It just works like the
   <a> tag but is there to detect that it links a report.  One file with
   such a <rep> tag is included in the diff.

 And it introduced a new gettext string, called "Report" (how convinient
;).  I had to add it to common_tags.wml for not making the
recent_list.wml dependent on events_common.wml which would IMHO just
reduce the throughput on other pages using recent_list.wml.

 I defined the <rep> tag only in the past_event.wml file for it doesn't
make sense in any other.

 I hope the patch is staight forward enough to have a chance to be
applied ;)

 Have fun,
Alfie
-- 
"The reason why worry kills more people than work is that more people worry
 than work."
                                  -- unknown
Index: events/2002/1019-plgiessen.wml
===================================================================
RCS file: /cvs/webwml/webwml/english/events/2002/1019-plgiessen.wml,v
retrieving revision 1.5
diff -u -r1.5 1019-plgiessen.wml
--- events/2002/1019-plgiessen.wml      22 Oct 2002 09:04:38 -0000      1.5
+++ events/2002/1019-plgiessen.wml      13 Jan 2003 13:57:24 -0000
@@ -26,5 +26,6 @@
 #Related Links here (free form)
 <ul>
  <li><a href="http://www.schmehl.info/linux/pi2002/index.html";>Alexander's 
presentation</a>
- <li><a 
href="http://lists.debian.org/debian-events-eu-0210/msg00019.html";>report</a>
+ <li><rep href="http://lists.debian.org/debian-events-eu-0210/msg00019.html";>\
+ Report</rep>
 </ul>
Index: po/templates.pot
===================================================================
RCS file: /cvs/webwml/webwml/english/po/templates.pot,v
retrieving revision 1.8
diff -u -r1.8 templates.pot
--- po/templates.pot    29 Dec 2002 15:29:25 -0000      1.8
+++ po/templates.pot    13 Jan 2003 13:57:24 -0000
@@ -63,6 +63,10 @@
 msgid "<void id=\"misc-bottom\" />misc"
 msgstr ""
 
+#: ../../english/template/debian/common_tags.wml:10
+msgid "Report"
+msgstr ""
+
 #: ../../english/template/debian/common_translation.wml:4
 msgid "Yes"
 msgstr ""
Index: template/debian/common_tags.wml
===================================================================
RCS file: /cvs/webwml/webwml/english/template/debian/common_tags.wml,v
retrieving revision 1.6
diff -u -r1.6 common_tags.wml
--- template/debian/common_tags.wml     4 Nov 2002 01:17:12 -0000       1.6
+++ template/debian/common_tags.wml     13 Jan 2003 13:57:24 -0000
@@ -6,6 +6,10 @@
 <define-tag email><a href="mailto:%0";>%0</a></define-tag>
 <define-tag newsemail><email %0 /></define-tag>
 
+<define-tag report whitespace=delete>
+  <gettext>Report</gettext>
+</define-tag>
+
 #  Support for i18n with gettext
 <when <symbol-info printf />>
    #  mp4h >= 1.3.0
Index: template/debian/past_event.wml
===================================================================
RCS file: /cvs/webwml/webwml/english/template/debian/past_event.wml,v
retrieving revision 1.18
diff -u -r1.18 past_event.wml
--- template/debian/past_event.wml      15 Jan 2002 22:43:06 -0000      1.18
+++ template/debian/past_event.wml      13 Jan 2003 13:57:24 -0000
@@ -64,6 +64,13 @@
   if ($go) {
 :>
 
+<define-tag rep endtag=required whitespace=delete>
+<preserve href />
+<set-var %attributes />
+  <a href="<get-var href />">%body</a>
+  <restore href />
+</define-tag>
+
 <h2><relatedlinks/></h2>
 
 {#mainbody#}
Index: template/debian/recent_list.wml
===================================================================
RCS file: /cvs/webwml/webwml/english/template/debian/recent_list.wml,v
retrieving revision 1.104
diff -u -r1.104 recent_list.wml
--- template/debian/recent_list.wml     28 Dec 2002 23:24:34 -0000      1.104
+++ template/debian/recent_list.wml     13 Jan 2003 13:57:24 -0000
@@ -159,6 +159,7 @@
 
   $title = ''; $date = ''; $rdate = ''; $desc = ''; $status = ''; $where = '';
   $moreinfo = ''; $startdate = ''; $enddate = '';
+  $repfile = '';
 <protect pass=2>
   if ($content =~ /^<define-tag pagetitle>\s*(.*?)\s*<\/define-tag>$/ms) {
     $title = qq/$1/; }      # all
@@ -178,12 +179,20 @@
     $startdate = qq/$1/; }     # startdate (events)
   if ($content =~ /^<define-tag enddate>(.*?)<\/define-tag>$/ms) {
     $enddate = $1; }        # enddate (events)
+  my ($shortfile) = $file =~ /^(.*)\.wml$/;
+  if ($content =~ /<a\s+href="($shortfile-report)"\s*>/ms) {
+    $repfile = $1; }        # Report (events)
+  if ($content =~ /<rep\s+href="([^"]*)"\s*\/?>/ms) {
+    $repfile = $1; }        # Report (events)
 </protect>
   if ($startdate && $enddate) { # Convert date range into printable string
     $date = &daterange($startdate, $enddate);
   }
   if ($title && $date && $where) { # for events/
-    $str1 = "$elemhead<tt>[$date]</tt>$elemdate <strong><a 
href=\"$year/$base\">$title</a></strong>, $elemfoot$where<br />$elemrealfoot\n";
+    $report = ($repfile)
+            ? " [<a href=\"$repfile\"><report></a>]"
+            : '';
+    $str1 = "$elemhead<tt>[$date]</tt>$elemdate <strong><a 
href=\"$year/$base\">$title</a></strong>, $elemfoot$where$report<br 
/>$elemrealfoot\n";
   }
   elsif ($desc) { # for security/
     open DATAFILE, "$eng_dir/$year/$base.data" or warn "couldn't open 
$eng_dir/$year/$base.data: $!\n";

Attachment: pgp3rKcheSt73.pgp
Description: PGP signature

Reply via email to