mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: SSF-168 code convention correction
MINOR: SSF-168 add _t()'s where necessory in GridField print view
This commit is contained in:
parent
5826b36f8d
commit
a946096e29
@ -135,12 +135,22 @@ class GridFieldPrintButton implements GridField_HTMLProvider, GridField_ActionPr
|
||||
//get title for the print view
|
||||
$form = $gridField->getForm();
|
||||
$currentController = Controller::curr();
|
||||
$title = method_exists($currentController, 'Title')?$currentController->Title():
|
||||
($currentController->Title?$currentController->Title:
|
||||
($form?$form->Name():''));
|
||||
if($fieldTitle = $gridField->Title()) $title .= ($title?' - ':'').$fieldTitle;
|
||||
|
||||
//$state = $gridField->getState(false)->__toString();
|
||||
$title = '';
|
||||
if(method_exists($currentController, 'Title')) {
|
||||
$title = $currentController->Title();
|
||||
}else{
|
||||
if($currentController->Title){
|
||||
$title = $currentController->Title;
|
||||
}else{
|
||||
if($form->Name()){
|
||||
$title = $form->Name();
|
||||
}
|
||||
}
|
||||
}
|
||||
if($fieldTitle = $gridField->Title()){
|
||||
if($title) $title .= " - ";
|
||||
$title .= $fieldTitle;
|
||||
}
|
||||
|
||||
$ret = new ArrayData(
|
||||
array(
|
||||
|
@ -16,9 +16,9 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<p>
|
||||
Printed at $Datetime.Nice
|
||||
<% _t('GridField.PRINTEDAT', 'Printed at') %> $Datetime.Time, $Datetime.Date
|
||||
<br />
|
||||
Printed by $Member.Name
|
||||
<% _t('GridField.PRINTEDBY', 'Printed by') %> $Member.Name
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user