<%@ include file="initviews.jsp" %>

<jsp:useBean id="detail" type="com.evermind.ejb.NewsView" scope="request" />
<html>
	<head>
		<title>News</title>
	</head>
	<body bgcolor="e0d0c0">
		<font size="5" face="Arial"><b>Useless news HQ - <td bgcolor="ffffff"><jsp:getProperty name="detail" property="subject" /></b></font><br>

		<table border="2" width="50%">
			<tr>
				<td bgcolor="7070a0"><b><%=dateFormat.format(detail.getDate())%> - <jsp:getProperty name="detail" property="subject" />, by <jsp:getProperty name="detail" property="submitter" /></b></td>
			</tr>
			<tr>
				<td bgcolor="ffffff"><jsp:getProperty name="detail" property="text" /></td>
			</tr>
		</table>
		<form action="addnews.jsp">
			<input type="hidden" name="parent" value="<%=detail.getId()%>">
			<input type="Submit" value="Add reply...">
		</form>

		<b>Replies<b><br>
		<jsp:include page="news-body.jsp" />

		<% if(detail.getParentId() != 0) { %>
			<form action="newsdetail.jsp">
				<input type="hidden" name="parent" value="<%=detail.getParentId()%>">
				<input type="Submit" value="Back">
			</form>
		<% } else { %>
			<form action="news.jsp">
				<input type="Submit" value="Back">
			</form>		
		<% } %>
	</body>
</html>