view src/main/webapp/home/searchPage.xhtml @ 0:7682c04c63a8

First commit of the source code!
author "jurzua <jurzua@mpiwg-berlin.mpg.de>"
date Tue, 10 Mar 2015 14:50:41 +0100
parents
children 5316e79f9a27
line wrap: on
line source

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:ace="http://www.icefaces.org/icefaces/components"
	xmlns:ice="http://www.icesoft.com/icefaces/component"
	xmlns:icecore="http://www.icefaces.org/icefaces/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:cl="http://java.sun.com/jsf/composite/jsf/cl"
	template="../templates/publicTemplate.xhtml">
	
	<ui:define name="content">
	
			<ice:form styleClass="content">
			
				<ice:outputLabel value="Search" styleClass="subTitle"/>
					
					<h:panelGrid columns="2" style="width: 300px; margin-left: auto;margin-right: auto;">
						
							<ace:autoCompleteEntry
								id="searchTextInput"
								value="#{sessionBean.searchPage.term}"
								textChangeListener="#{sessionBean.searchPage.changeSectionName}" style="width: 300px;"
								valueChangeListener="#{sessionBean.searchPage.changeSectionSearch}">
								 <f:selectItems value="#{sessionBean.searchPage.sectionSuggestion}"/>
							</ace:autoCompleteEntry>
							
						<h:commandButton 
							value="Search"
							title="Search Submit" 
							actionListener="#{sessionBean.searchPage.listenerSearch}"
							image="#{appBean.searchImage}"/>
					</h:panelGrid>
					
					<h:outputLabel value="#{sessionBean.searchPage.message}"/>
					
					<h:panelGrid columns="1" rendered="#{!empty sessionBean.searchPage.sectionList}" style="width: 90%; margin-left: auto;margin-right: auto;">
						<ace:dataTable var="section" value="#{sessionBean.searchPage.sectionList}">
							 <ace:column headerText="Book Id">
							 	<h:outputText value="#{section.book.id}"/>
							 </ace:column>
							 <ace:column headerText="Book Name">
							 	<h:outputText value="#{section.book.name}"/>
							 </ace:column>
							 <ace:column headerText="Section Id">
							 	<h:outputText value="#{section.id}"/>
							 </ace:column>
							 <ace:column headerText="Section Name">
							 	<h:outputText value="#{section.name}"/>
							 </ace:column>
							 <ace:column headerText="Volume">
							 	<h:outputText value="#{section.book.volume}"/>
							 </ace:column>
							 <ace:column headerText="Period">
							 	<h:outputText value="#{section.book.period}"/>
							 </ace:column>
							 <ace:column headerText="Author">
							 	<h:outputText value="#{section.book.author}"/>
							 </ace:column>
							 <ace:column headerText="Edition">
							 	<h:outputText value="#{section.book.edition}"/>
							 </ace:column>
							 <ace:column headerText="Create Branch">
							 	<h:commandButton 
							 		value="Create Branch in Extraction Interface"
							 		title="Create Branch in Extraction Interface" 
							 		onclick="sectionInExtractionInterface(#{section.id}, '#{section.name}', #{section.book.id}, '#{section.book.name}', #{sessionBean.user.id}, '#{appBean.extractionInterfaceUrl}');"
							 		image="#{appBean.newBranchImage}"/>
							 </ace:column>								 
							 <ace:column headerText="Existing Branches">
							 	<ace:dataTable value="#{section.branches}" var="branch" rendered="#{!empty 	section.branches}">
							 		<ace:column>
							 			<h:outputLabel value="[#{branch.id}] #{branch.label}"/>
							 		</ace:column>
							 		<ace:column>
							 			<h:commandButton value="Edit Branch in Extraction Interface" 
											onclick="branchInExtractionInterface(#{branch.id}, #{branch.currentLastFileId}, #{branch.sectionId}, '#{branch.sectionName}', #{branch.book.id}, '#{branch.book.name}', #{sessionBean.user.id}, '#{appBean.extractionInterfaceUrl}');"
											image="#{appBean.editBranchImage}" title="Edit Branch in Extraction Interface"
											styleClass="iconLink"/>
										<h:outputLink 
											title="Manage Branch"
											value="#{appBean.rootServer}/home/branchEditor.xhtml?branchId=#{branch.id}"
											styleClass="iconLink">
											<h:graphicImage value="#{appBean.branchDetailsImage}"/>
										</h:outputLink>
							 		</ace:column>
							 	</ace:dataTable>
							 </ace:column>
						</ace:dataTable>
					</h:panelGrid>
					
				
			</ice:form>
			
	</ui:define>
	
		
	
</ui:composition>