<%
            /* 
            CDDL HEADER START

            The contents of this file are subject to the terms of the
            Common Development and Distribution License, Version 1.0 only
            (the "License"). You may not use this file except in compliance
            with the License.

            You can obtain a copy of the license at license/ESCIDOC.LICENSE
            or http://www.escidoc.de/license.
            See the License for the specific language governing permissions
            and limitations under the License.

            When distributing Covered Code, include this CDDL HEADER in each
            file and include the License file at license/ESCIDOC.LICENSE.
            If applicable, add the following below this CDDL HEADER, with the
            fields enclosed by brackets "[]" replaced with your own identifying
            information: Portions Copyright [yyyy] [name of copyright owner]

            CDDL HEADER END


            Copyright 2006-2010 Fachinformationszentrum Karlsruhe Gesellschaft
            f�r wissenschaftlich-technische Information mbH and Max-Planck-
            Gesellschaft zur F�rderung der Wissenschaft e.V.
            All rights reserved. Use is subject to license terms.
             */
%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://myfaces.apache.org/trinidad" prefix="tr"%>

<div class="full_area0 itemBlock">
	<h3 class="xLarge_area0_p8 endline blockHeader">
		<h:outputText value="#{lbl.adv_search_lbHeaderFiles}" />
	</h3>
	<span class="seperator"></span>
	<div class="free_area0 itemBlockContent hideBlockIfVoid endline">

    <tr:iterator id="fileCriterion" var="fileCriterionBean" value="#{AdvancedSearchEdit.fileCriterionCollection.fileCriterionManager.objectDM}" binding="#{AdvancedSearchEdit.fileCriterionIterator}" varStatus="index">

		<h:panelGroup layout="block" styleClass="free_area0 endline itemLine noTopBorder" >
			<b class="xLarge_area0_p8 endline labelLine clear">
				&#160;<span class="noDisplay"> </span>
			</b>
			<span class="xHuge_area0 xTiny_marginLExcl endline">
				<span class="free_area0">  
				    <span class="large_area0 tiny_marginRIncl">
                        <h:outputLabel styleClass="large_label" value="#{lbl.adv_search_fileComponentAvailability}"/>
                        
                        <h:selectOneMenu id="selComponentAvailabilityOptions" styleClass="large_select replace" value="#{fileCriterionBean.fileCriterionVO.componentAvailability}">
                            <f:selectItems value="#{fileCriterionBean.componentAvailabilityOptions}" />
                        </h:selectOneMenu>
                            
                    </span>
				    <span class="large_area0 tiny_marginRIncl">
                        <h:outputLabel id="lblComponentVisibilityOptions" styleClass="large_label" value="#{lbl.adv_search_fileComponentVisibility}"/>
                        
                        <h:selectOneMenu id="selComponentVisibilityOptions" styleClass="large_select replace" value="#{fileCriterionBean.fileCriterionVO.componentVisibility}">
                            <f:selectItems value="#{fileCriterionBean.componentVisibilityOptions}" />
                        </h:selectOneMenu>
                            
                    </span>
					<span class="large_area0 tiny_marginRIncl">
                        <h:outputLabel id="lblComponentEmbargoDate" styleClass="large_label" value="&nbsp;" escape="false"/>
                        
                        <span class="large_checkbox">
							<h:selectBooleanCheckbox id="fileCriterion_hasEmbargoDate" value="#{fileCriterionBean.fileCriterionVO.searchForEmbargoFiles}" />
							<h:outputLabel for="fileCriterion_hasEmbargoDate" value="#{lbl.adv_search_fileComponentEmbargoDate}"/>
						</span>	
                            
                    </span>
					<span class="large_area0 tiny_marginRIncl">
						<h:outputLabel id="lblContentCategories" styleClass="large_label" value="#{lbl.adv_search_fileContentCategory}"/>
						
						<h:selectOneMenu id="selContentCategories" styleClass="large_select replace" value="#{fileCriterionBean.fileCriterionVO.contentCategory}">
							<f:selectItems value="#{fileCriterionBean.contentCategories}" />
						</h:selectOneMenu>
							
					</span>
					<span class="large_area0 tiny_marginRIncl">
						<h:outputLabel styleClass="large_label" value="&nbsp;" escape="false"/>

                        <span class="large_checkbox">
							<h:selectBooleanCheckbox id="fileCriterion_excludeCategory" value="#{fileCriterionBean.fileCriterionVO.excludeCategory}" />
							<h:outputLabel id="lblFileCriterion_excludeCategory" value="#{lbl.adv_search_fileExcludeCategory}" for="fileCriterion_excludeCategory" />
						</span>	
                            
                    </span>
				</span>
			</span>
			<span class="large_area0_p8 lineToolSection">
                    <tr:commandButton id="btnAdd" styleClass="min_imgBtn groupTool add" text=" " shortDesc="#{tip.search_btAdd}" action="#{AdvancedSearchEdit.fileCriterionCollection.fileCriterionManager.addObject}" />
                    <tr:commandButton id="btnRemove" styleClass="min_imgBtn groupTool remove" text=" " shortDesc="#{tip.search_btRemove}" disabled="#{AdvancedSearchEdit.fileCriterionCollection.fileCriterionManager.size == 1}" action="#{AdvancedSearchEdit.fileCriterionCollection.fileCriterionManager.removeObject}"/>
<%-- 
                    <tr:commandButton styleClass="free_txtBtn groupBtn" text="#{lbl.adv_search_btClear}" action="#{dateCriterionBean.clearCriterion}" />
--%>
            </span>
		</h:panelGroup>

		<h:panelGroup layout="block" styleClass="free_area0 endline itemLine noTopBorder"></h:panelGroup>
		<h:panelGroup layout="block" styleClass="large_area0_p8 lineToolSection">
				<h:selectOneMenu id="selFileCriterionLogicOption" styleClass="small_select xSmall_marginLIncl endline replace" value="#{fileCriterionBean.logicOperator}">
					<f:selectItems value="#{fileCriterionBean.logicOptions}"/>
				</h:selectOneMenu>		
		</h:panelGroup>
 
       </tr:iterator>
       
		<a class="free_area0 collapse advSearchCollapse"><h:outputText value="#{lbl.ViewItemFull_lblHideGroup} #{lbl.adv_search_lbHeaderFiles}" /></a>
	</div>
	<a class="free_area0 expand"><h:outputText value="#{lbl.ViewItemFull_lblShowGroup} #{lbl.adv_search_lbHeaderFiles}" /></a>
</div>