<commit_before><%@ include file="/WEB-INF/template/include.jsp" %>

<openmrs:require privilege="Manage Modules" otherwise="/login.htm" redirect="/admin/modules/module.list" />
	
<%@ include file="/WEB-INF/template/header.jsp" %>
<%@ include file="localHeader.jsp" %>

<h2><spring:message code="Module.header" /></h2>	

<p><spring:message code="Module.notice" /></p>

<b class="boxHeader"><spring:message code="Module.add" /></b>
<div class="box">
	<form id="moduleAddForm" action="module.list" method="post" enctype="multipart/form-data">
		<spring:message code="Module.addJar"/>: 
		<input type="file" name="moduleFile" size="40" <c:if test="${allowAdmin!='true'}">disabled="disabled"</c:if> />
		<input type="hidden" name="action" value="upload"/>
		
		<div id="moduleUploadButton" style="margin-top: 5px;">
			<c:choose>
				<c:when test="${allowAdmin == 'true'}">
					<input type="submit" value='<spring:message code="Module.add"/>'/>
				</c:when>
				<c:otherwise>
					${disallowUploads}
				</c:otherwise>
			</c:choose>
		</div>
	</form>
</div>

<br/>

<c:forEach var="module" items="${moduleList}" varStatus="varStatus">
	<c:if test="${varStatus.first}">
		<b class="boxHeader"><spring:message code="Module.manage" /></b>
		<div class="box" id="moduleListing">
			<table cellpadding="5" cellspacing="0">
				<thead>
					<tr>
						<c:if test="${allowAdmin=='true'}">
							<th colspan="2"><spring:message code="general.action"/></th>
						</c:if>
						<th><spring:message code="general.name"/></th>
						<th><spring:message code="general.version"/></th>
						<th><spring:message code="general.author"/></th>
						<th><spring:message code="general.description"/></th>
						<th></th>
						<th></th>
					</tr>
				</thead>
				<tbody>
	</c:if>
			
					<form method="post">
					<input type="hidden" name="moduleId" value="${module.moduleId}" />
					<tr class="<c:choose><c:when test="${varStatus.index % 2 == 0}">oddRow</c:when><c:otherwise>evenRow</c:otherwise></c:choose>" id="${module.moduleId}">
						<c:choose>
							<c:when test="${allowAdmin=='true' && module.mandatory == false}">
								<td valign="top">
									<c:choose>
										<c:when test="${not module.started}">
											<input type="image" src="${pageContext.request.contextPath}/images/play.gif" name="start" onclick="document.getElementById('hiddenAction').value = this.value" title="<spring:message code="Module.start.help"/>" alt="<spring:message code="Module.start"/>" />
										</c:when>
										<c:otherwise>
											<input type="image" src="${pageContext.request.contextPath}/images/stop.gif" name="stop" onclick="document.getElementById('hiddenAction').value = this.value" title="<spring:message code="Module.stop.help"/>" alt="<spring:message code="Module.stop"/>" />
										</c:otherwise>
									</c:choose>
								</td>
								<td valign="top"><input type="image" src="${pageContext.request.contextPath}/images/trash.gif" name="unload" onclick="return confirm('<spring:message code="Module.unloadWarning"/>');" title="<spring:message code="Module.unload.help"/>" title="<spring:message code="Module.unload"/>" alt="<spring:message code="Module.unload"/>" /></td>
							</c:when>
							<c:otherwise>
								<td valign="top" align="center" colspan="2">
									<img src="${pageContext.request.contextPath}/images/lock.gif" title="<spring:message code="Module.locked.help"/>" alt="<spring:message code="Module.locked"/>" />
								</td>
							</c:otherwise>
						</c:choose>
						<td valign="top">${module.name} <c:if test="${not module.started}"><b id="moduleNotStarted" style="white-space: nowrap">[<spring:message code="Module.notStarted"/>]</b></c:if></td>
						<td valign="top">${module.version}</td><commit_msg>Aligning the mandatory lock to the left on the module management page<commit_after><%@ include file="/WEB-INF/template/include.jsp" %>

<openmrs:require privilege="Manage Modules" otherwise="/login.htm" redirect="/admin/modules/module.list" />
	
