BUGFIX: Fixed link labelling and behaviour in Related page tab (from r89837)

This commit is contained in:
Tom Rix 2010-03-01 21:38:19 +00:00
parent c961f0244a
commit 17a75b3a1f
2 changed files with 9 additions and 3 deletions

View File

@ -60,8 +60,13 @@ class RelatedPageLink extends DataObject {
}
function RelatedPageAdminLink() {
return '<a href="admin/show/' . $this->RelatedPage()->ID . '" class="externallink" >' . Convert::raw2xml($this->RelatedPage()->Title) . '</a>';
return '<a href="admin/show/' . $this->RelatedPage()->ID . '" class="cmsEditlink">' . Convert::raw2xml($this->RelatedPage()->Title) . '</a>';
}
function AbsoluteLink() {
$url = $this->RelatedPage()->AbsoluteLink();
return '<a href="' . Convert::raw2att($url) .'" class="externallink">' . Convert::raw2xml($url) . '</a>';
}
/*
function canView($member = null) {
return $this->MasterPage()->canView($member);

View File

@ -178,7 +178,8 @@ class SiteTreeSubsites extends SiteTreeDecorator {
'RelatedPages',
'RelatedPageLink',
array(
'RelatedPageAdminLink' => 'Page'
'RelatedPageAdminLink' => 'Page',
'AbsoluteLink' => 'URL',
)
)
);
@ -189,7 +190,7 @@ class SiteTreeSubsites extends SiteTreeDecorator {
if($reverse) {
$text = '<p>In addition, this page is marked as related by the following pages: </p><ul>';
foreach($reverse as $rpage) {
$text .= '<ul><a href="admin/show/' . $rpage->ID . '">' . $rpage->Title . '</a> '.$rpage->AbsoluteLink().'</ul>';
$text .= '<ul><a href="admin/show/' . $rpage->ID . '" class="cmsEditlink">' . $rpage->Title . '</a> '.$rpage->AbsoluteLink().'</ul>';
}
$text .= '</ul>';