@(allChildren: scala.collection.immutable.Seq[models.Part], partsListss: scala.collection.immutable.Map[Part, scala.collection.immutable.Seq[beans.MultiPartsListBean]], maxSize: Int, modelbuffer: org.squeryl.dsl.OneToMany[models.Part], project: String)(implicit lang: Lang)
@import org.squeryl.PrimitiveTypeMode._
@import helper._
@main("Matrix Parts List by Play 2.1") {
	<h3>@Messages("list.link24")</h3>
	
    <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=model1&relationKey=">@Messages("title4")</a>
    &nbsp
	<a href="/multi_partslist?key=model1&page=0&relationKey=">@Messages("list.link8")</a>
    &nbsp
	<a href="/cost_partslist?page=0&key=model1&relationKey=">@Messages("list.link9")</a>
    &nbsp
	<a href="/unit_partslist?page=0&key=model1&relationKey=">@Messages("list.link10")</a>
    &nbsp
	<a href="single_uppartslist?key=model1&page=0">@Messages("list.link11")</a>
    &nbsp
	<a href="multi_uppartslist?key=model1&page=0">@Messages("list.link12")</a>
    &nbsp
	<a href="top_uppartslist?key=model1&page=0">@Messages("list.link13")</a>
	<br />
    <a href="/">@Messages("link.title1")</a>

	<div id="action">
		@helper.form(action=routes.PartsListController.matrixPartList(project)) {
			<input type="search" id="projectName" name="project" value="@project" placeholder="fill by the project name">
			<input type="submit" id="search submit" value=@Messages("btn.label1") class="btn primary">
		}
	</div>

		@if(modelbuffer != null ) {
		<table class="computers zebra-striped">
			<thread>
				<tr>
					<th>@Messages("list.header1")</th>
					@for(i: Int <- 1 to maxSize) {
						<th>@Messages("list.header2")</th>
					}
				</tr>
			</thead>
			<tbody>
				<tr><td></td>
				@for(allChild <- allChildren.sortBy(p => p.name)) {
					<td>@allChild.name</td>
				}
				</tr>
				@for(model <- modelbuffer) {
					<tr>
					<td>@model.name</td>
					@for(partsList <- partsListss.apply(model)) {
						@if(partsList.showOn == 1) {
							<td><a href="/relationUpdate?parent=@model.name&child=@partsList.part.name&project=@project">@partsList.part.name</a></td>
						} else {
							<td><a href="/relationCreate?parent=@model.name&child=@partsList.part.name&project=@project">+</a></td>
						}
					}
					@for(i: Int <- 1 to maxSize - partsListss.apply(model).length) {
						<td></td>
					}
					</tr>
				}
			</tbody>
    	</table>
		}

    <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=model1&relationKey=">@Messages("title4")</a>
    &nbsp
	<a href="/multi_partslist?key=model1&page=0&relationKey=">@Messages("list.link8")</a>
    &nbsp
	<a href="/cost_partslist?page=0&key=model1&relationKey=">@Messages("list.link9")</a>
    &nbsp
	<a href="/unit_partslist?page=0&key=model1&relationKey=">@Messages("list.link10")</a>
    &nbsp
	<a href="single_uppartslist?key=model1&page=0">@Messages("list.link11")</a>
    &nbsp
	<a href="multi_uppartslist?key=model1&page=0">@Messages("list.link12")</a>
    &nbsp
	<a href="top_uppartslist?key=model1&page=0">@Messages("list.link13")</a>
	<br />
    <a href="/">@Messages("link.title1")</a>

}
