[Rt-commit] r9669 - in rtfm/branches/2.3-EXPERIMENTAL: .
html/SelfService/Article
falcone at bestpractical.com
falcone at bestpractical.com
Wed Nov 14 17:03:40 EST 2007
Author: falcone
Date: Wed Nov 14 17:03:38 2007
New Revision: 9669
Modified:
rtfm/branches/2.3-EXPERIMENTAL/ (props changed)
rtfm/branches/2.3-EXPERIMENTAL/html/SelfService/Article/Search.html
rtfm/branches/2.3-EXPERIMENTAL/html/SelfService/Elements/SearchArticle
Log:
r26586 at ketch: falcone | 2007-11-14 16:42:23 -0500
* make the search box bigger
* make the search box on the search results page able to search
* tell users what they search for
* tell users if they didn't get any matches
Modified: rtfm/branches/2.3-EXPERIMENTAL/html/SelfService/Article/Search.html
==============================================================================
--- rtfm/branches/2.3-EXPERIMENTAL/html/SelfService/Article/Search.html (original)
+++ rtfm/branches/2.3-EXPERIMENTAL/html/SelfService/Article/Search.html Wed Nov 14 17:03:38 2007
@@ -19,12 +19,38 @@
<& /SelfService/Elements/Header, Title => loc('Search Articles') &>
<table>
+<form action="<%$RT::WebPath%>/SelfService/Article/Search.html">
<tr>
<td><&|/l&>Search for RTFM articles matching</&></td>
<td><input size=20 name="RTFM_Content" /></td>
+<td><input type="submit" value="Search"></td>
</tr>
+</form>
+
+<tr>
+<td> </td>
+<td>
+% if ($RTFM_Content) {
+% if ($articles_basics->Count || $articles_content->Count) {
+<&|/l,$RTFM_Content&>Articles matching [_1]</&>
+% } else {
+<&|/l,$RTFM_Content&>No Articles match [_1]</&>
+% }
+% }
+</td>
+</tr>
+
+% my %dedupe_articles;
+% while (my $article = $articles_content->Next) {
+% $dedupe_articles{$article->Id}++;
+<tr>
+<td> </td>
+<td><a href="Display.html?id=<%$article->Id%>"><%$article->Name || loc('(no name)')%>: <%$article->Summary%><a></td>
+</tr>
+% }
% while (my $article = $articles_basics->Next) {
+% next if $dedupe_articles{$article->Id};
<tr>
<td> </td>
<td><a href="Display.html?id=<%$article->Id%>"><%$article->Name || loc('(no name)')%>: <%$article->Summary%><a></td>
@@ -34,8 +60,7 @@
<%init>
use RT::FM::ArticleCollection;
-my $articles_content =
- RT::FM::ArticleCollection->new( $session{'CurrentUser'} );
+my $articles_content = RT::FM::ArticleCollection->new( $session{'CurrentUser'} );
my $articles_basics = RT::FM::ArticleCollection->new( $session{'CurrentUser'} );
if ( $ARGS{'RTFM_Content'} ) {
$articles_content->LimitCustomField( VALUE => $ARGS{'RTFM_Content'},
@@ -55,3 +80,6 @@
</%init>
+<%args>
+$RTFM_Content => ''
+</%args>
Modified: rtfm/branches/2.3-EXPERIMENTAL/html/SelfService/Elements/SearchArticle
==============================================================================
--- rtfm/branches/2.3-EXPERIMENTAL/html/SelfService/Elements/SearchArticle (original)
+++ rtfm/branches/2.3-EXPERIMENTAL/html/SelfService/Elements/SearchArticle Wed Nov 14 17:03:38 2007
@@ -46,7 +46,7 @@
%#
%# END BPS TAGGED BLOCK }}}
<form action="<%$RT::WebPath%>/SelfService/Article/Search.html">
-<input type="submit" class="button" value="<&|/l&>Search Article</&>" />
-<input size="4" name="RTFM_Content" />
+<input type="submit" class="button" value="<&|/l&>Search Articles</&>" />
+<input size="15" name="RTFM_Content" />
</form>
More information about the Rt-commit
mailing list