{include "header.inc.html"}
{$linksLang = $lang.admin.links.form}
<div class="content_box">
	<div class="toolbar_box">
		<div class="toolbar"> <span> <strong>商品自定义属性</strong><br />
		<span class="english"></span> </span> </div>
	</div>
{if $smarty.get.act=="edit" || $smarty.get.act=="add"}
{else}
{literal}
<style type="text/css">
.module_attr{ font-size:14px;line-height:2em; padding:0px 20px;}
.module_attr td.attrs{ padding:5px; }
.module_attr .table-ca tr:hover{color:#FFF;}
ul.exts{display:inline-block;}
ul.exts:after{content:".";clear:both;display:block;height:0px;font-size:0px;visibility:hidden;}
ul.exts li{
	display:block;border:none;float:left;
	margin:5px 10px 5px 0px;;
	-webkit-background-clip: padding-box;
	-webkit-background-origin: padding-box;
	-webkit-background-size: auto;
	background:rgb(64, 168, 205);
	border-radius:2px;
	color:#fff;
	font-family:Tahoma, Helvetica, 'Microsoft Yahei', 微软雅黑, Arial, STHeiti;
	font-size:12px;
	height:26px;
	line-height:26px;
	padding:0px 5px 0px 10px;
	white-space:nowrap;
	width:auto;
	zoom:1;
}
ul.exts li.ext-value-add{background:none;}
ul.exts li:first-child{margin-left:0px;}
.inner-value-name{color:#fff;display:inline;font-family:Tahoma, Helvetica, 'Microsoft Yahei', 微软雅黑, Arial, STHeiti;font-size:12px;height:auto;line-height:26px;white-space:nowrap;width:auto;zoom:1;}
.inner-value-close{
	margin-left:4px;
	color:#a0d4e6;
	font-family:"\5b8b\4f53",sans-serif;
}
.inner-value-close:hover{color:#fff;text-decoration:none;}
.ipt-value{width:100px;height:16px;line-height:16px;border:1px #d9d9d solid;outline:none;padding:3px 1px;}
.ipt-value:hover{border:1px #d9d9d solid;}
.ipt-value-error{border:1px #ff6600 solid;}
td.ext-values{padding:10px;}
.btn-value-add, .btn-attr-add, .btn-attr-add-dialog, .btn-attr-del, .btn-add-type, .btn-type-delete{
	-webkit-background-clip: padding-box;
	background-clip: padding-box;
	white-space: nowrap;
	color: #fff !important;
	background: #40a8cd;
	padding: 0 5px;
	height: 26px;line-height: 26px;
	margin-left: 5px;-webkit-border-radius: 2px;border-radius: 2px;zoom: 1;
	display:inline-block;
}
.btn-value-add:hover, .btn-attr-add:hover, .btn-attr-add-dialog:hover, .btn-attr-del:hover, .btn-add-type:hover, .btn-type-delete:hover{color: #fff;background: #57bee3;text-decoration:none;}

.typename{height:30px;line-height:30px;padding-left:2px;}
#add-type-dialog input.error{border-color:#ff0000;}
</style>
{/literal}
<div class="module_attr">
<div class="tool">
<a href="javascript:void(0)" class="btn-add-type">添加商品类别</a>
</div>

<table class="table-ca table_1">
<tr>
<th class="w100">商品类别</th><th class="">属性及值</th>
</tr>
{goodstype limit="false" name="type"}
{if $type.id>1}
<tr>
<td>
{$type.name}<br/><a href="javascript:void(0)" class="btn-attr-add-dialog" sid="{$type.id}">添加属性</a><br/><br/><a href="javascript:void(0)" class="btn-type-delete" sid="{$type.id}">删除类别</a><br/><br/>
</td>
<td class="tleft attrs">
<table class="table-ca table-attrs">
<tr><th class="w100">属性</th><th>可选值</th></tr>
{foreach from=$type.attr item="attr"}
<tr>
<td>	{$attr.info.name}<br/><a href="javascript:void(0)" class="btn-attr-del" sid="{$attr.info.id}">删除属性</a></td>
<td class="tleft ext-values"><ul class="exts">{foreach from=$attr.ext item="ext"}<li><span class="inner-value-name">{$ext.value}</span><a href="javascript:void(0)" title="删除" class="inner-value-close" sid="{$ext.id}">×</a></li>{/foreach}<li class="ext-value-add"><input type="text" class="ipt-value" value="" /><a href="javascript:void(0)" class="btn-value-add" attrId="{$attr.info.id}">添加</a></li></ul>
</td></tr>
{/foreach}
</table>
</td>

</tr>
{/if}
{/goodstype}
</table>
</div>
<script type="text/javascript" src="{$baseUrl}admin/js/attr.js"></script>
{/if}


{include "footer.inc.html"}