mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge remote-tracking branch 'origin/master' into translation-staging
This commit is contained in:
commit
e2dbad03b3
@ -203,7 +203,9 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
}
|
}
|
||||||
|
|
||||||
function LinkPageAdd() {
|
function LinkPageAdd() {
|
||||||
return singleton("CMSPageAddController")->Link();
|
$link = singleton("CMSPageAddController")->Link();
|
||||||
|
$this->extend('updateLinkPageAdd', $link);
|
||||||
|
return $link;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -466,9 +468,15 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
$addAction = $instance->i18n_singular_name();
|
$addAction = $instance->i18n_singular_name();
|
||||||
|
|
||||||
// Get description
|
// Get description
|
||||||
$description = _t($class . 'DESCRIPTION');
|
$description = _t($class . '.DESCRIPTION');
|
||||||
if(!$description) $description = $instance->uninherited('description');
|
|
||||||
if($class == 'Page' && !$description) $description = singleton('SiteTree')->uninherited('description');
|
if(!$description) {
|
||||||
|
$description = $instance->uninherited('description');
|
||||||
|
}
|
||||||
|
|
||||||
|
if($class == 'Page' && !$description) {
|
||||||
|
$description = singleton('SiteTree')->uninherited('description');
|
||||||
|
}
|
||||||
|
|
||||||
$result->push(new ArrayData(array(
|
$result->push(new ArrayData(array(
|
||||||
'ClassName' => $class,
|
'ClassName' => $class,
|
||||||
@ -480,6 +488,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
}
|
}
|
||||||
|
|
||||||
$result = $result->sort('AddAction');
|
$result = $result->sort('AddAction');
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -88,6 +88,7 @@ class ErrorPage extends Page {
|
|||||||
|
|
||||||
// Ensure a static error page is created from latest error page content
|
// Ensure a static error page is created from latest error page content
|
||||||
$response = Director::test(Director::makeRelative($pageNotFoundErrorPage->Link()));
|
$response = Director::test(Director::makeRelative($pageNotFoundErrorPage->Link()));
|
||||||
|
$written = null;
|
||||||
if($fh = fopen($pageNotFoundErrorPagePath, 'w')) {
|
if($fh = fopen($pageNotFoundErrorPagePath, 'w')) {
|
||||||
$written = fwrite($fh, $response->getBody());
|
$written = fwrite($fh, $response->getBody());
|
||||||
fclose($fh);
|
fclose($fh);
|
||||||
@ -115,6 +116,7 @@ class ErrorPage extends Page {
|
|||||||
|
|
||||||
// Ensure a static error page is created from latest error page content
|
// Ensure a static error page is created from latest error page content
|
||||||
$response = Director::test(Director::makeRelative($serverErrorPage->Link()));
|
$response = Director::test(Director::makeRelative($serverErrorPage->Link()));
|
||||||
|
$written = null;
|
||||||
if($fh = fopen($serverErrorPagePath, 'w')) {
|
if($fh = fopen($serverErrorPagePath, 'w')) {
|
||||||
$written = fwrite($fh, $response->getBody());
|
$written = fwrite($fh, $response->getBody());
|
||||||
fclose($fh);
|
fclose($fh);
|
||||||
|
@ -205,11 +205,13 @@ class SiteConfig extends DataObject implements PermissionProvider {
|
|||||||
$siteConfig->Tagline = _t('SiteConfig.TAGLINEDEFAULT',"your tagline here");
|
$siteConfig->Tagline = _t('SiteConfig.TAGLINEDEFAULT',"your tagline here");
|
||||||
|
|
||||||
if(class_exists('Translatable') && $siteConfig->hasExtension('Translatable')){
|
if(class_exists('Translatable') && $siteConfig->hasExtension('Translatable')){
|
||||||
$defaultConfig = DataObject::get_one('SiteConfig');
|
Translatable::disable_locale_filter();
|
||||||
if($defaultConfig){
|
$defaultConfig = SiteConfig::get()->first();
|
||||||
$siteConfig->Title = $defaultConfig->Title;
|
Translatable::enable_locale_filter();
|
||||||
$siteConfig->Tagline = $defaultConfig->Tagline;
|
|
||||||
}
|
if($defaultConfig){
|
||||||
|
return $defaultConfig->createTranslation($locale);
|
||||||
|
}
|
||||||
|
|
||||||
// TODO Copy view/edit group settings
|
// TODO Copy view/edit group settings
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
.cms-content-tools #cms-content-treeview .cms-content-toolbar { border-bottom: none; box-shadow: none; margin-bottom: 8px; }
|
.cms-content-tools #cms-content-treeview .cms-content-toolbar { border-bottom: none; box-shadow: none; margin-bottom: 8px; }
|
||||||
.cms-content-tools #cms-content-treeview .cms-tree-view-modes, .cms-content-tools #cms-content-treeview .cms-content-batchactions { display: none; }
|
.cms-content-tools #cms-content-treeview .cms-tree-view-modes, .cms-content-tools #cms-content-treeview .cms-content-batchactions { display: none; }
|
||||||
.cms-content-tools #cms-content-treeview .cms-tree-expand-trigger { display: inline-block; margin: 0 0 2px 0; position: absolute; top: 8px; right: 4px; }
|
.cms-content-tools #cms-content-treeview .cms-tree-expand-trigger { display: inline-block; margin: 0 0 2px 0; }
|
||||||
.cms-content-tools #cms-content-treeview .cms-tree-expand-trigger span.ui-button-text { padding-right: 8px; }
|
.cms-content-tools #cms-content-treeview .cms-tree-expand-trigger span.ui-button-text { padding-right: 8px; }
|
||||||
.cms-content-tools #cms-content-treeview .cms-tree .badge, .cms-content-tools #cms-content-treeview .cms-tree a > .jstree-icon { display: none; }
|
.cms-content-tools #cms-content-treeview .cms-tree .badge, .cms-content-tools #cms-content-treeview .cms-tree a > .jstree-icon { display: none; }
|
||||||
.cms-content-tools #cms-content-treeview .cms-tree a:hover > .text > .badge, .cms-content-tools #cms-content-treeview .cms-tree .jstree-clicked > .text > .badge { display: inline-block; }
|
.cms-content-tools #cms-content-treeview .cms-tree a:hover > .text > .badge, .cms-content-tools #cms-content-treeview .cms-tree .jstree-clicked > .text > .badge { display: inline-block; }
|
||||||
|
@ -11,9 +11,13 @@
|
|||||||
* Constructor: onmatch
|
* Constructor: onmatch
|
||||||
*/
|
*/
|
||||||
onmatch : function() {
|
onmatch : function() {
|
||||||
this._addActions(); // add elements and actions for editing
|
// Only initialize the field if it contains an editable field.
|
||||||
this.edit(); // toggle
|
// This ensures we don't get bogus previews on readonly fields.
|
||||||
this._autoInputWidth(); // set width of input field
|
if(this.find(':text').length) {
|
||||||
|
this._addActions(); // add elements and actions for editing
|
||||||
|
this.edit(); // toggle
|
||||||
|
this._autoInputWidth(); // set width of input field
|
||||||
|
}
|
||||||
|
|
||||||
this._super();
|
this._super();
|
||||||
},
|
},
|
||||||
|
@ -68,9 +68,6 @@
|
|||||||
.cms-tree-expand-trigger {
|
.cms-tree-expand-trigger {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin:0 0 2px 0;
|
margin:0 0 2px 0;
|
||||||
position:absolute;
|
|
||||||
top:8px;
|
|
||||||
right:4px;
|
|
||||||
span.ui-button-text{
|
span.ui-button-text{
|
||||||
padding-right:8px;
|
padding-right:8px;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user