diff options
| author | Greg Roach <fisharebest@gmail.com> | 2017-11-14 13:17:08 +0000 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2017-11-14 13:17:25 +0000 |
| commit | 19697c2f4600863983dd0b30d59a76a8899491a5 (patch) | |
| tree | a53eacd014af7db5bb48df573cd83158d7704f95 /resources | |
| parent | 146665a09881ba7f08551448b6b61ab1d82aa237 (diff) | |
| download | webtrees-19697c2f4600863983dd0b30d59a76a8899491a5.tar.gz webtrees-19697c2f4600863983dd0b30d59a76a8899491a5.tar.bz2 webtrees-19697c2f4600863983dd0b30d59a76a8899491a5.zip | |
Working on front-controller, and moving themes to views
Diffstat (limited to 'resources')
| -rw-r--r-- | resources/views/admin/modules.php | 6 | ||||
| -rw-r--r-- | resources/views/home-page.php | 42 | ||||
| -rw-r--r-- | resources/views/layouts/administration.php | 6 | ||||
| -rw-r--r-- | resources/views/layouts/default.php | 36 |
4 files changed, 85 insertions, 5 deletions
diff --git a/resources/views/admin/modules.php b/resources/views/admin/modules.php index ce8d12b9fe..8b7d1a4363 100644 --- a/resources/views/admin/modules.php +++ b/resources/views/admin/modules.php @@ -206,3 +206,9 @@ <i class="fa fa-check"></i> <?= I18N::translate('save') ?></button> </form> + +<script> + document.addEventListener("DOMContentLoaded", function(event) { + $(".table-module-administration").dataTable(<?= json_encode(I18N::datatablesI18N()) ?>); + } +</script> diff --git a/resources/views/home-page.php b/resources/views/home-page.php new file mode 100644 index 0000000000..c1c297ad60 --- /dev/null +++ b/resources/views/home-page.php @@ -0,0 +1,42 @@ +<?php use Fisharebest\Webtrees\Html; ?> +<?php use Fisharebest\Webtrees\I18N; ?> + +<h2 class="wt-page-title"> + HOME PAGE +</h2> + +<div class="row"> + <?php if (empty($main_blocks) || empty($side_blocks)): ?> + <div class="col-sm-12 wt-main-blocks"> + <?php foreach ($main_blocks + $side_blocks as $block_id => $block): ?> + <?php if ($block->loadAjax()): ?> + <div class="wt-ajax-load" data-ajax-url="<?= Html::escape(Html::url('index.php', ['ctype' => 'gedcom', 'block_id' => $block_id, 'ajax' => 1])) ?>"> + </div> + <?php else: ?> + <?= $block->getBlock($block_id) ?> + <?php endif ?> + <?php endforeach ?> + </div> + <?php else: ?> + <div class="col-sm-8 wt-main-blocks"> + <?php foreach ($main_blocks as $block_id => $block): ?> + <?php if ($block->loadAjax()): ?> + <div class="wt-ajax-load" data-ajax-url="<?= Html::escape(Html::url('index.php', ['ctype' => 'gedcom', 'block_id' => $block_id, 'ajax' => 1])) ?>"> + </div> + <?php else: ?> + <?= $block->getBlock($block_id) ?> + <?php endif ?> + <?php endforeach ?> + </div> + <div class="col-sm-4 wt-side-blocks"> + <?php foreach ($side_blocks as $block_id => $block): ?> + <?php if ($block->loadAjax()): ?> + <div class="wt-ajax-load" data-ajax-url="<?= Html::escape(Html::url('index.php', ['ctype' => 'gedcom', 'block_id' => $block_id, 'ajax' => 1])) ?>"> + </div> + <?php else: ?> + <?= $block->getBlock($block_id) ?> + <?php endif ?> + <?php endforeach ?> + </div> + <?php endif ?> +</div> diff --git a/resources/views/layouts/administration.php b/resources/views/layouts/administration.php index 77242ae5c1..9f54abbfd3 100644 --- a/resources/views/layouts/administration.php +++ b/resources/views/layouts/administration.php @@ -11,9 +11,7 @@ <title><?= $title ?></title> - <link rel="icon" type="image/png" href="<?= Html::escape($common_url) ?>favicon.png"> - <link rel="icon" type="image/png" href="<?= Html::escape($common_url) ?>favicon192.png" sizes="192x192"> - <link rel="apple-touch-icon" sizes="180x180" href="<?= Html::escape($common_url) ?>favicon180.png"> + <link rel="icon" href="favicon.ico" type="image/x-icon"> <link rel="stylesheet" type="text/css" href="<?= Html::escape(WT_BOOTSTRAP_CSS_URL) ?>"> <link rel="stylesheet" type="text/css" href="<?= Html::escape(WT_FONT_AWESOME_CSS_URL) ?>"> @@ -80,7 +78,5 @@ <script src="<?= Html::escape(WT_BOOTSTRAP_DATETIMEPICKER_JS_URL) ?>"></script> <script src="<?= Html::escape(WT_WEBTREES_JS_URL) ?>"></script> <script src="<?= Html::escape(WT_ADMIN_JS_URL) ?>"></script> - - <?= $javascript ?> </body> </html> diff --git a/resources/views/layouts/default.php b/resources/views/layouts/default.php new file mode 100644 index 0000000000..c61c379499 --- /dev/null +++ b/resources/views/layouts/default.php @@ -0,0 +1,36 @@ +<?php use Fisharebest\Webtrees\Database; ?> +<?php use Fisharebest\Webtrees\Filter; ?> +<?php use Fisharebest\Webtrees\FlashMessages; ?> +<?php use Fisharebest\Webtrees\Html; ?> +<?php use Fisharebest\Webtrees\I18N; ?> +<!DOCTYPE html> +<html <?= I18N::htmlAttributes() ?>> + <?= $theme_head ?> + <?= $theme_body_header ?> + + <?= $content ?> + + <?= $theme_footer_container ?> + + <script> + // Global constants + var WT_MODULES_DIR = <?= json_encode(WT_MODULES_DIR) ?>; + var WT_GEDCOM = <?= json_encode($tree ? $tree->getName() : '') ?>; + var textDirection = <?= json_encode(I18N::direction()) ?>; + var WT_LOCALE = <?= json_encode(WT_LOCALE) ?>; + </script> + + <script src="<?= Html::escape(WT_JQUERY_JS_URL) ?>"></script> + <script src="<?= Html::escape(WT_POPPER_JS_URL) ?>"></script> + <script src="<?= Html::escape(WT_BOOTSTRAP_JS_URL) ?>"></script> + <script src="<?= Html::escape(WT_DATATABLES_JS_URL) ?>"></script> + <script src="<?= Html::escape(WT_DATATABLES_BOOTSTRAP_JS_URL) ?>"></script> + <script src="<?= Html::escape(WT_SELECT2_JS_URL) ?>"></script> + <script src="<?= Html::escape(WT_WEBTREES_JS_URL) ?>"></script> + + </body> +</html> +<!-- webtrees: <?= WT_VERSION ?> -->' . +<!-- Execution time: <?= I18N::number(microtime(true) - WT_START_TIME, 3) ?> seconds --> +<!-- Memory: <?= I18N::number(memory_get_peak_usage(true) / 1024) ?> KB --> +<!-- SQL queries: <?= I18N::number(Database::getQueryCount()) ?> --> |
