<%

	import java.util.Set;
	import org.exoplatform.ecm.webui.component.explorer.UIJCRExplorer;
	import org.exoplatform.ecm.webui.component.explorer.sidebar.UIAllItems;

  def pref = uicomponent.getPreference();
	def allItemFilterMap = uicomponent.getAncestorOfType(UIJCRExplorer.class).getAllItemFilterMap();
	String ownedByMe = uicomponent.getOWNED_BY_ME();
	String favorite = uicomponent.getFAVORITE();
	String hidden = uicomponent.getHIDDEN();
	String trash = uicomponent.getTRASH();
	
%>
<div id="$uicomponent.id">
	<div class="SideBarContent">
		<div class="BarContent">
	  	<div class="BarContentL">
	  		<div class="BarContentR">
	  			<div class="BarContentM">
						<div class="Title"><%=_ctx.appRes("UIAllItems.title.allItems")%></div>
						<div class="SideGeneratal" onclick="<%=uicomponent.event("Preferences")%>" title="<%=_ctx.appRes("UIAllItems.label.Configuration")%>">
							<span></span>
						</div>
						<div class="ClearLeft"><span></span></div>
				  </div>
				</div>
			</div>
		</div>
		<div class="SideContent">
			<div class="ItemContent">
				<% if (pref.isShowOwnedByUserDoc()) { 
						String classValue = (allItemFilterMap.contains(ownedByMe) ?
								"TrueSelectIcon" : "ArrowSidContent") + " TextSiderContent";
					%>
						<div class="$classValue">
							<a href="<%=uicomponent.event("ClickFilter", ownedByMe)%>" title="<%=_ctx.appRes("UIActionBar.title.ShowAllOwnedByUser")%>" class="ShowAllOwnedByUserBtn">
								<span><%=_ctx.appRes("UIAllItems.label.OwnedByMe")%></span>
							</a>
						</div>
				<% } %>
				
			  <% if (pref.isShowFavouriteDoc()) { 
						String classValue = (allItemFilterMap.contains(favorite) ?
								"TrueSelectIcon" : "ArrowSidContent") + " TextSiderContent";
			  	%>
						<div class="$classValue">
							<a href="<%=uicomponent.event("ClickFilter", favorite)%>" title="<%=_ctx.appRes("UIActionBar.title.ShowAllFavourite")%>" class="ShowAllFavouriteBtn">
								<span><%=_ctx.appRes("UIAllItems.label.Favourites")%></span>
							</a>
						</div>
						<% } %>
						
				<% if (pref.isShowHiddenDoc()) {
					String classValue = (allItemFilterMap.contains(hidden) ?
							"TrueSelectIcon" : "ArrowSidContent") + " TextSiderContent";
					%>
						<div class="$classValue">
							<a href="<%=uicomponent.event("ClickFilter", hidden)%>" title="<%=_ctx.appRes("UIActionBar.title.ShowAllHidden")%>" class="ShowAllHiddenBtn">
								<span><%=_ctx.appRes("UIAllItems.label.Hidden")%></span>
							</a>
						</div>
				<% } %>
						

			</div>
		</div>
	</div>
</div>