commit 3416b114647e67c508be2c1799e40e400622f4b4
Author: Jan Šedivý <honza.seeda@gmail.com>
Date:   Fri Apr 19 18:10:10 2019 +0200

    Re #7327 Předávání parametrů vyhledávání přes nově vytvořenou session sekci

diff --git a/app/FrontModule/component/Transliteration/TransliterationSearchForm.latte b/app/FrontModule/component/Transliteration/TransliterationSearchForm.latte
new file mode 100644
index 0000000..4762779
--- /dev/null
+++ b/app/FrontModule/component/Transliteration/TransliterationSearchForm.latte
@@ -0,0 +1,394 @@
+{form form class => 'form'}
+    <div class="form-group">
+        <div class="row">
+            <div class="col">
+                {label word1}
+                {input word1 class => 'form-control'}
+            </div>
+            <div class="col">
+                {label word2}
+                <div class="input-group">
+                    {input word2_condition class => 'form-control'}
+                    {input word2 class => 'form-control'}
+                </div>
+            </div>
+            <div class="col">
+                {label word3}
+                <div class="input-group">
+                    {input word3_condition class => 'form-control'}
+                    {input word3 class => 'form-control'}
+                </div>
+            </div>
+        </div>
+        {input exact_match}
+        <hr>
+
+        {*<div class="search-options">*}
+            {*<div class="form-group row">*}
+                {*<label for="book" class="col-sm-2 col-form-label">Book</label>*}
+                {*<div class="col-sm-3">*}
+                    {*<div class="input-group">*}
+
+                        {*<select name="book-op" class="form-control">*}
+                            {*<option value="equals">*}
+                                {*equals*}
+                            {*</option>*}
+                            {*<option value="not equals">*}
+                                {*not equals*}
+                            {*</option>*}
+                            {*<option value="contains" selected="selected">*}
+                                {*contains*}
+                            {*</option>*}
+                            {*<option value="begins with">*}
+                                {*begins with*}
+                            {*</option>*}
+                            {*<option value="ends with">*}
+                                {*ends with*}
+                            {*</option>*}
+                        {*</select>*}
+                        {*<input type="text" id="book" name="book" class="form-control">*}
+                    {*</div>*}
+                {*</div>*}
+            {*</div>*}
+            {*<div class="form-group row">*}
+                {*<label for="museum-no" class="col-sm-2 col-form-label">Museum number</label>*}
+                {*<div class="col-sm-3">*}
+                    {*<div class="input-group">*}
+
+                        {*<select name="museum-no-op" class="form-control">*}
+                            {*<option value="equals">*}
+                                {*equals*}
+                            {*</option>*}
+                            {*<option value="not equals">*}
+                                {*not equals*}
+                            {*</option>*}
+                            {*<option value="contains" selected="selected">*}
+                                {*contains*}
+                            {*</option>*}
+                            {*<option value="begins with">*}
+                                {*begins with*}
+                            {*</option>*}
+                            {*<option value="ends with">*}
+                                {*ends with*}
+                            {*</option>*}
+                        {*</select>*}
+                        {*<input type="text" name="museum-no" id="museum-no" class="form-control">*}
+                    {*</div>*}
+                {*</div>*}
+            {*</div>*}
+            {*<div class="form-group row">*}
+                {*<label for="id_book_type" class="col-sm-2 col-form-label">Type</label>*}
+                {*<div class="col-sm-3">*}
+                    {*<div class="input-group">*}
+
+                        {*<select name="book-type-op" class="form-control">*}
+                            {*<option value="is">*}
+                                {*is*}
+                            {*</option>*}
+                            {*<option value="is not">*}
+                                {*is not*}
+                            {*</option>*}
+                        {*</select>*}
+                        {*<select name="id_book_type" id="id_book_type" class="form-control">*}
+
+                            {*<option value="0" label="- NOT SELECTED -">*}
+                                {*- NOT SELECTED -*}
+                            {*</option>*}
+                            {*<option value="1" label="letter">*}
+                                {*letter*}
+                            {*</option>*}
+                            {*<option value="2" label="document">*}
+                                {*document*}
+                            {*</option>*}
+                            {*<option value="3" label="epic">*}
+                                {*epic*}
+                            {*</option>*}
+                            {*<option value="4" label="hymn">*}
+                                {*hymn*}
+                            {*</option>*}
+                            {*<option value="5" label="incantation">*}
+                                {*incantation*}
+                            {*</option>*}
+                            {*<option value="6" label="legal text">*}
+                                {*legal text*}
+                            {*</option>*}
+                            {*<option value="8" label="mathematics">*}
+                                {*mathematics*}
+                            {*</option>*}
+                            {*<option value="9" label="omina">*}
+                                {*omina*}
+                            {*</option>*}
+                            {*<option value="10" label="other">*}
+                                {*other*}
+                            {*</option>*}
+                            {*<option value="11" label="royal inscription">*}
+                                {*royal inscription*}
+                            {*</option>*}
+                            {*<option value="13" label="school text">*}
+                                {*school text*}
+                            {*</option>*}
+
+                        {*</select>*}
+                    {*</div>*}
+                {*</div>*}
+            {*</div>*}
+            {*<div class="form-group row">*}
+                {*<label for="id_origin" class="col-sm-2 col-form-label">Origin</label>*}
+                {*<div class="col-sm-3">*}
+                    {*<div class="input-group">*}
+
+                        {*<select name="origin-op" class="form-control">*}
+                            {*<option value="is">*}
+                                {*is*}
+                            {*</option>*}
+                            {*<option value="is not">*}
+                                {*is not*}
+                            {*</option>*}
+                        {*</select>*}
+                        {*<select name="id_origin" id="id_origin" class="form-control">*}
+
+                            {*<option value="0" label="- NOT SELECTED -">*}
+                                {*/ - NOT SELECTED -*}
+                            {*</option>*}
+                            {*<option value="9" label="Tell Ḫarīrī">*}
+                                {*Mari / Tell Ḫarīrī*}
+                            {*</option>*}
+                            {*<option value="10" label="Išān Baḫriyāt">*}
+                                {*Isin / Išān Baḫriyāt*}
+                            {*</option>*}
+                            {*<option value="11" label="Nuffar">*}
+                                {*Nippur / Nuffar*}
+                            {*</option>*}
+                            {*<option value="1" label="Babylon">*}
+                                {*Bābili / Babylon*}
+                            {*</option>*}
+                            {*<option value="2" label="Tell Inġarra, Tell al-Uḫaimir">*}
+                                {*Kiš / Tell Inġarra, Tell al-Uḫaimir*}
+                            {*</option>*}
+                            {*<option value="3" label="Abū Ḫaṭab">*}
+                                {*Kisurra / Abū Ḫaṭab*}
+                            {*</option>*}
+                            {*<option value="4" label="unknown">*}
+                                {*Lagaba / unknown*}
+                            {*</option>*}
+                            {*<option value="5" label="as-Sankara">*}
+                                {*Larsa / as-Sankara*}
+                            {*</option>*}
+                            {*<option value="6" label="Tell Harmal">*}
+                                {*Šaduppûm / Tell Harmal*}
+                            {*</option>*}
+                            {*<option value="12" label="Tell Asmar">*}
+                                {*Ešnunna / Tell Asmar*}
+                            {*</option>*}
+                            {*<option value="13" label="Tell al-Muqaiyar">*}
+                                {*Ur / Tell al-Muqaiyar*}
+                            {*</option>*}
+                            {*<option value="14" label="Tulūl al-Ḫumr">*}
+                                {*- / Tulūl al-Ḫumr*}
+                            {*</option>*}
+                            {*<option value="15" label="Tell Abū Duwari">*}
+                                {*Maškan-šāpir / Tell Abū Duwari*}
+                            {*</option>*}
+                            {*<option value="16" label="Khafajah">*}
+                                {*/ Khafajah*}
+                            {*</option>*}
+                            {*<option value="17" label="Borsippa, Birs Nimrūd">*}
+                                {*Barsip / Borsippa, Birs Nimrūd*}
+                            {*</option>*}
+                            {*<option value="18" label="Tell Abū Ḫabba">*}
+                                {*Sippar / Tell Abū Ḫabba*}
+                            {*</option>*}
+                            {*<option value="19" label="Tell Muḫammad">*}
+                                {*Diniktum? / Tell Muḫammad*}
+                            {*</option>*}
+                            {*<option value="21" label="Khafajah">*}
+                                {*Dūr-Samsu-iluna / Khafajah*}
+                            {*</option>*}
+                            {*<option value="22" label="">*}
+                                {*unknown /*}
+                            {*</option>*}
+                            {*<option value="24" label="Sūsa">*}
+                                {*Šūšan / Sūsa*}
+                            {*</option>*}
+                            {*<option value="23" label="Warka">*}
+                                {*Uruk / Warka*}
+                            {*</option>*}
+                            {*<option value="25" label="Ishchali">*}
+                                {*Nērebtum? / Ishchali*}
+                            {*</option>*}
+                            {*<option value="26" label="Cytheria (island)">*}
+                                {*/ Cytheria (island)*}
+                            {*</option>*}
+                            {*<option value="27" label="Cyprus">*}
+                                {*Iadnāna / Cyprus*}
+                            {*</option>*}
+                            {*<option value="29" label="Qalʾat Šarqāṭ">*}
+                                {*Aššur / Qalʾat Šarqāṭ*}
+                            {*</option>*}
+                            {*<option value="28" label="Tell Ḫaddād">*}
+                                {*Mê-Turran / Tell Ḫaddād*}
+                            {*</option>*}
+                            {*<option value="30" label="Tell Leilān">*}
+                                {*Šubat-Enlil / Tell Leilān*}
+                            {*</option>*}
+                            {*<option value="31" label="Acem Höyük">*}
+                                {*? / Acem Höyük*}
+                            {*</option>*}
+                            {*<option value="32" label="Tell al-ʾAšāra">*}
+                                {*Terqa / Tell al-ʾAšāra*}
+                            {*</option>*}
+                            {*<option value="33" label="Išān Dhaḫāk">*}
+                                {*/ Išān Dhaḫāk*}
+                            {*</option>*}
+                            {*<option value="34" label="Tell ad-Dibāʾī">*}
+                                {*Zaralulu / Tell ad-Dibāʾī*}
+                            {*</option>*}
+                            {*<option value="35" label="Tell al-Suleimaḫ">*}
+                                {*Batir? / Tell al-Suleimaḫ*}
+                            {*</option>*}
+                            {*<option value="36" label="Bardi Sanjian in Bītwāta">*}
+                                {*/ Bardi Sanjian in Bītwāta*}
+                            {*</option>*}
+                            {*<option value="37" label="near Tūz Ḫurmati">*}
+                                {*Ḫuršītum? / near Tūz Ḫurmati*}
+                            {*</option>*}
+                            {*<option value="38" label="Tell Šamšāra">*}
+                                {*Šušarrā / Tell Šamšāra*}
+                            {*</option>*}
+                            {*<option value="39" label="Dura-Europos">*}
+                                {*Damara / Dura-Europos*}
+                            {*</option>*}
+                            {*<option value="20" label="Tell ar-Rimāḫ">*}
+                                {*Qaṭṭarā / Tell ar-Rimāḫ*}
+                            {*</option>*}
+                            {*<option value="40" label="Tell Açana">*}
+                                {*Alalaḫ / Tell Açana*}
+                            {*</option>*}
+                            {*<option value="7" label="Rās aš-Šamra">*}
+                                {*Ugarit / Rās aš-Šamra*}
+                            {*</option>*}
+                            {*<option value="41" label="Tell Mardiḫ">*}
+                                {*Ebla / Tell Mardiḫ*}
+                            {*</option>*}
+                            {*<option value="42" label="Hillah (near Babylon)">*}
+                                {*/ Hillah (near Babylon)*}
+                            {*</option>*}
+                            {*<option value="43" label="Bismāya">*}
+                                {*Adab / Bismāya*}
+                            {*</option>*}
+                            {*<option value="44" label="al-Hibā">*}
+                                {*Lagaš / al-Hibā*}
+                            {*</option>*}
+                            {*<option value="45" label="Tell ed-Dēr">*}
+                                {*Sippar-Iaḫrūrum / Tell ed-Dēr*}
+                            {*</option>*}
+                            {*<option value="46" label="Tell Dulaiḫim or Tell Muḫaṭṭaṭ">*}
+                                {*Dilbat / Tell Dulaiḫim or Tell Muḫaṭṭaṭ*}
+                            {*</option>*}
+
+                        {*</select>*}
+                    {*</div>*}
+                {*</div>*}
+            {*</div>*}
+            {*<div class="form-group row">*}
+                {*<label for="reg_no" class="col-sm-2 col-form-label">Registration / Ex. number</label>*}
+                {*<div class="col-sm-3">*}
+                    {*<div class="input-group">*}
+
+                        {*<select name="reg_no-op" class="form-control">*}
+                            {*<option value="equals">*}
+                                {*equals*}
+                            {*</option>*}
+                            {*<option value="not equals">*}
+                                {*not equals*}
+                            {*</option>*}
+                            {*<option value="contains" selected="selected">*}
+                                {*contains*}
+                            {*</option>*}
+                            {*<option value="begins with">*}
+                                {*begins with*}
+                            {*</option>*}
+                            {*<option value="ends with">*}
+                                {*ends with*}
+                            {*</option>*}
+                        {*</select>*}
+                        {*<input type="text" id="reg_no" name="reg_no" class="form-control">*}
+                    {*</div>*}
+                {*</div>*}
+            {*</div>*}
+            {*<div class="form-group row">*}
+                {*<label for="date" class="col-sm-2 col-form-label">Date</label>*}
+                {*<div class="col-sm-3">*}
+                    {*<div class="input-group">*}
+
+                        {*<select name="date-op" class="form-control">*}
+                            {*<option value="equals">*}
+                                {*equals*}
+                            {*</option>*}
+                            {*<option value="not equals">*}
+                                {*not equals*}
+                            {*</option>*}
+                            {*<option value="contains" selected="selected">*}
+                                {*contains*}
+                            {*</option>*}
+                            {*<option value="begins with">*}
+                                {*begins with*}
+                            {*</option>*}
+                            {*<option value="ends with">*}
+                                {*ends with*}
+                            {*</option>*}
+                        {*</select>*}
+                        {*<input type="text" id="date" name="date" class="form-control">*}
+                    {*</div>*}
+                {*</div>*}
+            {*</div>*}
+        {*</div>*}
+        {*<hr>*}
+
+        {*<label for="line-count">Representation of search result:</label>*}
+        {*<div class="form-inline">*}
+            {*<div class="form-group">*}
+                {*<small class="text-muted">*}
+                    {*Print*}
+                {*</small>*}
+                {*<select name="line-count" id="line-count" class="form-control form-control-sm mx-sm-3">*}
+                    {*<option value="0" selected="selected">0</option>*}
+                    {*<option value="1">1</option>*}
+                    {*<option value="2">2</option>*}
+                    {*<option value="3">3</option>*}
+                    {*<option value="5">5</option>*}
+                    {*<option value="10">10</option>*}
+                    {*<option value="15">15</option>*}
+                {*</select>*}
+                {*<small id="passwordHelpInline" class="text-muted">*}
+                    {*lines before and after found line.*}
+                {*</small>*}
+            {*</div>*}
+        {*</div>*}
+        {*<div class="form-inline">*}
+            {*<div class="form-group">*}
+                {*<small class="text-muted">*}
+                    {*Show*}
+                {*</small>*}
+                {*<select name="r_limit" class="form-control form-control-sm mx-sm-3">*}
+                    {*<option value="1">1</option>*}
+                    {*<option value="2">2</option>*}
+                    {*<option value="3">3</option>*}
+                    {*<option value="5" selected="selected">5</option>*}
+                    {*<option value="10">10</option>*}
+                    {*<option value="15">15</option>*}
+                    {*<option value="30">30</option>*}
+                {*</select>*}
+                {*<small class="text-muted">*}
+                    {*found transliteration per site.*}
+                {*</small>*}
+            {*</div>*}
+        {*</div>*}
+    </div>
+    <div class="form-group row">
+        <div class="col-sm-10">
+            {input submit class => 'btn btn-outline-dark'}
+        </div>
+    </div>
+
+{/form}
diff --git a/app/FrontModule/component/Transliteration/TransliterationSearchForm.php b/app/FrontModule/component/Transliteration/TransliterationSearchForm.php
new file mode 100644
index 0000000..31a88e4
--- /dev/null
+++ b/app/FrontModule/component/Transliteration/TransliterationSearchForm.php
@@ -0,0 +1,64 @@
+<?php
+
+namespace App\FrontModule\Components;
+
+use App\Enum\ELogicalConditions;
+use App\Model\TransliterationSearchModel;
+use Nette\Application\UI\Control;
+use Nette\Application\UI\Form;
+
+class TransliterationSearchForm extends Control
+{
+    /** @var TransliterationSearchModel */
+    private $transliterationSearchModel;
+
+    /**
+     * TransliterationSearchForm constructor.
+     * @param TransliterationSearchModel $transliterationSearchModel
+     */
+    public function __construct(TransliterationSearchModel $transliterationSearchModel)
+    {
+        parent::__construct();
+        $this->transliterationSearchModel = $transliterationSearchModel;
+    }
+
+
+    public function render()
+    {
+        $this->template->setFile(__DIR__ . '/TransliterationSearchForm.latte');
+        $this->template->render();
+    }
+
+    public function createComponentForm()
+    {
+        $form = new Form();
+
+        $form->addText('word1', 'Word 1')
+            ->setRequired(true, 'Field Word 1 is required');
+        $form->addText('word2', 'Word 2');
+        $form->addSelect('word2_condition', '', ELogicalConditions::$selectValues);
+        $form->addText('word3', 'Word 3');
+        $form->addSelect('word3_condition', '', ELogicalConditions::$selectValues);
+
+        $form->addCheckbox('exact_match', ' Exact Match');
+
+        $form->addSubmit('submit', 'Search');
+        $form->onSuccess[] = [$this, 'formSuccess'];
+
+        return $form;
+    }
+
+    public function formSuccess(Form $form)
+    {
+        $values = $form->getValues();
+        $this->transliterationSearchModel->setSearchTerms($values);
+        $this->presenter->redirect('Transliteration:searchResult');
+    }
+}
+
+interface ITransliterationSearchFormFactory{
+    /**
+     * @return TransliterationSearchForm
+     */
+    public function create();
+}
\ No newline at end of file
diff --git a/app/FrontModule/presenters/TransliterationPresenter.php b/app/FrontModule/presenters/TransliterationPresenter.php
new file mode 100644
index 0000000..5bffd92
--- /dev/null
+++ b/app/FrontModule/presenters/TransliterationPresenter.php
@@ -0,0 +1,65 @@
+<?php
+
+namespace App\FrontModule\Presenters;
+
+
+
+use App\FrontModule\Components\ITransliterationSearchFormFactory;
+use App\Model\Repository\TransliterationRepository;
+use App\Model\TransliterationSearchModel;
+use Nette\Application\UI\Presenter;
+
+class TransliterationPresenter extends Presenter
+{
+    /** @var ITransliterationSearchFormFactory */
+    private $transliterationSearchFormFactory;
+
+    /** @var TransliterationRepository */
+    private $transliterationRepository;
+
+    /** @var TransliterationSearchModel */
+    private $transliterationSearchModel;
+
+    public function __construct(
+        ITransliterationSearchFormFactory $transliterationSearchFormFactory,
+        TransliterationRepository $transliterationRepository,
+        TransliterationSearchModel $transliterationSearchModel
+    )
+    {
+        parent::__construct();
+
+        $this->transliterationSearchFormFactory = $transliterationSearchFormFactory;
+        $this->transliterationRepository = $transliterationRepository;
+        $this->transliterationSearchModel = $transliterationSearchModel;
+    }
+
+
+    public function actionSearch()
+    {
+
+    }
+
+    public function actionSearchResult()
+    {
+        $searchTerms = $this->transliterationSearchModel->getSearchTerms();
+
+        if (!$searchTerms)
+        {
+            $this->redirect('Transliteration:search');
+        }
+
+        if(!$searchTerms['word1'])
+        {
+            $this->redirect('Transliteration:search');
+        }
+
+        $resultRows = $this->transliterationRepository->transliterationsFulltextSearch($searchTerms);
+
+        $this->template->resultRows = $resultRows;
+    }
+
+    public function createComponentTransliterationSearchForm()
+    {
+        return $this->transliterationSearchFormFactory->create();
+    }
+}
\ No newline at end of file
diff --git a/app/FrontModule/templates/Transliteration/search.latte b/app/FrontModule/templates/Transliteration/search.latte
new file mode 100644
index 0000000..1beae78
--- /dev/null
+++ b/app/FrontModule/templates/Transliteration/search.latte
@@ -0,0 +1,5 @@
+{block content}
+    <div class="display-5">Search in transliterations</div>
+    <hr>
+    {control transliterationSearchForm}
+{/block}
\ No newline at end of file
diff --git a/app/FrontModule/templates/Transliteration/searchResult.latte b/app/FrontModule/templates/Transliteration/searchResult.latte
new file mode 100644
index 0000000..86884d5
--- /dev/null
+++ b/app/FrontModule/templates/Transliteration/searchResult.latte
@@ -0,0 +1,43 @@
+{block content}
+    <div class="display-5">Search in texts - Results</div>
+
+    <div class="row h-100 pagination-header">
+        <div class="col my-auto">
+            <nav aria-label="Page navigation example">
+                <ul class="pagination">
+                    <li class="page-item"><a class="page-link" href="#"><span aria-hidden="true">&laquo;</span>
+                            <span class="sr-only">Previous</span></a></li>
+                    <li class="page-item"><a class="page-link" href="#"><span aria-hidden="true">&lsaquo;</span>
+                            <span class="sr-only">Previous</span></a></li>
+                    <li class="page-item active"><a class="page-link" href="#">1</a></li>
+                    <li class="page-item"><a class="page-link" href="#">2</a></li>
+                    <li class="page-item"><a class="page-link" href="#">3</a></li>
+                    <li class="page-item"><a class="page-link" href="#">4</a></li>
+                    <li class="page-item"><a class="page-link" href="#">5</a></li>
+                    <li class="page-item"><a class="page-link" href="#"><span aria-hidden="true">&rsaquo;</span>
+                            <span class="sr-only">Next</span></a></li>
+                    <li class="page-item"><a class="page-link" href="#"><span aria-hidden="true">&raquo;</span>
+                            <span class="sr-only">Next</span></a></li>
+                </ul>
+            </nav>
+        </div>
+        <div class="col text-right my-auto">
+            <span class="text-muted align-middle">
+                Total count: 23655. Showing page 1 of 4731 (5 results per site).
+            </span>
+        </div>
+    </div>
+
+    {foreach $resultRows as $result}
+        <hr>
+
+        <a href="transliteration-info.html">
+            {$result->book_abrev}, {$result->chapter}
+        </a>
+        <div>
+            <span class="lineno linefound">{$result->line_number}.</span>
+            <span class="line">{$result->transliteration}</span>
+        </div>
+
+    {/foreach}
+{/block}
\ No newline at end of file
diff --git a/app/component/Transliteration/TransliterationSearchForm.latte b/app/component/Transliteration/TransliterationSearchForm.latte
deleted file mode 100644
index f3cb421..0000000
--- a/app/component/Transliteration/TransliterationSearchForm.latte
+++ /dev/null
@@ -1,397 +0,0 @@
-{form form class => 'form'}
-    <div class="form-group">
-        <div class="row">
-            <div class="col">
-                {label word1}
-                {input word1 class => 'form-control'}
-            </div>
-            <div class="col">
-                {label word2}
-                <div class="input-group">
-                    {input word2_condition class => 'form-control'}
-                    {input word2 class => 'form-control'}
-                </div>
-            </div>
-            <div class="col">
-                {label word3}
-                <div class="input-group">
-                    {input word3_condition class => 'form-control'}
-                    {input word3 class => 'form-control'}
-                </div>
-            </div>
-        </div>
-        <input name="exact-match" id="exact-match" type="checkbox">
-        <label for="exact-match">Exact Match</label>
-        <br>
-        <a href="/nobtc/app/webroot/pages/hints-for-search">Hints for search</a>
-        <hr>
-
-        <div class="search-options">
-            <div class="form-group row">
-                <label for="book" class="col-sm-2 col-form-label">Book</label>
-                <div class="col-sm-3">
-                    <div class="input-group">
-
-                        <select name="book-op" class="form-control">
-                            <option value="equals">
-                                equals
-                            </option>
-                            <option value="not equals">
-                                not equals
-                            </option>
-                            <option value="contains" selected="selected">
-                                contains
-                            </option>
-                            <option value="begins with">
-                                begins with
-                            </option>
-                            <option value="ends with">
-                                ends with
-                            </option>
-                        </select>
-                        <input type="text" id="book" name="book" class="form-control">
-                    </div>
-                </div>
-            </div>
-            <div class="form-group row">
-                <label for="museum-no" class="col-sm-2 col-form-label">Museum number</label>
-                <div class="col-sm-3">
-                    <div class="input-group">
-
-                        <select name="museum-no-op" class="form-control">
-                            <option value="equals">
-                                equals
-                            </option>
-                            <option value="not equals">
-                                not equals
-                            </option>
-                            <option value="contains" selected="selected">
-                                contains
-                            </option>
-                            <option value="begins with">
-                                begins with
-                            </option>
-                            <option value="ends with">
-                                ends with
-                            </option>
-                        </select>
-                        <input type="text" name="museum-no" id="museum-no" class="form-control">
-                    </div>
-                </div>
-            </div>
-            <div class="form-group row">
-                <label for="id_book_type" class="col-sm-2 col-form-label">Type</label>
-                <div class="col-sm-3">
-                    <div class="input-group">
-
-                        <select name="book-type-op" class="form-control">
-                            <option value="is">
-                                is
-                            </option>
-                            <option value="is not">
-                                is not
-                            </option>
-                        </select>
-                        <select name="id_book_type" id="id_book_type" class="form-control">
-
-                            <option value="0" label="- NOT SELECTED -">
-                                - NOT SELECTED -
-                            </option>
-                            <option value="1" label="letter">
-                                letter
-                            </option>
-                            <option value="2" label="document">
-                                document
-                            </option>
-                            <option value="3" label="epic">
-                                epic
-                            </option>
-                            <option value="4" label="hymn">
-                                hymn
-                            </option>
-                            <option value="5" label="incantation">
-                                incantation
-                            </option>
-                            <option value="6" label="legal text">
-                                legal text
-                            </option>
-                            <option value="8" label="mathematics">
-                                mathematics
-                            </option>
-                            <option value="9" label="omina">
-                                omina
-                            </option>
-                            <option value="10" label="other">
-                                other
-                            </option>
-                            <option value="11" label="royal inscription">
-                                royal inscription
-                            </option>
-                            <option value="13" label="school text">
-                                school text
-                            </option>
-
-                        </select>
-                    </div>
-                </div>
-            </div>
-            <div class="form-group row">
-                <label for="id_origin" class="col-sm-2 col-form-label">Origin</label>
-                <div class="col-sm-3">
-                    <div class="input-group">
-
-                        <select name="origin-op" class="form-control">
-                            <option value="is">
-                                is
-                            </option>
-                            <option value="is not">
-                                is not
-                            </option>
-                        </select>
-                        <select name="id_origin" id="id_origin" class="form-control">
-
-                            <option value="0" label="- NOT SELECTED -">
-                                / - NOT SELECTED -
-                            </option>
-                            <option value="9" label="Tell Ḫarīrī">
-                                Mari / Tell Ḫarīrī
-                            </option>
-                            <option value="10" label="Išān Baḫriyāt">
-                                Isin / Išān Baḫriyāt
-                            </option>
-                            <option value="11" label="Nuffar">
-                                Nippur / Nuffar
-                            </option>
-                            <option value="1" label="Babylon">
-                                Bābili / Babylon
-                            </option>
-                            <option value="2" label="Tell Inġarra, Tell al-Uḫaimir">
-                                Kiš / Tell Inġarra, Tell al-Uḫaimir
-                            </option>
-                            <option value="3" label="Abū Ḫaṭab">
-                                Kisurra / Abū Ḫaṭab
-                            </option>
-                            <option value="4" label="unknown">
-                                Lagaba / unknown
-                            </option>
-                            <option value="5" label="as-Sankara">
-                                Larsa / as-Sankara
-                            </option>
-                            <option value="6" label="Tell Harmal">
-                                Šaduppûm / Tell Harmal
-                            </option>
-                            <option value="12" label="Tell Asmar">
-                                Ešnunna / Tell Asmar
-                            </option>
-                            <option value="13" label="Tell al-Muqaiyar">
-                                Ur / Tell al-Muqaiyar
-                            </option>
-                            <option value="14" label="Tulūl al-Ḫumr">
-                                - / Tulūl al-Ḫumr
-                            </option>
-                            <option value="15" label="Tell Abū Duwari">
-                                Maškan-šāpir / Tell Abū Duwari
-                            </option>
-                            <option value="16" label="Khafajah">
-                                / Khafajah
-                            </option>
-                            <option value="17" label="Borsippa, Birs Nimrūd">
-                                Barsip / Borsippa, Birs Nimrūd
-                            </option>
-                            <option value="18" label="Tell Abū Ḫabba">
-                                Sippar / Tell Abū Ḫabba
-                            </option>
-                            <option value="19" label="Tell Muḫammad">
-                                Diniktum? / Tell Muḫammad
-                            </option>
-                            <option value="21" label="Khafajah">
-                                Dūr-Samsu-iluna / Khafajah
-                            </option>
-                            <option value="22" label="">
-                                unknown /
-                            </option>
-                            <option value="24" label="Sūsa">
-                                Šūšan / Sūsa
-                            </option>
-                            <option value="23" label="Warka">
-                                Uruk / Warka
-                            </option>
-                            <option value="25" label="Ishchali">
-                                Nērebtum? / Ishchali
-                            </option>
-                            <option value="26" label="Cytheria (island)">
-                                / Cytheria (island)
-                            </option>
-                            <option value="27" label="Cyprus">
-                                Iadnāna / Cyprus
-                            </option>
-                            <option value="29" label="Qalʾat Šarqāṭ">
-                                Aššur / Qalʾat Šarqāṭ
-                            </option>
-                            <option value="28" label="Tell Ḫaddād">
-                                Mê-Turran / Tell Ḫaddād
-                            </option>
-                            <option value="30" label="Tell Leilān">
-                                Šubat-Enlil / Tell Leilān
-                            </option>
-                            <option value="31" label="Acem Höyük">
-                                ? / Acem Höyük
-                            </option>
-                            <option value="32" label="Tell al-ʾAšāra">
-                                Terqa / Tell al-ʾAšāra
-                            </option>
-                            <option value="33" label="Išān Dhaḫāk">
-                                / Išān Dhaḫāk
-                            </option>
-                            <option value="34" label="Tell ad-Dibāʾī">
-                                Zaralulu / Tell ad-Dibāʾī
-                            </option>
-                            <option value="35" label="Tell al-Suleimaḫ">
-                                Batir? / Tell al-Suleimaḫ
-                            </option>
-                            <option value="36" label="Bardi Sanjian in Bītwāta">
-                                / Bardi Sanjian in Bītwāta
-                            </option>
-                            <option value="37" label="near Tūz Ḫurmati">
-                                Ḫuršītum? / near Tūz Ḫurmati
-                            </option>
-                            <option value="38" label="Tell Šamšāra">
-                                Šušarrā / Tell Šamšāra
-                            </option>
-                            <option value="39" label="Dura-Europos">
-                                Damara / Dura-Europos
-                            </option>
-                            <option value="20" label="Tell ar-Rimāḫ">
-                                Qaṭṭarā / Tell ar-Rimāḫ
-                            </option>
-                            <option value="40" label="Tell Açana">
-                                Alalaḫ / Tell Açana
-                            </option>
-                            <option value="7" label="Rās aš-Šamra">
-                                Ugarit / Rās aš-Šamra
-                            </option>
-                            <option value="41" label="Tell Mardiḫ">
-                                Ebla / Tell Mardiḫ
-                            </option>
-                            <option value="42" label="Hillah (near Babylon)">
-                                / Hillah (near Babylon)
-                            </option>
-                            <option value="43" label="Bismāya">
-                                Adab / Bismāya
-                            </option>
-                            <option value="44" label="al-Hibā">
-                                Lagaš / al-Hibā
-                            </option>
-                            <option value="45" label="Tell ed-Dēr">
-                                Sippar-Iaḫrūrum / Tell ed-Dēr
-                            </option>
-                            <option value="46" label="Tell Dulaiḫim or Tell Muḫaṭṭaṭ">
-                                Dilbat / Tell Dulaiḫim or Tell Muḫaṭṭaṭ
-                            </option>
-
-                        </select>
-                    </div>
-                </div>
-            </div>
-            <div class="form-group row">
-                <label for="reg_no" class="col-sm-2 col-form-label">Registration / Ex. number</label>
-                <div class="col-sm-3">
-                    <div class="input-group">
-
-                        <select name="reg_no-op" class="form-control">
-                            <option value="equals">
-                                equals
-                            </option>
-                            <option value="not equals">
-                                not equals
-                            </option>
-                            <option value="contains" selected="selected">
-                                contains
-                            </option>
-                            <option value="begins with">
-                                begins with
-                            </option>
-                            <option value="ends with">
-                                ends with
-                            </option>
-                        </select>
-                        <input type="text" id="reg_no" name="reg_no" class="form-control">
-                    </div>
-                </div>
-            </div>
-            <div class="form-group row">
-                <label for="date" class="col-sm-2 col-form-label">Date</label>
-                <div class="col-sm-3">
-                    <div class="input-group">
-
-                        <select name="date-op" class="form-control">
-                            <option value="equals">
-                                equals
-                            </option>
-                            <option value="not equals">
-                                not equals
-                            </option>
-                            <option value="contains" selected="selected">
-                                contains
-                            </option>
-                            <option value="begins with">
-                                begins with
-                            </option>
-                            <option value="ends with">
-                                ends with
-                            </option>
-                        </select>
-                        <input type="text" id="date" name="date" class="form-control">
-                    </div>
-                </div>
-            </div>
-        </div>
-        <hr>
-
-        <label for="line-count">Representation of search result:</label>
-        <div class="form-inline">
-            <div class="form-group">
-                <small class="text-muted">
-                    Print
-                </small>
-                <select name="line-count" id="line-count" class="form-control form-control-sm mx-sm-3">
-                    <option value="0" selected="selected">0</option>
-                    <option value="1">1</option>
-                    <option value="2">2</option>
-                    <option value="3">3</option>
-                    <option value="5">5</option>
-                    <option value="10">10</option>
-                    <option value="15">15</option>
-                </select>
-                <small id="passwordHelpInline" class="text-muted">
-                    lines before and after found line.
-                </small>
-            </div>
-        </div>
-        <div class="form-inline">
-            <div class="form-group">
-                <small class="text-muted">
-                    Show
-                </small>
-                <select name="r_limit" class="form-control form-control-sm mx-sm-3">
-                    <option value="1">1</option>
-                    <option value="2">2</option>
-                    <option value="3">3</option>
-                    <option value="5" selected="selected">5</option>
-                    <option value="10">10</option>
-                    <option value="15">15</option>
-                    <option value="30">30</option>
-                </select>
-                <small class="text-muted">
-                    found transliteration per site.
-                </small>
-            </div>
-        </div>
-    </div>
-    <div class="form-group row">
-        <div class="col-sm-10">
-            {input submit class => 'btn btn-outline-dark'}
-        </div>
-    </div>
-
-{/form}
diff --git a/app/component/Transliteration/TransliterationSearchForm.php b/app/component/Transliteration/TransliterationSearchForm.php
deleted file mode 100644
index fc0bcad..0000000
--- a/app/component/Transliteration/TransliterationSearchForm.php
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-
-namespace App\Components;
-
-use App\Enum\ELogicalConditions;
-use Nette\Application\UI\Control;
-use Nette\Forms\Form;
-
-class TransliterationSearchForm extends Control
-{
-    public function render()
-    {
-        $this->template->setFile(__DIR__ . '/TransliterationSearchForm.latte');
-        $this->template->render();
-    }
-
-    public function createComponentForm()
-    {
-        $form = new Form();
-        $form->addText('word1', 'Word 1');
-        $form->addText('word2', 'Word 2');
-        $form->addSelect('word2_condition', '', ELogicalConditions::$selectValues);
-        $form->addText('word3', 'Word 3');
-        $form->addSelect('word3_condition', '', ELogicalConditions::$selectValues);
-
-        $form->addSubmit('submit', 'Search');
-
-        $form->onSuccess[] = [$this, 'formSubmit'];
-
-        return $form;
-    }
-
-    public function formSubmit()
-    {
-
-    }
-}
-
-interface ITransliterationSearchFormFactory{
-    /**
-     * @return TransliterationSearchForm
-     */
-    public function create();
-}
\ No newline at end of file
diff --git a/app/config/components.neon b/app/config/components.neon
index 8cd619f..4ac11f0 100644
--- a/app/config/components.neon
+++ b/app/config/components.neon
@@ -6,4 +6,4 @@ services:
     # Formuláře
     - App\FrontModule\Components\ILoginFormFactory
     - App\AdminModule\Components\IUserEditFormFactory
