commit f115c8b5c75cf3d7590a63efd5cfa361643db640
Author: Filip Jani <jsem@filek.cz>
Date:   Wed Apr 17 16:40:40 2019 +0200

    Re #7332 přidání presenteru a vytvoření submodulů

diff --git a/app/AdminModule/presenters/BaseAdminPresenter.php b/app/AdminModule/presenters/BaseAdminPresenter.php
new file mode 100644
index 0000000..38586d4
--- /dev/null
+++ b/app/AdminModule/presenters/BaseAdminPresenter.php
@@ -0,0 +1,37 @@
+<?php
+
+
+namespace App\AdminModule\Presenters;
+
+use App\Enum\EUserRole;
+use Nette;
+
+/**
+ * Základní presenter od kterého dědí všechny presentery v AdminModulu,
+ *  zajišťuje kontrolu práv uživatele
+ *
+ * @package App\AdminModule\Presenters
+ */
+abstract class BaseAdminPresenter extends Nette\Application\UI\Presenter
+{
+
+    public function startup()
+    {
+        parent::startup();
+
+        if (!$this->isUserAllowed())
+        {
+            throw new Nette\Application\ForbiddenRequestException();
+        }
+    }
+
+    /**
+     * Vrací TRUE pokud má uživatel přístup do administrace
+     *
+     * @return bool
+     */
+    protected function isUserAllowed()
+    {
+        return $this->user->isLoggedIn() && $this->user->isInRole(EUserRole::ADMIN);
+    }
+}
\ No newline at end of file
diff --git a/app/AdminModule/presenters/DefaultPresenter.php b/app/AdminModule/presenters/DefaultPresenter.php
new file mode 100644
index 0000000..cf2f5aa
--- /dev/null
+++ b/app/AdminModule/presenters/DefaultPresenter.php
@@ -0,0 +1,12 @@
+<?php
+
+namespace App\AdminModule\Presenters;
+
+/**
+ * Presenter zobrazující se po přihlášení do Administrace
+ *
+ * @package App\AdminModule\Presenters
+ */
+final class DefaultPresenter extends BaseAdminPresenter
+{
+}
\ No newline at end of file
diff --git a/app/AdminModule/templates/@layout.latte b/app/AdminModule/templates/@layout.latte
new file mode 100644
index 0000000..f6b30d4
--- /dev/null
+++ b/app/AdminModule/templates/@layout.latte
@@ -0,0 +1,146 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+
+    <title>{ifset title}{include title|stripHtml} | {/ifset}Old Babylonian Text Corpus</title>
+
+    <!-- jQuery -->
+    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
+            integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
+            crossorigin="anonymous"></script>
+
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.js"
+            integrity="sha256-wqAoCRn9//AnHSl4qbXVhqdvmgFQqN5Elqp4Eb2wOXA=" crossorigin="anonymous"></script>
+
+    <!-- Bootstrap CDN -->
+    <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet"
+          integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
+    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"
+            integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T"
+            crossorigin="anonymous"></script>
+
+    <!-- Bootstrap Select -->
+    <link rel="stylesheet"
+          href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.4/css/bootstrap-select.min.css">
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.4/js/bootstrap-select.min.js"></script>
+
+    <!-- Bootstrap Datepicker -->
+    <link rel="stylesheet"
+          href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.8.0/css/bootstrap-datepicker3.min.css"
+          integrity="sha256-mlKJFBS1jbZwwDrZD1ApO7YFS6MA1XDN37jZ9GDFC64=" crossorigin="anonymous"/>
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.8.0/js/bootstrap-datepicker.min.js"
+            integrity="sha256-tW5LzEC7QjhG0CiAvxlseMTs2qJS7u3DRPauDjFJ3zo=" crossorigin="anonymous"></script>
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.8.0/locales/bootstrap-datepicker.cs.min.js"
+            integrity="sha256-pbW7ult8QcDlimj+JQplrsCieqCvQ/8VGr7ZdTuev8c=" crossorigin="anonymous"></script>
+
+    <!-- Font awesome -->
+    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css"
+          integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous">
+
+    <link rel="stylesheet" href="{$basePath}/css/admin/style.css">
+
+    <script src="https://nette.github.io/resources/js/netteForms.min.js"></script>
+    <script src="{$basePath}/js/nette.ajax.js"></script>
+
+</head>
+<body>
+<!--Navbar-->
+<div class="jumbotron jumbotron-fluid header-logo">
+    <div class="container text-center">
+        <div class="display-4"><a n:href=":Front:Homepage:">Old Babylonian Text Corpus</a></div>
+    </div>
+</div>
+<nav class="navbar navbar-expand-lg navbar-dark bg-primary" style="background-color: #003366 !important;">
+    <ul class="navbar-nav mr-auto">
+        <li class="nav-item">
+            <a class="nav-link" href="search-texts.html">Search & edit texts</a>
+        </li>
+        <li class="nav-item">
+            <a class="nav-link" href="#">Search dictionary</a>
+        </li>
+        <li class="nav-item">
+            <a class="nav-link" href="#">Text catalogue</a>
+        </li>
+        <li class="nav-item">
+            <a class="nav-link" href="#">Catalogue of cuneiform signs</a>
+        </li>
+        <li class="nav-item">
+            <a class="nav-link" href="#">Contact & members</a>
+        </li>
+        <li class="nav-item">
+            <a class="nav-link" href="#">Input new text</a>
+        </li>
+        <li class="nav-item active">
+            <a class="nav-link" n:href="Default:default">Admin</a>
+        </li>
+    </ul>
+    {if $user->loggedIn}
+    <span class="navbar-text" style="padding-right: 1rem">
+            User: <strong>{$user->getIdentity()->username}</strong>
+        </span>
+    {/if}
+    <div class="navbar-nav nav-item">
+        {if $user->loggedIn}
+            <a class="nav-link" n:href=":Front:Homepage:logout">Logout</a>
+            <a class="nav-link" href="#">Change Password</a>
+        {else}
+            <a class="nav-link" n:href=":Front:Homepage:login">Login</a>
+        {/if}
+    </div>
+</nav>
+
+<ul class="nav">
+    <!-- Aktualní zvýraznění linku se dá udělat takhle -->
+    <!-- - do n:class se dá isLinkCurrent a odkaz na presenter -->
+    <!-- <li class="nav-item"><a n:href="Default:default" n:class="nav-link, $presenter->isLinkCurrent('Default:*') ? active" title="Users">
+            Users </a></li> -->
+
+    <li class="nav-item"><a href="#" class="nav-link" title="Users">
+            Users </a></li>
+    <li class="nav-item"><a href="#" class="nav-link active" title="Groups">
+            Groups </a></li>
+    <li class="nav-item"><a href="#" class="nav-link" title="Rules">
+            Rules </a></li>
+
+    <li class="nav-item"><a href="#" class="nav-link" title="Book">
+            Book </a></li>
+    <li class="nav-item"><a href="#" class="nav-link" title="Transliteration">
+            Transliteration </a></li>
+    <li class="nav-item"><a href="#" class="nav-link" title="Book type">
+            Book type </a></li>
+    <li class="nav-item"><a href="#" class="nav-link" title="Object type">
+            Object&nbsp;type </a></li>
+    <li class="nav-item"><a href="#" class="nav-link" title="Surface type">
+            Surface&nbsp;type </a></li>
+
+    <li class="nav-item"><a href="#" class="nav-link" title="Museum">
+            Museum </a></li>
+    <li class="nav-item"><a href="#" class="nav-link" title="Origin">
+            Origin </a></li>
+    <li class="nav-item"><a href="#" class="nav-link" title="Upload">
+            Upload&nbsp;texts </a></li>
+    <li class="nav-item"><a href="#" class="nav-link" title="Replace">
+            Mass&nbsp;replace </a></li>
+</ul>
+
+<!--Content-->
+<div class="content">
+    <div n:foreach="$flashes as $flash" n:class="alert, 'alert-' . $flash->type">{$flash->message}</div>
+
+    {include content}
+</div>
+
+{ifset scripts}{include scripts}{/ifset}
+
+<!--Footer-->
+<footer class="footer">
+    <div class="container">
+        <div class="text-center">
+            © Furat Rahman - Faculty of Philosophy - University of West Bohemia in Pilsen and Cuneiform Circle 2002-2005<br>
+            Created by Medici - Faculty of Applied Science - University of West Bohemia in Pilsen
+        </div>
+    </div>
+</footer>
+</body>
+</html>
\ No newline at end of file
diff --git a/app/AdminModule/templates/Default/default.latte b/app/AdminModule/templates/Default/default.latte
new file mode 100644
index 0000000..4cc7eaa
--- /dev/null
+++ b/app/AdminModule/templates/Default/default.latte
@@ -0,0 +1 @@
+{block content}
\ No newline at end of file
diff --git a/app/FrontModule/component/ExampleGrid.php b/app/FrontModule/component/ExampleGrid.php
new file mode 100644
index 0000000..c84f1ae
--- /dev/null
+++ b/app/FrontModule/component/ExampleGrid.php
@@ -0,0 +1,66 @@
+<?php
+
+
+namespace App\FrontModule\Components;
+
+
+use App\Utils\DataGrid\DataGrid;
+use App\Model\Repository\LineRepository;
+use Ublaboo\DataGrid\Exception\DataGridException;
+
+/**
+ * Ukázkový datagrid, bude smazán při předání
+ *  - všechny možnosti použití gridu lze vidět na
+ *  https://gitlab.com/Fifal/dvm/blob/21afc037e3604093197e140defc05925df0b8c28/web-project/app/components/variant/VariantGrid.php
+ *
+ * @package App\Components
+ */
+class ExampleGrid extends DataGrid
+{
+    /** @var LineRepository */
+    private $lineRepository;
+
+    public function __construct(LineRepository $lineRepository)
+    {
+        $this->lineRepository = $lineRepository;
+
+        parent::__construct();
+    }
+
+    /**
+     * Abstraktní metoda, slouží k nastavení primárního klíče a nastavení datasource
+     *  1. $this->setPrimaryKey();
+     *  2. $this->setDataSource();
+     *
+     * @throws DataGridException
+     */
+    public function init()
+    {
+        $this->setPrimaryKey(LineRepository::COLUMN_ID);
+        $this->setDataSource($this->lineRepository->findAll());
+    }
+
+    /**
+     * Definice sloupečků, akcí, vyhledávácích filtrů gridu
+     *
+     * @throws DataGridException
+     */
+    public function define()
+    {
+        $this->addColumnNumber(LineRepository::COLUMN_ID, "ID");
+        $this->addColumnText(LineRepository::COLUMN_TRANSLITERATION, "Transliterace");
+        $this->addFilterText(LineRepository::COLUMN_TRANSLITERATION, "Transliterace");
+
+        $this->addAction(LineRepository::COLUMN_TRANSLITERATION, "Smazat");
+    }
+}
+
+interface IExampleGirdFactory
+{
+    /**
+     * Funkce create je implementována již v předkovi
+     *
+     * @return ExampleGrid
+     */
+    public function create();
+}
\ No newline at end of file
diff --git a/app/FrontModule/component/Login/LoginForm.latte b/app/FrontModule/component/Login/LoginForm.latte
new file mode 100644
index 0000000..a2f7fa7
--- /dev/null
+++ b/app/FrontModule/component/Login/LoginForm.latte
@@ -0,0 +1,11 @@
+<div class="col-3">
+    {form form class => 'form'}
+        {label \App\Model\Repository\UserRepository::COLUMN_LOGIN}
+        {input \App\Model\Repository\UserRepository::COLUMN_LOGIN class => 'form-control'}
+
+        {label \App\Model\Repository\UserRepository::COLUMN_PASSWORD}
+        {input \App\Model\Repository\UserRepository::COLUMN_PASSWORD class => 'form-control'}
+
+        {input submit class => 'form-control btn btn-success mt-4'}
+    {/form}
+</div>
\ No newline at end of file
diff --git a/app/FrontModule/component/Login/LoginForm.php b/app/FrontModule/component/Login/LoginForm.php
new file mode 100644
index 0000000..6de521e
--- /dev/null
+++ b/app/FrontModule/component/Login/LoginForm.php
@@ -0,0 +1,59 @@
+<?php
+
+
+namespace App\FrontModule\Components;
+
+
+use App\Enum\EFlashMessage;
+use App\Model\Repository\UserRepository;
+use Nette\Application\UI\Control;
+use Nette\Application\UI\Form;
+use Nette\Security\AuthenticationException;
+
+class LoginForm extends Control
+{
+    public function render()
+    {
+        $this->template->setFile(__DIR__ . '/LoginForm.latte');
+        $this->template->render();
+    }
+
+    protected function createComponentForm()
+    {
+        $form = new Form;
+
+        $form->addText(UserRepository::COLUMN_LOGIN, 'Login');
+        $form->addPassword(UserRepository::COLUMN_PASSWORD, 'Password');
+
+        $form->addSubmit('submit', 'Login');
+
+        $form->onSuccess[] = [$this, 'formSuccess'];
+
+        return $form;
+    }
+
+    public function formSuccess(Form $form)
+    {
+        $values = $form->getValues();
+
+        try
+        {
+            $this->presenter->user->login($values->{UserRepository::COLUMN_LOGIN}, $values->{UserRepository::COLUMN_PASSWORD});
+        } catch (AuthenticationException $ex)
+        {
+            $this->presenter->flashMessage($ex->getMessage(), EFlashMessage::ERROR);
+            $this->presenter->redirect('Homepage:login');
+        }
+
+        $this->presenter->flashMessage('Přihlášení bylo úspěšné.', EFlashMessage::SUCCESS);
+        $this->presenter->redirect('Homepage:default');
+    }
+}
+
+interface ILoginFormFactory
+{
+    /**
+     * @return LoginForm
+     */
+    public function create();
+}
\ No newline at end of file
diff --git a/app/FrontModule/presenters/Error4xxPresenter.php b/app/FrontModule/presenters/Error4xxPresenter.php
new file mode 100644
index 0000000..4b35cf7
--- /dev/null
+++ b/app/FrontModule/presenters/Error4xxPresenter.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace App\FrontModule\Presenters;
+
+use Nette;
+
+
+final class Error4xxPresenter extends Nette\Application\UI\Presenter
+{
+	public function startup()
+	{
+		parent::startup();
+		if (!$this->getRequest()->isMethod(Nette\Application\Request::FORWARD)) {
+			$this->error();
+		}
+	}
+
+
+	public function renderDefault(Nette\Application\BadRequestException $exception)
+	{
+		// load template 403.latte or 404.latte or ... 4xx.latte
+		$file = __DIR__ . "/templates/Error/{$exception->getCode()}.latte";
+		$this->template->setFile(is_file($file) ? $file : __DIR__ . '/templates/Error/4xx.latte');
+	}
+}
diff --git a/app/FrontModule/presenters/ErrorPresenter.php b/app/FrontModule/presenters/ErrorPresenter.php
new file mode 100644
index 0000000..b319995
--- /dev/null
+++ b/app/FrontModule/presenters/ErrorPresenter.php
@@ -0,0 +1,41 @@
+<?php
+
+namespace App\FrontModule\Presenters;
+
+use Nette;
+use Nette\Application\Responses;
+use Nette\Http;
+use Tracy\ILogger;
+
+
+final class ErrorPresenter implements Nette\Application\IPresenter
+{
+	use Nette\SmartObject;
+
+	/** @var ILogger */
+	private $logger;
+
+
+	public function __construct(ILogger $logger)
+	{
+		$this->logger = $logger;
+	}
+
+
+	public function run(Nette\Application\Request $request)
+	{
+		$exception = $request->getParameter('exception');
+
+		if ($exception instanceof Nette\Application\BadRequestException) {
+			list($module, , $sep) = Nette\Application\Helpers::splitName($request->getPresenterName());
+			return new Responses\ForwardResponse($request->setPresenterName($module . $sep . 'Error4xx'));
+		}
+
+		$this->logger->log($exception, ILogger::EXCEPTION);
+		return new Responses\CallbackResponse(function (Http\IRequest $httpRequest, Http\IResponse $httpResponse) {
+			if (preg_match('#^text/html(?:;|$)#', $httpResponse->getHeader('Content-Type'))) {
+				require __DIR__ . '/templates/Error/500.phtml';
+			}
+		});
+	}
+}
diff --git a/app/FrontModule/presenters/HomepagePresenter.php b/app/FrontModule/presenters/HomepagePresenter.php
new file mode 100644
index 0000000..32cff43
--- /dev/null
+++ b/app/FrontModule/presenters/HomepagePresenter.php
@@ -0,0 +1,67 @@
+<?php
+
+namespace App\FrontModule\Presenters;
+
+use App\FrontModule\Components\IExampleGirdFactory;
+use App\FrontModule\Components\ILoginFormFactory;
+use App\Enum\EFlashMessage;
+use Nette;
+
+
+final class HomepagePresenter extends Nette\Application\UI\Presenter
+{
+    /** @var IExampleGirdFactory  */
+    private $exampleGridFactory;
+    /** @var ILoginFormFactory */
+    private $loginFormFactory;
+
+    public function __construct(IExampleGirdFactory $exampleGridFactory, ILoginFormFactory $loginFormFactory)
+    {
+        parent::__construct();
+
+        $this->exampleGridFactory = $exampleGridFactory;
+        $this->loginFormFactory = $loginFormFactory;
+    }
+
+    public function actionDefault()
+    {
+
+    }
+
+    public function actionLogin()
+    {
+        if ($this->user->isLoggedIn())
+        {
+            $this->redirect('Homepage:default');
+        }
+    }
+
+    public function actionLogout()
+    {
+        if ($this->getUser()->isLoggedIn())
+        {
+            $this->user->logout(true);
+
+            $this->flashMessage('Odhlášení bylo úspěšné.', EFlashMessage::SUCCESS);
+            $this->redirect('Homepage:default');
+        }
+    }
+
+    /**
+     * Komponenta přihlašovacího formuláře
+     *
+     * @return \App\FrontModule\Components\LoginForm
+     */
+    public function createComponentLoginForm()
+    {
+        return $this->loginFormFactory->create();
+    }
+
+    /**
+     * Vytvoření ukázkového gridu
+     */
+    public function createComponentDataGrid()
+    {
+        return $this->exampleGridFactory->create();
+    }
+}
diff --git a/app/FrontModule/templates/@layout.latte b/app/FrontModule/templates/@layout.latte
new file mode 100644
index 0000000..5c72501
--- /dev/null
+++ b/app/FrontModule/templates/@layout.latte
@@ -0,0 +1,112 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+
+    <title>{ifset title}{include title|stripHtml} | {/ifset}Old Babylonian Text Corpus</title>
+
+    <!-- jQuery -->
+    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
+            integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
+            crossorigin="anonymous"></script>
+
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.js"
+            integrity="sha256-wqAoCRn9//AnHSl4qbXVhqdvmgFQqN5Elqp4Eb2wOXA=" crossorigin="anonymous"></script>
+
+    <!-- Bootstrap CDN -->
+    <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet"
+          integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
+    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"
+            integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T"
+            crossorigin="anonymous"></script>
+
+    <!-- Bootstrap Select -->
+    <link rel="stylesheet"
+          href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.4/css/bootstrap-select.min.css">
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.4/js/bootstrap-select.min.js"></script>
+
+    <!-- Bootstrap Datepicker -->
+    <link rel="stylesheet"
+          href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.8.0/css/bootstrap-datepicker3.min.css"
+          integrity="sha256-mlKJFBS1jbZwwDrZD1ApO7YFS6MA1XDN37jZ9GDFC64=" crossorigin="anonymous"/>
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.8.0/js/bootstrap-datepicker.min.js"
+            integrity="sha256-tW5LzEC7QjhG0CiAvxlseMTs2qJS7u3DRPauDjFJ3zo=" crossorigin="anonymous"></script>
+    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.8.0/locales/bootstrap-datepicker.cs.min.js"
+            integrity="sha256-pbW7ult8QcDlimj+JQplrsCieqCvQ/8VGr7ZdTuev8c=" crossorigin="anonymous"></script>
+
+    <!-- Font awesome -->
+    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css"
+          integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous">
+
+    <link rel="stylesheet" href="{$basePath}/css/front/style.css">
+
+    <script src="https://nette.github.io/resources/js/netteForms.min.js"></script>
+    <script src="{$basePath}/js/nette.ajax.js"></script>
+
+</head>
+<body>
+<!--Navbar-->
+<div class="jumbotron jumbotron-fluid header-logo">
+    <div class="container text-center">
+        <div class="display-4"><a n:href=":Front:Homepage:">Old Babylonian Text Corpus</a></div>
+    </div>
+</div>
+<nav class="navbar navbar-expand-lg navbar-dark bg-primary" style="background-color: #003366 !important;">
+    <ul class="navbar-nav mr-auto">
+        <li class="nav-item">
+            <a class="nav-link" href="search-texts.html">Search & edit texts</a>
+        </li>
+        <li class="nav-item">
+            <a class="nav-link" href="#">Search dictionary</a>
+        </li>
+        <li class="nav-item">
+            <a class="nav-link" href="#">Text catalogue</a>
+        </li>
+        <li class="nav-item">
+            <a class="nav-link" href="#">Catalogue of cuneiform signs</a>
+        </li>
+        <li class="nav-item">
+            <a class="nav-link" href="#">Contact & members</a>
+        </li>
+        <li class="nav-item">
+            <a class="nav-link" href="#">Input new text</a>
+        </li>
+        <li class="nav-item">
+            <a class="nav-link" n:href=":Admin:Default:">Admin</a>
+        </li>
+    </ul>
+    {if $user->loggedIn}
+    <span class="navbar-text" style="padding-right: 1rem">
+            User: <strong>{$user->getIdentity()->username}</strong>
+        </span>
+    {/if}
+    <div class="navbar-nav nav-item">
+        {if $user->loggedIn}
+            <a class="nav-link" n:href="Homepage:logout">Logout</a>
+            <a class="nav-link" href="#">Change Password</a>
+        {else}
+            <a class="nav-link" n:href="Homepage:login">Login</a>
+        {/if}
+    </div>
+</nav>
+
+<!--Content-->
+<div class="content">
+    <div n:foreach="$flashes as $flash" n:class="alert, 'alert-' . $flash->type">{$flash->message}</div>
+
+    {include content}
+</div>
+
+{ifset scripts}{include scripts}{/ifset}
+
+<!--Footer-->
+<footer class="footer">
+    <div class="container">
+        <div class="text-center">
+            © Furat Rahman - Faculty of Philosophy - University of West Bohemia in Pilsen and Cuneiform Circle 2002-2005<br>
+            Created by Medici - Faculty of Applied Science - University of West Bohemia in Pilsen
+        </div>
+    </div>
+</footer>
+</body>
+</html>
\ No newline at end of file
diff --git a/app/FrontModule/templates/Error/403.latte b/app/FrontModule/templates/Error/403.latte
new file mode 100644
index 0000000..de00328
--- /dev/null
+++ b/app/FrontModule/templates/Error/403.latte
@@ -0,0 +1,7 @@
+{block content}
+<h1 n:block=title>Access Denied</h1>
+
+<p>You do not have permission to view this page. Please try contact the web
+site administrator if you believe you should be able to view this page.</p>
+
+<p><small>error 403</small></p>
diff --git a/app/FrontModule/templates/Error/404.latte b/app/FrontModule/templates/Error/404.latte
new file mode 100644
index 0000000..022001c
--- /dev/null
+++ b/app/FrontModule/templates/Error/404.latte
@@ -0,0 +1,8 @@
+{block content}
+<h1 n:block=title>Page Not Found</h1>
+
+<p>The page you requested could not be found. It is possible that the address is
+incorrect, or that the page no longer exists. Please use a search engine to find
+what you are looking for.</p>
+
+<p><small>error 404</small></p>
diff --git a/app/FrontModule/templates/Error/405.latte b/app/FrontModule/templates/Error/405.latte
new file mode 100644
index 0000000..d424892
--- /dev/null
+++ b/app/FrontModule/templates/Error/405.latte
@@ -0,0 +1,6 @@
+{block content}
+<h1 n:block=title>Method Not Allowed</h1>
+
+<p>The requested method is not allowed for the URL.</p>
+
+<p><small>error 405</small></p>
diff --git a/app/FrontModule/templates/Error/410.latte b/app/FrontModule/templates/Error/410.latte
new file mode 100644
index 0000000..99bde92
--- /dev/null
+++ b/app/FrontModule/templates/Error/410.latte
@@ -0,0 +1,6 @@
+{block content}
+<h1 n:block=title>Page Not Found</h1>
+
+<p>The page you requested has been taken off the site. We apologize for the inconvenience.</p>
+
+<p><small>error 410</small></p>
diff --git a/app/FrontModule/templates/Error/4xx.latte b/app/FrontModule/templates/Error/4xx.latte
new file mode 100644
index 0000000..d5ce82f
--- /dev/null
+++ b/app/FrontModule/templates/Error/4xx.latte
@@ -0,0 +1,4 @@
+{block content}
+<h1 n:block=title>Oops...</h1>
+
+<p>Your browser sent a request that this server could not understand or process.</p>
diff --git a/app/FrontModule/templates/Error/500.phtml b/app/FrontModule/templates/Error/500.phtml
new file mode 100644
index 0000000..a2b900c
--- /dev/null
+++ b/app/FrontModule/templates/Error/500.phtml
@@ -0,0 +1,27 @@
+<!DOCTYPE html><!-- "' --></textarea></script></style></pre></xmp></a></audio></button></canvas></datalist></details></dialog></iframe></listing></meter></noembed></noframes></noscript></optgroup></option></progress></rp></select></table></template></title></video>
+<meta charset="utf-8">
+<meta name="robots" content="noindex">
+<title>Server Error</title>
+
+<style>
+	#nette-error { all: initial; position: absolute; top: 0; left: 0; right: 0; height: 70vh; min-height: 400px; display: flex; align-items: center; justify-content: center; z-index: 1000 }
+	#nette-error div { all: initial; max-width: 550px; background: white; color: #333; display: block }
+	#nette-error h1 { all: initial; font: bold 50px/1.1 sans-serif; display: block; margin: 40px }
+	#nette-error p { all: initial; font: 20px/1.4 sans-serif; margin: 40px; display: block }
+	#nette-error small { color: gray }
+</style>
+
+<div id=nette-error>
+	<div>
+		<h1>Server Error</h1>
+
+		<p>We're sorry! The server encountered an internal error and
+		was unable to complete your request. Please try again later.</p>
+
+		<p><small>error 500</small></p>
+	</div>
+</div>
+
+<script>
+	document.body.insertBefore(document.getElementById('nette-error'), document.body.firstChild);
+</script>
diff --git a/app/FrontModule/templates/Error/503.phtml b/app/FrontModule/templates/Error/503.phtml
new file mode 100644
index 0000000..1c2c427
--- /dev/null
+++ b/app/FrontModule/templates/Error/503.phtml
@@ -0,0 +1,22 @@
+<?php
+
+header('HTTP/1.1 503 Service Unavailable');
+header('Retry-After: 300'); // 5 minutes in seconds
+
+?>
+<!DOCTYPE html>
+<meta charset="utf-8">
+<meta name="robots" content="noindex">
+<meta name="generator" content="Nette Framework">
+
+<style>
+	body { color: #333; background: white; width: 500px; margin: 100px auto }
+	h1 { font: bold 47px/1.5 sans-serif; margin: .6em 0 }
+	p { font: 21px/1.5 Georgia,serif; margin: 1.5em 0 }
+</style>
+
+<title>Site is temporarily down for maintenance</title>
+
+<h1>We're Sorry</h1>
+
+<p>The site is temporarily down for maintenance. Please try again in a few minutes.</p>
diff --git a/app/FrontModule/templates/Homepage/default.latte b/app/FrontModule/templates/Homepage/default.latte
new file mode 100644
index 0000000..7d5e1aa
--- /dev/null
+++ b/app/FrontModule/templates/Homepage/default.latte
@@ -0,0 +1,58 @@
+{block content}
+<div class="display-5">Old Babylonian Text Corpus by Cuneiform Circle</div>
+<hr>
+
+<div class="row">
+    <div class="col">
+        <dl class="row">
+            <dt class="col-sm-3">OB motto</dt>
+            <dd class="col-sm-9">a-na D:na-bi-um-ma-lik a-wi-lim dam-qí-im ša D:AMAR.UTU ù D:na-bi-um GI.DUB.BA-šu ú-še-še-ru (AbB 3,33,1-4)</dd>
+        </dl>
+
+        <div class="alert alert-primary">
+            If you have interest in Old Babylonian Akkadian Texts, don't hesitate to join us! You are welcome!
+        </div>
+    </div>
+    <div class="col">
+        <form method="get" action="/utf/utf/show2boger.php" onclick="this.target='_blank'" target="_blank">
+            <p class="blue">
+                <label for="borger">Input Borger's ABZ number:</label>
+                <input class="td5" type="text" id="borger" name="borger" size="3" value="333">
+                <input class="tlacitko2" type="submit" value=" find ">
+            </p>
+            <p class="blue">
+                This is a quick search to find variants of signs according to Borger's number from Old Babylonian Graphemic Analyses.
+                <a class="noline" href="/utf/utf/signs.html" onclick="this.target='_blank'">
+                    Click here for an advanced search.</a>
+
+            </p>
+            <p>
+                <a class="noline" href="/utf/utf/signs.html" target="blank">
+                    <img src="http://sp105p02-kbs.ff.zcu.cz/img/gar3.gif" width="335" height="35" alt="signs">
+                </a>
+            </p>
+        </form>
+    </div>
+</div>
+
+<hr>
+
+<p>Cuneiform Circle is a community of scholars engaged in the study of the Old Babylonian Akkadian. Our main goal is to create an Old Babylonian Text Corpus, an Old Babylonian Dictionary, and a List of Old Babylonian Cuneiform Signs.</p>
+
+<p>The Old Babylonian Text Corpus (OBTC) comprises a large text database of the Old Babylonian Akkadian Language (currently 144097 text lines, letters, documents, legal texts, royal inscriptions, omina, mathematical texts etc.).</p>
+
+<p><strong>All texts are available for search according to sign-chains (transliteration). The search engine in Old Babylonian Text Corpus verse 1 is available for everybody but the search is restricted to the following texts: Codex Hammurapi and AbB 5. The search in all 144097 lines of OBTC verse 2 is available for members only (see how to become a member) .</strong></p>
+
+<p><strong>Our service includes unique searchable lists of Old Babylonian Signs Variants as appearing in the hand copies selected for the graphemic analysis.</strong></p>
+
+<p>The work on the project is in progress. We have started in 1988-89 and have accomplished significant advances since. We are currently working towards improving the quality and scope of our databases. The full access to all materials and sources is given to active members only ( see our policy ).</p>
+{/block}
+
+{block scripts}
+    <script>
+        $(function ()
+        {
+            $.nette.init();
+        });
+    </script>
+{/block}
\ No newline at end of file
diff --git a/app/FrontModule/templates/Homepage/login.latte b/app/FrontModule/templates/Homepage/login.latte
new file mode 100644
index 0000000..39710ba
--- /dev/null
+++ b/app/FrontModule/templates/Homepage/login.latte
@@ -0,0 +1,8 @@
+{block content}
+    <div class="row">
+        <div class="col">
+            <h4>System authorization</h4>
+            {control loginForm}
+        </div>
+    </div>
+{/block}
\ No newline at end of file
diff --git a/app/component/ExampleGrid.php b/app/component/ExampleGrid.php
deleted file mode 100644
index 08f7541..0000000
--- a/app/component/ExampleGrid.php
+++ /dev/null
@@ -1,66 +0,0 @@
-<?php
-
-
-namespace App\Components;
-
-
-use App\Utils\DataGrid\DataGrid;
-use App\Model\Repository\LineRepository;
-use Ublaboo\DataGrid\Exception\DataGridException;
-
-/**
- * Ukázkový datagrid, bude smazán při předání
- *  - všechny možnosti použití gridu lze vidět na
- *  https://gitlab.com/Fifal/dvm/blob/21afc037e3604093197e140defc05925df0b8c28/web-project/app/components/variant/VariantGrid.php
- *
- * @package App\Components
- */
-class ExampleGrid extends DataGrid
-{
-    /** @var LineRepository */
-    private $lineRepository;
-
-    public function __construct(LineRepository $lineRepository)
-    {
-        $this->lineRepository = $lineRepository;
-
-        parent::__construct();
-    }
-
-    /**
-     * Abstraktní metoda, slouží k nastavení primárního klíče a nastavení datasource
-     *  1. $this->setPrimaryKey();
-     *  2. $this->setDataSource();
-     *
-     * @throws DataGridException
-     */
-    public function init()
-    {
-        $this->setPrimaryKey(LineRepository::COLUMN_ID);
-        $this->setDataSource($this->lineRepository->findAll());
-    }
-
-    /**
-     * Definice sloupečků, akcí, vyhledávácích filtrů gridu
-     *
-     * @throws DataGridException
-     */
-    public function define()
-    {
-        $this->addColumnNumber(LineRepository::COLUMN_ID, "ID");
-        $this->addColumnText(LineRepository::COLUMN_TRANSLITERATION, "Transliterace");
-        $this->addFilterText(LineRepository::COLUMN_TRANSLITERATION, "Transliterace");
-
-        $this->addAction(LineRepository::COLUMN_TRANSLITERATION, "Smazat");
-    }
-}
-
-interface IExampleGirdFactory
-{
-    /**
-     * Funkce create je implementována již v předkovi
-     *
-     * @return ExampleGrid
-     */
-    public function create();
-}
\ No newline at end of file
diff --git a/app/component/Login/LoginForm.latte b/app/component/Login/LoginForm.latte
deleted file mode 100644
index a2f7fa7..0000000
--- a/app/component/Login/LoginForm.latte
+++ /dev/null
@@ -1,11 +0,0 @@
-<div class="col-3">
-    {form form class => 'form'}
-        {label \App\Model\Repository\UserRepository::COLUMN_LOGIN}
-        {input \App\Model\Repository\UserRepository::COLUMN_LOGIN class => 'form-control'}
-
-        {label \App\Model\Repository\UserRepository::COLUMN_PASSWORD}
-        {input \App\Model\Repository\UserRepository::COLUMN_PASSWORD class => 'form-control'}
-
-        {input submit class => 'form-control btn btn-success mt-4'}
-    {/form}
-</div>
\ No newline at end of file
diff --git a/app/component/Login/LoginForm.php b/app/component/Login/LoginForm.php
deleted file mode 100644
index 263ef43..0000000
--- a/app/component/Login/LoginForm.php
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-
-
-namespace App\Components;
-
-
-use App\Enum\EFlashMessage;
-use App\Model\Repository\UserRepository;
-use Nette\Application\UI\Control;
-use Nette\Application\UI\Form;
-use Nette\Security\AuthenticationException;
-
-class LoginForm extends Control
-{
-    public function render()
-    {
-        $this->template->setFile(__DIR__ . '/LoginForm.latte');
-        $this->template->render();
-    }
-
-    protected function createComponentForm()
-    {
-        $form = new Form;
-
-        $form->addText(UserRepository::COLUMN_LOGIN, 'Login');
-        $form->addPassword(UserRepository::COLUMN_PASSWORD, 'Password');
-
-        $form->addSubmit('submit', 'Login');
-
-        $form->onSuccess[] = [$this, 'formSuccess'];
-
-        return $form;
-    }
-
-    public function formSuccess(Form $form)
-    {
-        $values = $form->getValues();
-
-        try
-        {
-            $this->presenter->user->login($values->{UserRepository::COLUMN_LOGIN}, $values->{UserRepository::COLUMN_PASSWORD});
-        } catch (AuthenticationException $ex)
-        {
-            $this->presenter->flashMessage($ex->getMessage(), EFlashMessage::ERROR);
-            $this->presenter->redirect('Homepage:login');
-        }
-
-        $this->presenter->flashMessage('Přihlášení bylo úspěšné.', EFlashMessage::SUCCESS);
-        $this->presenter->redirect('Homepage:default');
-    }
-}
-
-interface ILoginFormFactory
-{
-    /**
-     * @return LoginForm
-     */
-    public function create();
-}
\ No newline at end of file
diff --git a/app/config/components.neon b/app/config/components.neon
index 47713fa..2cb199d 100644
--- a/app/config/components.neon
+++ b/app/config/components.neon
@@ -1,6 +1,6 @@
 services:
     # Gridy
-    - App\Components\IExampleGirdFactory
+    - App\FrontModule\Components\IExampleGirdFactory
 
     # Formuláře
-    - App\Components\ILoginFormFactory
\ No newline at end of file
+    - App\FrontModule\Components\ILoginFormFactory
\ No newline at end of file
diff --git a/app/presenters/Error4xxPresenter.php b/app/presenters/Error4xxPresenter.php
deleted file mode 100644
index 6346a4a..0000000
--- a/app/presenters/Error4xxPresenter.php
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-
-namespace App\Presenters;
-
-use Nette;
-
-
-final class Error4xxPresenter extends Nette\Application\UI\Presenter
-{
-	public function startup()
-	{
-		parent::startup();
-		if (!$this->getRequest()->isMethod(Nette\Application\Request::FORWARD)) {
-			$this->error();
-		}
-	}
-
-
-	public function renderDefault(Nette\Application\BadRequestException $exception)
-	{
-		// load template 403.latte or 404.latte or ... 4xx.latte
-		$file = __DIR__ . "/templates/Error/{$exception->getCode()}.latte";
-		$this->template->setFile(is_file($file) ? $file : __DIR__ . '/templates/Error/4xx.latte');
-	}
-}
diff --git a/app/presenters/ErrorPresenter.php b/app/presenters/ErrorPresenter.php
deleted file mode 100644
index 9c093fc..0000000
--- a/app/presenters/ErrorPresenter.php
+++ /dev/null
@@ -1,41 +0,0 @@
-<?php
-
-namespace App\Presenters;
-
-use Nette;
-use Nette\Application\Responses;
-use Nette\Http;
-use Tracy\ILogger;
-
-
-final class ErrorPresenter implements Nette\Application\IPresenter
-{
-	use Nette\SmartObject;
-
-	/** @var ILogger */
-	private $logger;
-
-
-	public function __construct(ILogger $logger)
-	{
-		$this->logger = $logger;
-	}
-
-
-	public function run(Nette\Application\Request $request)
-	{
-		$exception = $request->getParameter('exception');
-
-		if ($exception instanceof Nette\Application\BadRequestException) {
-			list($module, , $sep) = Nette\Application\Helpers::splitName($request->getPresenterName());
-			return new Responses\ForwardResponse($request->setPresenterName($module . $sep . 'Error4xx'));
-		}
-
-		$this->logger->log($exception, ILogger::EXCEPTION);
-		return new Responses\CallbackResponse(function (Http\IRequest $httpRequest, Http\IResponse $httpResponse) {
-			if (preg_match('#^text/html(?:;|$)#', $httpResponse->getHeader('Content-Type'))) {
-				require __DIR__ . '/templates/Error/500.phtml';
-			}
-		});
-	}
-}
diff --git a/app/presenters/HomepagePresenter.php b/app/presenters/HomepagePresenter.php
deleted file mode 100644
index 216b596..0000000
--- a/app/presenters/HomepagePresenter.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-
-namespace App\Presenters;
-
-use App\Components\IExampleGirdFactory;
-use App\Components\ILoginFormFactory;
-use App\Enum\EFlashMessage;
-use Nette;
-
-
-final class HomepagePresenter extends Nette\Application\UI\Presenter
-{
-    /** @var IExampleGirdFactory  */
-    private $exampleGridFactory;
-    /** @var ILoginFormFactory */
-    private $loginFormFactory;
-
-    public function __construct(IExampleGirdFactory $exampleGridFactory, ILoginFormFactory $loginFormFactory)
-    {
-        parent::__construct();
-
-        $this->exampleGridFactory = $exampleGridFactory;
-        $this->loginFormFactory = $loginFormFactory;
-    }
-
-    public function actionDefault()
-    {
-
-    }
-
-    public function actionLogin()
-    {
-        if ($this->user->isLoggedIn())
-        {
-            $this->redirect('Homepage:default');
-        }
-    }
-
-    public function actionLogout()
-    {
-        if ($this->getUser()->isLoggedIn())
-        {
-            $this->user->logout(true);
-
-            $this->flashMessage('Odhlášení bylo úspěšné.', EFlashMessage::SUCCESS);
-            $this->redirect('Homepage:default');
-        }
-    }
-
-    /**
-     * Komponenta přihlašovacího formuláře
-     *
-     * @return \App\Components\LoginForm
-     */
-    public function createComponentLoginForm()
-    {
-        return $this->loginFormFactory->create();
-    }
-
-    /**
-     * Vytvoření ukázkového gridu
-     */
-    public function createComponentDataGrid()
-    {
-        return $this->exampleGridFactory->create();
-    }
-}
diff --git a/app/presenters/templates/@layout.latte b/app/presenters/templates/@layout.latte
deleted file mode 100644
index b640850..0000000
--- a/app/presenters/templates/@layout.latte
+++ /dev/null
@@ -1,112 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
-    <meta charset="UTF-8">
-
-    <title>{ifset title}{include title|stripHtml} | {/ifset}Old Babylonian Text Corpus</title>
-
-    <!-- jQuery -->
-    <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
-            integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
-            crossorigin="anonymous"></script>
-
-    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.js"
-            integrity="sha256-wqAoCRn9//AnHSl4qbXVhqdvmgFQqN5Elqp4Eb2wOXA=" crossorigin="anonymous"></script>
-
-    <!-- Bootstrap CDN -->
-    <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet"
-          integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
-    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"
-            integrity="sha384-smHYKdLADwkXOn1EmN1qk/HfnUcbVRZyYmZ4qpPea6sjB/pTJ0euyQp0Mk8ck+5T"
-            crossorigin="anonymous"></script>
-
-    <!-- Bootstrap Select -->
-    <link rel="stylesheet"
-          href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.4/css/bootstrap-select.min.css">
-    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.4/js/bootstrap-select.min.js"></script>
-
-    <!-- Bootstrap Datepicker -->
-    <link rel="stylesheet"
-          href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.8.0/css/bootstrap-datepicker3.min.css"
-          integrity="sha256-mlKJFBS1jbZwwDrZD1ApO7YFS6MA1XDN37jZ9GDFC64=" crossorigin="anonymous"/>
-    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.8.0/js/bootstrap-datepicker.min.js"
-            integrity="sha256-tW5LzEC7QjhG0CiAvxlseMTs2qJS7u3DRPauDjFJ3zo=" crossorigin="anonymous"></script>
-    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.8.0/locales/bootstrap-datepicker.cs.min.js"
-            integrity="sha256-pbW7ult8QcDlimj+JQplrsCieqCvQ/8VGr7ZdTuev8c=" crossorigin="anonymous"></script>
-
-    <!-- Font awesome -->
-    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css"
-          integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous">
-
-    <link rel="stylesheet" href="{$basePath}/css/front/style.css">
-
-    <script src="https://nette.github.io/resources/js/netteForms.min.js"></script>
-    <script src="{$basePath}/js/nette.ajax.js"></script>
-
-</head>
-<body>
-<!--Navbar-->
-<div class="jumbotron jumbotron-fluid header-logo">
-    <div class="container text-center">
-        <div class="display-4"><a href="landing-page.html">Old Babylonian Text Corpus</a></div>
-    </div>
-</div>
-<nav class="navbar navbar-expand-lg navbar-dark bg-primary" style="background-color: #003366 !important;">
-    <ul class="navbar-nav mr-auto">
-        <li class="nav-item">
-            <a class="nav-link" href="search-texts.html">Search & edit texts</a>
-        </li>
-        <li class="nav-item">
-            <a class="nav-link" href="#">Search dictionary</a>
-        </li>
-        <li class="nav-item">
-            <a class="nav-link" href="#">Text catalogue</a>
-        </li>
-        <li class="nav-item">
-            <a class="nav-link" href="#">Catalogue of cuneiform signs</a>
-        </li>
-        <li class="nav-item">
-            <a class="nav-link" href="#">Contact & members</a>
-        </li>
-        <li class="nav-item">
-            <a class="nav-link" href="#">Input new text</a>
-        </li>
-        <li class="nav-item">
-            <a class="nav-link" href="admin.html">Admin</a>
-        </li>
-    </ul>
-    {if $user->loggedIn}
-    <span class="navbar-text" style="padding-right: 1rem">
-            User: <strong>{$user->getIdentity()->username}</strong>
-        </span>
-    {/if}
-    <div class="navbar-nav nav-item">
-        {if $user->loggedIn}
-            <a class="nav-link" n:href="Homepage:logout">Logout</a>
-            <a class="nav-link" href="#">Change Password</a>
-        {else}
-            <a class="nav-link" n:href="Homepage:login">Login</a>
-        {/if}
-    </div>
-</nav>
-
-<!--Content-->
-<div class="content">
-    <div n:foreach="$flashes as $flash" n:class="alert, 'alert-' . $flash->type">{$flash->message}</div>
-
-    {include content}
-</div>
-
-{ifset scripts}{include scripts}{/ifset}
-
-<!--Footer-->
-<footer class="footer">
-    <div class="container">
-        <div class="text-center">
-            © Furat Rahman - Faculty of Philosophy - University of West Bohemia in Pilsen and Cuneiform Circle 2002-2005<br>
-            Created by Medici - Faculty of Applied Science - University of West Bohemia in Pilsen
-        </div>
-    </div>
-</footer>
-</body>
-</html>
\ No newline at end of file
diff --git a/app/presenters/templates/Error/403.latte b/app/presenters/templates/Error/403.latte
deleted file mode 100644
index de00328..0000000
--- a/app/presenters/templates/Error/403.latte
+++ /dev/null
@@ -1,7 +0,0 @@
-{block content}
-<h1 n:block=title>Access Denied</h1>
-
-<p>You do not have permission to view this page. Please try contact the web
-site administrator if you believe you should be able to view this page.</p>
-
-<p><small>error 403</small></p>
diff --git a/app/presenters/templates/Error/404.latte b/app/presenters/templates/Error/404.latte
deleted file mode 100644
index 022001c..0000000
--- a/app/presenters/templates/Error/404.latte
+++ /dev/null
@@ -1,8 +0,0 @@
-{block content}
-<h1 n:block=title>Page Not Found</h1>
-
-<p>The page you requested could not be found. It is possible that the address is
-incorrect, or that the page no longer exists. Please use a search engine to find
-what you are looking for.</p>
-
-<p><small>error 404</small></p>
diff --git a/app/presenters/templates/Error/405.latte b/app/presenters/templates/Error/405.latte
deleted file mode 100644
index d424892..0000000
--- a/app/presenters/templates/Error/405.latte
+++ /dev/null
@@ -1,6 +0,0 @@
-{block content}
-<h1 n:block=title>Method Not Allowed</h1>
-
-<p>The requested method is not allowed for the URL.</p>
-
-<p><small>error 405</small></p>
diff --git a/app/presenters/templates/Error/410.latte b/app/presenters/templates/Error/410.latte
deleted file mode 100644
index 99bde92..0000000
--- a/app/presenters/templates/Error/410.latte
+++ /dev/null
@@ -1,6 +0,0 @@
-{block content}
-<h1 n:block=title>Page Not Found</h1>
-
-<p>The page you requested has been taken off the site. We apologize for the inconvenience.</p>
-
-<p><small>error 410</small></p>
diff --git a/app/presenters/templates/Error/4xx.latte b/app/presenters/templates/Error/4xx.latte
deleted file mode 100644
index d5ce82f..0000000
--- a/app/presenters/templates/Error/4xx.latte
+++ /dev/null
@@ -1,4 +0,0 @@
-{block content}
-<h1 n:block=title>Oops...</h1>
-
-<p>Your browser sent a request that this server could not understand or process.</p>
diff --git a/app/presenters/templates/Error/500.phtml b/app/presenters/templates/Error/500.phtml
deleted file mode 100644
index a2b900c..0000000
--- a/app/presenters/templates/Error/500.phtml
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE html><!-- "' --></textarea></script></style></pre></xmp></a></audio></button></canvas></datalist></details></dialog></iframe></listing></meter></noembed></noframes></noscript></optgroup></option></progress></rp></select></table></template></title></video>
-<meta charset="utf-8">
-<meta name="robots" content="noindex">
-<title>Server Error</title>
-
-<style>
-	#nette-error { all: initial; position: absolute; top: 0; left: 0; right: 0; height: 70vh; min-height: 400px; display: flex; align-items: center; justify-content: center; z-index: 1000 }
-	#nette-error div { all: initial; max-width: 550px; background: white; color: #333; display: block }
-	#nette-error h1 { all: initial; font: bold 50px/1.1 sans-serif; display: block; margin: 40px }
-	#nette-error p { all: initial; font: 20px/1.4 sans-serif; margin: 40px; display: block }
-	#nette-error small { color: gray }
-</style>
-
-<div id=nette-error>
-	<div>
-		<h1>Server Error</h1>
-
-		<p>We're sorry! The server encountered an internal error and
-		was unable to complete your request. Please try again later.</p>
-
-		<p><small>error 500</small></p>
-	</div>
-</div>
-
-<script>
-	document.body.insertBefore(document.getElementById('nette-error'), document.body.firstChild);
-</script>
diff --git a/app/presenters/templates/Error/503.phtml b/app/presenters/templates/Error/503.phtml
deleted file mode 100644
index 1c2c427..0000000
--- a/app/presenters/templates/Error/503.phtml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-
-header('HTTP/1.1 503 Service Unavailable');
-header('Retry-After: 300'); // 5 minutes in seconds
-
-?>
-<!DOCTYPE html>
-<meta charset="utf-8">
-<meta name="robots" content="noindex">
-<meta name="generator" content="Nette Framework">
-
-<style>
-	body { color: #333; background: white; width: 500px; margin: 100px auto }
-	h1 { font: bold 47px/1.5 sans-serif; margin: .6em 0 }
-	p { font: 21px/1.5 Georgia,serif; margin: 1.5em 0 }
-</style>
-
-<title>Site is temporarily down for maintenance</title>
-
-<h1>We're Sorry</h1>
-
-<p>The site is temporarily down for maintenance. Please try again in a few minutes.</p>
diff --git a/app/presenters/templates/Homepage/default.latte b/app/presenters/templates/Homepage/default.latte
deleted file mode 100644
index 7d5e1aa..0000000
--- a/app/presenters/templates/Homepage/default.latte
+++ /dev/null
@@ -1,58 +0,0 @@
-{block content}
-<div class="display-5">Old Babylonian Text Corpus by Cuneiform Circle</div>
-<hr>
-
-<div class="row">
-    <div class="col">
-        <dl class="row">
-            <dt class="col-sm-3">OB motto</dt>
-            <dd class="col-sm-9">a-na D:na-bi-um-ma-lik a-wi-lim dam-qí-im ša D:AMAR.UTU ù D:na-bi-um GI.DUB.BA-šu ú-še-še-ru (AbB 3,33,1-4)</dd>
-        </dl>
-
-        <div class="alert alert-primary">
-            If you have interest in Old Babylonian Akkadian Texts, don't hesitate to join us! You are welcome!
-        </div>
-    </div>
-    <div class="col">
-        <form method="get" action="/utf/utf/show2boger.php" onclick="this.target='_blank'" target="_blank">
-            <p class="blue">
-                <label for="borger">Input Borger's ABZ number:</label>
-                <input class="td5" type="text" id="borger" name="borger" size="3" value="333">
-                <input class="tlacitko2" type="submit" value=" find ">
-            </p>
-            <p class="blue">
-                This is a quick search to find variants of signs according to Borger's number from Old Babylonian Graphemic Analyses.
-                <a class="noline" href="/utf/utf/signs.html" onclick="this.target='_blank'">
-                    Click here for an advanced search.</a>
-
-            </p>
-            <p>
-                <a class="noline" href="/utf/utf/signs.html" target="blank">
-                    <img src="http://sp105p02-kbs.ff.zcu.cz/img/gar3.gif" width="335" height="35" alt="signs">
-                </a>
-            </p>
-        </form>
-    </div>
-</div>
-
-<hr>
-
-<p>Cuneiform Circle is a community of scholars engaged in the study of the Old Babylonian Akkadian. Our main goal is to create an Old Babylonian Text Corpus, an Old Babylonian Dictionary, and a List of Old Babylonian Cuneiform Signs.</p>
-
-<p>The Old Babylonian Text Corpus (OBTC) comprises a large text database of the Old Babylonian Akkadian Language (currently 144097 text lines, letters, documents, legal texts, royal inscriptions, omina, mathematical texts etc.).</p>
-
-<p><strong>All texts are available for search according to sign-chains (transliteration). The search engine in Old Babylonian Text Corpus verse 1 is available for everybody but the search is restricted to the following texts: Codex Hammurapi and AbB 5. The search in all 144097 lines of OBTC verse 2 is available for members only (see how to become a member) .</strong></p>
-
-<p><strong>Our service includes unique searchable lists of Old Babylonian Signs Variants as appearing in the hand copies selected for the graphemic analysis.</strong></p>
-
-<p>The work on the project is in progress. We have started in 1988-89 and have accomplished significant advances since. We are currently working towards improving the quality and scope of our databases. The full access to all materials and sources is given to active members only ( see our policy ).</p>
-{/block}
-
-{block scripts}
-    <script>
-        $(function ()
-        {
-            $.nette.init();
-        });
-    </script>
-{/block}
\ No newline at end of file
diff --git a/app/presenters/templates/Homepage/login.latte b/app/presenters/templates/Homepage/login.latte
deleted file mode 100644
index 39710ba..0000000
--- a/app/presenters/templates/Homepage/login.latte
+++ /dev/null
@@ -1,8 +0,0 @@
-{block content}
-    <div class="row">
-        <div class="col">
-            <h4>System authorization</h4>
-            {control loginForm}
-        </div>
-    </div>
-{/block}
\ No newline at end of file
diff --git a/app/router/RouterFactory.php b/app/router/RouterFactory.php
index 2c5650d..7b2eb91 100644
--- a/app/router/RouterFactory.php
+++ b/app/router/RouterFactory.php
@@ -17,7 +17,16 @@ final class RouterFactory
 	public static function createRouter()
 	{
 		$router = new RouteList;
-		$router[] = new Route('<presenter>/<action>[/<id>]', 'Homepage:default');
-		return $router;
+
+        $frontRouter = new RouteList('Front');
+        $frontRouter[] = new Route('<action>[/<id>]', 'Homepage:default');
+
+        $adminRouter = new RouteList('Admin');
+        $adminRouter[] = new Route('admin/<presenter>/<action>[/<id>]', 'Default:default');
+
+        $router[] = $adminRouter;
+        $router[] = $frontRouter;
+
+        return $router;
 	}
 }
diff --git a/www/css/admin/style.css b/www/css/admin/style.css
new file mode 100644
index 0000000..05148b5
--- /dev/null
+++ b/www/css/admin/style.css
@@ -0,0 +1,109 @@
+.header-logo {
+    background-color: #006666;
+    color: white;
+    padding: 16px;
+    font-size: 2rem;
+    margin-bottom: 0;
+}
+
+.display-4 {
+    font-size: 2.5rem;
+}
+
+.display-4 a {
+    color: white;
+}
+
+.display-4 a:hover {
+    text-decoration: none;
+}
+
+.display-4 a:active {
+    color: white;
+}
+
+.display-4 a:visited {
+    color: white;
+}
+
+.display-5 {
+    font-size: 2rem;
+    font-weight: 300;
+    line-height: 1.2;
+}
+
+.content {
+    margin: 32px 64px;
+}
+
+html {
+    position: relative;
+    min-height: 100%;
+}
+
+body {
+    /* Margin bottom by footer height + margin */
+    margin-bottom: 96px;
+}
+
+.footer {
+    position: absolute;
+    bottom: 0;
+    width: 100%;
+    /* Set the fixed height of the footer here */
+    height: 64px;
+    padding: 8px;
+    background-color: #003366;
+    color: rgba(255, 255, 255, .5);
+}
+
+.search-options .form-group.row {
+    margin-bottom: 0.5rem;
+}
+
+.navbar.navbar-expand-lg {
+    padding-top: 0;
+    padding-bottom: 0;
+}
+
+.pagination-header {
+    margin-bottom: 0;
+    margin-top: 1rem;
+}
+
+.pagination-header ul {
+    margin-bottom: 0;
+}
+
+.linefound {
+    font-weight: bold;
+}
+
+.found {
+    font-weight: bold;
+    color: #003366;
+}
+
+.page-link {
+    color: #003366;
+}
+
+.page-item.active .page-link {
+    background-color: #003366;
+    border-color: #003366;
+}
+
+.nav .nav-item a {
+    color: #003366;
+}
+
+ul.nav {
+    background-color: #e5e5e5;
+    padding: 0 1rem;
+}
+
+li.nav-item .active{
+    background-color: #003366;
+    border-color: #003366;
+    color: #FAFAFA;
+}
\ No newline at end of file
