Add bulkUpload btn template + move to top

This commit is contained in:
colymba 2013-04-16 21:33:50 +03:00
parent 3a3d33ffdc
commit 6110d81c94
2 changed files with 14 additions and 12 deletions

View File

@ -159,20 +159,19 @@ class GridFieldBulkImageUpload implements GridField_HTMLProvider, GridField_URLH
Requirements::css(BULK_EDIT_TOOLS_PATH . '/css/GridFieldBulkImageUpload.css'); Requirements::css(BULK_EDIT_TOOLS_PATH . '/css/GridFieldBulkImageUpload.css');
/* $targetFragment = 'before';
$data = new ArrayData(array( if ( $gridField->getConfig()->getComponentByType('GridFieldButtonRow') )
'NewLink' => $gridField->Link('bulkimageupload'), {
'ButtonName' => 'Bulk Upload' $targetFragment = 'buttons-before-right';
}
$bulkUploadBtn = new ArrayData(array(
'Link' => $gridField->Link('bulkimageupload'),
'Label' => '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>';
return array( return array(
//'bulk-edit-tools' => $data->renderWith('GridFieldAddNewbutton') $targetFragment => $bulkUploadBtn->renderWith('BulkUploadButton')
'bulk-edit-tools' => $html
); );
} }

View 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>