venice-main-classic/web/format/top_content.jsp

73 lines
3.0 KiB
Plaintext

<%--
The contents of this file are subject to the Mozilla Public License Version 1.1
(the "License"); you may not use this file except in compliance with the License.
You may obtain a copy of the License at <http://www.mozilla.org/MPL/>.
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT
WARRANTY OF ANY KIND, either express or implied. See the License for the specific
language governing rights and limitations under the License.
The Original Code is the Venice Web Communities System.
The Initial Developer of the Original Code is Eric J. Bowersox <erbo@users.sf.net>,
for Silverwrist Design Studios. Portions created by Eric J. Bowersox are
Copyright (C) 2001 Eric J. Bowersox/Silverwrist Design Studios. All Rights Reserved.
Contributor(s):
--%>
<%@ page import = "java.util.List" %>
<%@ page import = "com.silverwrist.venice.core.TopicMessageContext" %>
<%@ page import = "com.silverwrist.venice.ui.view.JSPView" %>
<%@ taglib uri="/tlds/user" prefix="user" %>
<%@ taglib uri="/tlds/util" prefix="util" %>
<%@ taglib uri="/tlds/post" prefix="post" %>
<%
JSPView view = JSPView.get(request);
List post_list = (List)(view.getRequestAttribute("top.fp_posts"));
List poster_names = (List)(view.getRequestAttribute("top.fp_posts.names"));
List message_text = (List)(view.getRequestAttribute("top.fp_posts.text"));
List topic_names = (List)(view.getRequestAttribute("top.fp_posts.topics.names"));
List topic_links = (List)(view.getRequestAttribute("top.fp_posts.topics.links"));
%>
<util:comment>Top Content Panel</util:comment>
<%-- If the user is not logged in, write the welcome message. --%>
<user:is_not_logged_in>
<util:header stocktitle="welcome-top"/>
<util:font color="content.fg" size="content"><util:stock_message key="welcome"/></util:font><P>
</user:is_not_logged_in>
<%-- Write the messages that have been published to the front page. --%>
<util:header stocktitle="currents-top"/>
<% if (post_list.size()>0) { %>
<% for (int i=0; i<post_list.size(); i++) { %>
<%
TopicMessageContext msg = (TopicMessageContext)(post_list.get(i));
String pname = poster_names.get(i).toString();
%>
<% if (i>0) { %><HR WIDTH="70%"><% } %>
<util:font color="content.fg" size="content">
<B><%= msg.getPseud() %></B>
(<EM>
<util:xlink target="_blank">
<util:href type="servlet">user/<%= pname %></util:href>
<util:text><%= pname %></util:text>
</util:xlink>,
<%= view.formatDate(msg.getPostDate()) %>
</EM>)
<P>
<PRE><post:rewrite><%= message_text.get(i) %></post:rewrite></PRE>
<P>
<FONT SIZE=-1><EM>(From the topic: <util:xlink>
<util:href type="servlet">go/<%= topic_links.get(i) %></util:href>
<util:text><%= topic_names.get(i) %></util:text>
</util:xlink>)</EM></FONT><BR>
</util:font>
<% } // end for %>
<% } else { %>
<util:font color="content.fg" size="content"><EM>No front page postings found.</EM></util:font>
<% } // end if %>