mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 09:05:53 +00:00
Merge remote-tracking branch 'origin/master' into translation-staging
This commit is contained in:
commit
0dbbe04a4b
@ -206,7 +206,7 @@ JS
|
|||||||
'<a class="ss-ui-button ss-ui-action ui-button-text-icon-primary ss-ui-button-ajax" data-icon="arrow-circle-double" title="%s" href="%s">%s</a>',
|
'<a class="ss-ui-button ss-ui-action ui-button-text-icon-primary ss-ui-button-ajax" data-icon="arrow-circle-double" title="%s" href="%s">%s</a>',
|
||||||
_t('AssetAdmin.FILESYSTEMSYNCTITLE', 'Update the CMS database entries of files on the filesystem. Useful when new files have been uploaded outside of the CMS, e.g. through FTP.'),
|
_t('AssetAdmin.FILESYSTEMSYNCTITLE', 'Update the CMS database entries of files on the filesystem. Useful when new files have been uploaded outside of the CMS, e.g. through FTP.'),
|
||||||
$this->Link('doSync'),
|
$this->Link('doSync'),
|
||||||
_t('FILESYSTEMSYNC','Sync files')
|
_t('AssetAdmin.FILESYSTEMSYNC','Sync files')
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
@ -202,9 +202,10 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
return $link;
|
return $link;
|
||||||
}
|
}
|
||||||
|
|
||||||
function LinkPageAdd() {
|
function LinkPageAdd($extraArguments = null) {
|
||||||
$link = singleton("CMSPageAddController")->Link();
|
$link = singleton("CMSPageAddController")->Link();
|
||||||
$this->extend('updateLinkPageAdd', $link);
|
$this->extend('updateLinkPageAdd', $link);
|
||||||
|
if($extraArguments) $link = Controller::join_links ($link, $extraArguments);
|
||||||
return $link;
|
return $link;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -467,8 +468,8 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
|
|
||||||
$addAction = $instance->i18n_singular_name();
|
$addAction = $instance->i18n_singular_name();
|
||||||
|
|
||||||
// Get description
|
// Get description (convert 'Page' to 'SiteTree' for correct localization lookups)
|
||||||
$description = _t($class . '.DESCRIPTION');
|
$description = _t((($class == 'Page') ? 'SiteTree' : $class) . '.DESCRIPTION');
|
||||||
|
|
||||||
if(!$description) {
|
if(!$description) {
|
||||||
$description = $instance->uninherited('description');
|
$description = $instance->uninherited('description');
|
||||||
@ -483,7 +484,8 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
'AddAction' => $addAction,
|
'AddAction' => $addAction,
|
||||||
'Description' => $description,
|
'Description' => $description,
|
||||||
// TODO Sprite support
|
// TODO Sprite support
|
||||||
'IconURL' => $instance->stat('icon')
|
'IconURL' => $instance->stat('icon'),
|
||||||
|
'Title' => singleton($class)->i18n_singular_name(),
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -719,9 +721,8 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
$num = $item ? $item->numChildren() : null;
|
$num = $item ? $item->numChildren() : null;
|
||||||
if($num) {
|
if($num) {
|
||||||
return sprintf(
|
return sprintf(
|
||||||
'<a class="cms-panel-link list-children-link" data-pjax-target="ListViewForm,Breadcrumbs" href="%s?ParentID=%d&view=list">%s</a>',
|
'<a class="cms-panel-link list-children-link" data-pjax-target="ListViewForm,Breadcrumbs" href="%s">%s</a>',
|
||||||
$controller->Link(),
|
Controller::join_links($controller->Link(), "?ParentID={$item->ID}&view=list"),
|
||||||
$item->ID,
|
|
||||||
$num
|
$num
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -845,8 +846,11 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
$id = $id . $suffix;
|
$id = $id . $suffix;
|
||||||
}
|
}
|
||||||
|
|
||||||
$newItem->Title = _t('CMSMain.NEW',"New ",'"New " followed by a className').$className;
|
$newItem->Title = _t(
|
||||||
$newItem->URLSegment = "new-" . strtolower($className);
|
'CMSMain.NEWPAGE',
|
||||||
|
"New {pagetype}",'followed by a page type title',
|
||||||
|
array('pagetype' => singleton($className)->i18n_singular_name())
|
||||||
|
);
|
||||||
$newItem->ClassName = $className;
|
$newItem->ClassName = $className;
|
||||||
$newItem->ParentID = $parentID;
|
$newItem->ParentID = $parentID;
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ class CMSPageAddController extends CMSPageEditController {
|
|||||||
$pageTypes = array();
|
$pageTypes = array();
|
||||||
foreach($this->PageTypes() as $type) {
|
foreach($this->PageTypes() as $type) {
|
||||||
$html = sprintf('<span class="page-icon class-%s"></span><strong class="title">%s</strong><span class="description">%s</span>',
|
$html = sprintf('<span class="page-icon class-%s"></span><strong class="title">%s</strong><span class="description">%s</span>',
|
||||||
$type->getField('ClassName'),
|
$type->getField('Title'),
|
||||||
$type->getField('AddAction'),
|
$type->getField('AddAction'),
|
||||||
$type->getField('Description')
|
$type->getField('Description')
|
||||||
);
|
);
|
||||||
|
@ -163,7 +163,7 @@ class ReportAdmin extends LeftAndMain implements PermissionProvider {
|
|||||||
$gridField = new GridField('Reports',false, $this->Reports(), $gridFieldConfig);
|
$gridField = new GridField('Reports',false, $this->Reports(), $gridFieldConfig);
|
||||||
$columns = $gridField->getConfig()->getComponentByType('GridFieldDataColumns');
|
$columns = $gridField->getConfig()->getComponentByType('GridFieldDataColumns');
|
||||||
$columns->setDisplayFields(array(
|
$columns->setDisplayFields(array(
|
||||||
'title' => 'Title',
|
'title' => _t('ReportAdmin.ReportTitle', 'Title'),
|
||||||
));
|
));
|
||||||
$columns->setFieldFormatting(array(
|
$columns->setFieldFormatting(array(
|
||||||
'title' => '<a href=\"$Link\" class=\"cms-panel-link\">$value</a>'
|
'title' => '<a href=\"$Link\" class=\"cms-panel-link\">$value</a>'
|
||||||
|
@ -2699,7 +2699,9 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
* @return String
|
* @return String
|
||||||
*/
|
*/
|
||||||
function i18n_singular_name() {
|
function i18n_singular_name() {
|
||||||
return _t($this->class.'.SINGULARNAME', $this->singular_name());
|
// Convert 'Page' to 'SiteTree' for correct localization lookups
|
||||||
|
$class = ($this->class == 'Page') ? 'SiteTree' : $this->class;
|
||||||
|
return _t($class.'.SINGULARNAME', $this->singular_name());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2709,14 +2711,17 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
|
|||||||
function provideI18nEntities() {
|
function provideI18nEntities() {
|
||||||
$entities = parent::provideI18nEntities();
|
$entities = parent::provideI18nEntities();
|
||||||
|
|
||||||
if(isset($entities['Page.SINGULARNAME'])) $entities['Page.SINGULARNAME'][3] = FRAMEWORK_DIR;
|
if(isset($entities['Page.SINGULARNAME'])) $entities['Page.SINGULARNAME'][3] = CMS_DIR;
|
||||||
if(isset($entities['Page.PLURALNAME'])) $entities['Page.PLURALNAME'][3] = FRAMEWORK_DIR;
|
if(isset($entities['Page.PLURALNAME'])) $entities['Page.PLURALNAME'][3] = CMS_DIR;
|
||||||
|
|
||||||
$entities[$this->class . '.DESCRIPTION'] = array(
|
$entities[$this->class . '.DESCRIPTION'] = array(
|
||||||
$this->stat('description'),
|
$this->stat('description'),
|
||||||
'Description of the page type (shown in the "add page" dialog)'
|
'Description of the page type (shown in the "add page" dialog)'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
$entities['SiteTree.SINGULARNAME'][0] = 'Page';
|
||||||
|
$entities['SiteTree.PLURALNAME'][0] = 'Pages';
|
||||||
|
|
||||||
return $entities;
|
return $entities;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
11
lang/en.yml
11
lang/en.yml
@ -13,6 +13,7 @@ en:
|
|||||||
CurrentFolderOnly: 'Limit to current folder?'
|
CurrentFolderOnly: 'Limit to current folder?'
|
||||||
DetailsView: Details
|
DetailsView: Details
|
||||||
FILES: Files
|
FILES: Files
|
||||||
|
FILESYSTEMSYNC: 'Sync files'
|
||||||
FILESYSTEMSYNCTITLE: 'Update the CMS database entries of files on the filesystem. Useful when new files have been uploaded outside of the CMS, e.g. through FTP.'
|
FILESYSTEMSYNCTITLE: 'Update the CMS database entries of files on the filesystem. Useful when new files have been uploaded outside of the CMS, e.g. through FTP.'
|
||||||
FROMTHEINTERNET: 'From the internet'
|
FROMTHEINTERNET: 'From the internet'
|
||||||
FROMYOURCOMPUTER: 'From your computer'
|
FROMYOURCOMPUTER: 'From your computer'
|
||||||
@ -82,7 +83,7 @@ en:
|
|||||||
EMAIL: Email
|
EMAIL: Email
|
||||||
EditTree: 'Edit Tree'
|
EditTree: 'Edit Tree'
|
||||||
ListFiltered: 'Filtered list.'
|
ListFiltered: 'Filtered list.'
|
||||||
NEW: 'New '
|
NEWPAGE: 'New {pagetype}'
|
||||||
PAGENOTEXISTS: 'This page doesn''t exist'
|
PAGENOTEXISTS: 'This page doesn''t exist'
|
||||||
PAGES: Pages
|
PAGES: Pages
|
||||||
PAGETYPEANYOPT: Any
|
PAGETYPEANYOPT: Any
|
||||||
@ -236,6 +237,8 @@ en:
|
|||||||
REDIRECTTOPAGE: 'A page on your website'
|
REDIRECTTOPAGE: 'A page on your website'
|
||||||
SINGULARNAME: 'Redirector Page'
|
SINGULARNAME: 'Redirector Page'
|
||||||
YOURPAGE: 'Page on your website'
|
YOURPAGE: 'Page on your website'
|
||||||
|
ReportAdmin:
|
||||||
|
ReportTitle: Title
|
||||||
ReportAdminForm:
|
ReportAdminForm:
|
||||||
FILTERBY: 'Filter by'
|
FILTERBY: 'Filter by'
|
||||||
SearchForm:
|
SearchForm:
|
||||||
@ -333,7 +336,7 @@ en:
|
|||||||
PARENTTYPE_SUBPAGE: 'Sub-page underneath a parent page'
|
PARENTTYPE_SUBPAGE: 'Sub-page underneath a parent page'
|
||||||
PERMISSION_GRANTACCESS_DESCRIPTION: 'Manage access rights for content'
|
PERMISSION_GRANTACCESS_DESCRIPTION: 'Manage access rights for content'
|
||||||
PERMISSION_GRANTACCESS_HELP: 'Allow setting of page-specific access restrictions in the "Pages" section.'
|
PERMISSION_GRANTACCESS_HELP: 'Allow setting of page-specific access restrictions in the "Pages" section.'
|
||||||
PLURALNAME: 'Site Tres'
|
PLURALNAME: Pages
|
||||||
PageTypNotAllowedOnRoot: 'Page type "{type}" is not allowed on the root level'
|
PageTypNotAllowedOnRoot: 'Page type "{type}" is not allowed on the root level'
|
||||||
PageTypeNotAllowed: 'Page type "{type}" not allowed as child of this parent page'
|
PageTypeNotAllowed: 'Page type "{type}" not allowed as child of this parent page'
|
||||||
REMOVEDFROMDRAFTHELP: 'Page is published, but has been deleted from draft'
|
REMOVEDFROMDRAFTHELP: 'Page is published, but has been deleted from draft'
|
||||||
@ -343,7 +346,7 @@ en:
|
|||||||
REORGANISE_HELP: 'Rearrange pages in the site tree through drag&drop.'
|
REORGANISE_HELP: 'Rearrange pages in the site tree through drag&drop.'
|
||||||
SHOWINMENUS: 'Show in menus?'
|
SHOWINMENUS: 'Show in menus?'
|
||||||
SHOWINSEARCH: 'Show in search?'
|
SHOWINSEARCH: 'Show in search?'
|
||||||
SINGULARNAME: 'Site Tree'
|
SINGULARNAME: Page
|
||||||
TABBEHAVIOUR: Behavior
|
TABBEHAVIOUR: Behavior
|
||||||
TABCONTENT: 'Main Content'
|
TABCONTENT: 'Main Content'
|
||||||
TABDEPENDENT: 'Dependent pages'
|
TABDEPENDENT: 'Dependent pages'
|
||||||
@ -394,8 +397,6 @@ en:
|
|||||||
PLURALNAME: 'Virtual Pags'
|
PLURALNAME: 'Virtual Pags'
|
||||||
PageTypNotAllowedOnRoot: 'Original page type "{type}" is not allowed on the root level for this virtual page'
|
PageTypNotAllowedOnRoot: 'Original page type "{type}" is not allowed on the root level for this virtual page'
|
||||||
SINGULARNAME: 'Virtual Page'
|
SINGULARNAME: 'Virtual Page'
|
||||||
cms:
|
|
||||||
FILESYSTEMSYNC: 'Sync files'
|
|
||||||
CMSFileAddController:
|
CMSFileAddController:
|
||||||
MENUTITLE: Files
|
MENUTITLE: Files
|
||||||
CMSPageEditController:
|
CMSPageEditController:
|
||||||
|
@ -22,7 +22,7 @@ $ExtraTreeTools
|
|||||||
</div>
|
</div>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
|
|
||||||
<div class="cms-tree" data-url-tree="$Link(getsubtree)" data-url-savetreenode="$Link(savetreenode)" data-url-updatetreenodes="$Link(updatetreenodes)" data-url-addpage="{$LinkPageAdd}AddForm/?action_doAdd=1&ParentID=%s&PageType=%s&SecurityID=$SecurityID" data-url-editpage="$LinkPageEdit('%s')" data-hints="$SiteTreeHints">
|
<div class="cms-tree" data-url-tree="$Link(getsubtree)" data-url-savetreenode="$Link(savetreenode)" data-url-updatetreenodes="$Link(updatetreenodes)" data-url-addpage="{$LinkPageAdd('AddForm/?action_doAdd=1')}&ParentID=%s&PageType=%s&SecurityID=$SecurityID" data-url-editpage="$LinkPageEdit('%s')" data-hints="$SiteTreeHints">
|
||||||
$SiteTreeAsUL
|
$SiteTreeAsUL
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<div class="cms-actions-row">
|
<div class="cms-actions-row">
|
||||||
<a class="cms-page-add-button ss-ui-button ss-ui-action-constructive" data-icon="add" href="$LinkPageAdd" data-url-addpage="{$LinkPageAdd}?ParentID=%s"><% _t('CMSMain.AddNewButton', 'Add new') %></a>
|
<a class="cms-page-add-button ss-ui-button ss-ui-action-constructive" data-icon="add" href="$LinkPageAdd" data-url-addpage="{$LinkPageAdd('?ParentID=%s')}"><% _t('CMSMain.AddNewButton', 'Add new') %></a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="cms-content-batchactions">
|
<div class="cms-content-batchactions">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user