 <!---main body--->
<style>
    dl{width:200px; height:260px; border:1px solid #d4d4d4; float:left; margin-right:20px; margin-bottom:20px;}
    dl img{width:200px; height:140px;}
    dl dt{ font-size:14px; line-height:30px;margin-left:10px; margin-right:10px;height:28px; width:260px; overflow:hidden;}
    dl dd{ color:#a3a3a3;margin-left:10px; margin-right:10px; line-height:20px; }
    .red{ color:Red; padding:0; margin:0; border:0;font-family:'宋体'}
    .remark{ background-color:#f2f2f2; display:block; width:180px; height:40px; overflow:hidden;}
    .cedit{ padding-top:10px;}
    .cedit a{ float:right; color:#0064d3; margin-left:0px; line-height:28px; background:url(/Content/Themes/Base/Images/ico/icon_web.png) no-repeat; display:block;text-indent:22px;}
    .cedit a.delete{ background-position:-76px 0px;}
    .cedit a.eidt{ background-position:-125px 0px;}
    .cedit a.view{ background-position:-505px -550px;}
    .checkdiv { width:22px;height:22px;text-align:center;background:#fff; position:absolute; top:0px;  right:0px; margin:0;padding:0 }

    a.cbbtn { display:inline-block; padding:5px 10px 5px 8px; border:1px solid #ccc; height:20px; line-height:20px; font-size:12px; background:#fafafa }
    a.cbbtn i { width:14px;height:14px; display:inline-block; margin-right:3px;vertical-align:middle;background:url(/Content/Themes/Base/Images/ico/icon_web.png) no-repeat; }
    a.cbbtn i.cbadd { background-position: -10px -2px; }
    a.cbbtn i.cball { background-position: -60px -2px; }
    a.cbbtn i.cbdel { background-position: -84px -2px; }
    .keyword { display:block;float:left;margin:0;padding:0 5px; width:150px; height:30px; line-height:28px; font-size:12px; border:1px solid #dbdbdb;color:#444; }
    .search {display:block;float:left;margin:0 0 0 -1px; padding:0; width:30px;height:26px;line-height:30px;border:1px solid #B6B6B6;background:url(/Content/Themes/Base/Images/ico/icon_web.png) no-repeat -150px 5px;cursor:pointer;text-indent:-9999px; }
</style>  
<div ms-controller="credentials"> 
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="titbox">
    <tr>
        <td height="50">  
            <a href="javascript:void(0);" id="add" ms-if="ADD" ms-click="doAdd" class="cbbtn"><i class="cbadd"></i><span>新增</span></a>
            <a href="javascript:void(0);" ms-click="doSelectAll"  class="cbbtn"><i class="cball"></i><span>全选</span></a>
            <a href="javascript:void(0);" ms-click="doDelAll" class="cbbtn"><i class="cbdel"></i><span>删除</span></a>
            <span style="float:right;">
                <input type="text" class="keyword" ms-duplex="keyword" ms-keyup="bindclick" />
                <a href="javascript:void(0);" id="dosearch" title="搜索" class="search" ms-click="dosearch"></a>
            </span>
        </td>
    </tr>
</table>


<div ms-if="hasData">
     <div ms-each-item="credentialsList">
         <dl ms-attr-id="item.Id" style="position:relative;">
             <div class="checkdiv">
                 <input name="checkbox" type="checkbox" ms-attr-index="$index" ms-value="{{item.Id}}" />
             </div>
             <a href="javascript:void(0);" ms-attr-val="item.Picture" class="myimage" ms-click="doView"><img ms-attr-src="item.Picture" ms-attr-alt="item.Name"  ms-if="item.Picture"/></a>
             <img src="/Content/Themes/Base/Images/credentials_default.png" ms-attr-alt="item.Name"  ms-if="!item.Picture"/>  
             <dt>{{item.Name}}</dt>
             <dd>
                 有效：{{item.BeginDate|truncate(10,"")}} 至 <font ms-class-red="new Date(item.EndDate).getTime()<new Date().getTime()">
                     {{item.EndDate|truncate(10,"")}}</font>
             </dd>
             <dd class="remark">
                 {{item.Remark|truncate(50,"……")}}
                 <div ms-if="!item.Remark" style="line-height:40px;width:100%;text-align:center;">暂无描述</div>
             </dd>
             <dd class="cedit">
                 <span>{{item.AddTime}}</span>
                 <a href="javascript:void(0)" class="delete" ms-if="item.DELETE" ms-click="doDelete"  ms-value="item.Id" ms-attr-index="$index" title="删除" >&nbsp;</a>
                 <a href="javascript:void(0)" class="eidt" ms-if="item.EDIT" ms-click="doEdit" ms-value="item.Id" title="编辑">&nbsp;</a> 
             </dd>
         </dl>
     </div>
 </div>
 <div ms-if="!hasData">  
        <h4>抱歉,暂无数据！</h4>  
    <div class="clear"></div>
 </div>
</div>
<!---end main body--->
<!---view--->
<noscript type="text/avalon" id="viewTemplate">
   <img id="fucklaozhong" ms-attr-src="credentialsEntity.Picture" ms-attr-alt="credentialsEntity.Name"  ms-if="credentialsEntity.Picture"/>
   <img src="/Content/Themes/Base/Images/credentials_default.png" ms-attr-alt="credentialsEntity.Name"  ms-if="!credentialsEntity.Picture"/>  
</noscript>
<!---end view -->
<!-----add and edid------>
<noscript type="text/avalon" id="formTemplate">
      <table width="100%" border="0" cellspacing="0" cellpadding="0" class="formTable">
            <tr>
                <td width="60">
                     证件名称： 
                </td>
                <td colspan="3">
                    <input type="text" ms-duplex="credentialsEntity.Name" style="width: 240px" />
                    <select ms-each-item="nameData" style="width:143px;" ms-change="doChangName">
                       <option ms-value="item.id">{{item.data}}</option> 
                    </select>
                    <span class="must">*</span>
                </td>
            </tr>
            <tr> 
                <td width="74">
                    证件有效期：
                </td>
                <td colspan="3">
                  <input  type="text" ms-widget="date,cbegindateid,begindateOpts" ms-duplex="credentialsEntity.BeginDate"  style="width: 120px;"  readonly="readonly"/> 
                  <span style="margin:0px 5px 0 -12px;">至</span><input type="text" ms-widget="date,cenddateid,enddateOpts" ms-duplex="credentialsEntity.EndDate" style="width: 120px;" readonly="readonly"/>
                </td> 
            </tr>
            <tr>
                <td width="60">
                    证件图片：
                </td>
                <td colspan="3"> 
                    <input type="text" readonly="readonly" ms-duplex="credentialsEntity.Picture" /> 
                    <button type="button" class="myfbt" ms-click="uploadpicture">
                                <i class="customer"></i></button>  
                </td>
            </tr> 
            <tr>
                <td width="60" valign="top">
                    备注说明：
                </td>
                <td colspan="3"> 
                    <textarea ms-duplex="credentialsEntity.Remark" cols="20" rows="2"  style=" width:460px; height:110px;"></textarea> 
                </td>
            </tr>    
        </table> 
</noscript>  
<!-----end add and edit----->                     
        