[+] BO Customers Groups WIP

This commit is contained in:
Kevin Granger
2013-07-29 20:39:52 +02:00
parent d95a519ace
commit b95478d529
3 changed files with 75 additions and 97 deletions
@@ -28,16 +28,14 @@
{block name="label"}
{if $input['type'] == 'modules'}
<div style="{if !$form_id}display:none{/if}">
<div class="separation"></div>
<label>{l s='Module restrictions:'}</label>
<label class="control-label col-lg-3">{l s='Module restrictions:'}</label>
</div>
{elseif $input['type'] == 'group_discount_category'}
<div style="{if !$form_id}display:none{/if}">
<div class="separation"></div>
<label>{$input.label} </label>
{$smarty.block.parent}
</div>
{else}
<label>{$input.label} </label>
{$smarty.block.parent}
{/if}
{/block}
@@ -162,15 +160,18 @@
$('#category_reduction_fancybox').val('0.00');
}
</script>
<div class="margin-form">
<a class="button" href="#group_discount_category_fancybox" id="group_discount_category">{l s='Add a category discount'}</a>
<table cellspacing="0" cellpadding="0" class="table" style="margin-top:10px" id="group_discount_category_table">
<div class="col-lg-9">
<a class="btn btn-default" href="#group_discount_category_fancybox" id="group_discount_category">{l s='Add a category discount'}</a>
<table class="table" id="group_discount_category_table">
{foreach $input['values'] key=key item=category }
<tr class="alt_row" id="{$category.id_category}">
<td>{$category.path}</td>
<td>{l s='Discount: %d%%' sprintf=$category.reduction}</td>
<td>
<a href="#" onclick="deleteCategoryReduction({$category.id_category});"><img src="../img/admin/delete.gif"></a>
<a href="#" onclick="deleteCategoryReduction({$category.id_category});">
<img src="../img/admin/delete.gif">
</a>
<input type="hidden" class="category_reduction" name="category_reduction[{$category.id_category}]" value="{$category.reduction}">
</td>
</tr>
@@ -178,17 +179,18 @@
</table>
<div style="display:none" id="group_discount_category_fancybox">
<fieldset style="text-align:left"><legend><img src="../img/admin/tab-groups.gif" />{l s='New group category discount'}</legend>
<div class="hintGroup" style="font-size: 13px;">
<fieldset>
<h3><i class="icon-group"></i>{l s='New group category discount'}</h3>
<div class="hintGroup">
{l s='Caution: The discount applied to a category does not stack with the overall reduction but instead replaces it.'}
</div>
{$categoryTreeView}
<div class="alert alert-block">{l s='Only products that have this category as the default category will be affected.'}</div>
<div class="clear">&nbsp;</div>
<label>{l s='Discount (%):'}</label>
<input type="text" name="category_reduction_fancybox" id="category_reduction_fancybox" value="0.00" size="33">
<div class="clear">&nbsp;</div>
<button onclick="addCategoryReduction();" class="button">{l s='add'}</button>
<input type="text" name="category_reduction_fancybox" id="category_reduction_fancybox" value="0.00">
<button onclick="addCategoryReduction();" class="btn btn-primary">{l s='add'}</button>
</fieldset>
</div>
</div>
@@ -209,61 +211,43 @@
}).disableSelection();
});
</script>
<table cellspacing="0" cellpadding="0" class="table" style="width:600px">
<thead>
<tr>
<th style="padding-left:10px;">
{$input['label']['auth_modules']}
</th>
<th style="padding-left:10px;">
{$input['label']['unauth_modules']}
</th>
</tr>
</thead>
<tbody>
<tr>
<td style="width:300px">
<ul id="sortable_module_authorize_list" class="connectedSortable" style="height:300px;overflow:auto">
<li></li>
{foreach $input['values']['auth_modules'] key=key item=module }
<li class="module_list" id="module_{$module->id}">
<input type="checkbox" style="margin-right:5px">
<img src="../modules/{$module->name}/logo.gif">
{$module->displayName}
<input type="hidden" name="modulesBoxAuth[]" value="{$module->id}">
</li>
{/foreach}
</ul>
</td>
<td style="width:300px">
<ul id="sortable_module_unauthorize_list" class="connectedSortable" style="height:300px;overflow:auto">
<li></li>
{foreach $input['values']['unauth_modules'] key=key item=module }
<li class="module_list" id="module_{$module->id}">
<input type="checkbox" style="margin-right:5px">
<img src="../modules/{$module->name}/logo.gif">
{$module->displayName}
<input type="hidden" name="modulesBoxUnauth[]" value="{$module->id}">
</li>
{/foreach}
</ul>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td style="text-align:center">
<button style="width:100%;margin-top:5px" id="authorize_list" onclick="toogleCheck(this);return false;" class="button">{l s='Select all'}</button>
<button style="width:100%;margin-top:5px;margin-bottom:5px" onclick="authorizeChecked();return false;" class="button">{l s='Unauthorize >>'}</button>
</td>
<td style="text-align:center">
<button style="width:100%;margin-top:5px"id="unauthorize_list" onclick="toogleCheck(this);return false;" class="button">{l s='Select all'}</button>
<button style="width:100%;margin-top:5px;margin-bottom:5px" onclick="unauthorizeChecked();return false;" class="button">{l s='<< Authorize'}</button>
</td>
</tr>
</tfoot>
</table>
<div class="col-lg-9">
<div class="row">
<div class="col-lg-6">
<label>{$input['label']['auth_modules']}</label>
<ul id="sortable_module_authorize_list" class="connectedSortable list-unstyled">
{foreach $input['values']['auth_modules'] key=key item=module }
<li class="module_list" id="module_{$module->id}">
<input type="checkbox" style="margin-right:5px">
<img src="../modules/{$module->name}/logo.gif">
{$module->displayName}
<input type="hidden" name="modulesBoxAuth[]" value="{$module->id}">
</li>
{/foreach}
</ul>
<button id="authorize_list" onclick="toogleCheck(this);return false;" class="btn btn-default">{l s='Select all'}</button>
<button onclick="authorizeChecked();return false;" class="btn btn-default">{l s='Unauthorize >>'}</button>
</div>
<div class="col-lg-6">
<label>{$input['label']['unauth_modules']}</label>
<ul id="sortable_module_unauthorize_list" class="connectedSortable list-unstyled">
{foreach $input['values']['unauth_modules'] key=key item=module }
<li class="module_list" id="module_{$module->id}">
<input type="checkbox" style="margin-right:5px">
<img src="../modules/{$module->name}/logo.gif">
{$module->displayName}
<input type="hidden" name="modulesBoxUnauth[]" value="{$module->id}">
</li>
{/foreach}
</ul>
<button id="unauthorize_list" onclick="toogleCheck(this);return false;" class="btn btn-default">{l s='Select all'}</button>
<button onclick="unauthorizeChecked();return false;" class="btn btn-default">{l s='<< Authorize'}</button>
</div>
</div>
</div>
</div>
{else}
{$smarty.block.parent}
@@ -29,13 +29,14 @@
<fieldset>
<ul>
<li><span style="font-weight: bold; font-size: 13px; color:#000;">{l s='Name:'}</span> {$group->name[$language->id]}</li>
<li><span style="font-weight: bold; font-size: 13px; color:#000;">{l s='Discount: %d%%' sprintf=$group->reduction}</span></li>
<li><span style="font-weight: bold; font-size: 13px; color:#000;">{l s='Current category discount:'}</span>
<li><span >{l s='Name:'}</span> {$group->name[$language->id]}</li>
<li><span >{l s='Discount: %d%%' sprintf=$group->reduction}</span></li>
<li><span >{l s='Current category discount:'}</span>
{if !$categorieReductions}
{l s='None'}
{else}
<table cellspacing="0" cellpadding="0" class="table" style="margin-top:10px">
<table class="table">
{foreach $categorieReductions key=key item=category }
<tr class="alt_row">
<td>{$category.path}</td>
@@ -46,14 +47,14 @@
{/if}
</li>
<li><span style="font-weight: bold; font-size: 13px; color:#000;">{l s='Price display method:'}</span>
<li><span>{l s='Price display method:'}</span>
{if $group->price_display_method}
{l s='Tax excluded'}
{else}
{l s='Tax included'}
{/if}
</li>
<li><span style="font-weight: bold; font-size: 13px; color:#000;">{l s='Show prices:'}</span> {if $group->show_prices}{l s='Yes'}{else}{l s='No'}{/if}
<li><span>{l s='Show prices:'}</span> {if $group->show_prices}{l s='Yes'}{else}{l s='No'}{/if}
</li>
</ul>
</fieldset>