@(partsLists: scala.collection.mutable.ArrayBuffer[beans.PartsListBean], opt:Int, page:Int, maxColumn:Int, key:String)(implicit lang: Lang)
@import beans.PartsListBean

@*******************************************
* Helper generating navigation links *
*******************************************@
@link(newPage: Int) = @{
	routes.PartsListController.index(opt, newPage, key)
}
@main("Parts List by Play 2.1") {
	<h3>@Messages("title4")</h3>
	
	<div id="action">
		@helper.form(action=routes.PartsListController.index(opt, page, key)) {
			<input type="search" id="searchbox" name="key" value="@key" placeholder="fill by the model name">
			<input type="hidden" name="page" value="0">
			<input type="submit" id="search submit" value=@Messages("btn.label1") class="btn primary">
		}
	</div>
		<table class="computers zebra-striped">
			<thread>
				<tr>
					<th>@Messages("list.header1")</th>
					<th>@Messages("list.header2")</th>
					<th>@Messages("list.header3")</th>
				</tr>
			</thead>
			<tbody>
				@for(relation <- partsLists) {
					<tr><td><a href="/relationCreate?parent=@relation.parent">@relation.parent</a></td>
					<td><a href="/relationUpdate?parent=@relation.parent&child=@relation.child">@relation.child</a></td>
					<td><a href="/relationUpdate?parent=@relation.parent&child=@relation.child">@relation.quantity</a></td></tr>
				}
			</tbody>
	    </table>
	    
	    <div id="pagination" class="pagination">
	    	<ul>
	    		@if(page-1 < 0) {
		    		<li class="prev disabled">&larr; prev</li>	    		
	    		} else {
		    		<li class="prev"><a href="@link(page-1)">prev</a></li>	    		
	    		}
	    		<li class="current">current page:@(page+1)</li>
	    		@if((page+1)*(Integer.decode(Messages("list.row"))) >= maxColumn) {
		    		<li class="next disabled">next &rarr;</li>
	    		} else {
		    		<li class="next"><a href="@link(page+1)">next</a></li>
		    	}
	    	</ul>
	    </div>
	    
	    <a href="/partCreate">@Messages("list.link1")</a>
	    &nbsp
	    <a href="/list?page=0&key=">@Messages("title6")</a>
	    &nbsp
		<a href="single_partslist?page=0&key=">@Messages("title4")</a>
	    &nbsp
		<a href="/multi_partslist?key=&page=0">@Messages("list.link8")</a>
	    &nbsp
		<a href="/cost_partslist?page=0&key=">@Messages("list.link9")</a>
	    &nbsp
		<a href="/unit_partslist?page=0&key=">@Messages("list.link10")</a>
	    &nbsp
		<a href="single_uppartslist?key=&page=0">@Messages("list.link11")</a>
	    &nbsp
		<a href="multi_uppartslist?key=&page=0">@Messages("list.link12")</a>
	    &nbsp
		<a href="top_uppartslist?key=Part&page=0">@Messages("list.link13")</a>

}
