add png image

This commit is contained in:
Marion Muszynski 2017-12-07 14:46:19 +01:00
parent e663de7dc6
commit c85e23079b
2 changed files with 11 additions and 1 deletions

View File

@ -72,6 +72,10 @@ class AdminOrders extends AdminTab
foreach(Country::getCountries((int) $cookie->id_lang, TRUE) as $country) {
$country_array[(int) $country['id_country']] = $country['name'];
}
$appliArray = array(
0 => 'Site',
1 => 'Appli'
);
foreach ($states AS $state)
$statesArray[$state['id_order_state']] = $state['name'];
@ -99,7 +103,7 @@ class AdminOrders extends AdminTab
//'mixed' => array('title' => $this->l('Mixed'), 'callback' => 'printMixedSale', 'orderby' => false, 'search' => false),
'id_pdf' => array('title' => $this->l('PDF'), 'callback' => 'printPDFIcons', 'orderby' => false, 'search' => false),
'id_country' => array('title' => $this->l('Pays'), 'callback' => 'printCountry', 'orderby' => false, 'type' => 'select', 'select' => $country_array, 'filter_key' => 'x!id_country', 'filter_type' => 'int', 'width' => 35,),
'appli' => array('title' => $this->l('Appli'), 'width' => 25, 'align' => 'center', 'type' => 'bool', 'filter_key' => 'appli', 'tmpTableFilter' => true, 'icon' => array(0 => 'disabled.gif', 1 => 'enabled.gif'), 'orderby' => false),
'appli' => array('title' => $this->l('Appli'), 'width' => 25, 'align' => 'center', 'type' => 'select', 'select' => $appliArray, 'filter_key' => 'a!appli', 'callback' => 'printAppliIcons', 'orderby' => false),
);
parent::__construct();

View File

@ -85,6 +85,12 @@ class Order extends OrderCore {
return '<img src="/img/flags/'.(int) $value.'.png" alt="" />';
}
public function printAppliIcons($value, $params)
{
$name = ((int)$value?'computer':'mobile');
return '<img src="/img/'.$name.'.png" alt="" width="18px"/>';
}
public function printCarrier($value, $params)
{
$laposte_carriers = unserialize(Configuration::get('LAPOSTEWS_CARRIERS', serialize(array())));