diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-09-19 22:40:09 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-12-20 09:38:43 +0300 |
commit | dfff288d1eec7b7f9a1c7339b7acb8c201784dde (patch) | |
tree | 15bb20fb94d6f782c19e2ce0fa3824e24bf8ae69 /templates | |
parent | a5eb500d5ef336e9e9629c8fd709383ad2a0e31d (diff) |
Template picker and system tpl script fixes
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'templates')
-rw-r--r-- | templates/admin.php | 49 | ||||
-rw-r--r-- | templates/templatePicker.html | 17 |
2 files changed, 40 insertions, 26 deletions
diff --git a/templates/admin.php b/templates/admin.php index ffd4fa2e..566da894 100644 --- a/templates/admin.php +++ b/templates/admin.php @@ -58,34 +58,31 @@ script('files', 'jquery.fileupload'); <?php p($l->t('Global templates')) ?> <label for="add-template" class="icon-add" title="<?php p($l->t('Add a new template')); ?>"></label> </h2> - <?php if (!empty($_['templates'])) { ?> - <ul> - <li class="hidden template-model"> + <div id="emptycontent" class="<?php p(empty($_['templates'])?:'hidden') ?>"> + <div class="icon-file"></div> + <h2> + <?php p($l->t('No templates defined.')); ?> + </h2> + <label for="add-template"><?php p($l->t('Add a new one?')); ?></label> + </div> + <ul class="<?php p(!empty($_['templates'])?:'hidden') ?>"> + <li class="hidden template-model"> + <figure> + <img src="" alt="<?php p($l->t('template preview')) ?>" /> + <figcaption></figcaption> + </figure> + <a href="" class="delete-template icon-delete"></a> + <div class="delete-cover"></div> + </li> + <?php foreach ($_['templates'] as $template) {?> + <li> <figure> - <img src="" alt="<?php p($l->t('template preview')) ?>" /> - <figcaption></figcaption> + <img src="<?php p($template['preview']) ?>?y=297&x=210" alt="<?php p($l->t('template preview')) ?>" /> + <figcaption><?php p($template['name']) ?></figcaption> </figure> - <a href="" class="delete-template icon-delete"></a> + <a href="<?php p($template['delete']) ?>" class="delete-template icon-delete"></a> <div class="delete-cover"></div> </li> - <?php foreach ($_['templates'] as $template) {?> - <li> - <figure> - <img src="<?php p($template['preview']) ?>?y=297&x=210" alt="<?php p($l->t('template preview')) ?>" /> - <figcaption><?php p($template['name']) ?></figcaption> - </figure> - <a href="<?php p($template['delete']) ?>" class="delete-template icon-delete"></a> - <div class="delete-cover"></div> - </li> - <?php } ?> - </ul> - <?php } else { ?> - <div id="emptycontent"> - <div class="icon-file"></div> - <h2> - <?php p($l->t('No templates defined.')); ?> - </h2> - <label for="add-template"><?php p($l->t('Add a new one?')); ?></label> - </div> - <?php } ?> + <?php } ?> + </ul> </form> diff --git a/templates/templatePicker.html b/templates/templatePicker.html new file mode 100644 index 00000000..74c1b8be --- /dev/null +++ b/templates/templatePicker.html @@ -0,0 +1,17 @@ +<div id="{dialog_name}" title="{dialog_title}"> + <div class="template-container"> + <a class="hidden template-model" href="#"> + <span> + <img src="" alt="" /> + <h2></h2> + </span> + </a> + <a class="default" href="#"> + <span> + <span class="icon-add-white"></span> + <h2>{default_name}</h2> + </span> + </a> + </div> +</div> +
\ No newline at end of file |