mdf: search placeholder text upd

This commit is contained in:
E. S. 2024-03-13 17:27:01 +00:00
parent c542307f00
commit ca5b49205e
2 changed files with 6 additions and 4 deletions

View File

@ -99,7 +99,7 @@ function collection(SkinContext $ctx,
$html = <<<HTML
{$ctx->bc($bc)}
{$ctx->if_true($do_show_search, fn() => $ctx->collection_search($search_count, $search_query))}
{$ctx->if_true($do_show_search, fn() => $ctx->collection_search($search_count, $search_query, $ctx->lang('files_'.$collection->value.'_search_ph')))}
<div class="files-list">
<div id="files_list">
@ -146,7 +146,7 @@ function collection_files($ctx,
text_excerpts: $text_excerpts));
}
function collection_search(SkinContext $ctx, $count, $query) {
function collection_search(SkinContext $ctx, $count, $query, ?string $placeholder = null) {
$icons = svg();
$widgets = skin('widgets');
$clear_dsp = $query ? 'block' : 'none';
@ -155,7 +155,7 @@ function collection_search(SkinContext $ctx, $count, $query) {
<div class="files-search-wrap">
<div class="files-search" id="files_search">
<div class="files-search-icon">{$icons->search_20()}</div>
<input type="text" value="{$query}" placeholder="{$ctx->lang('files_search_ph')}" id="files_search_input">
<input type="text" value="{$query}" placeholder="{$ctx->if_then_else($placeholder !== null, $placeholder, $ctx->lang('files_search_ph'))}" id="files_search_input">
<div class="files-search-clear-icon" id="files_search_clear_icon" style="display: {$clear_dsp}">{$icons->clear_16()}</div>
</div>

View File

@ -117,7 +117,9 @@ files_wff_collection_short: W.F.F. Archive
files_mdf_collection_short: MdF
files_baconiana_collection_short: Baconiana
files_search_ph: Document number, title or text
files_wff_search_ph: Document number, title or text
files_mdf_search_ph: Issue number, date or text
files_search_results_count:
- "%s result"
- "%s results"