<commit_before><%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://sakaiproject.org/jsf/sakai" prefix="sakai" %>
<%@ taglib uri="http://sakaiproject.org/jsf/syllabus" prefix="syllabus" %>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<% response.setContentType("text/html; charset=UTF-8"); %>
<f:view>

<jsp:useBean id="msgs" class="org.sakaiproject.util.ResourceLoader" scope="session">
   <jsp:setProperty name="msgs" property="baseName" value="org.sakaiproject.tool.syllabus.bundle.Messages"/>
</jsp:useBean>

	<sakai:view_container title="#{msgs.title_list}">
	<sakai:view_content>
	
	<%
	  	String thisId = request.getParameter("panel");
  		if (thisId == null) 
  		{
    		thisId = "Main" + org.sakaiproject.tool.cover.ToolManager.getCurrentPlacement().getId();
  		}
	%>

<script type="text/javascript" src="/library/js/jquery.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.10.1.custom.min.js"></script>
<script type="text/javascript" src="js/syllabus.js"></script>
<sakai:stylesheet path="/syllabus/css/ui-lightness/jquery-ui-1.10.1.custom.min.css" />
<script language="JavaScript">
	// if redirected, just open in another window else
	// open with size approx what actual print out will look like
	function printFriendly(url) {
		if (url.indexOf("printFriendly") == -1) {
			window.open(url,"mywindow");
		}
		else {
			window.open(url,"mywindow","width=960,height=1100,scrollbars=yes"); 
		}
	}
	
	$(function() {
		setupAccordion('<%= org.sakaiproject.util.Web.escapeJavascript(thisId)%>');
	});
	
	
</script>
<style>
	a.draft{
		color: grey !important
	}
</style>

<%-- gsilver: global things about syllabus tool:
1 ) what happens to empty lists - still generate a table?
2 ) Ids generated by jsf start with _  not optimal keeps us from validating fully.
 --%>
	<h:form id="syllabus">
		<%--gsilver: would be best if used all sakai tags, or none, 2 blocks
		following just gets tries to get around the mix --%>		
		<syllabus:syllabus_ifnot test="#{SyllabusTool.editAble}">
			<f:verbatim><ul class="navIntraTool actionToolbar"></f:verbatim>
				<f:verbatim><li class="firstToolBarItem"></f:verbatim>
					<f:verbatim><span></f:verbatim>
						<sakai:tool_bar_item
			    			action="#{SyllabusTool.processCreateAndEdit}"
							value="#{msgs.bar_create_edit}" />
					<f:verbatim></span></f:verbatim>
				<f:verbatim></li></f:verbatim>
				<f:verbatim><li></f:verbatim>
					<f:verbatim><span></f:verbatim>
						<h:outputLink id="print" value="javascript:printFriendly('#{SyllabusTool.printFriendlyUrl}');">
							<h:graphicImage url="/images/printer.png" alt="#{msgs.print_friendly}" title="#{msgs.print_friendly}" />
						</h:outputLink>
					<f:verbatim></span></f:verbatim>
				<f:verbatim></li></f:verbatim>
			<f:verbatim></ul></f:verbatim>			
		
		</syllabus:syllabus_ifnot>

		<syllabus:syllabus_if test="#{SyllabusTool.editAble}" >

			<f:verbatim><ul class="navIntraTool actionToolbar"></f:verbatim>
				<f:verbatim><li class="firstToolBarItem"></f:verbatim>
					<f:verbatim><span></f:verbatim>
						<h:outputLink id="printIcon" value="javascript:printFriendly('#{SyllabusTool.printFriendlyUrl}');">
							<h:graphicImage url="/images/printer.png" alt="#{msgs.print_friendly}" title="#{msgs.print_friendly}" />
						</h:outputLink>
					<f:verbatim></span></f:verbatim>
				<f:verbatim></li></f:verbatim>
			<f:verbatim></ul></f:verbatim>			
				
			</syllabus:syllabus_if>
			<syllabus:syllabus_if test="#{SyllabusTool.syllabusItem.redirectURL}">
					<f:verbatim>
						<br/>
						<br/>
						<div id="accordion">
					</f:verbatim>
					<t:dataList value="#{SyllabusTool.entries}" var="eachEntry" layout="simple">
						<f:verbatim><h3><a href="#" </f:verbatim>
							<f:subview id="draftclass" rendered="#{eachEntry.status == eachEntry.draftStatus}">
								<f:verbatim>class="draft"</f:verbatim>
							</f:subview>
							<f:verbatim>></f:verbatim>		 
							<h:outputText rendered="#{eachEntry.status == eachEntry.draftStatus}" value="#{msgs.mainDraft} - "/> 
							<h:outputText value="#{eachEntry.entry.title}" />
							<f:subview id="date" rendered="#{eachEntry.entry.startDate != null || eachEntry.entry.endDate != null}">
								<f:verbatim><br/><span style="font-weight: normal"></f:verbatim>
									<h:outputText value="("/>
									<h:outputText value="#{eachEntry.entry.startDate}">
										<f:convertDateTime type="date" pattern="EEE MMM dd, yyyy hh:mm a"/>
									</h:outputText>
									<h:outputText value=" - " rendered="#{eachEntry.entry.startDate != null && eachEntry.entry.endDate != null}"/>
									<h:outputText value="#{eachEntry.entry.endDate}" rendered="#{!eachEntry.startAndEndDatesSameDay}">
								  		<f:convertDateTime type="date" pattern="EEE MMM dd, yyyy hh:mm a"/>
									</h:outputText>
									<h:outputText value="#{eachEntry.entry.endDate}" rendered="#{eachEntry.startAndEndDatesSameDay}">
								  		<f:convertDateTime type="date" pattern="hh:mm a"/>
									</h:outputText>
									<h:outputText value=")"/><commit_msg>SAK-23342 Create a Table of Contents Style view for Syllabus  Changing date display on TOC view to float right of the title<commit_after><%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>