-    - App\Components\ITransliterationSearchFormFactory
\ No newline at end of file
+    - App\FrontModule\Components\ITransliterationSearchFormFactory
\ No newline at end of file
diff --git a/app/config/model.neon b/app/config/model.neon
index 1c933ec..63cc685 100644
--- a/app/config/model.neon
+++ b/app/config/model.neon
@@ -1,4 +1,5 @@
 services:
+    #Repository
     - App\Model\Repository\Repository
     - App\Model\Repository\BookRepository
     - App\Model\Repository\BookTypeRepository
@@ -16,4 +17,8 @@ services:
     - App\Model\Repository\UserRepository
     - App\Model\Repository\UserRoleRepository
 
-    - App\Model\Facade\UserFacade
\ No newline at end of file
+    #Facade
+    - App\Model\Facade\UserFacade
+
+    #Sessions
+    - App\Model\TransliterationSearchModel
\ No newline at end of file
diff --git a/app/enum/ELogicalConditions.php b/app/enum/ELogicalConditions.php
index a824d92..29fd2ba 100644
--- a/app/enum/ELogicalConditions.php
+++ b/app/enum/ELogicalConditions.php
@@ -16,4 +16,10 @@ class ELogicalConditions
         self::OR => 'OR',
         self::AND_NOT => 'AND NOT'
     ];
