diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2023-06-23 10:13:54 -0400 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2023-06-23 10:16:37 -0400 |
commit | 5ffbadc163e63fc3a06992813fea6ebcd3c91a80 (patch) | |
tree | c57f0adf06c5f484176a2c8e9f930313c1b8a91f /src | |
parent | makefile add gitZip, git archive (diff) |
search form, "next ❯❯" removed for initial state
Diffstat (limited to 'src')
-rw-r--r-- | src/spine_search.d | 24 | ||||
-rwxr-xr-x | src/spine_search.d_ | 24 |
2 files changed, 32 insertions, 16 deletions
diff --git a/src/spine_search.d b/src/spine_search.d index 57b817b..34b4fdf 100644 --- a/src/spine_search.d +++ b/src/spine_search.d @@ -522,7 +522,11 @@ void cgi_function_intro(Cgi cgi) { _url_previous = _url.replace(rgx.track_offset, _set_offset_previous); } } else { // _current_offset_value = 0; - _url_next = _url ~= "&smo=" ~ cv.sql_match_limit.to!string; + if ("query_string" in cgi.post) { + _url_next = _url ~= "&smo=" ~ cv.sql_match_limit.to!string; + } else { + _url_next = ""; + } } if (_url_previous.empty) { arrow_previous = ""; @@ -535,13 +539,17 @@ void cgi_function_intro(Cgi cgi) { ~ "❮❮ prev" ~ "</a> || </font>"; } - arrow_next = - "<font-size=\"1.8rem\" color=\"#666666\">" - ~ "<a href=\"" - ~ _url_next - ~ "\">" - ~ "next ❯❯" - ~ "</a></font>"; + if (_url_next.empty) { + arrow_next = ""; + } else { + arrow_next = + "<font-size=\"1.8rem\" color=\"#666666\">" + ~ "<a href=\"" + ~ _url_next + ~ "\">" + ~ "next ❯❯" + ~ "</a></font>"; + } _previous_next = "<hr>" ~ arrow_previous ~ arrow_next; return _previous_next; } diff --git a/src/spine_search.d_ b/src/spine_search.d_ index d2c5e1f..e66eac0 100755 --- a/src/spine_search.d_ +++ b/src/spine_search.d_ @@ -524,7 +524,11 @@ void cgi_function_intro(Cgi cgi) { _url_previous = _url.replace(rgx.track_offset, _set_offset_previous); } } else { // _current_offset_value = 0; - _url_next = _url ~= "&smo=" ~ cv.sql_match_limit.to!string; + if ("query_string" in cgi.post) { + _url_next = _url ~= "&smo=" ~ cv.sql_match_limit.to!string; + } else { + _url_next = ""; + } } if (_url_previous.empty) { arrow_previous = ""; @@ -537,13 +541,17 @@ void cgi_function_intro(Cgi cgi) { ~ "❮❮ prev" ~ "</a> || </font>"; } - arrow_next = - "<font-size=\"1.8rem\" color=\"#666666\">" - ~ "<a href=\"" - ~ _url_next - ~ "\">" - ~ "next ❯❯" - ~ "</a></font>"; + if (_url_next.empty) { + arrow_next = ""; + } else { + arrow_next = + "<font-size=\"1.8rem\" color=\"#666666\">" + ~ "<a href=\"" + ~ _url_next + ~ "\">" + ~ "next ❯❯" + ~ "</a></font>"; + } _previous_next = "<hr>" ~ arrow_previous ~ arrow_next; return _previous_next; } |