<%@ taglib uri="http://sakaiproject.org/jsf/sakai" prefix="sakai" %>
<%@ taglib uri="http://sakaiproject.org/jsf/syllabus" prefix="syllabus" %>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<% response.setContentType("text/html; charset=UTF-8"); %>
<f:view>

<jsp:useBean id="msgs" class="org.sakaiproject.util.ResourceLoader" scope="session">
   <jsp:setProperty name="msgs" property="baseName" value="org.sakaiproject.tool.syllabus.bundle.Messages"/>
</jsp:useBean>

	<sakai:view_container title="#{msgs.title_list}">
	<sakai:view_content>
	
	<%
	  	String thisId = request.getParameter("panel");
  		if (thisId == null) 
  		{
    		thisId = "Main" + org.sakaiproject.tool.cover.ToolManager.getCurrentPlacement().getId();
  		}
	%>

<script type="text/javascript" src="/library/js/jquery.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.10.1.custom.min.js"></script>
<script type="text/javascript" src="js/syllabus.js"></script>
<sakai:stylesheet path="/syllabus/css/ui-lightness/jquery-ui-1.10.1.custom.min.css" />
<script language="JavaScript">
	// if redirected, just open in another window else
	// open with size approx what actual print out will look like
	function printFriendly(url) {
		if (url.indexOf("printFriendly") == -1) {
			window.open(url,"mywindow");
		}
		else {
			window.open(url,"mywindow","width=960,height=1100,scrollbars=yes"); 
		}
	}
	
	$(function() {
		setupAccordion('<%= org.sakaiproject.util.Web.escapeJavascript(thisId)%>');
	});
	
	
</script>
<style>
	a.draft{
		color: grey !important
	}
	.ui-accordion .ui-accordion-header{
		overflow: auto !important;
	}
</style>