+
+    public static $whereCondition = [
+        self::AND => 'AND',
+        self::OR => 'OR',
+        self::AND_NOT => 'AND NOT'
+    ];
 }
\ No newline at end of file
diff --git a/app/model/TransliterationSearchModel.php b/app/model/TransliterationSearchModel.php
new file mode 100644
index 0000000..8ffe770
--- /dev/null
+++ b/app/model/TransliterationSearchModel.php
@@ -0,0 +1,40 @@
+<?php
+
+namespace App\Model;
+
+
+use Nette\Http\Session;
+use Nette\Http\SessionSection;
+
+class TransliterationSearchModel
+{
+    const SECTION_NAME = 'TransliterationSearch';
+    const SECTION_EXPIRATION = 0;
+
+    /** @var SessionSection */
+    private $section;
+
+    public function __construct(Session $session)
+    {
+        $this->section = $session->getSection(self::SECTION_NAME);
+        $this->section->setExpiration(self::SECTION_EXPIRATION);
+    }
+
+    /**
+     * @return SessionSection
+     */
+    public function getTransliterationSearchSection()
+    {
+        return $this->section;
+    }
+
+    public function setSearchTerms($searchTerms)
+    {
+        $this->section->searchTerms = $searchTerms;
+    }
+
+    public function getSearchTerms()
+    {
+        return $this->section->searchTerms;
+    }
+}
\ No newline at end of file
diff --git a/app/model/repository/TransliterationRepository.php b/app/model/repository/TransliterationRepository.php
index 1fecefd..0a2d3fd 100644
--- a/app/model/repository/TransliterationRepository.php
+++ b/app/model/repository/TransliterationRepository.php
@@ -2,6 +2,8 @@
 
 namespace App\Model\Repository;
 
