]> sipb.mit.edu Git - ikiwiki.git/commitdiff
templatize commit types, so it could use icons, or whatever
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 12 Mar 2006 20:24:10 +0000 (20:24 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 12 Mar 2006 20:24:10 +0000 (20:24 +0000)
ikiwiki
templates/recentchanges.tmpl

diff --git a/ikiwiki b/ikiwiki
index e684ce38ae03d0fdc132e6c965d28366e421f616..abeda29c248dba2ad2722740b8149dca478072bb 100755 (executable)
--- a/ikiwiki
+++ b/ikiwiki
@@ -446,13 +446,18 @@ sub rcs_recentchanges ($) { #{{{
                                $state='body';
                        }
                        elsif ($state eq 'body' && /$div/) {
                                $state='body';
                        }
                        elsif ($state eq 'body' && /$div/) {
+                               my $committype="web";
                                if (defined $message[0] &&
                                    $message[0]->{line}=~/^web commit by (\w+)(.*)/) {
                                if (defined $message[0] &&
                                    $message[0]->{line}=~/^web commit by (\w+)(.*)/) {
-                                       $user="$1 (web)";
+                                       $user="$1";
                                        $message[0]->{line}=$2;
                                }
                                        $message[0]->{line}=$2;
                                }
+                               else {
+                                       $committype="svn";
+                               }
                                
                                push @ret, { rev => $rev, user => $user,
                                
                                push @ret, { rev => $rev, user => $user,
+                                       commitype => $commitype,
                                        when => $when, message => [@message],
                                        pages => [@pages] } if @pages;
                                return @ret if @ret >= $num;
                                        when => $when, message => [@message],
                                        pages => [@pages] } if @pages;
                                return @ret if @ret >= $num;
index 774fb34f0af9ba68f7f4264fc759eefc74b90f5f..3dc9fc1be1f1b8b70113c592319a3857dbbfc67d 100644 (file)
@@ -15,6 +15,7 @@
                        <TMPL_VAR NAME="LINK">
                </TMPL_LOOP>
                <br>
                        <TMPL_VAR NAME="LINK">
                </TMPL_LOOP>
                <br>
+               <!-- <TMPL_VAR NAME="COMMITTYPE"> -->
                changed <TMPL_VAR NAME="WHEN"> by <TMPL_VAR NAME="USER">:
                <i>
                <TMPL_LOOP NAME="MESSAGE">
                changed <TMPL_VAR NAME="WHEN"> by <TMPL_VAR NAME="USER">:
                <i>
                <TMPL_LOOP NAME="MESSAGE">