39,084
社区成员
发帖
与我相关
我的任务
分享
{% block content %}
<script language="javascript">
function choose(){
document.moduleForm.action="/module_status_choose/";
document.moduleForm.submit();}
function update(){
document.moduleForm.action="/module_info_edit/";
document.moduleForm.submit();}
</script>
<h2 class="sub-header">Module Management</h2>
<ul class="nav nav-tabs">
<li role="presentation" class="active"><a href="#">Module Information</a></li>
<li role="presentation"><a href="/search_module/">Search Module</a></li>
<li role="presentation"><a href="/create_module/">Create Module</a></li>
</ul>
<div class="table-responsive">
<!div>
<table class="table table-striped" id="table1">
<thead>
<tr>
<th>NO.</th>
<th>Module Name</th>
<th>Serial Number</th>
<th>Type</th>
<th>APN</th>
<th>CLEI</th>
<th>Receive-Date</th>
<th>NE</th>
<th>Slot</th>
<th>Port</th>
<th>Owner</th>
<th>User</th>
<th>Status</th>
<th>Comment</th>
</tr>
</thead>
<tbody>
{% if modules %}
{% for module in modules %}
<tr>
<form name="moduleForm" action="" method="get">
<td>{{module.no}}</td>
<td>{{module.name}}</td>
<td>{{module.sn}}</td>
<td>{{ module.type }}</td>
<td>{{ module.apn }}</td>
<td>{{ module.clei }}</td>
<td>{{ module.arrivaldate }}</td>
<td>{{ module.nename }}</td>
<td>{{ module.slotid }}</td>
<td>{{ module.portid }}</td>
<td>{{ module.owner }}</td>
<td>{{ module.userteam }}</td>
<td>
{% ifequal module.status 'TBD' %}
<td>
<button type="submit" id="btn_submit" onclick="choose()" value="choose"> Choose </button>
</td>
{% endifequal %}
<td>{{ module.status }}</td>
</td>
<td>{{ module.comment }}</td>
<input type="hidden" name="sn" value={{module.sn}}>
<td><button type="submit" class="btn btn-default" onclick="update()" value="update">Edit Module Info</button></td>
</form>
</tr>
{% endfor %}
{% else %}
<p>No books found.
{% endif %}
</tbody>
</table>
</div>