Skip to content

Commit

Permalink
Merge pull request #3 from beatrycze-volk/add-search-template
Browse files Browse the repository at this point in the history
Add custom template for SearchInDocumentTool
  • Loading branch information
Alexander Bigga authored Mar 29, 2021
2 parents 42356a2 + f530e6f commit 5db9f66
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
1 change: 0 additions & 1 deletion Build/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ module.exports = function(grunt) {
'Resources/Private/JavaScript/Kitodo/PageView/FulltextControl.js',
'../dlf/Resources/Public/Javascript/PageView/FullTextUtility.js',
// use standard input instead of submit button
// TODO: add template
'Resources/Private/JavaScript/Kitodo/PageView/SearchInDocument.js',
'../dlf/Resources/Public/Javascript/PageView/PageView.js'
],
Expand Down
33 changes: 33 additions & 0 deletions Resources/Public/Templates/SearchInDocumentTool.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!--
* (c) Kitodo. Key to digital objects e.V. <[email protected]>
*
* This file is part of the Kitodo and TYPO3 projects.
*
* @license GNU General Public License version 3 or later.
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
-->
<!-- ###TEMPLATE### -->
<form class="tx-dlf-search-form" id="tx-dlf-search-in-document-form" action="###ACTION_URL###" method="post" enctype="multipart/form-data">
<div>
<label for="tx-dlf-search-query">###LABEL_QUERY###</label>
<!-- Never change the @id of this input field! Otherwise search won't work! -->
<input type="text" id="tx-dlf-search-in-document-query" placeholder="###LABEL_SEARCH_IN_DOCUMENT###" name="###LABEL_QUERY_URL###" />
<input type="button" id="tx-dlf-search-in-document-button" value="###LABEL_SUBMIT###" onclick="search();"/>
<input type="hidden" id="tx-dlf-search-in-document-start" name="###LABEL_START###" value="0" />
<input type="hidden" id="tx-dlf-search-in-document-id" name="###LABEL_ID###" value="###CURRENT_DOCUMENT###" />
<input type="hidden" id="tx-dlf-search-in-document-page" name="###LABEL_PAGE_URL###" />
<input type="hidden" id="tx-dlf-search-in-document-highlight-word" name="###LABEL_HIGHLIGHT_WORD###" />
<input type="hidden" id="tx-dlf-search-in-document-encrypted" name="###LABEL_ENCRYPTED###" value="###SOLR_ENCRYPTED###" />
</div>
</form>
<div id="tx-dlf-search-in-document-loading" style="display: none;">###LABEL_LOADING###...</div>
<div id="tx-dlf-search-in-document-clearing" onclick="clearSearch();">###LABEL_DELETE_SEARCH###...</div>
<div id="tx-dlf-search-in-document-results"></div>
<div id="tx-dlf-search-in-document-labels" style="display:none;">
<span id="tx-dlf-search-in-document-label-next">###LABEL_NEXT###</span>
<span id="tx-dlf-search-in-document-label-previous">###LABEL_PREVIOUS###</span>
<span id="tx-dlf-search-in-document-label-page">###LABEL_PAGE###</span>
<span id="tx-dlf-search-in-document-label-noresult">###LABEL_NORESULT###</span>
</div>
<!-- ###TEMPLATE### -->

0 comments on commit 5db9f66

Please sign in to comment.