+use App\Enum\ELogicalConditions;
+
 /**
  * Repository pro práci s tabulkou `transliteration`
  *
@@ -25,4 +27,29 @@ class TransliterationRepository extends Repository
     const COLUMN_REG_NO = 'reg_no';
     const COLUMN_DATE = 'date';
     const COLUMN_NOTE = 'note';
+
+    public function transliterationsFulltextSearch($queryParams)
+    {
+        $where = '';
+        $whereArgs = [];
+
+        if($queryParams['exact_match'])
+        {
+            $where .= "l.transliteration LIKE '%?%' ";
+            $whereArgs[] = $queryParams['word1'];
+        }
+        else
+        {
+            $where .= "l.transliteration LIKE '%?%' ";
+            $whereArgs[] = $queryParams['word1'];
+        }
+
+        $query = "SELECT b.book_abrev, t.chapter, l.transliteration, l.line_number FROM transliteration t
+                  LEFT JOIN surface s ON s.id_transliteration = t.id_transliteration
+                  LEFT JOIN line l ON l.id_surface = s.id_surface
+                  LEFT JOIN book b on t.id_book = b.id_book
+                  WHERE " . $where;
+
+        return $this->context->queryArgs($query, $whereArgs);
+    }
 }
\ No newline at end of file
diff --git a/app/presenters/TransliterationPresenter.php b/app/presenters/TransliterationPresenter.php
deleted file mode 100644
index 0bb00d9..0000000
--- a/app/presenters/TransliterationPresenter.php
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-namespace App\Presenters;
-
-
-use App\Components\ITransliterationSearchFormFactory;
-use Nette\Application\UI\Presenter;
-
-class TransliterationPresenter extends Presenter
-{
-    /** @var ITransliterationSearchFormFactory */
-    private $transliterationSearchFormFactory;
-
-    public function __construct(ITransliterationSearchFormFactory $transliterationSearchFormFactory)
-    {
-        parent::__construct();
-
-        $this->transliterationSearchFormFactory = $transliterationSearchFormFactory;
-    }
-
-
-    public function actionSearch()
-    {
-
-    }
-
-    public function actionSearchResult(array $searchTerms = null)
-    {
-
-    }
-
-    public function createComponentTransliterationSearchForm()
-    {
-        return $this->transliterationSearchFormFactory->create();
-    }
-}
\ No newline at end of file
diff --git a/app/presenters/templates/Transliteration/search.latte b/app/presenters/templates/Transliteration/search.latte
deleted file mode 100644
index 1beae78..0000000
--- a/app/presenters/templates/Transliteration/search.latte
+++ /dev/null
@@ -1,5 +0,0 @@
-{block content}
-    <div class="display-5">Search in transliterations</div>
-    <hr>
-    {control transliterationSearchForm}
-{/block}
\ No newline at end of file
diff --git a/app/router/RouterFactory.php b/app/router/RouterFactory.php
index 7b2eb91..effddcb 100644
--- a/app/router/RouterFactory.php
+++ b/app/router/RouterFactory.php
@@ -19,7 +19,7 @@ final class RouterFactory
 		$router = new RouteList;
 
         $frontRouter = new RouteList('Front');
-        $frontRouter[] = new Route('<action>[/<id>]', 'Homepage:default');
+        $frontRouter[] = new Route('<presenter>/<action>[/<id>]', 'Homepage:default');
 
         $adminRouter = new RouteList('Admin');
         $adminRouter[] = new Route('admin/<presenter>/<action>[/<id>]', 'Default:default');
