<%@ page import="org.thdl.lex.*,org.thdl.lex.component.*" buffer="512kb" autoFlush="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>




<!--ETYMOLOGY-->
<c:set var="etymology" value="${ sessionScope.visit.helper.component }"/>
	<p class="data">

		<c:if test="${ editMode }">
			<span class="compEditOptions">			
			<c:out value='<a href="/lex/action?cmd=getAnnotationForm&amp;comp=etymology&amp;metaId=${etymology.metaId}" title="Add Analytical Note"><img alt="Add Analytical Note" src="/lex/images/note.gif"/></a>' escapeXml="false" />
			<c:out value='<a href="/lex/action?cmd=getUpdateForm&amp;comp=etymology&amp;metaId=${ etymology.metaId }&amp;parentId=${etymology.parentId}" title="Edit this Etymology"><img alt="Edit this component" src="/lex/images/edit.gif"/></a>' escapeXml="false" />
			<c:out value='<a href="/lex/action?cmd=getTranslationForm&amp;comp=etymology&amp;parentId=${etymology.parentId}&amp;translationOf=${etymology.metaId}" title="Translate this Etymology"><img alt="Translate this Etymology" src="/lex/images/trans.gif"/></a>' escapeXml="false" />			
			</span>
		</c:if>

		<!--<span class="label">Etymology:</span>-->
		<!--<span class="label">Etymology Type:</span>-->
		<em><c:out value="${ applicationScope.flatData.etymologyTypes[ etymology.etymologyType ] }" /></em>; 
		
		<c:if test="${ ! empty etymology.loanLanguage }">
		<!--<span class="label">Loan Language:</span>-->
		<c:out value="${ applicationScope.flatData.languages[ etymology.loanLanguage ] }" escapeXml="false" />; 
		</c:if>

		<c:out value="${ etymology.etymologyDescription }" escapeXml="false" />   
		
		<c:if test="${ empty etymology.derivation != 'none'  }">
		<%-- <span class="label">Derivation</span>: --%>
		<c:out value="${ etymology.derivation }" escapeXml="false" />   
		</span>
		</c:if>
		
		<jsp:include page="displayMeta.jsf" />
		
		
		<c:if test="${sessionScope.visit.helper.showTranslations }">
		<!--translation-->		
		<c:set value="${etymology.translations}" target="${sessionScope.visit.helper}" property="collection"/>
		<c:if test="${ sessionScope.visit.helper.collectionSize > 0 }">
		<h3>Translations</h3>
		<ul>
		
		<c:forEach var="translation" items="${ etymology.translations }" >
		<li>
		
		<%-- <c:set var='href' value='#'/>
		<c:if test="${ editMode }">
			<c:set var='href' value='/lex/action?cmd=getUpdateForm&amp;comp=etymology&amp;metaId=${ translation.metaId }'  />
		</c:if> 
		<c:out value='<a class="meta" href="${href} ">'escapeXml="false" /><img src="/lex/images/trans.gif" alt="view/edit translation" />--%>
		<span class="translation">		
		<!--<span class="label">Etymology:</span>-->
	  <c:out value="${ translation.etymologyDescription }" escapeXml="false" />   <br />
		<!--<span class="label">Etymology Type:</span>-->
	  <c:out value="${ applicationScope.flatData.etymologyTypes[ translation.etymologyType ] }" escapeXml="false" />   <br />
		<!--<span class="label">Loan Language:</span>-->
	  <c:out value="${ applicationScope.flatData.languages[ translation.loanLanguage ] }" escapeXml="false" />   <br />
		<!--<span class="label">Derivation:</span>-->
		<c:out value="${ translation.derivation }" escapeXml="false" />   
		
		</span>
		<c:set var="originalComponent" value="${ etymology }" />
		<c:set target="${ sessionScope.visit.helper }" property="component" value="${ translation }" />
		<jsp:include page="displayMeta.jsf" />	
		<c:set target="${ sessionScope.visit.helper }" property="component" value="${ originalComponent }" />
		</li>
		</c:forEach>
		</ul>
		</c:if>
		</c:if>
		
		
		<jsp:include page="displayNotes.jsf" />

		</p>