<%-- gsilver: global things about syllabus tool:
1 ) what happens to empty lists - still generate a table?
2 ) Ids generated by jsf start with _  not optimal keeps us from validating fully.
 --%>
	<h:form id="syllabus">
		<%--gsilver: would be best if used all sakai tags, or none, 2 blocks
		following just gets tries to get around the mix --%>		
		<syllabus:syllabus_ifnot test="#{SyllabusTool.editAble}">
			<f:verbatim><ul class="navIntraTool actionToolbar"></f:verbatim>
				<f:verbatim><li class="firstToolBarItem"></f:verbatim>
					<f:verbatim><span></f:verbatim>
						<sakai:tool_bar_item
			    			action="#{SyllabusTool.processCreateAndEdit}"
							value="#{msgs.bar_create_edit}" />
					<f:verbatim></span></f:verbatim>
				<f:verbatim></li></f:verbatim>
				<f:verbatim><li></f:verbatim>
					<f:verbatim><span></f:verbatim>
						<h:outputLink id="print" value="javascript:printFriendly('#{SyllabusTool.printFriendlyUrl}');">
							<h:graphicImage url="/images/printer.png" alt="#{msgs.print_friendly}" title="#{msgs.print_friendly}" />
						</h:outputLink>
					<f:verbatim></span></f:verbatim>
				<f:verbatim></li></f:verbatim>
			<f:verbatim></ul></f:verbatim>			
		
		</syllabus:syllabus_ifnot>

		<syllabus:syllabus_if test="#{SyllabusTool.editAble}" >

			<f:verbatim><ul class="navIntraTool actionToolbar"></f:verbatim>
				<f:verbatim><li class="firstToolBarItem"></f:verbatim>
					<f:verbatim><span></f:verbatim>
						<h:outputLink id="printIcon" value="javascript:printFriendly('#{SyllabusTool.printFriendlyUrl}');">
							<h:graphicImage url="/images/printer.png" alt="#{msgs.print_friendly}" title="#{msgs.print_friendly}" />
						</h:outputLink>
					<f:verbatim></span></f:verbatim>
				<f:verbatim></li></f:verbatim>
			<f:verbatim></ul></f:verbatim>			
				
			</syllabus:syllabus_if>
			<syllabus:syllabus_if test="#{SyllabusTool.syllabusItem.redirectURL}">
					<f:verbatim>
						<br/>
						<br/>
						<div id="accordion">
					</f:verbatim>
					<t:dataList value="#{SyllabusTool.entries}" var="eachEntry" layout="simple">
						<f:verbatim><h3><a href="#" </f:verbatim>
							<f:subview id="draftclass" rendered="#{eachEntry.status == eachEntry.draftStatus}">
								<f:verbatim>class="draft"</f:verbatim>
							</f:subview>
							<f:verbatim>></f:verbatim>		 
							<h:outputText rendered="#{eachEntry.status == eachEntry.draftStatus}" value="#{msgs.mainDraft} - "/> 
							<h:outputText value="#{eachEntry.entry.title}" />
							<f:subview id="date" rendered="#{eachEntry.entry.startDate != null || eachEntry.entry.endDate != null}">
								<f:verbatim><span style="font-weight: normal; color: grey; float: right"></f:verbatim>
									<h:outputText value="#{eachEntry.entry.startDate}">
										<f:convertDateTime type="date" pattern="EEE MMM dd, yyyy hh:mm a"/>
									</h:outputText>
									<h:outputText value=" - " rendered="#{eachEntry.entry.startDate != null && eachEntry.entry.endDate != null}"/>
									<h:outputText value="#{eachEntry.entry.endDate}" rendered="#{!eachEntry.startAndEndDatesSameDay}">
								  		<f:convertDateTime type="date" pattern="EEE MMM dd, yyyy hh:mm a"/>
									</h:outputText>
									<h:outputText value="#{eachEntry.entry.endDate}" rendered="#{eachEntry.startAndEndDatesSameDay}">
								  		<f:convertDateTime type="date" pattern="hh:mm a"/>
									</h:outputText>
{'fraction_non_alphanumeric': 0.18899452607317777, 'fraction_numerical': 0.004513588783251705, 'mean_word_length': 4.2970498474059005, 'pattern_counts': {'":': 0, '<': 246, '<?xml version=': 0, '>': 246, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2885185', 'n_tokens_mistral': 4528, 'n_tokens_neox': 3750, 'n_words': 563}