Merge branch 'bootstrap' of https://github.com/PrestaShop/PrestaShop into bootstrap

Conflicts:
	admin-dev/themes/default/css/admin-theme.css
This commit is contained in:
Damien Metzger
2013-10-25 15:22:01 +02:00
38 changed files with 3854 additions and 222 deletions
@@ -388,6 +388,14 @@ class AdminCategoriesControllerCore extends AdminController
$guest_group_information = sprintf($this->l('%s - Customer who placed an order with the guest checkout.'), '<b>'.$guest->name[$this->context->language->id].'</b>');
$default_group_information = sprintf($this->l('%s - All people who have created an account on this site.'), '<b>'.$default->name[$this->context->language->id].'</b>');
if (!($obj = $this->loadObject(true)))
return;
$image = _PS_CAT_IMG_DIR_.$obj->id.'.jpg';
$image_url = ImageManager::thumbnail($image, $this->table.'_'.(int)$obj->id.'.'.$this->imageType, 350,
$this->imageType, true, true);
$image_size = file_exists($image) ? filesize($image) / 1000 : false;
$this->fields_form = array(
'tinymce' => true,
'legend' => array(
@@ -402,7 +410,6 @@ class AdminCategoriesControllerCore extends AdminController
'lang' => true,
'required' => true,
'class' => 'copy2friendlyUrl',
'col' => '4',
'hint' => $this->l('Invalid characters:').' <>;=#{}',
),
array(
@@ -447,15 +454,17 @@ class AdminCategoriesControllerCore extends AdminController
'label' => $this->l('Image:'),
'name' => 'image',
'display_image' => true,
'col' => '4',
'hint' => $this->l('Upload a category logo from your computer.')
'image' => $image_url ? $image_url : false,
'size' => $image_size,
'delete_url' => self::$currentIndex.'&'.$this->identifier.'='.$this->id.'&token='.$this->token.'&deleteImage=1',
'hint' => $this->l('Upload a category logo from your computer.'),
'col' => 4
),
array(
'type' => 'text',
'label' => $this->l('Meta title:'),
'name' => 'meta_title',
'lang' => true,
'col' => '4',
'hint' => $this->l('Forbidden characters:').' <>;=#{}'
),
array(
@@ -463,7 +472,6 @@ class AdminCategoriesControllerCore extends AdminController
'label' => $this->l('Meta description:'),
'name' => 'meta_description',
'lang' => true,
'col' => '6',
'hint' => $this->l('Forbidden characters:').' <>;=#{}'
),
array(
@@ -471,7 +479,6 @@ class AdminCategoriesControllerCore extends AdminController
'label' => $this->l('Meta keywords:'),
'name' => 'meta_keywords',
'lang' => true,
'col' => '6',
'hint' => $this->l('To add "tags," click in the field, write something, and then press "Enter."').'&nbsp;'.$this->l('Forbidden characters:').' <>;=#{}'
),
array(
@@ -480,7 +487,6 @@ class AdminCategoriesControllerCore extends AdminController
'name' => 'link_rewrite',
'lang' => true,
'required' => true,
'col' => '4',
'hint' => $this->l('Only letters and the minus (-) character are allowed.')
),
array(
@@ -492,7 +498,6 @@ class AdminCategoriesControllerCore extends AdminController
'unidentified' => $unidentified_group_information,
'guest' => $guest_group_information,
'customer' => $default_group_information,
'col' => '6',
'hint' => $this->l('Mark all of the customer groups you;d like to have access to this category.')
)
),
+1 -1
View File
@@ -221,7 +221,7 @@ class AdminGroupsControllerCore extends AdminController
'date_add' => array('title' => $this->l('Register date'), 'type' => 'date', 'class' => 'fixed-width-md', 'align' => 'center'),
'active' => array('title' => $this->l('Enabled'),'align' => 'center', 'class' => 'fixed-width-sm', 'active' => 'status','type' => 'bool', 'filter_key' => 'c!active')
));
$this->_select = 'c.*';
$this->_select = 'c.*, a.id_group';
$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'customer` c ON (a.`id_customer` = c.`id_customer`)';
$this->_where = 'AND a.`id_group` = '.(int)$group->id.' AND c.`deleted` != 1';
self::$currentIndex = self::$currentIndex.'&viewgroup';
@@ -268,6 +268,14 @@ class AdminManufacturersControllerCore extends AdminController
public function renderForm()
{
if (!($manufacturer = $this->loadObject(true)))
return;
$image = _PS_MANU_IMG_DIR_.$manufacturer->id.'.jpg';
$image_url = ImageManager::thumbnail($image, $this->table.'_'.(int)$manufacturer->id.'.'.$this->imageType, 350,
$this->imageType, true, true);
$image_size = file_exists($image) ? filesize($image) / 1000 : false;
$this->fields_form = array(
'tinymce' => true,
'legend' => array(
@@ -309,6 +317,8 @@ class AdminManufacturersControllerCore extends AdminController
'type' => 'file',
'label' => $this->l('Logo:'),
'name' => 'logo',
'image' => $image_url ? $image_url : false,
'size' => $image_size,
'display_image' => true,
'col' => 6,
'hint' => $this->l('Upload a manufacturer logo from your computer.')
@@ -380,13 +390,6 @@ class AdminManufacturersControllerCore extends AdminController
'class' => 'button'
);
$image = ImageManager::thumbnail(_PS_MANU_IMG_DIR_.'/'.$manufacturer->id.'.jpg', $this->table.'_'.(int)$manufacturer->id.'.'.$this->imageType, 350, $this->imageType, true);
$this->fields_value = array(
'image' => $image ? $image : false,
'size' => $image ? filesize(_PS_MANU_IMG_DIR_.'/'.$manufacturer->id.'.jpg') / 1000 : false
);
foreach ($this->_languages as $language)
{
$this->fields_value['short_description_'.$language['id_lang']] = htmlentities(stripslashes($this->getFieldValue(
+15 -15
View File
@@ -163,6 +163,14 @@ class AdminStoresControllerCore extends AdminController
public function renderForm()
{
if (!($obj = $this->loadObject(true)))
return;
$image = _PS_STORE_IMG_DIR_.$obj->id.'.jpg';
$image_url = ImageManager::thumbnail($image, $this->table.'_'.(int)$obj->id.'.'.$this->imageType, 350,
$this->imageType, true, true);
$image_size = file_exists($image) ? filesize($image) / 1000 : false;
$this->fields_form = array(
'legend' => array(
'title' => $this->l('Stores'),
@@ -274,16 +282,19 @@ class AdminStoresControllerCore extends AdminController
)
),
'hint' => $this->l('Whether or not to display this store')
)
),
'rightCols' => array (
'input' => array(
),
array(
'type' => 'file',
'label' => $this->l('Picture'),
'name' => 'image',
'display_image' => true,
'image' => $image_url ? $image_url : false,
'size' => $image_size,
'hint' => $this->l('Storefront picture')
)
),
'hours' => array(
),
'submit' => array(
'title' => $this->l(' Save '),
'class' => 'btn btn-default'
@@ -299,15 +310,6 @@ class AdminStoresControllerCore extends AdminController
);
}
if (!($obj = $this->loadObject(true)))
return;
if (file_exists(_PS_TMP_IMG_DIR_.$this->table.'_'.(int)$obj->id.'.'.$this->imageType)) {
@unlink(_PS_TMP_IMG_DIR_.$this->table.'_'.(int)$obj->id.'.'.$this->imageType);
}
$image = ImageManager::thumbnail(_PS_STORE_IMG_DIR_.DIRECTORY_SEPARATOR.$obj->id.'.jpg', $this->table.'_'.(int)$obj->id.'.'.$this->imageType, 350, $this->imageType, true, true);
$days = array();
$days[1] = $this->l('Monday');
$days[2] = $this->l('Tuesday');
@@ -324,8 +326,6 @@ class AdminStoresControllerCore extends AdminController
$this->fields_value = array(
'latitude' => $this->getFieldValue($obj, 'latitude') ? $this->getFieldValue($obj, 'latitude') : Configuration::get('PS_STORES_CENTER_LAT'),
'longitude' => $this->getFieldValue($obj, 'longitude') ? $this->getFieldValue($obj, 'longitude') : Configuration::get('PS_STORES_CENTER_LONG'),
'image' => $image ? $image : false,
'size' => $image ? filesize(_PS_STORE_IMG_DIR_.DIRECTORY_SEPARATOR.$obj->id.'.jpg') / 1000 : false,
'days' => $days,
'hours' => isset($hours_unserialized) ? $hours_unserialized : false
);
+14 -14
View File
@@ -88,6 +88,11 @@ class AdminSuppliersControllerCore extends AdminController
if (!($obj = $this->loadObject(true)))
return;
$image = _PS_SUPP_IMG_DIR_.$obj->id.'.jpg';
$image_url = ImageManager::thumbnail($image, $this->table.'_'.(int)$obj->id.'.'.$this->imageType, 350,
$this->imageType, true, true);
$image_size = file_exists($image) ? filesize($image) / 1000 : false;
$this->fields_form = array(
'legend' => array(
'title' => $this->l('Suppliers'),
@@ -185,6 +190,8 @@ class AdminSuppliersControllerCore extends AdminController
'label' => $this->l('Logo:'),
'name' => 'logo',
'display_image' => true,
'image' => $image_url ? $image_url : false,
'size' => $image_size,
'hint' => $this->l('Upload a supplier logo from your computer')
),
array(
@@ -281,11 +288,6 @@ class AdminSuppliersControllerCore extends AdminController
);
}
// set logo image
$image = ImageManager::thumbnail(_PS_SUPP_IMG_DIR_.'/'.$this->object->id.'.jpg', $this->table.'_'.(int)$this->object->id.'.'.$this->imageType, 350, $this->imageType, true);
$this->fields_value['image'] = $image ? $image : false;
$this->fields_value['size'] = $image ? filesize(_PS_SUPP_IMG_DIR_.'/'.$this->object->id.'.jpg') / 1000 : false;
return parent::renderForm();
}
@@ -296,15 +298,13 @@ class AdminSuppliersControllerCore extends AdminController
*/
public function initToolbar()
{
switch ($this->display)
{
default:
parent::initToolbar();
$this->toolbar_btn['import'] = array(
'href' => $this->context->link->getAdminLink('AdminImport', true).'&import_type=suppliers',
'desc' => $this->l('Import')
);
}
parent::initToolbar();
if (empty($this->display))
$this->toolbar_btn['import'] = array(
'href' => $this->context->link->getAdminLink('AdminImport', true).'&import_type=suppliers',
'desc' => $this->l('Import')
);
}
public function renderView()
@@ -133,6 +133,7 @@ class AdminThemesControllerCore extends AdminController
'title' => $this->l('Header logo'),
'hint' => $this->l('Will appear on main page. Recommended height: 52px. Maximum height on default theme: 65px.'),
'type' => 'file',
'name' => 'PS_LOGO',
'thumb' => _PS_IMG_.Configuration::get('PS_LOGO').'?date='.time()
),
'PS_LOGO_MOBILE' => array(
@@ -141,6 +142,7 @@ class AdminThemesControllerCore extends AdminController
((Configuration::get('PS_LOGO_MOBILE') === false) ? '<span class="light-warning">'.$this->l('Warning: No mobile logo has been defined. The header logo will be used instead.').'</span><br />' : '').
$this->l('Will appear on the main page of your mobile template. If left undefined, the header logo will be used.'),
'type' => 'file',
'name' => 'PS_LOGO_MOBILE',
'thumb' => (Configuration::get('PS_LOGO_MOBILE') !== false && file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO_MOBILE'))) ? _PS_IMG_.Configuration::get('PS_LOGO_MOBILE').'?date='.time() : _PS_IMG_.Configuration::get('PS_LOGO').'?date='.time()
),
'PS_LOGO_MAIL' => array(
@@ -149,6 +151,7 @@ class AdminThemesControllerCore extends AdminController
((Configuration::get('PS_LOGO_MAIL') === false) ? '<span class="light-warning">'.$this->l('Warning: No email logo has been indentified. The header logo will be used instead.').'</span><br />' : '').
$this->l('Will appear on email headers. If undefined, the header logo will be used.'),
'type' => 'file',
'name' => 'PS_LOGO_MAIL',
'thumb' => (Configuration::get('PS_LOGO_MAIL') !== false && file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO_MAIL'))) ? _PS_IMG_.Configuration::get('PS_LOGO_MAIL').'?date='.time() : _PS_IMG_.Configuration::get('PS_LOGO').'?date='.time()
),
'PS_LOGO_INVOICE' => array(
@@ -157,6 +160,7 @@ class AdminThemesControllerCore extends AdminController
((Configuration::get('PS_LOGO_INVOICE') === false) ? '<span class="light-warning">'.$this->l('Warning: No invoice logo has been defined. The header logo will be used instead.').'</span><br />' : '').
$this->l('Will appear on invoice headers. If undefined, the header logo will be used.'),
'type' => 'file',
'name' => 'PS_LOGO_INVOICE',
'thumb' => (Configuration::get('PS_LOGO_INVOICE') !== false && file_exists(_PS_IMG_DIR_.Configuration::get('PS_LOGO_INVOICE'))) ? _PS_IMG_.Configuration::get('PS_LOGO_INVOICE').'?date='.time() : _PS_IMG_.Configuration::get('PS_LOGO').'?date='.time()
),
'PS_FAVICON' => array(
@@ -164,6 +168,7 @@ class AdminThemesControllerCore extends AdminController
'hint' => $this->l('Only ICO format allowed'),
'hint' => $this->l('Will appear in the address bar of your web browser.'),
'type' => 'file',
'name' => 'PS_FAVICON',
'thumb' => _PS_IMG_.Configuration::get('PS_FAVICON').'?date='.time()
),
'PS_STORES_ICON' => array(
@@ -171,6 +176,7 @@ class AdminThemesControllerCore extends AdminController
'hint' => $this->l('Only GIF format allowed.'),
'hint' => $this->l('Will appear on the store locator (inside Google Maps).').'<br />'.$this->l('Suggested size: 30x30, Transparent GIF'),
'type' => 'file',
'name' => 'PS_STORES_ICON',
'thumb' => _PS_IMG_.Configuration::get('PS_STORES_ICON').'?date='.time()
),
'PS_NAVIGATION_PIPE' => array(