<jsp:root 
    version="2.0" 
    xmlns:jsp="http://java.sun.com/JSP/Page"
    xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:portlet="http://java.sun.com/portlet"    
    xmlns:fn="http://java.sun.com/jsp/jstl/functions"    
    xmlns:fmt="http://java.sun.com/jsp/jstl/fmt"     
>
	<jsp:directive.page session="true"/>
	<jsp:directive.page isELIgnored="false"/>
	<fmt:setLocale value=""/>
	<fmt:setBundle basename="samples.webcenter.portlets.wiki.WikiPortlet"/>		
	<portlet:defineObjects/>
	<fmt:message key='wiki.save.label' var="wiki_save_label"/>
	<fmt:message key='wiki.cancel.label' var="wiki_cancel_label"/>
	<fmt:message key="wiki.delete.confirm.msg" var="wiki_delete_confirm">
		<fmt:param value="${page_info.name}"/>
	</fmt:message>
	<div class="wiki-body">
		<div class="wiki-page">
			<div id="${uid}_controls" class="wiki-page-controls">
				<div name="Edit" onclick="wikiPortlet_doEdit('${uid}');"><fmt:message key="wiki.edit.label"/></div>
				<div name="Delete" onclick="wikiPortlet_doDelete('${uid}', '${wiki_delete_confirm}');"><fmt:message key="wiki.delete.label"/></div>
			</div>
			<h3 class="wiki-page-name">
				<div id="${uid}_name">${page_info.name}</div>
				<div class="wiki-page-name-edit" id="${uid}_name_edit" style="display: none">
					<fmt:message key="wiki.name.label"/>:
					<input id="${uid}_name_editor" type="text" value="${page_info.name}" onkeyup="wikiPortlet_nospaces(this)"/>
				</div>				
			</h3>
			<div id="${uid}_info" class="wiki-page-info">
				<c:set var="dateTime" value="${fn:split(page_info.modified, ' ')}" scope="request"/>
				<fmt:message key="wiki.page.msg.info">
					<fmt:param value="${page_info.author}"></fmt:param>
					<fmt:param value="${page_info.editor}"></fmt:param>
					<fmt:param value="${dateTime[0]}"></fmt:param>
					<fmt:param value="${dateTime[1]}"></fmt:param>
				</fmt:message>
			</div>
			<div id="${uid}_content" class="wiki-page-content">
				${page_markup}
			</div>
			<div id="${uid}_editor" class="wiki-page-editor" style="display: none">
				<textarea id="${uid}_textarea">
					${page_source}
				</textarea>
			</div>
			<div id="${uid}_editor_buttons" class="wiki-page-editor-buttons" style="display: none">
				<input type="button" name="Save" onclick="wikiPortlet_doSave('${uid}');" value="${wiki_save_label}"/>
				<input type="button" name="Cancel" onclick="wikiPortlet_doCancel('${uid}');" value="${wiki_cancel_label}"/>
			</div>
		</div>
	</div>
	<portlet:actionURL var="wikiPageURL"/>
	<form id="${uid}_page_content_form" method="POST" action="${wikiPageURL}" style="display: none">
		<input type="hidden" name="page_content" id="${uid}_page_content_field" value="${page_content}"/>
		<input type="hidden" name="page_name" id="${uid}_page_name_field" value="${page_info.name}"/>		
		<input id="${uid}_page_action" type="hidden" name="page_action" value="update"/>		
	</form>
</jsp:root>