aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2007-07-14 01:46:31 +0100
committerRalph Amissah <ralph@amissah.com>2007-07-14 01:46:31 +0100
commit4a5fc958477d8bea6cb81a9ba50ea0f00bdaf5e5 (patch)
tree5acae4c7ef792d831168fcb318f4b020fd29d4b1
parentmap moved vim files for installation (diff)
parentsample search form, previous next arrows (diff)
Merge branch 'upstream' into debian/sid
-rw-r--r--CHANGELOG8
-rw-r--r--lib/sisu/v0/cgi_sql_common.rb60
2 files changed, 46 insertions, 22 deletions
diff --git a/CHANGELOG b/CHANGELOG
index deef2a9f..9c4cafd0 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -23,15 +23,17 @@ http://www.jus.uio.no/sisu/pkg/src/sisu_0.55.3.orig.tar.gz
better
* indentation levels reset
- * cgi, generated sample search form
- * presentation rearranged
+ * cgi, generated sample search form, improved
+ * presentation adjustments, placement of info, larger text entry form
* additional result information provided
- * canned searches provided to show matched text or indexes in matched documents
+ * canned searches provided to show matched text or indexes in individual
+ matched documents
* links to odf text
* new results defaults set
* better highlighting of matches
* footnotes and footnote references have links to the main text in which
they are found
+ * no next page if there are none
* manifest and concordance, output presentation title and author information
more prominent
diff --git a/lib/sisu/v0/cgi_sql_common.rb b/lib/sisu/v0/cgi_sql_common.rb
index 6239b6bf..9f89913e 100644
--- a/lib/sisu/v0/cgi_sql_common.rb
+++ b/lib/sisu/v0/cgi_sql_common.rb
@@ -451,31 +451,53 @@ module SiSU_CGI_sql
end
self
end
- def sql_canned_search_url(ok)
- if ok
- can=sql_canned_search
- page=(sql_offset.to_i + sql_limit.to_i)/sql_limit.to_i
- case page.to_s
- when /^1$/
- %{<hr /><br /><center>
- pg. #{page.to_s}
- <a href="#{can.next}">&nbsp;&nbsp;&gt;</a>
- </center>}
- when /^2$/
+ def sql_canned_search_url(ok,img)
+ @image_src=img
+ can=sql_canned_search
+ page=(sql_offset.to_i + sql_limit.to_i)/sql_limit.to_i
+ case page.to_s
+ when /^1$/
+ %{<hr /><br /><center>
+ pg. #{page.to_s}
+ <a href="#{can.next}">
+ <img border="0" width="22" height="22" src="#@image_src/arrow_next_red.png" alt="&nbsp;&gt;&gt;" />
+ </a>
+ </center>}
+ when /^2$/
+ %{<hr /><br /><center>
+ <a href="#{can.previous}">
+ <img border="0" width="22" height="22" src="#@image_src/arrow_prev_red.png" alt="&lt;&lt;&nbsp;" />
+ </a>
+ pg. #{page.to_s}
+ <a href="#{can.next}">
+ <img border="0" width="22" height="22" src="#@image_src/arrow_next_red.png" alt="&nbsp;&gt;&gt;" />
+ </a>
+ </center>}
+ else
+ if ok
%{<hr /><br /><center>
- <a href="#{can.previous}">&lt;&nbsp;&nbsp;</a>
+ <a href="#{can.start}">
+ <img border="0" width="22" height="22" src="#@image_src/arrow_prev_red.png" alt="|&lt;&nbsp;" />
+ </a>
+ <a href="#{can.previous}">
+ <img border="0" width="22" height="22" src="#@image_src/arrow_prev_red.png" alt="&lt;&lt;&nbsp;" />
+ </a>
pg. #{page.to_s}
- <a href="#{can.next}">&nbsp;&nbsp;&gt;</a>
+ <a href="#{can.next}">
+ <img border="0" width="22" height="22" src="#@image_src/arrow_next_red.png" alt="&nbsp;&gt;&gt;" />
+ </a>
</center>}
else
%{<hr /><br /><center>
- <a href="#{can.start}">|&lt;&nbsp;&nbsp;</a>
- <a href="#{can.previous}">&lt;&nbsp;&nbsp;</a>
+ <a href="#{can.start}">
+ <img border="0" width="22" height="22" src="#@image_src/arrow_prev_red.png" alt="|&lt;&nbsp;" />
+ </a>
+ <a href="#{can.previous}">
+ <img border="0" width="22" height="22" src="#@image_src/arrow_prev_red.png" alt="&lt;&lt;&nbsp;" />
+ </a>
pg. #{page.to_s}
- <a href="#{can.next}">&nbsp;&nbsp;&gt;</a>
</center>}
end
- else ''
end
end
WOK_SQL
@@ -910,9 +932,9 @@ module SiSU_CGI_sql
limit=dbi_statement.sql_limit.to_s
@@lt_t ||=false; @@lt_e ||=false
canned=if (@@lt_t or @@lt_e)
- dbi_statement.sql_canned_search_url(true).to_s
+ dbi_statement.sql_canned_search_url(true,@image_src).to_s
else
- dbi_statement.sql_canned_search_url(false).to_s
+ dbi_statement.sql_canned_search_url(false,@image_src).to_s
end
limit=dbi_statement.sql_limit.to_s
cgi.out{@header + @counters_txt + @counters_endn + @body_main.join + @endnotes.join + canned + @tail} #% print cgi_output_header+counters+body+endnotes