aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/cgi_sql_common.rb
diff options
context:
space:
mode:
authorRalph Amissah <ralph@amissah.com>2007-07-11 16:48:06 +0100
committerRalph Amissah <ralph@amissah.com>2007-07-11 16:48:06 +0100
commit214c1b729158084c51ff2caefe6fcb26271f02f3 (patch)
tree8e8d6d8a66982ca3222a51f84423321fa3bf9052 /lib/sisu/v0/cgi_sql_common.rb
parentcgi search form worked on and presentation, (an info button added and used) (diff)
various fixes: cgi search for, manifest, concordance, diakonos syntax highlghting
* cgi search subtitle and odf link * manifest and concordance, subtitle and author info * diakonos syntax highligthing;
Diffstat (limited to 'lib/sisu/v0/cgi_sql_common.rb')
-rw-r--r--lib/sisu/v0/cgi_sql_common.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/sisu/v0/cgi_sql_common.rb b/lib/sisu/v0/cgi_sql_common.rb
index fbb627db..762632dc 100644
--- a/lib/sisu/v0/cgi_sql_common.rb
+++ b/lib/sisu/v0/cgi_sql_common.rb
@@ -764,7 +764,10 @@ module SiSU_CGI_sql
end
#metadata_found_body
if c['tid'].to_i != oldtid.to_i
- title=%{<span style="background-color: #@color_heading"><a href="#@hosturl_files/#@stub/#{location}/toc#{lang}.html">#{c['title']}</a></span> by #{c['creator']} <a href="#@hosturl_files/#@stub/#{location}/portrait#{lang}.pdf"><img border="0" width="15" height="18" src="#@image_src/b_pdf.png" alt="pdf portrait"></a><a href="#@hosturl_files/#@stub/#{location}/landscape#{lang}.pdf"><img border="0" width="18" height="15" src="#@image_src/b_pdf.png" alt="pdf landscape"></a> <a href="#@hosturl_files/#@stub/#{location}/sisu_manifest#{lang}.html"><img border="0" width="12" height="12" src="#@image_src/b_info.png" alt="manifest"></a><br />} if file_suffix=~/s/ #hmm watch file_suffix
+ ti=if c['subtitle'] =~/\S+/; "#{c['title']} - #{c['subtitle']}"
+ else c['title']
+ end
+ title=%{<span style="background-color: #@color_heading"><a href="#@hosturl_files/#@stub/#{location}/toc#{lang}.html"><img border="0" width="15" height="18" src="#@image_src/b_toc.png" alt="toc html">&nbsp;#{ti}</a></span> by #{c['creator']} <a href="#@hosturl_files/#@stub/#{location}/toc#{lang}.html"><img border="0" width="15" height="18" src="#@image_src/b_toc.png" alt="toc html"></a><a href="#@hosturl_files/#@stub/#{location}/portrait#{lang}.pdf"><img border="0" width="15" height="18" src="#@image_src/b_pdf.png" alt="pdf portrait"></a><a href="#@hosturl_files/#@stub/#{location}/landscape#{lang}.pdf"><img border="0" width="18" height="15" src="#@image_src/b_pdf.png" alt="pdf landscape"></a> <a href="#@hosturl_files/#@stub/#{location}/opendocument#{lang}.odt"><img border="0" width="15" height="15" src="#@image_src/b_odf.png" alt="odf"></a> <a href="#@hosturl_files/#@stub/#{location}/sisu_manifest#{lang}.html"><img border="0" width="15" height="15" src="#@image_src/b_info.png" alt="manifest"></a><br />} if file_suffix=~/s/ #hmm watch file_suffix
if @text_search_flag; title='<br /><hr>'+title
else title='<br />'+title
end
@@ -853,7 +856,10 @@ module SiSU_CGI_sql
#metadata_found_endnotes
if @text_search_flag
if e['metadata_tid'].to_i != oldtid.to_i
- title=%{<br /><hr><span style="background-color: #@color_heading"><a href="#@hosturl_files/#@stub/#{location}/toc#{lang}.html">#{e['title']}</a></span> by #{e['creator']} <a href="#@hosturl_files/#@stub/#{location}/portrait.pdf"><img border="0" width="15" height="18" src="#@image_src/b_pdf.png" alt="pdf portrait"></a><a href="#@hosturl_files/#@stub/#{location}/landscape.pdf"><img border="0" width="18" height="15" src="#@image_src/b_pdf.png" alt="pdf landscape"></a> <a href="#@hosturl_files/#@stub/#{location}/sisu_manifest#{lang}.html"><img border="0" width="12" height="12" src="#@image_src/b_info.png" alt="manifest"></a><br />} if file_suffix=~/s/
+ ti=if e['subtitle'] =~/\S+/; "#{e['title']} - #{e['subtitle']}"
+ else e['title']
+ end
+ title=%{<br /><hr><span style="background-color: #@color_heading"><a href="#@hosturl_files/#@stub/#{location}/toc#{lang}.html"><img border="0" width="15" height="18" src="#@image_src/b_toc.png" alt="toc html">&nbsp;#{ti}</a></span> by #{e['creator']} <a href="#@hosturl_files/#@stub/#{location}/toc#{lang}.html"><img border="0" width="15" height="18" src="#@image_src/b_toc.png" alt="toc html"></a> <a href="#@hosturl_files/#@stub/#{location}/portrait.pdf"><img border="0" width="15" height="18" src="#@image_src/b_pdf.png" alt="pdf portrait"></a><a href="#@hosturl_files/#@stub/#{location}/landscape.pdf"><img border="0" width="18" height="15" src="#@image_src/b_pdf.png" alt="pdf landscape"></a> <a href="#@hosturl_files/#@stub/#{location}/opendocument#{lang}.odt"><img border="0" width="15" height="15" src="#@image_src/b_odf.png" alt="odf"></a> <a href="#@hosturl_files/#@stub/#{location}/sisu_manifest#{lang}.html"><img border="0" width="15" height="15" src="#@image_src/b_info.png" alt="manifest"></a><br />} if file_suffix=~/s/
@counter_endn_doc+=1
oldtid=e['metadata_tid'].to_i
else title = ''