aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v5/cgi_sql_common.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2014-10-19 21:05:55 -0400
committerRalph Amissah <ralph@amissah.com>2014-10-19 21:05:55 -0400
commit84957a4260170c3b81a690853ba5b865f59e1217 (patch)
treedc4c11c676c9ea95e443fffb0bcf8fce4c10f40e /lib/sisu/v5/cgi_sql_common.rb
parentv5 v6: version & changelog (tidy & simplify, output related) (diff)
v5 v6: html, remove trailing backslash for empty linebreak & paragraph, <br> <p>
Diffstat (limited to 'lib/sisu/v5/cgi_sql_common.rb')
-rw-r--r--lib/sisu/v5/cgi_sql_common.rb110
1 files changed, 55 insertions, 55 deletions
diff --git a/lib/sisu/v5/cgi_sql_common.rb b/lib/sisu/v5/cgi_sql_common.rb
index d6f99342..eb8ce0ab 100644
--- a/lib/sisu/v5/cgi_sql_common.rb
+++ b/lib/sisu/v5/cgi_sql_common.rb
@@ -134,7 +134,7 @@ module SiSU_CGI_SQL
search_field='' if checked_echo !~/\S/
@base,@search_field,@selected_db,@result_type,@checked_sql_limit,@checked_tip,@checked_stats,@checked_searched,@checked_url,@checked_case,@checked_echo,@checked_sql,@checked_all,@checked_none,@checked_selected,@checked_default,@search_note,@the_can=base,search_field,selected_db,result_type,checked_sql_limit,checked_tip,checked_stats,checked_searched,checked_url,checked_case,checked_echo,checked_sql,checked_all,checked_none,checked_selected,checked_default,search_note,the_can
@tip=if checked_tip =~/\S/
- '<font size="2" color="#666666">text:__; fulltxt:__; keywords:__; title:__; author:__; topic_register:__; subject:__; description:__; publisher:__; editor:__; contributor:__; date:__; type:__; format:__; identifier:__; source:__; language:__; relation:__; coverage:__; rights:__; comment:__; abstract:__; filename:__;</font><br />'
+ '<font size="2" color="#666666">text:__; fulltxt:__; keywords:__; title:__; author:__; topic_register:__; subject:__; description:__; publisher:__; editor:__; contributor:__; date:__; type:__; format:__; identifier:__; source:__; language:__; relation:__; coverage:__; rights:__; comment:__; abstract:__; filename:__;</font><br>'
else ''
end
end
@@ -161,10 +161,10 @@ module SiSU_CGI_SQL
<tr><td width="20%">
<table summary="home button / home information" border="0" cellpadding="3" cellspacing="0">
<tr><td align="left">
- <br /><a href="http://sisudoc.org/" target="_top">
+ <br><a href="http://sisudoc.org/" target="_top">
<b>SiSU</b>
</a>
- <br /><a href="http://git.sisudoc.org/" target="_top">
+ <br><a href="http://git.sisudoc.org/" target="_top">
git
</a>
</td></tr>
@@ -193,7 +193,7 @@ module SiSU_CGI_SQL
<!input type="text" id="find" name="find" value="" />
<font size="2" color="#222222">
<b>to search:</b> select which database to search (drop-down menu below); enter your search query (in the form above); and <b>click on the search button</b> (below)
- <br />
+ <br>
<select name="db" size="1">
#{@selected_db}
WOK_SQL
@@ -208,18 +208,18 @@ module SiSU_CGI_SQL
end
def buttons2
<<-'WOK_SQL'
- <br />
+ <br>
match limit:
<input type="radio" name="sql_match_limit" value="1000" #{@checked_sql_limit[:l1000]}> 1,000
<input type="radio" name="sql_match_limit" value="2500" #{@checked_sql_limit[:l2500]}> 2,500
- <br />
+ <br>
<input type="checkbox" name="echo" #{@checked_echo}> echo query
<input type="checkbox" name="stats" #{@checked_stats}> result stats
<input type="checkbox" name="url" #{@checked_url}> search url
<input type="checkbox" name="searched" #{@checked_searched}> searched
<input type="checkbox" name="tip" #{@checked_tip}> available fields
<input type="checkbox" name="sql" #{@checked_sql}> sql statement
- <br />
+ <br>
checks:
<input type="radio" name="checks" value="check_default" #{@checked_default}> default
<input type="radio" name="checks" value="check_selected" #{@checked_selected}> selected
@@ -483,14 +483,14 @@ module SiSU_CGI_SQL
page=(sql_offset.to_i + sql_match_limit.to_i)/sql_match_limit.to_i
if beyond_limit
if page.to_s =~ /^1$/
- %{<br /><center>
+ %{<br><center>
pg. #{page.to_s}
<a href="#{can.next}">
<img border="0" width="22" height="22" src="#{img}/arrow_next_red.png" alt="&nbsp;&gt;&gt;" />
</a>
</center>}
elsif page.to_s =~ /^2$/
- %{<br /><center>
+ %{<br><center>
<a href="#{can.previous}">
<img border="0" width="22" height="22" src="#{img}/arrow_prev_red.png" alt="&lt;&lt;&nbsp;" />
</a>
@@ -500,7 +500,7 @@ module SiSU_CGI_SQL
</a>
</center>}
else
- %{<br /><center>
+ %{<br><center>
<a href="#{can.start}">
<img border="0" width="22" height="22" src="#{img}/arrow_prev_red.png" alt="|&lt;&nbsp;" />
</a>
@@ -516,14 +516,14 @@ module SiSU_CGI_SQL
else
if page.to_s =~ /^1$/ then ''
elsif page.to_s =~ /^2$/
- %{<br /><center>
+ %{<br><center>
<a href="#{can.previous}">
<img border="0" width="22" height="22" src="#{img}/arrow_prev_red.png" alt="&lt;&lt;&nbsp;" />
</a>
pg. #{page.to_s}
</center>}
else
- %{<br /><center>
+ %{<br><center>
<a href="#{can.start}">
<img border="0" width="22" height="22" src="#{img}/arrow_prev_red.png" alt="|&lt;&nbsp;" />
</a>
@@ -542,16 +542,16 @@ module SiSU_CGI_SQL
<<-WOK_SQL
def tail
<<-'WOK'
- <br /><hr /><br />
+ <br><hr /><br>
<table summary="SiSU summary" cellpadding="2" border="0">
<!-- widget sisu -->
<tr><td valign="top" width="10%">
<table summary="home button / home information" border="0" cellpadding="3" cellspacing="0">
<tr><td align="left">
- <br /><a href="http://sisudoc.org/" target="_top">
+ <br><a href="http://sisudoc.org/" target="_top">
<b>SiSU</b>
</a>
- <br /><a href="http://git.sisudoc.org/" target="_top">
+ <br><a href="http://git.sisudoc.org/" target="_top">
git
</a>
</td></tr>
@@ -562,14 +562,14 @@ module SiSU_CGI_SQL
<p class="tiny_left"><font color="#666666" size="2">
Generated by
#{v[:project]} #{v[:version]} #{v[:date]} (#{v[:date_stamp]})
- <br />
+ <br>
<a href="http://www.sisudoc.org" >
<b>#{v[:project]}</b></a> <sup>&copy;</sup> Ralph Amissah
1993, current 2014.
All Rights Reserved.
- <br />
+ <br>
#{v[:project]} is software for document structuring, publishing and search,
- <br />
+ <br>
<a href="http://www.jus.uio.no/sisu" >
www.jus.uio.no/sisu
</a>
@@ -581,17 +581,17 @@ module SiSU_CGI_SQL
<a href="http://git.sisudoc.org" >
git.sisudoc.org
</a>
- <br />
+ <br>
<i>w3 since October 3 1993</i>
<a href="mailto:ralph@amissah.com" >
ralph@amissah.com
</a>
- <br />
+ <br>
mailing list subscription
<a href="http://lists.sisudoc.org/listinfo/sisu" >
http://lists.sisudoc.org/listinfo/sisu
</a>
- <br />
+ <br>
<a href="mailto:sisu@lists.sisudoc.org" >
sisu@lists.sisudoc.org
</a>
@@ -599,10 +599,10 @@ module SiSU_CGI_SQL
</td><td valign="top" width="45%">
<p class="tiny_left"><font color="#666666" size="2">
#{v[:project]} using:
- <br />Standard SiSU markup syntax,
- <br />Standard SiSU meta-markup syntax, and the
- <br />Standard SiSU <u>object citation numbering</u> and system, (object/text identifying/locating system)
- <br />
+ <br>Standard SiSU markup syntax,
+ <br>Standard SiSU meta-markup syntax, and the
+ <br>Standard SiSU <u>object citation numbering</u> and system, (object/text identifying/locating system)
+ <br>
<sup>&copy;</sup> Ralph Amissah 1997, current 2014.
All Rights Reserved.
</font></p>
@@ -767,39 +767,39 @@ module SiSU_CGI_SQL
end
green=%{<font size="2" color="#004000">}
canned_search_url_txt=CGI.escapeHTML(@@canned_search_url)
- the_can=%{<font size="2" color="#666666">#{canned_note} <a href="#{@@canned_search_url}">#{canned_search_url_txt}</a></font><br />}
+ the_can=%{<font size="2" color="#666666">#{canned_note} <a href="#{@@canned_search_url}">#{canned_search_url_txt}</a></font><br>}
p_text=p_fulltext=p_keywords=p_title=p_author=p_topic_register=p_subject=p_description=p_publisher=p_editor=p_contributor=p_date=p_type=p_format=p_identifier=p_source=p_language=p_relation=p_coverage=p_rights=p_comment=p_abstract=p_filename=''
- p_filename=%{filename: #{green}#{@search_for.filename}</font><br />} if @search_for.filename =~/\S+/
- p_text=%{text: #{green}#{@search_for.text1}</font><br />} if @search_for.text1 =~/\S+/
- p_fulltext=%{fulltxt: #{green}#{@search_for.fulltext}</font><br />} if @search_for.fulltext =~/\S+/
- p_title=%{title: #{green}#{@search_for.title}</font><br />} if @search_for.title =~/\S+/
- p_author=%{author: #{green}#{@search_for.author}</font><br />} if @search_for.author =~/\S+/
- p_editor=%{editor: #{green}#{@search_for.editor}</font><br />} if @search_for.editor=~/\S+/
- p_contributor=%{contributor: #{green}#{@search_for.contributor}</font><br />} if @search_for.contributor =~/\S+/
- p_date=%{date: #{green}#{@search_for.date}</font><br />} if @search_for.date =~/\S+/
- p_rights=%{rights: #{green}#{@search_for.rights}</font><br />} if @search_for.rights =~/\S+/
- p_topic_register=%{topic_register: #{green}#{@search_for.topic_register}</font><br />} if @search_for.topic_register =~/\S+/
- p_subject=%{subject: #{green}#{@search_for.subject}</font><br />} if @search_for.subject =~/\S+/
- p_keywords=%{keywords: #{green}#{@search_for.keywords}</font><br />} if @search_for.keywords =~/\S+/
- p_identifier=%{identifier: #{green}#{@search_for.identifier}</font><br />} if @search_for.identifier =~/\S+/
- p_type=%{type: #{green}#{@search_for.type}</font><br />} if @search_for.type =~/\S+/
- p_format=%{format: #{green}#{@search_for.format}</font><br />} if @search_for.format =~/\S+/
- p_relation=%{relation: #{green}#{@search_for.relation}</font><br />} if @search_for.relation =~/\S+/
- p_coverage=%{coverage: #{green}#{@search_for.coverage}</font><br />} if @search_for.coverage =~/\S+/
- p_description=%{description: #{green}#{@search_for.description}</font><br />} if @search_for.description =~/\S+/
- p_abstract=%{abstract: #{green}#{@search_for.abstract}</font><br />} if @search_for.abstract =~/\S+/
- p_comment=%{comment: #{green}#{@search_for.comment}</font><br />} if @search_for.comment =~/\S+/
- p_publisher=%{publisher: #{green}#{@search_for.publisher}</font><br />} if @search_for.publisher =~/\S+/
- p_source=%{source: #{green}#{@search_for.source}</font><br />} if @search_for.source =~/\S+/
- p_language=%{language: #{green}#{@search_for.language}</font><br />} if @search_for.language =~/\S+/
+ p_filename=%{filename: #{green}#{@search_for.filename}</font><br>} if @search_for.filename =~/\S+/
+ p_text=%{text: #{green}#{@search_for.text1}</font><br>} if @search_for.text1 =~/\S+/
+ p_fulltext=%{fulltxt: #{green}#{@search_for.fulltext}</font><br>} if @search_for.fulltext =~/\S+/
+ p_title=%{title: #{green}#{@search_for.title}</font><br>} if @search_for.title =~/\S+/
+ p_author=%{author: #{green}#{@search_for.author}</font><br>} if @search_for.author =~/\S+/
+ p_editor=%{editor: #{green}#{@search_for.editor}</font><br>} if @search_for.editor=~/\S+/
+ p_contributor=%{contributor: #{green}#{@search_for.contributor}</font><br>} if @search_for.contributor =~/\S+/
+ p_date=%{date: #{green}#{@search_for.date}</font><br>} if @search_for.date =~/\S+/
+ p_rights=%{rights: #{green}#{@search_for.rights}</font><br>} if @search_for.rights =~/\S+/
+ p_topic_register=%{topic_register: #{green}#{@search_for.topic_register}</font><br>} if @search_for.topic_register =~/\S+/
+ p_subject=%{subject: #{green}#{@search_for.subject}</font><br>} if @search_for.subject =~/\S+/
+ p_keywords=%{keywords: #{green}#{@search_for.keywords}</font><br>} if @search_for.keywords =~/\S+/
+ p_identifier=%{identifier: #{green}#{@search_for.identifier}</font><br>} if @search_for.identifier =~/\S+/
+ p_type=%{type: #{green}#{@search_for.type}</font><br>} if @search_for.type =~/\S+/
+ p_format=%{format: #{green}#{@search_for.format}</font><br>} if @search_for.format =~/\S+/
+ p_relation=%{relation: #{green}#{@search_for.relation}</font><br>} if @search_for.relation =~/\S+/
+ p_coverage=%{coverage: #{green}#{@search_for.coverage}</font><br>} if @search_for.coverage =~/\S+/
+ p_description=%{description: #{green}#{@search_for.description}</font><br>} if @search_for.description =~/\S+/
+ p_abstract=%{abstract: #{green}#{@search_for.abstract}</font><br>} if @search_for.abstract =~/\S+/
+ p_comment=%{comment: #{green}#{@search_for.comment}</font><br>} if @search_for.comment =~/\S+/
+ p_publisher=%{publisher: #{green}#{@search_for.publisher}</font><br>} if @search_for.publisher =~/\S+/
+ p_source=%{source: #{green}#{@search_for.source}</font><br>} if @search_for.source =~/\S+/
+ p_language=%{language: #{green}#{@search_for.language}</font><br>} if @search_for.language =~/\S+/
search_note=<<-WOK
<font size="2" color="#666666">
<b>database:</b> #{green}#{@db}</font>; <b>selected view:</b> #{green}#{cgi['view']}</font>
- <b>search string:</b> "#{green}#{analyze_format}</font>"<br />
+ <b>search string:</b> "#{green}#{analyze_format}</font>"<br>
#{p_text} #{p_fulltext} #{p_keywords} #{p_title} #{p_author} #{p_topic_register} #{p_subject} #{p_description} #{p_publisher} #{p_editor} #{p_contributor} #{p_date} #{p_type} #{p_format} #{p_identifier} #{p_source} #{p_language} #{p_relation} #{p_coverage} #{p_rights} #{p_comment} #{p_abstract} #{p_filename}
</font>
WOK
- #eg = %{canned search e.g.:<br /> <a href="#{url}">#{url}</a><br />find: #{analyze}<br />database: #{database}}
+ #eg = %{canned search e.g.:<br> <a href="#{url}">#{url}</a><br>find: #{analyze}<br>database: #{database}}
#% dbi_canning
@header=Form.new(@base,search_field,selected_db,result_type,checked_sql_limit,checked_tip,checked_stats,checked_searched,checked_url,checked_case,checked_echo,checked_sql,checked_all,checked_none,checked_selected,checked_default,search_note,the_can).submission_form #% form
unless q['s1'] =~/\S/ or q['au'] =~/\S/ or @search[:text][1] =~/\S/
@@ -928,10 +928,10 @@ module SiSU_CGI_SQL
can_txt_srch=(cgi['view']=~/index/) \
? %{<a href="#{@canned_base_url}&fns=#{c['src_filename']}&lang=#{c['language_document_char']}&view=text"><img border="0" width="24" height="16" src="#{@image_src}/b_search.png" alt="search"></a>&nbsp;}
: %{<a href="#{@canned_base_url}&fns=#{c['src_filename']}&lang=#{c['language_document_char']}&view=index"><img border="0" width="24" height="16" src="#{@image_src}/b_search.png" alt="search"></a>&nbsp;}
- title=%{<span style="background-color: #{@color_heading}"><a href="#{path_toc(location,c['language_document_char'])}"><img border="0" width="15" height="18" src="#{@image_src}/b_toc.png" alt="toc html">&nbsp;#{ti}</a></span> [#{c['language_document_char']}] by #{c['creator_author']} <a href="#{path_manifest(location,c['language_document_char'])}"><img border="0" width="15" height="15" src="#{@image_src}/b_info.png" alt="manifest"></a> #{can_txt_srch}<br />} if file_suffix=~/s/ #hmm watch file_suffix
+ title=%{<span style="background-color: #{@color_heading}"><a href="#{path_toc(location,c['language_document_char'])}"><img border="0" width="15" height="18" src="#{@image_src}/b_toc.png" alt="toc html">&nbsp;#{ti}</a></span> [#{c['language_document_char']}] by #{c['creator_author']} <a href="#{path_manifest(location,c['language_document_char'])}"><img border="0" width="15" height="15" src="#{@image_src}/b_info.png" alt="manifest"></a> #{can_txt_srch}<br>} if file_suffix=~/s/ #hmm watch file_suffix
title=@text_search_flag \
- ? '<br /><hr>'+title
- : '<br />'+title
+ ? '<br><hr>'+title
+ : '<br>'+title
@counter_txt_doc+=1
oldtid=c['tid'].to_i
else title=''
@@ -996,7 +996,7 @@ module SiSU_CGI_SQL
@@lt_t=(@counter_txt_ocn==dbi_statement.sql_match_limit.to_i) ? true : false
start=(@@offset.to_i+1).to_s
range=(@@offset.to_i+@counter_txt_ocn.to_i).to_s
- %{<hr /><font size="2" color="#666666">Found #{@counter_txt_ocn} times in the main body of #{@counter_txt_doc} documents [ matches #{start} to #{range} ]</font><br />}
+ %{<hr /><font size="2" color="#666666">Found #{@counter_txt_ocn} times in the main body of #{@counter_txt_doc} documents [ matches #{start} to #{range} ]</font><br>}
else ''
end
else ''