<%@ include file="/WEB-INF/template/header.jsp" %>
<%@ include file="localHeader.jsp" %>

<h2><spring:message code="Module.header" /></h2>	

<p><spring:message code="Module.notice" /></p>

<b class="boxHeader"><spring:message code="Module.add" /></b>
<div class="box">
	<form id="moduleAddForm" action="module.list" method="post" enctype="multipart/form-data">
		<spring:message code="Module.addJar"/>: 
		<input type="file" name="moduleFile" size="40" <c:if test="${allowAdmin!='true'}">disabled="disabled"</c:if> />
		<input type="hidden" name="action" value="upload"/>
		
		<div id="moduleUploadButton" style="margin-top: 5px;">
			<c:choose>
				<c:when test="${allowAdmin == 'true'}">
					<input type="submit" value='<spring:message code="Module.add"/>'/>
				</c:when>
				<c:otherwise>
					${disallowUploads}
				</c:otherwise>
			</c:choose>
		</div>
	</form>
</div>

<br/>

<c:forEach var="module" items="${moduleList}" varStatus="varStatus">
	<c:if test="${varStatus.first}">
		<b class="boxHeader"><spring:message code="Module.manage" /></b>
		<div class="box" id="moduleListing">
			<table cellpadding="5" cellspacing="0">
				<thead>
					<tr>
						<c:if test="${allowAdmin=='true'}">
							<th colspan="2"><spring:message code="general.action"/></th>
						</c:if>
						<th><spring:message code="general.name"/></th>
						<th><spring:message code="general.version"/></th>
						<th><spring:message code="general.author"/></th>
						<th><spring:message code="general.description"/></th>
						<th></th>
						<th></th>
					</tr>
				</thead>
				<tbody>
	</c:if>
			
				<form method="post">
					<input type="hidden" name="moduleId" value="${module.moduleId}" />
					<tr class="<c:choose><c:when test="${varStatus.index % 2 == 0}">oddRow</c:when><c:otherwise>evenRow</c:otherwise></c:choose>" id="${module.moduleId}">
						<c:choose>
							<c:when test="${allowAdmin=='true' && module.mandatory == false}">
								<td valign="top">
									<c:choose>
										<c:when test="${not module.started}">
											<input type="image" src="${pageContext.request.contextPath}/images/play.gif" name="start" onclick="document.getElementById('hiddenAction').value = this.value" title="<spring:message code="Module.start.help"/>" alt="<spring:message code="Module.start"/>" />
										</c:when>
										<c:otherwise>
											<input type="image" src="${pageContext.request.contextPath}/images/stop.gif" name="stop" onclick="document.getElementById('hiddenAction').value = this.value" title="<spring:message code="Module.stop.help"/>" alt="<spring:message code="Module.stop"/>" />
										</c:otherwise>
									</c:choose>
								</td>
								<td valign="top"><input type="image" src="${pageContext.request.contextPath}/images/trash.gif" name="unload" onclick="return confirm('<spring:message code="Module.unloadWarning"/>');" title="<spring:message code="Module.unload.help"/>" title="<spring:message code="Module.unload"/>" alt="<spring:message code="Module.unload"/>" /></td>
							</c:when>
							<c:otherwise>
								<td valign="top">
									<img src="${pageContext.request.contextPath}/images/lock.gif" title="<spring:message code="Module.locked.help"/>" alt="<spring:message code="Module.locked"/>" />
								</td>
								<td></td>
							</c:otherwise>
						</c:choose>
						<td valign="top">${module.name} <c:if test="${not module.started}"><b id="moduleNotStarted" style="white-space: nowrap">[<spring:message code="Module.notStarted"/>]</b></c:if></td>
						<td valign="top">${module.version}</td>
{'fraction_non_alphanumeric': 0.22539135049084638, 'fraction_numerical': 0.0027858848500928626, 'mean_word_length': 4.297962052002811, 'pattern_counts': {'":': 0, '<': 239, '<?xml version=': 0, '>': 239, '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': '2758141', 'n_tokens_mistral': 3084, 'n_tokens_neox': 2432, 'n_words': 387}