// Remove $display_multishop_toolbar and add instead $multishop_context to manage shop context per admin controller
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@13530 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
+13
-4
@@ -419,10 +419,19 @@ function generateShopList()
|
||||
foreach ($tree as $gID => $group_data)
|
||||
{
|
||||
$disabled = ($group_data['totalShops'] != count($group_data['shops'])) ? 'disabled="disabled"' : '';
|
||||
$html .= '<option class="group" value="g-'.$gID.'" '.(($value == 'g-'.$gID) ? 'selected="selected"' : '').' '.$disabled.'>'.translate('Group:').' '.htmlspecialchars($group_data['name']).'</option>';
|
||||
foreach ($group_data['shops'] as $sID => $shopData)
|
||||
if ($shopData['active'])
|
||||
$html .= '<option value="s-'.$sID.'" class="shop" '.(($value == 's-'.$sID || $context->shop->id == $sID) ? 'selected="selected"' : '').'>» '.$shopData['name'].'</option>';
|
||||
|
||||
if ($context->controller->multishop_context & Shop::CONTEXT_GROUP)
|
||||
$html .= '<option class="group" value="g-'.$gID.'" '.(($value == 'g-'.$gID) ? 'selected="selected"' : '').' '.$disabled.'>'.translate('Group:').' '.htmlspecialchars($group_data['name']).'</option>';
|
||||
else
|
||||
$html .= '<optgroup class="group" label="'.translate('Group:').' '.htmlspecialchars($group_data['name']).'">';
|
||||
|
||||
if ($context->controller->multishop_context & Shop::CONTEXT_SHOP)
|
||||
foreach ($group_data['shops'] as $sID => $shopData)
|
||||
if ($shopData['active'])
|
||||
$html .= '<option value="s-'.$sID.'" class="shop" '.(($value == 's-'.$sID || $context->shop->id == $sID) ? 'selected="selected"' : '').'>» '.$shopData['name'].'</option>';
|
||||
|
||||
if (!($context->controller->multishop_context & Shop::CONTEXT_GROUP))
|
||||
$html .= '</optgroup>';
|
||||
}
|
||||
$html .= '</select>';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user