projects
/
irspy-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add support for sorting.
[irspy-moved-to-github.git]
/
web
/
htdocs
/
details
/
found.mc
diff --git
a/web/htdocs/details/found.mc
b/web/htdocs/details/found.mc
index
a358498
..
e957091
100644
(file)
--- a/
web/htdocs/details/found.mc
+++ b/
web/htdocs/details/found.mc
@@
-1,4
+1,4
@@
-%# $Id: found.mc,v 1.4 2006-09-19 11:12:33 mike Exp $
+%# $Id: found.mc,v 1.5 2006-09-19 16:35:25 mike Exp $
<%once>
use XML::LibXML;
use XML::LibXML::XPathContext;
<%once>
use XML::LibXML;
use XML::LibXML::XPathContext;
@@
-15,6
+15,13
@@
foreach my $key (keys %params) {
}
$query = 'cql.allRecords=x' if $query eq "";
}
$query = 'cql.allRecords=x' if $query eq "";
+my $sort = $params{"_sort"};
+if ($sort) {
+ $query .= " or $sort=/sort";
+ $query .= "-desc" if $params{_desc};
+ $query .= " 0";
+}
+
### We can think about keeping the Connection object open to re-use
# for multiple requests, but that may not get us much. Same applies
# for the XML parser.
### We can think about keeping the Connection object open to re-use
# for multiple requests, but that may not get us much. Same applies
# for the XML parser.
@@
-32,9
+39,8
@@
my $first = $skip+1;
my $last = $first+$count-1;
$last = $n if $last > $n;
</%perl>
my $last = $first+$count-1;
$last = $n if $last > $n;
</%perl>
+ <h2><% $query %></h2>
<p>
<p>
- <b><% $query %></b>
- <br/>
% if ($n == 0) {
No matches
% } elsif ($first > $n) {
% if ($n == 0) {
No matches
% } elsif ($first > $n) {