From ea317649ac9eddf20f02cbd12748fd7f90888a4b Mon Sep 17 00:00:00 2001 From: onli Date: Sun, 23 Jun 2013 21:38:23 +0200 Subject: [PATCH] Use bigger previews in template list TODO: Generate real previews instead of downscaling the bigger ones, Cleanup inline css --- include/admin/templates.inc.php | 6 +++++- templates/2k11/admin/templates.inc.tpl | 21 ++++++++++++++------- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/include/admin/templates.inc.php b/include/admin/templates.inc.php index ab66238b..b768f322 100644 --- a/include/admin/templates.inc.php +++ b/include/admin/templates.inc.php @@ -169,7 +169,11 @@ foreach ($stack as $theme => $info) { if (file_exists($serendipity['serendipityPath'] . $serendipity['templatePath'] . $theme . '/preview_fullsize.jpg')) { $data['templates'][$theme]['fullsize_preview'] = $serendipity['baseURL'] . $serendipity['templatePath'] . $theme . '/preview_fullsize.jpg'; } elseif (!empty($info['preview_fullsizeURL'])) { - $data['templates'][$theme]['fullsize_preview'] = $info['preview_fullsizeURL']; + if (file_exists($serendipity['serendipityPath'] . '/templates_c/template_cache/'. $theme .'.jpg')) { + $data['templates'][$theme]['fullsize_preview'] = $serendipity['baseURL'] . 'templates_c/template_cache/'. $theme .'.jpg'; + } else { + $data['templates'][$theme]['fullsize_preview'] = $info['preview_fullsizeURL']; + } } if (file_exists($serendipity['serendipityPath'] . $serendipity['templatePath'] . $theme . '/preview.png')) { diff --git a/templates/2k11/admin/templates.inc.tpl b/templates/2k11/admin/templates.inc.tpl index 74688fbd..48aaffa5 100644 --- a/templates/2k11/admin/templates.inc.tpl +++ b/templates/2k11/admin/templates.inc.tpl @@ -33,9 +33,13 @@
{if $cur_tpl.fullsize_preview || $cur_tpl.preview} - {if $cur_tpl.fullsize_preview}{/if} - {if $cur_tpl.preview}{$CONST.PREVIEW}{/if} - {if $cur_tpl.fullsize_preview}{/if} + {if $cur_tpl.fullsize_preview} + + {$CONST.PREVIEW} + + {else} + {$CONST.PREVIEW} + {/if} {/if}