<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" %>
<% 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>

<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"); 
		}
	}
</script>

<%-- 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">
		 	<sakai:tool_bar>
				<syllabus:syllabus_ifnot test="#{SyllabusTool.editAble}">
				  	<%-- (gsilver) cannot pass a needed title atribute to this next item --%>
					<sakai:tool_bar_item
			    		action="#{SyllabusTool.processCreateAndEdit}"
						value="#{msgs.bar_create_edit}" />
					<f:verbatim><h:outputText value=" " /><h:outputText value=" " /></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>
				</syllabus:syllabus_ifnot>
				<syllabus:syllabus_if test="#{SyllabusTool.editAble}" >
					<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>
				</syllabus:syllabus_if>
			</sakai:tool_bar>
			<syllabus:syllabus_if test="#{SyllabusTool.syllabusItem.redirectURL}">
				<h:dataTable value="#{SyllabusTool.entries}" var="eachEntry" rendered="#{! SyllabusTool.syllabusItem.redirectURL}" style="margin-top:1em;clear:both;" summary="#{msgs.mainCaption}" >
					<h:column>
							<f:verbatim><h4 class="textPanelHeader"></f:verbatim>		  
								<h:outputText value="#{eachEntry.entry.title}" />
							<f:verbatim></h4></f:verbatim>
							<f:verbatim><div class="textPanel"></f:verbatim>
							<syllabus:syllabus_htmlShowArea value="#{eachEntry.entry.asset}" />
							<f:verbatim></div></f:verbatim>
							<h:dataTable value="#{eachEntry.attachmentList}" var="eachAttach" styleClass="indnt1" summary="layout">
							  <h:column>
									<f:facet name="header">
										<h:outputText value="" />
									</f:facet>
									<sakai:contentTypeMap fileType="#{eachAttach.type}" mapType="image" var="imagePath" pathPrefix="/library/image/"/>									
									<h:graphicImage id="exampleFileIcon" value="#{imagePath}" />	
									<h:outputLink value="#{eachAttach.url}" target="_blank" title="#{msgs.openLinkNewWindow}">
										<h:outputText value=" "/><h:outputText value="#{eachAttach.name}"/><commit_msg>SAK-13307<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" %>
<% 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>

<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"); 
		}
	}
</script>

<%-- 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" role="menu"></f:verbatim>
				<f:verbatim><li role="menuitem" 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 role="menuitem"></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" role="menu"></f:verbatim>
				<f:verbatim><li role="menuitem" 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}">
				<h:dataTable value="#{SyllabusTool.entries}" var="eachEntry" rendered="#{! SyllabusTool.syllabusItem.redirectURL}" style="margin-top:1em;clear:both;" summary="#{msgs.mainCaption}" >
					<h:column>
							<f:verbatim><h4 class="textPanelHeader"></f:verbatim>		  
								<h:outputText value="#{eachEntry.entry.title}" />
							<f:verbatim></h4></f:verbatim>
							<f:verbatim><div class="textPanel"></f:verbatim>
							<syllabus:syllabus_htmlShowArea value="#{eachEntry.entry.asset}" />
							<f:verbatim></div></f:verbatim>
							<h:dataTable value="#{eachEntry.attachmentList}" var="eachAttach" styleClass="indnt1" summary="layout">
							  <h:column>
									<f:facet name="header">
										<h:outputText value="" />
									</f:facet>
									<sakai:contentTypeMap fileType="#{eachAttach.type}" mapType="image" var="imagePath" pathPrefix="/library/image/"/>									
									<h:graphicImage id="exampleFileIcon" value="#{imagePath}" />	
									<h:outputLink value="#{eachAttach.url}" target="_blank" title="#{msgs.openLinkNewWindow}">
										<h:outputText value=" "/><h:outputText value="#{eachAttach.name}"/>
{'fraction_non_alphanumeric': 0.1866009589770911, 'fraction_numerical': 0.004794885455514118, 'mean_word_length': 4.692949203942381, 'pattern_counts': {'":': 0, '<': 165, '<?xml version=': 0, '>': 165, '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': '7654004', 'n_tokens_mistral': 3242, 'n_tokens_neox': 2692, 'n_words': 391}