<%
	public void renderDCValues(String name) {
	  def node = uicomponent.getViewNode("dc:elementSet") ;
		def values = uicomponent.getMultiValues(node, name) ;
		if(values.size() == 0) { %>
	    <div style="overflow:hidden; width:99.5%; margin-top:5px; margin-left:5px">
	      <div class="MetaImage"><img style="height:4px; vertical-align:middle; margin-right:3px" alt="" src='/ecmexplorer/skin/images/metadata/rect.gif'/></div>     
	      <div class="Text"><%=_ctx.appRes("ElementSet.view.label.not-avaliable")%></div>
	    </div>    		
	<%} else {
			for(value in values) { %>
	      <div style="overflow:hidden; width:99.5%; margin-top:5px; margin-left:5px">
	        <div class="MetaImage"><img style="height:4px; vertical-align:middle; margin-right:3px" alt="" src='/ecmexplorer/skin/images/metadata/rect.gif'/></div>     
	        <div style="Text">$value</div>
	      </div>    			
	<%	}
		}
	}
%>

<div class="Header">DC:ELEMENTSET</div>
<div>     
  <div class="ContentBlock" style="width:43%">
    <div class="Title">
      <div class="LabelMetadata">Title</div>
    </div>          
    <div><% renderDCValues("dc:title") %></div>
  </div>

  <div>
    <div style="float: left; width:44%;">
      <div class="ContentBlock">
        <div class="Title">
          <div class="LabelMetadata"><%=_ctx.appRes("ElementSet.view.label.date")%></div>
          <div><% renderDCValues("dc:date") %></div>
        </div>                        
      </div>
    </div>
    <div style="float:right; width:44%;">
      <div class="ContentBlock">
        <div class="Title">
          <div class="LabelMetadata"><%=_ctx.appRes("ElementSet.view.label.subject")%></div>
        </div>
        <div><% renderDCValues("dc:subject") %></div>
      </div>
    </div>
    <div style="clear: both;"><span></span></div>
  </div>

  <div>
    <div style="float: left; width:44%">
      <div class="ContentBlock">
        <div class="Title">
          <div class="LabelMetadata"><%=_ctx.appRes("ElementSet.view.label.description")%></div>
          <div><% renderDCValues("dc:description") %></div>
        </div>                        
      </div>
    </div>
    <div style="float:right; width:44%">
      <div class="ContentBlock">
        <div class="Title">
          <div class="LabelMetadata"><%=_ctx.appRes("ElementSet.view.label.languages")%></div>
        </div>
        <div><% renderDCValues("dc:language") %></div>
      </div>
    </div> 
    <div style="clear: both;"><span></span></div>             
  </div>

  <div>
    <div style="float: left; width:44%">
      <div class="ContentBlock">
        <div class="Title">
          <div class="LabelMetadata"><%=_ctx.appRes("ElementSet.view.label.creator")%></div>
          <div><% renderDCValues("dc:creator") %></div>
        </div>                        
      </div>
    </div>
    <div style="float:right; width:44%">
      <div class="ContentBlock">
        <div class="Title">
          <div class="LabelMetadata"><%=_ctx.appRes("ElementSet.view.label.publisher")%></div>
        </div>
        <div><% renderDCValues("dc:publisher") %></div>
      </div>
    </div>  
    <div style="clear: both;"><span></span></div>            
  </div>

  <div>
    <div style="float: left; width:44%">
      <div class="ContentBlock">
        <div class="Title">
          <div class="LabelMetadata"><%=_ctx.appRes("ElementSet.view.label.contributor")%></div>
          <div><% renderDCValues("dc:contributor") %></div>
        </div>                        
      </div>
    </div>
    <div style="float:right; width:44%">
      <div class="ContentBlock">
        <div class="Title">
          <div class="LabelMetadata"><%=_ctx.appRes("ElementSet.view.label.identifier")%></div>
        </div>
        <div><% renderDCValues("dc:identifier") %></div>
      </div>
    </div>  
    <div style="clear: both;"><span></span></div>            
  </div>

  <div>
    <div style="float: left; width:44%">
      <div class="ContentBlock">
        <div class="Title">
          <div class="LabelMetadata"><%=_ctx.appRes("ElementSet.view.label.resource-type")%></div>
          <div><% renderDCValues("dc:resourceType") %></div>
        </div>                        
      </div>
    </div>
    <div style="float:right;width:44%">
      <div class="ContentBlock">
        <div class="Title">
          <div class="LabelMetadata"><%=_ctx.appRes("ElementSet.view.label.format")%></div>
        </div>
        <div><% renderDCValues("dc:format") %></div>
      </div>
    </div>   
    <div style="clear: both;"><span></span></div>           
  </div>

  <div>
    <div style="float: left; width:44%">
      <div class="ContentBlock">
        <div class="Title">
          <div class="LabelMetadata"><%=_ctx.appRes("ElementSet.view.label.relation")%></div>
          <div><% renderDCValues("dc:relation") %></div>
        </div>                        
      </div>
    </div>
    <div style="float:right; width:44%">
      <div class="ContentBlock">
        <div class="Title">
          <div class="LabelMetadata"><%=_ctx.appRes("ElementSet.view.label.rights")%></div>
        </div>
        <div><% renderDCValues("dc:rights") %></div>
      </div>
    </div>  
    <div style="clear: both;"><span></span></div>            
  </div>

  <div>
    <div style="float: left; width:44%">
      <div class="ContentBlock">
        <div class="Title">
          <div class="LabelMetadata"><%=_ctx.appRes("ElementSet.view.label.source")%></div>
          <div><% renderDCValues("dc:source") %></div>
        </div>                        
      </div>
    </div>
    <div style="float:right; width:44%">
      <div class="ContentBlock">
        <div class="Title">
          <div class="LabelMetadata"><%=_ctx.appRes("ElementSet.view.label.coverage")%></div>
        </div>
        <div><% renderDCValues("dc:coverage") %></div>
      </div>
    </div>              
    <div style="clear: both;"><span></span></div>
  </div>  
</div>
<%/* start render action*/%>
<div class="UIAction"> 
  <table class="ActionContainer">
  	<tr>
  		<td>
		  	<div onclick="<%=uicomponent.event("EditProperty", "dc:elementSet")%>" class="ActionButton LightBlueStyle">
					<div class="ButtonLeft">
						 <div class="ButtonRight">
						  <div class="ButtonMiddle"  title="<%=_ctx.appRes("ElementSet.view.tooltip.add-edit")%>">
						    <a href="javascript:void(0);"><%=_ctx.appRes("ElementSet.view.action.add-edit")%></a>
					    </div>
				    </div>
				  </div>
				</div>
		  	<div onclick="<%=uicomponent.event("Cancel")%>" class="ActionButton LightBlueStyle">
					<div class="ButtonLeft">
					  <div class="ButtonRight">
						  <div class="ButtonMiddle" title="<%=_ctx.appRes("ElementSet.view.tooltip.cancel")%>">
						    <a href="javascript:void(0);"><%=_ctx.appRes("ElementSet.view.action.cancel")%></a>
				      </div>
				    </div>
			    </div>
				</div>
  		</td>
  	</tr>
  </table>
</div>
<%/* end render action*/%>
 