Merge of the NewUI changes into the trunk
This commit is contained in:
@@ -15,50 +15,58 @@
|
||||
|
||||
Contributor(s):
|
||||
--%>
|
||||
<%@ page import = "java.util.*" %>
|
||||
<%@ page import = "com.silverwrist.util.StringUtil" %>
|
||||
<%@ page import = "com.silverwrist.venice.core.*" %>
|
||||
<%@ page import = "com.silverwrist.venice.servlets.Variables" %>
|
||||
<%@ page import = "com.silverwrist.venice.servlets.format.*" %>
|
||||
<%@ 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" %>
|
||||
<%
|
||||
TopDisplay data = TopDisplay.retrieve(request);
|
||||
Variables.failIfNull(data);
|
||||
RenderData rdat = RenderConfig.createRenderData(application,request,response);
|
||||
%>
|
||||
<% if (rdat.useHTMLComments()) { %><!-- Top content panel --><% } %>
|
||||
<% if (data.displayWelcome()) { %>
|
||||
<% rdat.writeContentHeader(out,rdat.getStockMessage("welcome-top"),null); %>
|
||||
<%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %><%= rdat.getStockMessage("welcome") %></FONT><P>
|
||||
<% } // end if %>
|
||||
<%
|
||||
rdat.writeContentHeader(out,rdat.getStockMessage("currents-top"),null);
|
||||
int ntp = data.getNumTopPosts();
|
||||
if (ntp>0) {
|
||||
for (int i=0; i<ntp; i++) {
|
||||
TopicMessageContext msg = data.getTopPost(i);
|
||||
String poster = data.getPosterName(msg);
|
||||
String topic_link = data.getTopicPostLink(rdat,msg);
|
||||
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%"><% } %>
|
||||
<%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %>
|
||||
<util:font color="content.fg" size="content">
|
||||
<B><%= msg.getPseud() %></B>
|
||||
(<EM>
|
||||
<A HREF="<%= rdat.getEncodedServletPath("user/" + poster) %>" TARGET="_blank"><%= poster %></A>,
|
||||
<%= rdat.formatDateForDisplay(msg.getPostDate()) %>
|
||||
<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><%= rdat.rewritePostData(data.getMessageBodyText(msg)) %></PRE>
|
||||
<% if (topic_link!=null) { %>
|
||||
<P><FONT SIZE=-1><EM>(From the topic: <%= topic_link %>)</EM></FONT><BR>
|
||||
<% } // end if %>
|
||||
</FONT>
|
||||
<%
|
||||
} // end for
|
||||
} else {
|
||||
%>
|
||||
<%= rdat.getStdFontTag(ColorSelectors.CONTENT_FOREGROUND,2) %><EM>No front page postings found.</EM></FONT>
|
||||
<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 %>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user