summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandi <andi@splitbrain.org>2005-04-23 13:07:29 +0200
committerandi <andi@splitbrain.org>2005-04-23 13:07:29 +0200
commitcffcc40367a41c169506364f93128f9e221087bc (patch)
tree5a43d8826697ec5912aabd9a9ec54fc8f6290a74
parent4d58bd99b9ee57a913e569eb83b609734dee7da9 (diff)
downloadrpg-cffcc40367a41c169506364f93128f9e221087bc.tar.gz
rpg-cffcc40367a41c169506364f93128f9e221087bc.tar.bz2
links to diff and old revisions on recent changes page #255
darcs-hash:20050423110729-9977f-c5830c49d60c32b3b9153412445cd3bfeeca7a15.gz
-rw-r--r--images/history.pngbin0 -> 202 bytes
-rw-r--r--inc/html.php27
-rw-r--r--inc/parser/xhtml.php12
3 files changed, 31 insertions, 8 deletions
diff --git a/images/history.png b/images/history.png
new file mode 100644
index 000000000..ef9e311d3
--- /dev/null
+++ b/images/history.png
Binary files differ
diff --git a/inc/html.php b/inc/html.php
index 9df9aae72..8f717f8c4 100644
--- a/inc/html.php
+++ b/inc/html.php
@@ -22,7 +22,7 @@ function html_wikilink($id,$name='',$search=''){
$xhtml_renderer = new Doku_Renderer_xhtml();
}
- return $xhtml_renderer->internallink($id,$name,$search);
+ return $xhtml_renderer->internallink($id,$name,$search,true);
}
/**
@@ -396,6 +396,8 @@ function html_revisions(){
print '<ul>';
if($INFO['exists']){
print '<li>';
+ print '<img src="'.DOKU_BASE.'images/blank.gif" border="0" width="15" height="11" alt="" /> ';
+
print $date.' <a class="wikilink1" href="'.wl($ID).'">'.$ID.'</a> ';
print $INFO['sum'];
@@ -413,16 +415,17 @@ function html_revisions(){
$info = getRevisionInfo($ID,$rev);
print '<li>';
+ print '<a href="'.wl($ID,"rev=$rev,do=diff").'">';
+ print '<img src="'.DOKU_BASE.'images/diff.png" border="0" width="15" height="11" title="'.$lang['diff'].'" />';
+ print '</a> ';
+
print $date.' <a class="wikilink1" href="'.wl($ID,"rev=$rev").'">'.$ID.'</a> ';
print $info['sum'];
print ' <span class="user">(';
print $info['ip'];
if($info['user']) print ' '.$info['user'];
- print ')</span> ';
+ print ')</span>';
- print '<a href="'.wl($ID,"rev=$rev,do=diff").'">';
- print '<img src="'.DOKU_BASE.'images/diff.png" border="0" width="15" height="11" title="'.$lang['diff'].'" />';
- print '</a>';
print '</li>';
}
print '</ul>';
@@ -435,6 +438,7 @@ function html_revisions(){
*/
function html_recent(){
global $conf;
+ global $lang;
$recents = getRecents(0,true);
print p_locale_xhtml('recent');
@@ -442,12 +446,23 @@ function html_recent(){
foreach(array_keys($recents) as $id){
$date = date($conf['dformat'],$recents[$id]['date']);
print '<li>';
+
+ print '<a href="'.wl($id,"do=diff").'">';
+ print '<img src="'.DOKU_BASE.'images/diff.png" border="0" width="15" height="11" title="'.$lang['diff'].'" />';
+ print '</a> ';
+
+ print '<a href="'.wl($id,"do=revisions").'">';
+ print '<img src="'.DOKU_BASE.'images/history.png" border="0" width="12" height="14" title="'.$lang['btn_revs'].'" />';
+ print '</a> ';
+
+
print $date.' '.html_wikilink($id,$id);
- print ' '.htmlspecialchars($recents[$id]['sum']);
+ print htmlspecialchars($recents[$id]['sum']);
print ' <span class="user">(';
print $recents[$id]['ip'];
if($recents[$id]['user']) print ' '.$recents[$id]['user'];
print ')</span>';
+
print '</li>';
}
print '</ul>';
diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index 1c26b0645..70a8c7830 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -388,7 +388,11 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
$this->internallink($link,$link);
}
- function internallink($id, $name = NULL, $search=NULL) {
+ /**
+ * $search and $returnonly are not for the renderer but are used
+ * elsewhere - no need to implement them in other renderers
+ */
+ function internallink($id, $name = NULL, $search=NULL,$returnonly=false) {
global $conf;
global $ID;
@@ -423,7 +427,11 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
}
//output formatted
- echo $this->_formatLink($link);
+ if($returnonly){
+ return $this->_formatLink($link);
+ }else{
+ echo $this->_formatLink($link);
+ }
}
function externallink($url, $name = NULL) {