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

@*******************************************
* Helper generating navigation links *
*******************************************@
@link(newPage: Int) = @{
	routes.PartsListController.upIndex(opt, newPage, key)
}
@main("Up Parts List by Play 2.1") {
	<h3>@Messages("title5")</h3>
	
	<div id="action">
		@helper.form(action=routes.PartsListController.upIndex(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="search" class="btn primary">
		}
	</div>
@*		@for(model <- partsLists) {
			@model.parent*@
		<table class="computers zebra-striped">
			<thread>
				<tr>
					<th>@Messages("list.header2")</th>
					<th>@Messages("list.header1")</th>
					<th>@Messages("list.header3")</th>
				</tr>
			</thead>
			<tbody>
				@for(relation <- partsLists) {
					<tr><td>@relation.parent</td>
					<td>@relation.child</td>
					<td>@relation.quantity</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>
}
