<%@include file="/WEB-INF/common/layouts/common.jsp" %>
<%@ page language="java" pageEncoding="UTF-8" %>
<html>
<head>
    <title>${entity.id}</title>
    <script type="text/javascript">
    	$(function(){
    		  <c:choose>
	    		 <c:when test="${action=='create'}">
					 //Do nothing
		         </c:when>
		         <c:when test="${action=='edit'}">
		         	$("#entityUsed").val("${entity.used}");
		         </c:when>
		         <c:otherwise>
		         </c:otherwise>
	         </c:choose>
    	});
    </script>
</head>
<body>
<form id="input_form" class="form-horizontal valid"
      action="${ctx}/klfcity<c:if test="${action=='edit'}">/${entity.id}</c:if>"
      method="post">
        
    <!-- 面包屑 begin -->
	<div class="row-fluid">
		<div class="span12">
				<ul class="breadcrumb">
					<li>
						<span class="divider" style="color:#26a0da;font-weight:bold;">/</span>
						<a href="${ctx}/klfcity">城市列表</a>
					</li>
					<li class="active" >
						<span class="divider" style="color:#26a0da;font-weight:bold;">/</span>
						<c:choose>
                             <c:when test="${action=='create'}">
								<span class="inline">新增</span>
                             </c:when>
                             <c:when test="${action=='edit'}">
								<span class="inline"> ${entity.id} </span>
                             </c:when>
                             <c:otherwise>
                             	<span class="inline"> ${entity.id}</span>
                             </c:otherwise>
                         </c:choose>
					</li>
			</ul>
		</div>
	</div>     
	<!-- 面包屑 end -->      
	<house365:flushMessage/>
	 <div class="row${fluid}">
		<div class="span12">
        	<div class="portlet-header">
                <div class="operation-btn pull-right">
                    <c:choose>
                        <c:when test="${action=='edit'}">
                            <button class="btn blue" type="submit"><i
                                    class="icon-save"></i>&nbsp;保存
                            </button>
                            <a href="${ctx}/klfcity/${entity.id}" class="btn gray"><i
                                    class="icon-mail-reply"></i>&nbsp;取消</a>
                        </c:when>
                        <c:when test="${action=='create'}">
                            <button class="btn blue"><i class="icon-save"></i>&nbsp;保存</button>
                            <a href="${ctx}/klfcity" class="btn gray"><i class="icon-mail-reply"></i>&nbsp;返回</a>
                        </c:when>
                        <c:otherwise>
                            <a href="${ctx}/klfcity/${entity.id}?action=edit" class="btn blue"><i
                                    class="icon-edit"></i>&nbsp;编辑</a>
                            <a href="${ctx}/klfcity" class="btn gray"><i class="icon-mail-reply"></i>&nbsp;返回</a>
                        </c:otherwise>
                    </c:choose>
                </div>
            </div>   
			<div class="form-horizontal house365Page">
				<div class="house365Border">
               		<!-- 片段头 begin -->
					<div class="sectionTitle">
						<c:choose>
                             <c:when test="${action=='create'}">
								<h5>新增</h5>
                             </c:when>
                             <c:when test="${action=='edit'}">
								<h5>编辑</h5>
                             </c:when>
                             <c:otherwise>
                             	<h5>详情</h5>
                             </c:otherwise>
                         </c:choose>
					</div>
                    <input name="entity.id" type="hidden" value="${entity.id}"/>
					<div class="row-fluid">
                        <div class="span6 control-group">
                            <label class="control-label">城市名称:</label>
                            <div class="controls">
                            	<c:choose>
                                    <c:when test="${action=='create' || action=='edit'}">
										<input type="text" id="entity.name" readonly="readonly"
											class="required"
											name="entity.name"
											value="${entity.name}" />
										<font color="red"><form:errors path="klfCityVo.entity.name" /></font>
                                    </c:when>
                                    <c:otherwise>
                                        <span class="inline">${entity.name}&nbsp;</span>
                                    </c:otherwise>
                                </c:choose>
                            
                            </div>
                        </div>
                        <div class="span6 control-group">
                            <label class="control-label">是否使用</label>
                            <div class="controls">
                            	<c:choose>
                                    <c:when test="${action=='create' || action=='edit'}">
										<select id="entityUsed" name="entity.used">
											<option value="0">未使用</option>
											<option value="1">已使用</option>
										</select>
										<font color="red"><form:errors path="klfCityVo.entity.used" /></font>
                                    </c:when>
                                    <c:otherwise>
                                        <%-- <span class="inline">${entity.used}&nbsp;</span> --%>
                                        <c:if test="${null ne entity.used && '' ne entity.used && 1 eq entity.used}">
											<span style="color:green;">已使用</span>
										</c:if>
										<c:if test="${null eq entity.used || '' eq entity.used || 0 eq entity.used}">
											未使用
										</c:if>
                                    </c:otherwise>
                                </c:choose>
                            
                            </div>
                        </div>
					</div>
					
					<div class="row-fluid">
                        <div class="span6 control-group">
                            <label class="control-label">城市代号(全拼):</label>
                            <div class="controls">
                            	<c:choose>
                                    <c:when test="${action=='create' || action=='edit'}">
										<input type="text" id="entity.code" readonly="readonly"
											name="entity.code"
											class="required"
											value="${entity.code}" />
										<font color="red"><form:errors path="klfCityVo.entity.code" /></font>
                                    </c:when>
                                    
                                    <c:otherwise>
                                        <span class="inline">${entity.code}&nbsp;</span>
                                    </c:otherwise>
                                </c:choose>
                            </div>
                        </div>
					</div>
					
				</div>
			</div>               
        </div>
    </div>   

</form>
</body>

</html>