summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2026-06-24 22:19:52 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2026-06-25 11:15:19 -0400
commit78745eb618982f129e8ee1b731cb4442c32432a8 (patch)
treeae7de1c8ca591dbb8a998dd07f053606c7919fb4
parentorg headers rearranged (& odd hilighting issue) (diff)
change search result symbols for show index & text
-rw-r--r--flake.lock6
-rw-r--r--org/spine_search_cgi.org16
-rwxr-xr-xsrc/sisudoc/spine_search.d13
3 files changed, 24 insertions, 11 deletions
diff --git a/flake.lock b/flake.lock
index 061b3bc..01099c5 100644
--- a/flake.lock
+++ b/flake.lock
@@ -2,11 +2,11 @@
"nodes": {
"nixpkgs": {
"locked": {
- "lastModified": 1777826146,
- "narHash": "sha256-wQ/iN5Zp5VIa3ebBibijPnLyKhor+xEbDy4d0goa9Zs=",
+ "lastModified": 1782175435,
+ "narHash": "sha256-EMzXKmnOtBQ2MnvpiNOm7E+kOMvdPrIKaeg52Tip2Uk=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "73c703c22422b8951895a960959dbbaca7296492",
+ "rev": "89570f24e97e614aa34aa9ab1c927b6578a43775",
"type": "github"
},
"original": {
diff --git a/org/spine_search_cgi.org b/org/spine_search_cgi.org
index b298da2..e160c2b 100644
--- a/org/spine_search_cgi.org
+++ b/org/spine_search_cgi.org
@@ -654,17 +654,21 @@ auto rgx = regex_canned_search;
string _matched_objects_text = "";
string _url = canned_url;
string _url_new = "";
+string _symbol = "";
string _matches_show_text = "&rt=txt";
string _matches_show_index = "&rt=idx";
string _fn = "&fn=" ~ fn;
_url_new = _url;
if (_url_new.match(rgx.results_type_index)) {
_url_new = _url_new.replace(rgx.results_type_index, _matches_show_text);
+ _symbol = "▶";
} else if (_url.match(rgx.results_type_text)) {
_url_new = _url_new.replace(rgx.results_type_text, _matches_show_index);
+ _symbol = "▼";
} else {
if (!(_url.match(rgx.results_type))) {
_url_new = _url ~ _matches_show_text;
+ _symbol = "▶";
}
}
if (!(_url_new.match(rgx.fn))) {
@@ -675,11 +679,14 @@ _matched_objects_text =
~ "<a href=\""
~ _url_new
~ "\">"
- ~ "፠"
+ ~ _symbol
~ "</a></font>";
return _matched_objects_text;
#+END_SRC
+▶ ▼
+፠
+
**** previous_next () {}
#+NAME: spine_search_previous_next
@@ -941,9 +948,10 @@ return tip;
<input type="hidden" name="db" value="%s">
<input type="submit" value="፨ SiSU search ❭❭">
match [ results:
- <input type="radio" name="rt" id="results_type_index" value="idx" %s> ፨ (index)
- <input type="radio" name="rt" id="results_type_text" value="txt" %s> ⚏ (text / grep)
- ]&nbsp;&nbsp;[ limit:
+ [
+ ▶ <input type="radio" name="rt" id="results_type_index" value="idx" %s> index ፨ ]&nbsp;&nbsp;[
+ ▼ <input type="radio" name="rt" id="results_type_text" value="txt" %s> text / grep ⚏ ]
+ ]&nbsp;&nbsp;&nbsp;[ limit:
<input type="radio" name="sml" id="sql_match_limit_1000" value="1000" %s> 1,000
<input type="radio" name="sml" id="sql_match_limit_2500" value="2500" %s> 2,500
]
diff --git a/src/sisudoc/spine_search.d b/src/sisudoc/spine_search.d
index 25321d8..e551cc8 100755
--- a/src/sisudoc/spine_search.d
+++ b/src/sisudoc/spine_search.d
@@ -474,17 +474,21 @@ void spine_cgi_search_function(Cgi cgi) {
string _matched_objects_text = "";
string _url = canned_url;
string _url_new = "";
+ string _symbol = "";
string _matches_show_text = "&rt=txt";
string _matches_show_index = "&rt=idx";
string _fn = "&fn=" ~ fn;
_url_new = _url;
if (_url_new.match(rgx.results_type_index)) {
_url_new = _url_new.replace(rgx.results_type_index, _matches_show_text);
+ _symbol = "▶";
} else if (_url.match(rgx.results_type_text)) {
_url_new = _url_new.replace(rgx.results_type_text, _matches_show_index);
+ _symbol = "▼";
} else {
if (!(_url.match(rgx.results_type))) {
_url_new = _url ~ _matches_show_text;
+ _symbol = "▶";
}
}
if (!(_url_new.match(rgx.fn))) {
@@ -495,7 +499,7 @@ void spine_cgi_search_function(Cgi cgi) {
~ "<a href=\""
~ _url_new
~ "\">"
- ~ "፠"
+ ~ _symbol
~ "</a></font>";
return _matched_objects_text;
}
@@ -1530,9 +1534,10 @@ void spine_cgi_search_function(Cgi cgi) {
<input type="hidden" name="db" value="%s">
<input type="submit" value="፨ SiSU search ❭❭">
match [ results:
- <input type="radio" name="rt" id="results_type_index" value="idx" %s> ፨ (index)
- <input type="radio" name="rt" id="results_type_text" value="txt" %s> ⚏ (text / grep)
- ]&nbsp;&nbsp;[ limit:
+ [
+ ▶ <input type="radio" name="rt" id="results_type_index" value="idx" %s> index ፨ ]&nbsp;&nbsp;[
+ ▼ <input type="radio" name="rt" id="results_type_text" value="txt" %s> text / grep ⚏ ]
+ ]&nbsp;&nbsp;&nbsp;[ limit:
<input type="radio" name="sml" id="sql_match_limit_1000" value="1000" %s> 1,000
<input type="radio" name="sml" id="sql_match_limit_2500" value="2500" %s> 2,500
]