Author: kcardineaud Date: 2011-06-29 17:24:58 +0200 (Wed, 29 Jun 2011) New Revision: 143 Url: http://nuiton.org/repositories/revision/scmwebeditor/143 Log: Add a message when search address is not a repository Modified: trunk/src/main/webapp/Search.jsp Modified: trunk/src/main/webapp/Search.jsp =================================================================== --- trunk/src/main/webapp/Search.jsp 2011-06-29 15:16:59 UTC (rev 142) +++ trunk/src/main/webapp/Search.jsp 2011-06-29 15:24:58 UTC (rev 143) @@ -9,24 +9,37 @@ <sj:head jquerytheme="default"/> <div id="search"> -<p>Files in the SVN repository : </p> - <table> - <% - SearchAction action = SearchAction.getAction(); - - LinkedList<UrlSvnFile> files = action.getFiles(); - - Iterator<UrlSvnFile> it = files.iterator(); - - while(it.hasNext()) { - UrlSvnFile file = it.next(); - - %> - <tr><td> - <a href="checkout.action?address=<%=file%>" ><%=file+" "+file.getLevel()%></a> - - </td></tr> - <% } %> - - </table> + + <% + SearchAction action = SearchAction.getAction(); + + LinkedList<UrlSvnFile> files = action.getFiles(); + + Iterator<UrlSvnFile> it = files.iterator(); + + if(!files.isEmpty()) { + %> + <p>Files in the SVN repository : </p> + <% + while(it.hasNext()) { + UrlSvnFile file = it.next(); + %> + + <table> + <tr><td> + <a href="checkout.action?address=<%=file%>" ><%=file+" "+file.getLevel()%></a> + + </td></tr> + </table> + <% } + } + + else { + %> + + <p>This is not a repository.</p> + <% + } + %> + </div> \ No newline at end of file