mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge branch '3.0'
This commit is contained in:
commit
cac540d252
@ -1165,7 +1165,7 @@ class LeftAndMain extends Controller implements PermissionProvider {
|
|||||||
),
|
),
|
||||||
new FieldList(
|
new FieldList(
|
||||||
// TODO i18n
|
// TODO i18n
|
||||||
new FormAction('submit', "Go")
|
new FormAction('submit', _t('Form.SubmitBtnLabel', "Go"))
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
$form->addExtraClass('cms-batch-actions nostyle');
|
$form->addExtraClass('cms-batch-actions nostyle');
|
||||||
|
@ -109,7 +109,7 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
$groupsTab = new Tab('Groups', singleton('Group')->plural_name(),
|
$groupsTab = new Tab('Groups', singleton('Group')->i18n_plural_name(),
|
||||||
$groupList,
|
$groupList,
|
||||||
new HeaderField(_t('SecurityAdmin.IMPORTGROUPS', 'Import groups'), 3),
|
new HeaderField(_t('SecurityAdmin.IMPORTGROUPS', 'Import groups'), 3),
|
||||||
new LiteralField(
|
new LiteralField(
|
||||||
|
@ -1,22 +1,19 @@
|
|||||||
<div class="breadcrumbs-wrapper" data-pjax-fragment="Breadcrumbs">
|
<div class="breadcrumbs-wrapper" data-pjax-fragment="Breadcrumbs">
|
||||||
<% loop Breadcrumbs %>
|
|
||||||
|
|
||||||
<% if First %>
|
|
||||||
<% if ToplevelController %>
|
|
||||||
<span class="section-icon icon icon-16 icon-{$ToplevelController.MenuCurrentItem.Code.LowerCase}"></span>
|
|
||||||
<% else_if Controller %>
|
|
||||||
<span class="section-icon icon icon-16 icon-{$Controller.MenuCurrentItem.Code.LowerCase}"></span>
|
|
||||||
<% else %>
|
|
||||||
<span class="section-icon icon icon-16 icon-{$MenuCurrentItem.Code.LowerCase}"></span>
|
|
||||||
<% end_if %>
|
|
||||||
<% end_if %>
|
|
||||||
|
|
||||||
|
<% if ToplevelController %>
|
||||||
|
<span class="section-icon icon icon-16 icon-{$ToplevelController.MenuCurrentItem.Code.LowerCase}"></span>
|
||||||
|
<% else_if Controller %>
|
||||||
|
<span class="section-icon icon icon-16 icon-{$Controller.MenuCurrentItem.Code.LowerCase}"></span>
|
||||||
|
<% else %>
|
||||||
|
<span class="section-icon icon icon-16 icon-{$MenuCurrentItem.Code.LowerCase}"></span>
|
||||||
|
<% end_if %>
|
||||||
|
|
||||||
|
<% loop Breadcrumbs %>
|
||||||
<% if Last %>
|
<% if Last %>
|
||||||
<span class="cms-panel-link crumb last">$Title.XML</span>
|
<span class="cms-panel-link crumb last">$Title.XML</span>
|
||||||
<% else %>
|
<% else %>
|
||||||
<a class="cms-panel-link crumb" href="$Link">$Title.XML</a>
|
<a class="cms-panel-link crumb" href="$Link">$Title.XML</a>
|
||||||
<span class="sep">/</span>
|
<span class="sep">/</span>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
|
|
||||||
<% end_loop %>
|
<% end_loop %>
|
||||||
</div>
|
</div>
|
||||||
|
@ -33,12 +33,12 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li class="first <% if Top.class == 'AssetAdmin' %>current<% end_if %>" id="Menu-AssetAdmin">
|
<li class="first <% if Top.class == 'AssetAdmin' %>current<% end_if %>" id="Menu-AssetAdmin">
|
||||||
<a href="admin/assets/">
|
<a href="admin/assets/">
|
||||||
<span class="text">Edit & organize</span>
|
<span class="text"><% _t('AssetAdmin.EditOrgMenu', 'Edit & organize') %></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="last <% if Top.class == 'CMSFileAddController' %>current<% end_if %>" id="Menu-CMSFileAddController">
|
<li class="last <% if Top.class == 'CMSFileAddController' %>current<% end_if %>" id="Menu-CMSFileAddController">
|
||||||
<a href="admin/assets/add">
|
<a href="admin/assets/add">
|
||||||
<span class="text">Add files</span>
|
<span class="text"><% _t('AssetAdmin.ADDFILES', 'Add files') %></span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -23,7 +23,7 @@ class GridFieldAddNewButton implements GridField_HTMLProvider {
|
|||||||
public function getHTMLFragments($gridField) {
|
public function getHTMLFragments($gridField) {
|
||||||
if(!$this->buttonName) {
|
if(!$this->buttonName) {
|
||||||
// provide a default button name, can be changed by calling {@link setButtonName()} on this component
|
// provide a default button name, can be changed by calling {@link setButtonName()} on this component
|
||||||
$this->buttonName = _t('GridField.Add', 'Add {name}', array('name' => singleton($gridField->getModelClass())->singular_name()));
|
$this->buttonName = _t('GridField.Add', 'Add {name}', array('name' => singleton($gridField->getModelClass())->i18n_singular_name()));
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = new ArrayData(array(
|
$data = new ArrayData(array(
|
||||||
|
@ -464,7 +464,7 @@ class GridFieldDetailForm_ItemRequest extends RequestHandler {
|
|||||||
)));
|
)));
|
||||||
} else {
|
} else {
|
||||||
$items->push(new ArrayData(array(
|
$items->push(new ArrayData(array(
|
||||||
'Title' => sprintf(_t('GridField.NewRecord', 'New %s'), $this->record->singular_name()),
|
'Title' => sprintf(_t('GridField.NewRecord', 'New %s'), $this->record->i18n_singular_name()),
|
||||||
'Link' => false
|
'Link' => false
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
@ -3156,6 +3156,10 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity
|
|||||||
|
|
||||||
// Final fail-over, just list ID field
|
// Final fail-over, just list ID field
|
||||||
if(!$fields) $fields['ID'] = 'ID';
|
if(!$fields) $fields['ID'] = 'ID';
|
||||||
|
|
||||||
|
// Localize fields (if possible)
|
||||||
|
$labels = $this->fieldLabels(false);
|
||||||
|
$fields = array_intersect_key($labels, $fields);
|
||||||
|
|
||||||
return $fields;
|
return $fields;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user