mirror of
https://github.com/colymba/GridFieldBulkEditingTools.git
synced 2024-10-22 11:05:57 +02:00
Add bulkUpload btn template + move to top
This commit is contained in:
parent
3a3d33ffdc
commit
6110d81c94
@ -159,20 +159,19 @@ class GridFieldBulkImageUpload implements GridField_HTMLProvider, GridField_URLH
|
||||
|
||||
Requirements::css(BULK_EDIT_TOOLS_PATH . '/css/GridFieldBulkImageUpload.css');
|
||||
|
||||
/*
|
||||
$data = new ArrayData(array(
|
||||
'NewLink' => $gridField->Link('bulkimageupload'),
|
||||
'ButtonName' => 'Bulk Upload'
|
||||
));
|
||||
*/
|
||||
$html = '
|
||||
<a id="bulkImageUploadGFButton" href="'.$gridField->Link('bulkimageupload').'" class="action action-detail ss-ui-action-constructive ss-ui-button ui-button ui-widget ui-state-default ui-corner-all new new-link" data-icon="add">
|
||||
Bulk Upload
|
||||
</a>';
|
||||
$targetFragment = 'before';
|
||||
if ( $gridField->getConfig()->getComponentByType('GridFieldButtonRow') )
|
||||
{
|
||||
$targetFragment = 'buttons-before-right';
|
||||
}
|
||||
|
||||
$bulkUploadBtn = new ArrayData(array(
|
||||
'Link' => $gridField->Link('bulkimageupload'),
|
||||
'Label' => 'Bulk Upload',
|
||||
));
|
||||
|
||||
return array(
|
||||
//'bulk-edit-tools' => $data->renderWith('GridFieldAddNewbutton')
|
||||
'bulk-edit-tools' => $html
|
||||
$targetFragment => $bulkUploadBtn->renderWith('BulkUploadButton')
|
||||
);
|
||||
}
|
||||
|
||||
|
3
templates/BulkUploadButton.ss
Normal file
3
templates/BulkUploadButton.ss
Normal file
@ -0,0 +1,3 @@
|
||||
<a id="bulkImageUploadGFButton" href="$Link" class="action action-detail ss-ui-action-constructive ss-ui-button ui-button ui-widget ui-state-default ui-corner-all new new-link" data-icon="add">
|
||||
$Label
|
||||
</a>
|
Loading…
Reference in New Issue
Block a user