Author: jonathan Date: Mon Sep 8 20:56:07 2008 New Revision: 21599 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=21599
Log: MASHUP-1107: - Added feed links for home page to correspond with the queries on that page. - Added feed links for user and mashup pages. - Added feed icons to Recent Activity on mashup.jsp - Cleaned up some mismatched tags in mashup.jsp. - Changed "Recent" activity to be 30 days, not just 7. Added a little padding at the bottom of each page. Modified: trunk/mashup/java/modules/www/activity.jsp trunk/mashup/java/modules/www/css/styles.css trunk/mashup/java/modules/www/index.jsp trunk/mashup/java/modules/www/mashup.jsp trunk/mashup/java/modules/www/user.jsp Modified: trunk/mashup/java/modules/www/activity.jsp URL: http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/www/activity.jsp?rev=21599&r1=21598&r2=21599&view=diff ============================================================================== --- trunk/mashup/java/modules/www/activity.jsp (original) +++ trunk/mashup/java/modules/www/activity.jsp Mon Sep 8 20:56:07 2008 @@ -29,7 +29,7 @@ String title = request.getParameter("title"); String user = request.getParameter("user"); String queryPath = MashupConstants.ACTIVITY_QUERY_PATH; - String[] params = {mashupPath, "all", user, "7"}; + String[] params = {mashupPath, "all", user, "30"}; UserRegistry userRegistry = RegistryUtils.getRegistry(request); results = RegistryUtils.doQuery(userRegistry, title, queryPath, params, MashupConstants.SHOW_RESULTS_COUNT); Modified: trunk/mashup/java/modules/www/css/styles.css URL: http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/www/css/styles.css?rev=21599&r1=21598&r2=21599&view=diff ============================================================================== --- trunk/mashup/java/modules/www/css/styles.css (original) +++ trunk/mashup/java/modules/www/css/styles.css Mon Sep 8 20:56:07 2008 @@ -749,6 +749,7 @@ padding-top: 0px; padding-bottom: 8px; padding-right: 0px; + margin-bottom: 2em; clear:both; } Modified: trunk/mashup/java/modules/www/index.jsp URL: http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/www/index.jsp?rev=21599&r1=21598&r2=21599&view=diff ============================================================================== --- trunk/mashup/java/modules/www/index.jsp (original) +++ trunk/mashup/java/modules/www/index.jsp Mon Sep 8 20:56:07 2008 @@ -47,8 +47,18 @@ <title><%= bundle.getString("main.title")%> - Home</title> <!--Adding the site RSS feed, which subscribes the user to the list of mashups available.--> -<link rel="alternate" type="application/atom+xml" title="<%= bundle.getString("main.title")%> - Available Mashups" href="search.jsp?query=mashups&format=rss" /> +<% + UserQuery[] queries = userProfile.getQueries(); + for (int i = 0; i < queries.length; i++) { + String queryPath = queries[i].getQueryPath(); + String[] params = queries[i].getQueryParameters(); + String title = queries[i].getTitle(); + String p = QueryParamUtils.paramsFromQuery(queryPath, params); +%> +<link rel="alternate" type="application/atom+xml" title="<%= title%> (RSS)" href="search.jsp?<%=p %>&format=rss" /> +<link rel="alternate" type="application/atom+xml" title="<%= title%> (Atom)" href="search.jsp?<%=p %>&format=atom" /> +<% } %> <!-- Required CSS --> <link href="css/styles.css" rel="stylesheet" type="text/css"/> @@ -165,12 +175,13 @@ <% int nextId = 0; QueryResults results; - UserQuery[] queries = userProfile.getQueries(); + queries = userProfile.getQueries(); for (int i = 0; i < queries.length; i++) { String queryPath = queries[i].getQueryPath(); String[] params = queries[i].getQueryParameters(); String title = queries[i].getTitle(); + String p = QueryParamUtils.paramsFromQuery(queryPath, params); boolean commentsQuery = queryPath.equals(MashupConstants.COMMENTS_QUERY_PATH) || queryPath.equals(MashupConstants.MY_COMMENTS_QUERY_PATH) || @@ -187,11 +198,11 @@ <td> <div class="heading"><%= title%> <span class="edit-link"><a - href="search.jsp?<%=QueryParamUtils.paramsFromQuery(queryPath, params)%>&format=rss" - target="_blank"><img title="RSS feed" src="images/rss.png"/></a></span> + href="search.jsp?<%=p %>&format=rss" + target="_blank"><img title="<%= title%> (RSS)" src="images/rss.png"/></a></span> <span class="edit-link"><a - href="search.jsp?<%=QueryParamUtils.paramsFromQuery(queryPath, params)%>&format=atom" - target="_blank"><img title="Atom feed" src="images/atom.png"/></a></span> + href="search.jsp?<%=p%>&format=atom" + target="_blank"><img title="<%= title%> (Atom)" src="images/atom.png"/></a></span> </div> </td> <td valign="bottom" style="vertical-align: bottom;"> Modified: trunk/mashup/java/modules/www/mashup.jsp URL: http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/www/mashup.jsp?rev=21599&r1=21598&r2=21599&view=diff ============================================================================== --- trunk/mashup/java/modules/www/mashup.jsp (original) +++ trunk/mashup/java/modules/www/mashup.jsp Mon Sep 8 20:56:07 2008 @@ -86,6 +86,10 @@ <!-- Required CSS --> <link href="css/styles.css" rel="stylesheet" type="text/css"/> +<!-- Feed links --> +<link rel="alternate" type="application/atom+xml" title="Recent Activity on <%=mashup%> by <%=authorFullName%> (RSS)" href="search.jsp?query=activity&onmashup=<%=path%>&activity=all&period=30&format=rss" /> +<link rel="alternate" type="application/atom+xml" title="Recent Activity on <%=mashup%> by <%=authorFullName%> (Atom)" href="search.jsp?query=activity&onmashup=<%=path%>&activity=all&period=30&format=atom" /> + <!--Required JavaScript--> <script language="javascript" src="js/common.js" type="text/javascript"></script> <script language="javascript" src="js/prototype.js" type="text/javascript"></script> @@ -348,361 +352,373 @@ <%@ include file="searchbox.jsp" %> <table width="100%" border="0" cellspacing="0" cellpadding="0"> - <tr> - <td><div id="content"> -<table height="400" border="0" cellspacing="0" cellpadding="5"> -<tr> -<td valign="top"> - -<div class="mashup"> -<div class="mashup_title"><%=mashup%> -</div> - -<table> -<tr> - <td class="mashup_label"> - <nobr>author:</nobr> - </td> - <td> - <div class="mashup_author"><a href="user.jsp?name=<%=author%>"><%=authorFullName%></a></div> - </td> -</tr> -<tr> - <td class="mashup_label"> - <nobr>rating:</nobr> - </td> - <td> - <div class="mashup_details"> - <% String id = "rating"; %> - <%@ include file="rating.jsp" %> - </div> - </td> -</tr> -<tr> - <td class="mashup_label"> - <nobr>description:</nobr> - </td> - <td> - <div class="mashup_description"> - <span id="editDescription"> - <span id="editDescription_value"><%=description%></span> -<% if (currentUser.equals(author)) { %> - <span class="edit-link">[<a href="#" onclick="makeEditable('editDescription')">edit</a>]</span> -<% } %> - </span> - <span id="editDescription_input" style="display:none"> - <textarea id="editDescription_input_text"><%=description%> - </textarea> - <span class="edit-link">[<a href="#" - onclick="cancelEditable('editDescription')">cancel</a>]</span> - <span class="edit-link">[<a href="#" - onclick="saveEditable('editDescription', 'description', '<%=mashup%>')">save</a>]</span> - <br/> - <span class="mashup_label">(accepts some html markup)</span> - </span> - </div> - </td> -</tr> + <tr> + <td> + <div id="content"> + <table height="400" border="0" cellspacing="0" cellpadding="5"> + <tr> + <td valign="top"> -<tr> - <td class="mashup_label"> - <nobr>tags:</nobr> - </td> - <td id="tags_area"> - <div class="link-cloud" id="taglist"> - - <% org.wso2.registry.Tag[] tags = userRegistry.getTags(resource.getPath()); - - if (tags.length == 0) { %> - -none- - <% } - for (int i = 0; i < tags.length; i++) { - Tag tag = tags[i]; - String name = tag.getTagName(); - boolean canDelete = (author.equals(currentUser)); - - if (!canDelete) { - QueryResults isTagger = RegistryUtils.doQuery(userRegistry, - "User has permission to delete?", - MashupConstants.USER_TAGS_QUERY_PATH, - new String[] { path, - name, - currentUser }, - MashupConstants.MAX_RESULTS_COUNT); - canDelete = !(isTagger.getResults().isEmpty()); - } %> - <a class="link-cloud2" href="search.jsp?query=mashups&for=<%=name%>&tags=true"><%=name%></a><% - if (canDelete) { - %> <span class="edit-link"><img src="images/smalldelete.gif" alt="remove this tag" onClick="removeTag('<%=name%>')"/></span><% - } else if (RegistryUtils.isAdminRole(userRegistry)) { - %> <span class="edit-link"><img src="images/smalldelete.gif" alt="remove this tag" onClick="WSO2.MashupUtils.showTagDeletionDialog('<%=name%>')"/></span><% - } - if (i < tags.length - 1) out.print(","); %> <% - } %> - </div> - <% if (RegistryUtils.isLoggedIn(userRegistry)) { %> - <div id="addtag"> - <div> - <input type="hidden" value="<%=path%>" id="addtag_path"/> - <input type="hidden" value="<%=currentUser%>" id="addtag_tagger"/> - <input type="text" size="30" value="" id="addtag_tag" onkeydown="checkEnter(event)"/> - <input type="submit" id="addtag_submit" value="Tag" onClick="addTag()"/> - <a class="help" title="Separate tags with commas to enter more than one at a time. Unless you are an administrator or the author of this mashup, you will only be able to delete the tags you've added."><img src="images/blank.gif"/></a> - </div> - </div> - <% } %> - </td> -</tr> -<tr> - <td class="mashup_label"> - - <nobr>human resources:</nobr> - - </td> - <td> - <div class="mashup_details"> - <ul> - <li id="custom_ui_link">A custom HTML interface has not been provided for this service.</li> - - <!--Checking whether a custom UI is available for this Mashup--> - <script type="text/javascript"> - function customUiCallback() { - document.getElementById("custom_ui_link").innerHTML = - 'View the custom <a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>/" target="_blank">HTML Interface</a> to this service.'; - } - - isCustomUiAvailable('<%=mashupServerURL%><%=author%>/<%= mashup %>', customUiCallback); - </script> - - <li><a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?tryit" - target="_blank">Try-it</a> page for this service. - </li> - - <li id="custom_gadget_link" style="display:none"></li> - - <!--Checking whether a custom Google Gadget is available for this Mashup--> - <script type="text/javascript"> - function customGadgetCallback() { - document.getElementById("custom_gadget_link").innerHTML = - 'View the custom <a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>/gadget.xml" target="_blank">Google Gadget</a> for this service.' + - ' <a class="help" title="Copy this link into a Google Gadget container such as iGoogle.com."><img src="images/blank.gif"/></a>'; - document.getElementById("custom_gadget_link").style.display = "list-item"; - } - - isGadgetAvailable('<%=mashupServerURL%><%=author%>/<%= mashup %>', customGadgetCallback); - </script> - - <li><a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?gadget" - target="_blank">Try-it</a> Google Gadget for this services. - <a class="help" title="Copy this link into a Google Gadget container such as iGoogle.com."><img src="images/blank.gif"/></a> - </li> - <li>Read <a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?doc" - target="_blank">API documentation</a> for this service. - </li> - <li>View the <a - href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?source&content-type=text/plain" - target="_blank">source code</a>.</li> - <li><a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?template&flavor=html">Source code template</a> - for building an HTML interface for this service. - <a class="help" title="Get started on a custom interface to this service with this HTML template."><img src="images/blank.gif"/></a> - </li> - <li><a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?template&flavor=googlegadget">Source code template</a> - for building a Google Gadget for this service. - <a class="help" title="Get started on a Google Gadget interface to this service with this template."><img src="images/blank.gif"/></a> - </li> - </ul> + <div class="mashup"> + <div class="mashup_title"><%=mashup%></div> - </div> - </td> -</tr> -<tr> - <td class="mashup_label"> - <nobr>machine resources:</nobr> - </td> - <td> - <div class="mashup_details"> - <ul> - <li><a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?wsdl2&annotation=true">WSDL 2.0</a> - (<a - href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?wsdl2">raw</a>) - </li> - <li><a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?wsdl&annotation=true">WSDL 1.1</a> - (<a - href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?wsdl">raw</a>) - </li> - <li><a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?xsd&annotation=true">XML Schema</a> - (<a - href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?xsd">raw</a>) - </li> - <li><a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?stub&content-type=text/plain">Javascript - (DOM) stub</a> - <a class="help" title="This stub exposes XML elements as DOM objects, and is optimum for use in a cross-browser Web page."><img src="images/blank.gif"/></a> - </li> - <li><a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?stub&lang=e4x&content-type=text/plain">Javascript - (E4X) stub</a> - <a class="help" title="This stub exposes XML elements as E4X XML objects, and is optimum for a Web page for use in Firefox, or for importing into a Mashup with a fixed IP address."><img src="images/blank.gif"/></a> - </li> - <li><a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?stub&lang=e4x&localhost=true&content-type=text/plain">Javascript - (E4X) stub using "localhost" endpoints</a> - <a class="help" title="This stub exposes XML elements as E4X XML objects, and is optimum for importing into a Mashup hosted on this Mashup Server."><img src="images/blank.gif"/></a> - </li> - </ul> - </div> - </td> -</tr> -<% - //Service transports handling will only be available to the service author and admins - Boolean manageTransports = ((author.equals(currentUser)) || (RegistryUtils.isAdminRole(userRegistry))) && - MashupUtils.isMashupActive(mashupServiceName); -%> -<tr> - <td class="mashup_label"> - <nobr>configuration:</nobr> - </td> - <td id="transports_area"> - <div class="mashup_details"> - <ul> - <% - Iterator availableTransports = MashupUtils.getAvailableAxisTransports().values().iterator(); - TransportInDescription currentTransport; - int transportCount = 0; - ServerConfiguration serverConfig = ServerConfiguration.getInstance(); - String allowHttpAccess = serverConfig.getFirstProperty("Management.AllowHTTPAccess"); - boolean allowHttp = JavaUtils.isFalseExplicitly(allowHttpAccess); - while(availableTransports.hasNext()){ - currentTransport = (TransportInDescription)availableTransports.next(); - String transportName = currentTransport.getName(); - if (!(allowHttp && "http".equals(transportName))) { - if(MashupUtils.isTransportExposed(mashupServiceName, transportName)){ - %> - <li> - <div id="transport_<%=transportCount%>"> - <b><%=transportName%></b> transport is <span class="transport-enabled">enabled</span> for this service. <% if (manageTransports) { %>[<a href="#" onclick="disableTransport('<%=mashupServiceName%>', '<%=(currentTransport).getName()%>', 'transport_<%=transportCount%>');">Disable</a>]<% } %> - </div> - </li> - <% - }else{ - %> - <li> - <div id="transport_<%=transportCount%>"> - <b><%=transportName%></b> transport is <span class="transport-disabled">disabled</span> for this service. <% if (manageTransports) { %>[<a href="#" onclick="enableTransport('<%=mashupServiceName%>', '<%=(currentTransport).getName()%>', 'transport_<%=transportCount%>');">Enable</a>]<% } %> - </div> - </li> - <% - } - } - transportCount++; - } - if (manageTransports) { %> - <li><a href="service_security_manager.jsp?bounceback=<%=URLEncoder.encode(thisPage, "UTF-8")%>&author=<%=mashupOwner%>&mashup=<%=mashup%>">Configure Security Scenarios</a></li> - <% } %> - </ul> - </div> - </td> -</tr> + <table> + <tr> + <td class="mashup_label"> + <nobr>author:</nobr> + </td> + <td> + <div class="mashup_author"><a href="user.jsp?name=<%=author%>"><%=authorFullName%></a></div> + </td> + </tr> + <tr> + <td class="mashup_label"> + <nobr>rating:</nobr> + </td> + <td> + <div class="mashup_details"> + <% String id = "rating"; %> + <%@ include file="rating.jsp" %> + </div> + </td> + </tr> + <tr> + <td class="mashup_label"> + <nobr>description:</nobr> + </td> + <td> + <div class="mashup_description"> + <span id="editDescription"> + <span id="editDescription_value"><%=description%></span> + <% if (currentUser.equals(author)) { %> + <span class="edit-link">[<a href="#" onclick="makeEditable('editDescription')">edit</a>]</span> + <% } %> + </span> + <span id="editDescription_input" style="display:none"> + <textarea id="editDescription_input_text"><%=description%></textarea> + <span class="edit-link">[<a href="#" + onclick="cancelEditable('editDescription')">cancel</a>]</span> + <span class="edit-link">[<a href="#" + onclick="saveEditable('editDescription', 'description', '<%=mashup%>')">save</a>]</span> + <br/> + <span class="mashup_label">(accepts some html markup)</span> + </span> + </div> + </td> + </tr> + + <tr> + <td class="mashup_label"> + <nobr>tags:</nobr> + </td> + <td id="tags_area"> + <div class="link-cloud" id="taglist"> + + <% org.wso2.registry.Tag[] tags = userRegistry.getTags(resource.getPath()); + + if (tags.length == 0) { %> + -none- + <% } + for (int i = 0; i < tags.length; i++) { + Tag tag = tags[i]; + String name = tag.getTagName(); + boolean canDelete = (author.equals(currentUser)); + + if (!canDelete) { + QueryResults isTagger = RegistryUtils.doQuery(userRegistry, + "User has permission to delete?", + MashupConstants.USER_TAGS_QUERY_PATH, + new String[] { path, + name, + currentUser }, + MashupConstants.MAX_RESULTS_COUNT); + canDelete = !(isTagger.getResults().isEmpty()); + } %> + <a class="link-cloud2" href="search.jsp?query=mashups&for=<%=name%>&tags=true"><%=name%></a><% + if (canDelete) { + %> <span class="edit-link"><img src="images/smalldelete.gif" alt="remove this tag" onClick="removeTag('<%=name%>')"/></span><% + } else if (RegistryUtils.isAdminRole(userRegistry)) { + %> <span class="edit-link"><img src="images/smalldelete.gif" alt="remove this tag" onClick="WSO2.MashupUtils.showTagDeletionDialog('<%=name%>')"/></span><% + } + if (i < tags.length - 1) out.print(","); %> <% + } %> + </div> + <% if (RegistryUtils.isLoggedIn(userRegistry)) { %> + <div id="addtag"> + <div> + <input type="hidden" value="<%=path%>" id="addtag_path"/> + <input type="hidden" value="<%=currentUser%>" id="addtag_tagger"/> + <input type="text" size="30" value="" id="addtag_tag" onkeydown="checkEnter(event)"/> + <input type="submit" id="addtag_submit" value="Tag" onClick="addTag()"/> + <a class="help" title="Separate tags with commas to enter more than one at a time. Unless you are an administrator or the author of this mashup, you will only be able to delete the tags you've added."><img src="images/blank.gif"/></a> + </div> + </div> + <% } %> + </td> + </tr> + <tr> + <td class="mashup_label"> + + <nobr>human resources:</nobr> + + </td> + <td> + <div class="mashup_details"> + <ul> + <li id="custom_ui_link">A custom HTML interface has not been provided for this service.</li> + + <!--Checking whether a custom UI is available for this Mashup--> + <script type="text/javascript"> + function customUiCallback() { + document.getElementById("custom_ui_link").innerHTML = + 'View the custom <a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>/" target="_blank">HTML Interface</a> to this service.'; + } + + isCustomUiAvailable('<%=mashupServerURL%><%=author%>/<%= mashup %>', customUiCallback); + </script> + + <li><a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?tryit" + target="_blank">Try-it</a> page for this service. + </li> + + <li id="custom_gadget_link" style="display:none"></li> + + <!--Checking whether a custom Google Gadget is available for this Mashup--> + <script type="text/javascript"> + function customGadgetCallback() { + document.getElementById("custom_gadget_link").innerHTML = + 'View the custom <a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>/gadget.xml" target="_blank">Google Gadget</a> for this service.' + + ' <a class="help" title="Copy this link into a Google Gadget container such as iGoogle.com."><img src="images/blank.gif"/></a>'; + document.getElementById("custom_gadget_link").style.display = "list-item"; + } + + isGadgetAvailable('<%=mashupServerURL%><%=author%>/<%= mashup %>', customGadgetCallback); + </script> + + <li><a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?gadget" + target="_blank">Try-it</a> Google Gadget for this services. + <a class="help" title="Copy this link into a Google Gadget container such as iGoogle.com."><img src="images/blank.gif"/></a> + </li> + <li>Read <a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?doc" + target="_blank">API documentation</a> for this service. + </li> + <li>View the <a + href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?source&content-type=text/plain" + target="_blank">source code</a>.</li> + <li><a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?template&flavor=html">Source code template</a> + for building an HTML interface for this service. + <a class="help" title="Get started on a custom interface to this service with this HTML template."><img src="images/blank.gif"/></a> + </li> + <li><a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?template&flavor=googlegadget">Source code template</a> + for building a Google Gadget for this service. + <a class="help" title="Get started on a Google Gadget interface to this service with this template."><img src="images/blank.gif"/></a> + </li> + </ul> + + </div> + </td> + </tr> + <tr> + <td class="mashup_label"> + <nobr>machine resources:</nobr> + </td> + <td> + <div class="mashup_details"> + <ul> + <li><a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?wsdl2&annotation=true">WSDL 2.0</a> + (<a + href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?wsdl2">raw</a>) + </li> + <li><a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?wsdl&annotation=true">WSDL 1.1</a> + (<a + href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?wsdl">raw</a>) + </li> + <li><a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?xsd&annotation=true">XML Schema</a> + (<a + href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?xsd">raw</a>) + </li> + <li><a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?stub&content-type=text/plain">Javascript + (DOM) stub</a> + <a class="help" title="This stub exposes XML elements as DOM objects, and is optimum for use in a cross-browser Web page."><img src="images/blank.gif"/></a> + </li> + <li><a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?stub&lang=e4x&content-type=text/plain">Javascript + (E4X) stub</a> + <a class="help" title="This stub exposes XML elements as E4X XML objects, and is optimum for a Web page for use in Firefox, or for importing into a Mashup with a fixed IP address."><img src="images/blank.gif"/></a> + </li> + <li><a href="<%=httpUrl%><%=mashupServerURL%><%=author%>/<%= mashup %>?stub&lang=e4x&localhost=true&content-type=text/plain">Javascript + (E4X) stub using "localhost" endpoints</a> + <a class="help" title="This stub exposes XML elements as E4X XML objects, and is optimum for importing into a Mashup hosted on this Mashup Server."><img src="images/blank.gif"/></a> + </li> + </ul> + </div> + </td> + </tr> + <% + //Service transports handling will only be available to the service author and admins + Boolean manageTransports = ((author.equals(currentUser)) || (RegistryUtils.isAdminRole(userRegistry))) && + MashupUtils.isMashupActive(mashupServiceName); + %> + <tr> + <td class="mashup_label"> + <nobr>configuration:</nobr> + </td> + <td id="transports_area"> + <div class="mashup_details"> + <ul> + <% + Iterator availableTransports = MashupUtils.getAvailableAxisTransports().values().iterator(); + TransportInDescription currentTransport; + int transportCount = 0; + ServerConfiguration serverConfig = ServerConfiguration.getInstance(); + String allowHttpAccess = serverConfig.getFirstProperty("Management.AllowHTTPAccess"); + boolean allowHttp = JavaUtils.isFalseExplicitly(allowHttpAccess); + while(availableTransports.hasNext()){ + currentTransport = (TransportInDescription)availableTransports.next(); + String transportName = currentTransport.getName(); + if (!(allowHttp && "http".equals(transportName))) { + if(MashupUtils.isTransportExposed(mashupServiceName, transportName)){ + %> + <li> + <div id="transport_<%=transportCount%>"> + <b><%=transportName%></b> transport is <span class="transport-enabled">enabled</span> for this service. <% if (manageTransports) { %>[<a href="#" onclick="disableTransport('<%=mashupServiceName%>', '<%=(currentTransport).getName()%>', 'transport_<%=transportCount%>');">Disable</a>]<% } %> + </div> + </li> + <% + }else{ + %> + <li> + <div id="transport_<%=transportCount%>"> + <b><%=transportName%></b> transport is <span class="transport-disabled">disabled</span> for this service. <% if (manageTransports) { %>[<a href="#" onclick="enableTransport('<%=mashupServiceName%>', '<%=(currentTransport).getName()%>', 'transport_<%=transportCount%>');">Enable</a>]<% } %> + </div> + </li> + <% + } + } + transportCount++; + } + if (manageTransports) { %> + <li><a href="service_security_manager.jsp?bounceback=<%=URLEncoder.encode(thisPage, "UTF-8")%>&author=<%=mashupOwner%>&mashup=<%=mashup%>">Configure Security Scenarios</a></li> + <% } %> + </ul> + </div> + </td> + </tr> </table> </div> -<br/> - -<div id="comments_area"> -<div id="comments" class="usergenerated"> -<div class="heading">Comments</div> -<img src="images/blank.gif" width="10" height="5"/> + <br/> + <div id="comments_area"> + <div id="comments" class="usergenerated"> + <div class="heading">Comments</div> + <img src="images/blank.gif" width="10" height="5"/> + + + <% + Comment[] comments = userRegistry.getComments(resource.getPath()); + %> + + <table width="95%" border="0" cellpadding="3" cellspacing="0" class="data"> + <tbody> + <tr> + <td width="10%" class="headers_left">Date</td> + <td width="16%" class="headers">Author</td> + <td class="headers">Comment</td> + <td class="headers_right" width="86" nowrap=""></td> + </tr> -<% - Comment[] comments = userRegistry.getComments(resource.getPath()); -%> - - <table width="95%" border="0" cellpadding="3" cellspacing="0" class="data"> - - <tbody> - <tr> - <td width="10%" class="headers_left">Date</td> - <td width="16%" class="headers">Author</td> - <td class="headers">Comment</td> - <td class="headers_right" width="86" nowrap=""></td> - </tr> - - <% - for (int i = 0; i < comments.length; i++) { - Comment c = comments[i]; - String commenter = c.getUser(); - String text = c.getText(); - %> - - <tr class="results"> - <td nowrap class="left"><%=QueryParamUtils.friendlyDate(c.getTime())%></td> - <td nowrap><a href="user.jsp?name=<%=commenter%>"><%= RegistryUtils - .getFullName(request, commenter) %></a> (<%=commenter%>) - </td> - <td class="right" colspan="2"> - <%= MashupUtils.makeWrappable(text, 60) %> <% - if (author.equals(currentUser) || commenter.equals(currentUser) || RegistryUtils.isAdminRole(userRegistry)) { - String shortCommentText; - if (text.length() > 40) { - shortCommentText = text.substring(0,40) + "..."; - } else { - shortCommentText = text; - } - %> <span class="edit-link"><img src="images/smalldelete.gif" alt="remove this comment" onClick="removeComment('<%=c.getCommentPath()%>', '<%=shortCommentText%>')"/></span><% - } + for (int i = 0; i < comments.length; i++) { + Comment c = comments[i]; + String commenter = c.getUser(); + String text = c.getText(); %> - </td> - </tr> - - <% } %> - - </tbody> - </table> -</div> - <div id="postcomment"> - - <% if (RegistryUtils.isLoggedIn(userRegistry)) { %> - <input type="hidden" name="path" value="<%= path %>" id="Comment_path"/> - <input type="hidden" value="<%=currentUser%>" id="Comment_commenter"/> - <input type="text" name="commentText" size="70" id="Comment_commentText" maxlength="500" onkeydown="checkCommentEnter(event)"/> - <input type="submit" id="Comment_submit" value="Post comment" onclick="addComment()"/> - <% } else { %> - <a href="signin.jsp?bounceback=<%=URLEncoder.encode(thisPage, "UTF-8")%>">Sign in</a> to tag this service or to post a comment. - <% } %> - - </div> -<div id="recent" class="usergenerated"> - <div class="heading">Recent Activity</div> - <img src="images/blank.gif" width="10" height="5"/> - <jsp:include page="activity.jsp"> - <jsp:param name="mashup_path" value="<%=path%>"/> - <jsp:param name="title" value="Recent Activity"/> - </jsp:include> -</div> -</div> -<br/> -</td> + <tr class="results"> + <td nowrap class="left"><%=QueryParamUtils.friendlyDate(c.getTime())%></td> + <td nowrap><a href="user.jsp?name=<%=commenter%>"><%= RegistryUtils + .getFullName(request, commenter) %></a> (<%=commenter%>) + </td> + <td class="right" colspan="2"> + <%= MashupUtils.makeWrappable(text, 60) %> + <% + if (author.equals(currentUser) || commenter.equals(currentUser) || RegistryUtils.isAdminRole(userRegistry)) { + String shortCommentText; + if (text.length() > 40) { + shortCommentText = text.substring(0,40) + "..."; + } else { + shortCommentText = text; + } + %> <span class="edit-link"><img src="images/smalldelete.gif" alt="remove this comment" onClick="removeComment('<%=c.getCommentPath()%>', '<%=shortCommentText%>')"/></span><% + } + %> + </td> + </tr> -</tr> -</table> + <% } %> -</div></td> -<td><div id="taskbar"> - <jsp:include page="taskbar.jsp"> - <jsp:param name="mashupServiceName" value="<%=mashupServiceName%>"/> - <jsp:param name="path" value="<%=path%>"/> - <jsp:param name="mashup" value="<%=mashup%>"/> - <jsp:param name="thisPage" value="<%=thisPage%>"/> - </jsp:include> -</div></td> - </tr> -</table> + </tbody> + </table> + </div> + <div id="postcomment"> + <% if (RegistryUtils.isLoggedIn(userRegistry)) { %> + <input type="hidden" name="path" value="<%= path %>" id="Comment_path"/> + <input type="hidden" value="<%=currentUser%>" id="Comment_commenter"/> + <input type="text" name="commentText" size="70" id="Comment_commentText" maxlength="500" onkeydown="checkCommentEnter(event)"/> + <input type="submit" id="Comment_submit" value="Post comment" onclick="addComment()"/> + <% } else { %> + <a href="signin.jsp?bounceback=<%=URLEncoder.encode(thisPage, "UTF-8")%>">Sign in</a> to tag this service or to post a comment. + <% } %> + </div> + <div id="recent" class="usergenerated"> + <% + String queryPath = MashupConstants.ACTIVITY_QUERY_PATH; + String[] queryParams = new String[] { + path, + "all", + null, + "30"}; + String p = QueryParamUtils.paramsFromQuery(queryPath, queryParams); + %> + <div class="heading">Recent Activity + <span class="edit-link"><a + href="search.jsp?<%= p%>&format=rss" + target="_blank"><img title="Recent Activity (RSS)" src="images/rss.png"/></a></span> + <span class="edit-link"><a + href="search.jsp?<%= p%>&format=atom" + target="_blank"><img title="Recent Activity (Atom)" src="images/atom.png"/></a></span> + </div> + </div> + <img src="images/blank.gif" width="10" height="5"/> + <jsp:include page="activity.jsp"> + <jsp:param name="mashup_path" value="<%=path%>"/> + <jsp:param name="title" value="Recent Activity"/> + </jsp:include> + </div> + <br/> + </td> + </tr> + </table> + </div> + </td> + <td> + <div id="taskbar"> + <jsp:include page="taskbar.jsp"> + <jsp:param name="mashupServiceName" value="<%=mashupServiceName%>"/> + <jsp:param name="path" value="<%=path%>"/> + <jsp:param name="mashup" value="<%=mashup%>"/> + <jsp:param name="thisPage" value="<%=thisPage%>"/> + </jsp:include> + </div> + </td> + </tr> +</table> <%@ include file="footer.jsp" %> -</div> + </div> </div> </body> </html> Modified: trunk/mashup/java/modules/www/user.jsp URL: http://wso2.org/svn/browse/wso2/trunk/mashup/java/modules/www/user.jsp?rev=21599&r1=21598&r2=21599&view=diff ============================================================================== --- trunk/mashup/java/modules/www/user.jsp (original) +++ trunk/mashup/java/modules/www/user.jsp Mon Sep 8 20:56:07 2008 @@ -86,6 +86,12 @@ <!-- Required CSS --> <link href="css/styles.css" rel="stylesheet" type="text/css"/> + <!-- Feed links --> + <link rel="alternate" type="application/atom+xml" title="<%= memberFullName %>'s Mashups (RSS)" href="search.jsp?query=mashups&scope=<%=memberName %>%>&format=rss" /> + <link rel="alternate" type="application/atom+xml" title="<%= memberFullName %>'s Mashups (Atom)" href="search.jsp?query=mashups&scope=<%=memberName %>%>&format=atom" /> + <link rel="alternate" type="application/atom+xml" title="<%= memberFullName %>'s Recent Activity (RSS)" href="search.jsp?query=activity&scope=<%=memberName %>&activity=all&period=30&format=rss" /> + <link rel="alternate" type="application/atom+xml" title="<%= memberFullName %>'s Recent Activity (Atom)" href="search.jsp?query=activity&scope=<%=memberName %>&activity=all&period=30&format=atom" /> + <!--Required JavaScript--> <script language="javascript" src="js/common.js" type="text/javascript"></script> <script language="javascript" src="js/prototype.js" type="text/javascript"></script> @@ -361,26 +367,22 @@ <td> <% - - - - String queryTitle = customizedAuthor + " Mashups"; String queryPath = MashupConstants.MY_MASHUPS_QUERY_PATH; String [] queryParams = new String[] {memberName}; - QueryResults results = RegistryUtils.doQuery(userRegistry, queryTitle, queryPath, queryParams, MashupConstants.SHOW_RESULTS_COUNT); - + String p = QueryParamUtils.paramsFromQuery(queryPath, queryParams); + QueryResults results = RegistryUtils.doQuery(userRegistry, queryTitle, queryPath, queryParams, MashupConstants.SHOW_RESULTS_COUNT); %> <div class="querypane"> <div class="heading"><%= queryTitle%> <span class="edit-link"><a - href="search.jsp?<%=QueryParamUtils.paramsFromQuery(queryPath, queryParams)%>&format=rss" - target="_blank"><img title="RSS feed" src="images/rss.png"/></a></span> + href="search.jsp?<%=p %>&format=rss" + target="_blank"><img title="<%= queryTitle%> (RSS)" src="images/rss.png"/></a></span> <span class="edit-link"><a - href="search.jsp?<%=QueryParamUtils.paramsFromQuery(queryPath, queryParams)%>&format=atom" - target="_blank"><img title="Atom feed" src="images/atom.png"/></a></span> + href="search.jsp?<%=p %>&format=atom" + target="_blank"><img title="<%= queryTitle %> (Atom)" src="images/atom.png"/></a></span> </div> <table width="95%" border="0" cellpadding="3" cellspacing="0" class="data"> <tbody> @@ -445,13 +447,29 @@ </div> <br> <div class="querypane-comment"> - <% String customizedTitle = customizedAuthor + " Recent Activity"; %> - <div class="heading"><%=customizedTitle%></div> + <% + queryTitle = customizedAuthor + " Recent Activity"; + queryPath = MashupConstants.ACTIVITY_QUERY_PATH; + queryParams = new String[] { + null, + "all", + memberName, + "30"}; + p = QueryParamUtils.paramsFromQuery(queryPath, queryParams); + %> + <div class="heading"><%=queryTitle%> + <span class="edit-link"><a + href="search.jsp?<%= p%>&format=rss" + target="_blank"><img title="<%=queryTitle%> (RSS)" src="images/rss.png"/></a></span> + <span class="edit-link"><a + href="search.jsp?<%= p%>&format=atom" + target="_blank"><img title="<%=queryTitle%> (Atom)" src="images/atom.png"/></a></span> + </div> <div id="activitylist"> <jsp:include page="activity.jsp"> <jsp:param name="mashup_path" value=""/> <jsp:param name="user" value="<%=memberName%>"/> - <jsp:param name="title" value="<%=customizedTitle%>"/> + <jsp:param name="title" value="<%=queryTitle%>"/> </jsp:include> </div> </div> _______________________________________________ Mashup-dev mailing list [email protected] http://mailman.wso2.org/cgi-bin/mailman/listinfo/mashup-dev
