mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Merge branch '3.0' of github.com:silverstripe/silverstripe-cms into 3.0
This commit is contained in:
commit
cb8c10a473
@ -1764,9 +1764,9 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
$parentPage = $linkedPage->Parent;
|
$parentPage = $linkedPage->Parent;
|
||||||
if($parentPage) {
|
if($parentPage) {
|
||||||
if($parentPage->ID) {
|
if($parentPage->ID) {
|
||||||
$parentPageLinks[] = "<a class=\"cmsEditlink\" href=\"admin/show/$linkedPage->ID\">{$parentPage->Title}</a>";
|
$parentPageLinks[] = "<a class=\"cmsEditlink\" href=\"admin/pages/edit/show/$linkedPage->ID\">{$parentPage->Title}</a>";
|
||||||
} else {
|
} else {
|
||||||
$parentPageLinks[] = "<a class=\"cmsEditlink\" href=\"admin/show/$linkedPage->ID\">" .
|
$parentPageLinks[] = "<a class=\"cmsEditlink\" href=\"admin/pages/edit/show/$linkedPage->ID\">" .
|
||||||
_t('SiteTree.TOPLEVEL', 'Site Content (Top Level)') .
|
_t('SiteTree.TOPLEVEL', 'Site Content (Top Level)') .
|
||||||
"</a>";
|
"</a>";
|
||||||
}
|
}
|
||||||
@ -1814,7 +1814,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
);
|
);
|
||||||
$dependentTable->getConfig()->getComponentByType('GridFieldDataColumns')
|
$dependentTable->getConfig()->getComponentByType('GridFieldDataColumns')
|
||||||
->setFieldFormatting(array(
|
->setFieldFormatting(array(
|
||||||
'Title' => '<a href=\"admin/show/$ID\">$Title</a>',
|
'Title' => '<a href=\"admin/pages/edit/show/$ID\">$Title</a>',
|
||||||
'AbsoluteLink' => '<a href=\"$value\">$value</a>',
|
'AbsoluteLink' => '<a href=\"$value\">$value</a>',
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
public function windowName(suffix) {
|
function windowName(suffix) {
|
||||||
var base = document.getElementsByTagName('base')[0].href.replace('http://','').replace(/\//g,'_').replace(/\./g,'_');
|
var base = document.getElementsByTagName('base')[0].href.replace('http://','').replace(/\//g,'_').replace(/\./g,'_');
|
||||||
return base + suffix;
|
return base + suffix;
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@ in the other stage:<br />
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
$label = sprintf(
|
$label = sprintf(
|
||||||
'<a href="admin/show/%d">%s</a> <small>(#%d, Last Modified Date: %s, Last Modifier: %s, %s)</small>',
|
'<a href="admin/pages/edit/show/%d">%s</a> <small>(#%d, Last Modified Date: %s, Last Modifier: %s, %s)</small>',
|
||||||
$orphan->ID,
|
$orphan->ID,
|
||||||
$orphan->Title,
|
$orphan->Title,
|
||||||
$orphan->ID,
|
$orphan->ID,
|
||||||
|
@ -53,16 +53,18 @@ class SiteTreeHtmlEditorFieldTest extends FunctionalTest {
|
|||||||
$editor->setValue('<img src="assets/example.jpg" />');
|
$editor->setValue('<img src="assets/example.jpg" />');
|
||||||
$editor->saveInto($sitetree);
|
$editor->saveInto($sitetree);
|
||||||
|
|
||||||
$xml = new SimpleXMLElement($sitetree->Content);
|
$parser = new CSSContentParser($sitetree->Content);
|
||||||
$this->assertNotNull($xml['alt'], 'Alt tags are added by default.');
|
$xml = $parser->getByXpath('//img');
|
||||||
$this->assertNotNull($xml['title'], 'Title tags are added by default.');
|
$this->assertEquals('', $xml[0]['alt'], 'Alt tags are added by default.');
|
||||||
|
$this->assertEquals('', $xml[0]['title'], 'Title tags are added by default.');
|
||||||
|
|
||||||
$editor->setValue('<img src="assets/example.jpg" alt="foo" title="bar" />');
|
$editor->setValue('<img src="assets/example.jpg" alt="foo" title="bar" />');
|
||||||
$editor->saveInto($sitetree);
|
$editor->saveInto($sitetree);
|
||||||
|
|
||||||
$xml = new SimpleXMLElement($sitetree->Content);
|
$parser = new CSSContentParser($sitetree->Content);
|
||||||
$this->assertNotNull('foo', $xml['alt'], 'Alt tags are preserved.');
|
$xml = $parser->getByXpath('//img');
|
||||||
$this->assertNotNull('bar', $xml['title'], 'Title tags are preserved.');
|
$this->assertEquals('foo', $xml[0]['alt'], 'Alt tags are preserved.');
|
||||||
|
$this->assertEquals('bar', $xml[0]['title'], 'Title tags are preserved.');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testImageTracking() {
|
public function testImageTracking() {
|
||||||
|
Loading…
Reference in New Issue
Block a user