<%
/**
 * Created by The eXo Platform SARL
 * Author : Dang Van Minh
 *          minh.dang@exoplatform.com
 * Dec 26, 2008
 * 9:36:26 AM 
 */
%>

<div class="$uicomponent.id" id="$uicomponent.id">
  <table class="UIGrid">
    <thead>
      <tr>
  	    <th><%=_ctx.appRes("UIPublicationLogList.header.date")%></th>
  	    <th><%=_ctx.appRes("UIPublicationLogList.header.newState")%></th>
  	    <th><%=_ctx.appRes("UIPublicationLogList.header.user")%></th>
  	    <th><%=_ctx.appRes("UIPublicationLogList.header.description")%></th>
  	   </tr>
    </thead>
    <tbody>
      <%
        def rowClass = null ;
  	    boolean even = true ;
  	    for (bean in uicomponent.getLogList()) {
  	      if(even) rowClass = "EvenRow" ;  
  	      else rowClass =  "OddRow" ; 
  	      even = !even ;
  	      out.println("<tr class=\"" + rowClass + "\">");  	   			
					out.println("<td><div class=\"Text\">" + bean.getDate() + "</div></td>");	          
					out.println("<td><div class=\"Text\">" + bean.getNewState() + "</div></td>");	          
					out.println("<td><div class=\"Text\">" + bean.getUser() + "</div></td>");	          
					out.println("<td><div class=\"Text\">" + bean.getDescription() + "</div></td>");	          
					out.println("</tr>");	        
        }  
      %>  
    </tbody>
  </table>
  <% if(uicomponent.getUIPageIterator().getAvailablePage() > 1){ %>
  <div style="margin:1px 0px 5px 0px;">
    <%_ctx.renderUIComponent(uicomponent.getUIPageIterator())%>
  </div>
  <% } %>
	<div class="UIAction">
  <% for(action in uicomponent.getActions()) { %>
 		<a onclick="<%=uicomponent.event(action)%>" class="ActionButton LightBlueStyle" href="javascript:void(0);"><%=_ctx.appRes("UIPublicationLogList.action." + action)%></a>
  <% } %>
	</div>
</div>
