adding all of botlist, initial add
[botlist.git] / openbotlist / WEB-INF / jsps / botverse / botverse.jsp
blob9f5773ae3862f6b534869750fdbc123fb81254b0
1 <%@include file="/WEB-INF/jsps/general/default_doc_type.jsp" %>
2 <%@ page contentType="text/html"%>
3 <%@include file="/WEB-INF/jsps/general/default_includes.jsp" %>
4 <html xmlns="http://www.w3.org/1999/xhtml">
5 <head>
6 <title>Botverse - Interesting things online</title>
8 <meta name="DESCRIPTION" content="Botverse - Popular links all in the same place. Discover new links and articles on the web. Like Reddit or Digg but for adults."></meta>
9 <meta name="keywords" content="botverse, listing, bot, botlist, botlisting, bot's list, list, ads, advertising, atlanta technology, read it, dig it, reddit, digg, stumbleupon"></meta>
11 <link type="application/rss+xml" rel="alternate" title="Botverse - Link Listings" href="<c:url value="/spring/botverse/rss/botverse_rss.html" />" ></link>
12 <link href="<c:url value="/company/stylesheets/scaffold.css" />" media="screen" rel="Stylesheet" type="text/css" ></link>
13 <link href="<c:url value="/company/stylesheets/newspirit.css" />" media="screen" rel="Stylesheet" type="text/css" ></link>
14 <link href="<c:url value="/company/stylesheets/botlist.css" />" media="screen" rel="Stylesheet" type="text/css" ></link>
15 <link href="<c:url value="/company/stylesheets/botlist_general2.css" />" media="screen" rel="Stylesheet" type="text/css" ></link>
16 <style type="text/css">
17 <%@include file="/WEB-INF/jsps/general/botverse_link_css.jsp" %>
18 </style>
20 <%-- Include jquery javascript library --%>
21 <script type="text/javascript" src="<c:url value="/company/js/jq/jquery-1.1.4.pack.js" />" ></script>
23 <script type="text/javascript">
25 $(document).ready(function() {
26 });
28 function submitForm(operation, linkid) {
29 // deprecated
32 function submitAjaxVote(oper_action, linkid) {
33 // Submit vote information up/down vote based on linkid
34 $(document).ready(function() {
35 $.ajax({
36 url: '/botlist/spring/ajax/vote.html',
37 type: 'POST',
38 dataType: 'xml',
39 timeout: 5000,
40 data: {
41 ratingId: linkid,
42 operation: oper_action
43 }, // Post Data
44 error: function(xmlReqObj, errStr, expObj) {
45 alert('Error loading XML document');
47 success: function(xml) {
48 // set the bot message from the xml
49 setXmlMessage(xml);
51 }); // End ajax call
52 }); // End of call to "isReady"
54 } // End of submit ajax
56 function setBotVoteMessage(msg, resp_status) {
58 var css_msg_class = "ajx_msg_pass";
59 if (resp_status == 'pass') {
60 css_msg_class = "ajx_msg_pass"
61 } else {
62 css_msg_class = "ajx_msg_fail"
65 // set the message and green/red css class
66 $('div#bot_msg_vote').html('! message: ' + msg)
67 .addClass(css_msg_class);
70 function setXmlMessage(xml) {
72 var message_text = "invalid message";
73 var resp_status;
74 $(xml).find('message').each(function() {
75 message_text = $(this).text();
76 }); // End of find call
78 $(xml).find('status').each(function() {
79 resp_status = $(this).text();
80 }); // End of find call
81 setBotVoteMessage(message_text, resp_status);
83 </script>
84 </head>
85 <body>
87 <div id="body_content_center">
89 <div style="border-bottom: 1px solid #816943;">
90 <img src="<c:url value="/company/images/building_orange_roof.jpg" />" width="720" height="51" alt="Roof Logo" />
91 </div>
92 <h1 class="bot_titlelogo">Botverse - find interesting things online</h1>
94 <%-- Navigation Header --%>
95 <%@include file="/WEB-INF/jsps/general/default_navigation.jsp" %>
96 <%-- End of Navigation Header --%>
98 <div style="margin: 10px;">
100 <%-- Add Welcome user message and login content (above content border line) --%>
101 <%@include file="/WEB-INF/jsps/general/botverse_profile_nav.jsp" %>
102 <%-- End of Welcome Header --%>
104 <div id="link_content_group_botverse">
105 <!-- Display the error message -->
106 <div class="bot_profile_sect_add_link">
108 <%-- Build the table for entering the new department information --%>
109 <%@include file="/WEB-INF/jsps/general/botverse_navigation.jsp" %>
110 <%-- End of Table for Botverse Navigation Links --%>
112 <%-- Table Section including banner and search --%>
113 <table width="100%" cellspacing="0" cellpadding="0">
114 <tr>
115 <td>
116 <%-- Banner Section --%>
117 <c:choose>
118 <c:when test="${command.headline != null}" >
119 <div style="color: #444; font-size: 14pt; background-color: #e7f0f1; padding: 6px;">
120 <c:out value="${command.headline}" />
121 </div>
122 </c:when>
123 </c:choose>
124 <%-- End of Banner Section --%>
125 </td>
126 <td align="right" valign="top">
127 <!-- Begin Search Form -->
128 <div align="right">
129 <form method="get" action="<c:url value="/spring/search/search.html" />" name="newsearch">
130 <table class="botverse_search_wrapper">
131 <tr>
132 <td>
133 <input name="query" size="26" />
134 </td>
135 <td>
136 <input type="submit" value=" Search " />
137 </td>
138 </tr>
139 </table>
140 <input type="hidden" name="querymode" value="enabled" />
141 </form>
142 </div><!-- End of Form -->
143 </td>
144 </tr>
145 <tr>
146 <td colspan="2">
147 <%-- ============================== --%>
148 <%-- Display Media Table if enabled --%>
149 <%-- ============================== --%>
150 <c:if test="${command.mediaListEnabled}">
151 <div style="margin-top: 0px;">
152 <table cellspacing="0" cellpadding="2">
153 <tr>
154 <td width="100%">
155 <span style="background-color: #e8e8e8; padding: 4px; width: 100%;">
156 <b>related media feeds</b>
157 </span>
158 </td>
159 </tr>
160 <tr>
161 <td >
162 <%-- Additional Row to Hold Table Horizontal Media Section --%>
163 <table style="width: 100%; height: 100%;" cellspacing="0" cellpadding="0" border="0"><tr><td>
164 <c:forEach items="${command.mediaList}" var="curmedia" varStatus="status">
165 <td>
166 <%-- Media Section is made up table (image, title) --%>
167 <table cellspacing="0" cellpadding="12" width="100%" height="100%">
168 <tr><td style="background-color: #e7f0f1;">
169 <a href="<c:out value="${curmedia.media.mediaUrl}" />"
170 class="index_img">
171 <img src="<c:out value="${curmedia.media.imageThumbnail}" />" border="0" width="130" />
172 </a>
173 </td></tr>
174 <tr><td style="background-color: #f1f1f1; width: 100%;">
175 <b><c:out value='${botlistutil:getMaxWord(curmedia.media.mediaTitle, 22)}' /></b>
176 </td></tr>
177 </table>
178 <%-- End of Media Table --%>
179 </td>
180 </c:forEach>
181 </td></tr></table>
182 <%-- (end) Additional Row to Hold Table Horizontal Media Section --%>
183 </td>
184 </tr>
185 </table>
186 </div>
187 </c:if>
188 <%-- ============================== --%>
189 <%-- End of Display Media table --%>
190 <%-- ============================== --%>
191 </td>
192 </tr>
193 </table>
194 <%-- End of Table search/banner --%>
195 <form:form method="post" name="botverse_form">
196 <form:errors path="*" cssClass="general_field_error" />
197 <%-- === Ajax vote message === --%>
198 <div id="bot_msg_vote">
199 &nbsp;
200 </div>
201 <table class="linklist_data" cellspacing="2" cellpadding="0">
202 <c:forEach items="${command.listings}" var="listing" varStatus="status">
203 <%-- Begin row production for botverse links --%>
204 <tr>
205 <td colspan="3">
206 <span class="rating_area">
207 <c:out value="${listing.rating}" /> pts
208 </span>
209 <a class="linklist_objlinks" href="<c:url value="${listing.mainUrl}" />" >
210 <c:out value="${listing.urlTitle}" />
211 </a>
212 <%-- Add custom tag here, find hostname --%>
213 <span class="linklist_comments_host">
214 <%-- &nbsp;(<botlistutil:hostname value="${listing.mainUrl}" />) --%>
215 &nbsp;(<span class="home_source_label">source:</span> <c:out value="${listing.hostnameDisplay}" /> <a href="<c:out value="${listing.hostnameDisplayUrl}" />" class="linklist_comments_host">+</a>)
216 </span>
217 </td>
218 </tr>
219 <c:if test="${not empty listing.urlDescription}">
220 <%-- ======================== --%>
221 <%-- == Updated: 2/2/2008; Add URL description text --%>
222 <%-- ======================== --%>
223 <tr>
224 <td>
225 <div class="home_descr_left">
226 <span style="background-color: #ffcc66"><b>about:</b></span> <c:out value="${listing.urlDescription}" />
227 </div>
228 </td>
229 </tr>
230 </c:if>
231 <tr>
232 <td>
233 <!-- Inner table for data/status information -->
234 <table>
235 <tr>
236 <td>
237 <div style="margin-left: 10px;" class="linklist_comments_txt">
238 <c:set var="curStatusCount" value="${status.count}" />
239 <c:set var="curPageOffset" value="${command.pagingform.pageOffset}" />
240 <%-- ============== Vote Section ============= --%>
241 <table cellspacing="0" cellpadding="0"><tr>
242 <td>
243 <b><c:out value="${curStatusCount + curPageOffset}" /># &nbsp;</b>
244 </td>
245 <td valign="top" style="padding-right: 4px;">
246 <%-- Temp location for ranking --%>
247 <b><span class="linklist_comments_date">mod</span></b> <span style="color: green; font-size: 10px"></span>
248 </td>
249 <td style="padding-right: 4px;" valign="bottom">
250 <a href="javascript: submitAjaxVote('upvote', <c:out value='${listing.id}' />)" class="linklist_sample">
252 </a> /
253 </td>
254 <td style="border-right: 1px solid #e4e4e4; padding-right: 2px;" valign="bottom">
255 <a href="javascript: submitAjaxVote('downvote', <c:out value='${listing.id}' />)" class="linklist_sample">
257 </a>
258 </td></tr>
259 </table>
260 <%-- End Temp location for ranking --%>
261 <%-- ============== Vote Section (end) ============= --%>
262 </div>
263 </td>
264 <td>
265 <div class="linklist_comments_txt">
266 <span class="linklist_comments_date">
267 <botlistutil:timePast dateValue="${listing.createdOn.time}" />
268 on <fmt:formatDate pattern="EE MMM, dd" value="${listing.createdOn.time}" />
269 </span>
270 </div>
271 </td>
272 <td>
273 <span class="linklist_comments">
274 <a class="linklist_comments" href="<c:url value="/spring/botverse/linkviewcomments.html?viewid=${listing.id}&amp;commentsct=${fn:length(listing.listings)}" />">[!] comments (<c:out value="${fn:length(listing.listings)}" />)</a>
275 </span>
276 | <span class="linklist_comments"><a class="linklist_comments" href="<c:url value="/spring/botverse/linkaddcomment.html?viewid=${listing.id}" />">add comment</a></span>
277 <%-- Print the UserName --%>
278 <span style="margin-left: 2px; font-size: 10px">
279 <span class="linklist_comments_date"><strong>by
280 <%-- ================================= --%>
281 <%-- Display username if anonymous user %>
282 <%-- Otherwise display 'link' to user's links --%>
283 <%-- ================================= --%>
284 <c:choose>
285 <c:when test="${listing.coreUsername != null}" >
286 <a href="<c:url value="/spring/profile/overview.html?username=${listing.coreUsername}" />" class="link_userprof">
287 <c:out value="${listing.fullName}" />
288 </a>
289 </c:when>
290 <c:otherwise>
291 <c:out value="${listing.fullName}" />
292 </c:otherwise>
293 </c:choose>
294 <%-- ==== End of user links --%>
295 </strong>
296 </span>
297 <%-- ================================= --%>
298 <%-- Display category name, eg 'politics' --%>
299 <c:choose>
300 <c:when test="${listing.linkCategory != null}" >
301 &nbsp;<span class="linklist_comments_date" style="color: black; background-color: <c:out value="${listing.linkCategory.categoryColor}" />">
302 <c:out value="${listing.linkCategory.categoryName}" />
303 </span>
304 </c:when>
305 </c:choose>
306 <%--================================= --%>
307 </span>
308 </td>
309 </tr>
310 </table>
311 <!-- End of inner table (loop) -->
312 </td>
313 </tr>
314 <%-- End row production for botverse links --%>
315 </c:forEach>
316 </table>
318 <form:hidden path="operation" />
319 <form:hidden path="ratingId" />
321 </form:form>
323 <%-- ==== Section for paging ==== --%>
324 <div id="linklist_paging">
325 (view more) /
326 <a href="<c:url value="/spring/botverse/botverse.html?offsetpage=0" />">first</a>
327 <c:forEach begin="${command.pagingform.begin}"
328 end="${command.pagingform.end}" var="page" varStatus="status">
329 &nbsp;/ [<span class="linklist_paging_pg">
330 <a href="<c:url value="/spring/botverse/botverse.html?offsetpage=${page}" />">pg <c:out value="${page+1}" /></a>
331 </span>]
332 </c:forEach> /
333 <a href="<c:url value="/spring/botverse/botverse.html?offsetpage=${command.pagingform.begin+2}" />">next</a>
334 </div>
335 <%-- ==== End of Paging ==== --%>
337 <%-- End DIV (bot_profile_sect_add_link) --%>
338 </div>
340 </div>
341 </div>
343 <%@include file="/WEB-INF/jsps/general/default_footer.jsp"%>
344 <%-- End DIV (body_content_center) --%>
345 </div>
347 <%-- Debug, how long to process page --%>
348 <div style="font-size: 10px; color: #888;text-align: right">
349 <i>(process in <c:out value="${processingtime}" />s)</i>
350 </div>
352 <div>
353 <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
354 </script>
355 <script type="text/javascript">
356 _uacct = "UA-286501-2";
357 urchinTracker();
358 </script>
359 </div>
361 </body>
362 </html>