Skip to content
Snippets Groups Projects
Commit 82701622 authored by Ghislain Loas's avatar Ghislain Loas
Browse files

replace bouton by button in admin controller index : add missing files

parent 04da8638
Branches
Tags 7.8.7
4 merge requests!2334Master,!2102#57574 : correction orthographe des jours de la semaine,!2078Sandbox upgrade form buttons,!2066Sandbox upgrade form buttons
Pipeline #783 failed with stage
in 19 minutes and 44 seconds
<?php
/**
* Copyright (c) 2012-2017, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* BOKEH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class ZendAfi_View_Helper_Admin_Button_New extends ZendAfi_View_Helper_Button_New {
protected function _getDefaultAttribs() {
return array_merge(parent::_getDefaultAttribs(),
['class' => 'new']);
}
protected function _getDefaultButton($attribs) {
return parent::_getDefaultButton($attribs)
->setImage($this->view->tagImg(Class_Admin_Skin::current()
->renderIconUrlOn('buttons',
'add')));
}
}
\ No newline at end of file
<?php
/**
* Copyright (c) 2012-2017, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* BOKEH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class ZendAfi_View_Helper_Button_New extends ZendAfi_View_Helper_BaseHelper {
public function Button_New($settings = null) {
$button = $this->_getDefaultButton($this->_getDefaultAttribs());
if($settings)
$button->updateAttributes($settings->toArray());
return $this->view->button($button);
}
protected function _getDefaultAttribs() {
$attribs = ['class' => 'bouton new'];
if($this->view->isPopup())
$attribs['data-popup'] = 'true';
return $attribs;
}
protected function _getDefaultButton($attribs) {
return (new Class_Entity())
->setAttribs($attribs)
->setUrl($this->view->url(['action' => 'add',
'render' => null]));
}
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment