From 1e1e196e101562be7c0d56a9a1b3b12ab064f11c Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 23 Sep 2015 16:43:41 +0200 Subject: [PATCH] prepare for better readability in media_items Smarty code lines need an extra line appended, when followed by html, to keep the indent in compiled source code --- templates/2k11/admin/media_items.tpl | 316 +++++++++++++++------------ 1 file changed, 180 insertions(+), 136 deletions(-) diff --git a/templates/2k11/admin/media_items.tpl b/templates/2k11/admin/media_items.tpl index ccdb77f4..967d3936 100644 --- a/templates/2k11/admin/media_items.tpl +++ b/templates/2k11/admin/media_items.tpl @@ -55,163 +55,207 @@ {$img_alt="{$file.mime}"} {/if} {/if} - {* builds a ML objects link for step 1, to pass to media_choose.tpl file passthrough media.filename_only scripts - do not use "empty($link) AND" here, since that would require a reset before! *} + {* builds a ML objects link for step 1, to pass to media_choose.tpl file section: passthrough media.filename_only scripts - do not use "empty($link) AND" here, since that would require a reset before! *} {if (!$file.is_image OR $file.is_image == 0) AND $file.mediatype != 'image' AND $file.realfile} {$link="?serendipity[adminModule]=images&serendipity[adminAction]=choose&serendipity[noBanner]=true&serendipity[noSidebar]=true&serendipity[noFooter]=true&serendipity[fid]={$file.id}&serendipity[filename_only]={$media.filename_only}&serendipity[textarea]={$media.textarea}&serendipity[htmltarget]={$media.htmltarget}"} {/if} -
-
-
- -
-

{$file.realname|truncate:30:"…"}{if $file.orderkey != ''}: {$file.orderkey|escape}{/if}

- {if $file.authorid != 0}{$file.authorname}{/if} -
+
+
+
+ + +
-
-
- - {$img_alt} - -
-
    +

    {$file.realname|truncate:30:"…"}{if $file.orderkey != ''}: {$file.orderkey|escape}{/if}

    + {if $file.authorid != 0}{$file.authorname}{/if} + +
+ +
+
+ + {$img_alt} + +
+
    + {if $file.hotlink} + +
  • {$file.nice_hotlink}
  • +
  • {$CONST.MEDIA_HOTLINKED}
  • + {else} + {if $file.realname != $file.diskname} + +
  • {$file.diskname|truncate:30:"…"}
  • + {/if} + {if $file.mime} + +
  • MIME-Type: {$file.mime}
  • + {/if} + {if $file.is_image} + +
  • {$CONST.ORIGINAL_SHORT}: {$file.dimensions_width}x{$file.dimensions_height}
  • +
  • {$CONST.THUMBNAIL_SHORT}: {$file.dim.0}x{$file.dim.1}
  • + {/if} + +
  • {$CONST.IMAGE_SIZE}: {$file.nice_size} KB
  • +
  • {$CONST.INSTALL_RELUPLOADPATH}: "{$file.path}"
  • + {/if} + +
+
+
+
+ {if $media.manage || {serendipity_getConfigVar key='showMediaToolbar'}} + + + {/if} + +
+ + {if NOT $media.enclose} + +
+
+

{$file.realname}

+ {$CONST.SORT_ORDER_EXTENSION}: {$file.mime}{if $file.realname != $file.diskname}, {$file.diskname}{/if} +
+ +
+
    +
  • {$CONST.SORT_ORDER_DATE}: {if $file.authorid != 0}{$CONST.POSTED_BY} {$file.authorname} {/if}{$CONST.ON} {$file.date|formatTime:DATE_FORMAT_SHORT}
  • {if $file.hotlink} +
  • {$file.nice_hotlink}
  • -
  • {$CONST.MEDIA_HOTLINKED}
  • - {else} - {if $file.realname != $file.diskname} -
  • {$file.diskname|truncate:30:"…"}
  • - {/if} - {if $file.mime} -
  • MIME-Type: {$file.mime}
  • - {/if} - {if $file.is_image} + {elseif $file.is_image} +
  • {$CONST.ORIGINAL_SHORT}: {$file.dimensions_width}x{$file.dimensions_height}
  • {$CONST.THUMBNAIL_SHORT}: {$file.dim.0}x{$file.dim.1}
  • - {/if} -
  • {$CONST.IMAGE_SIZE}: {$file.nice_size} KB
  • -
  • {$CONST.INSTALL_RELUPLOADPATH}: "{$file.path}"
  • {/if} + +
  • {$CONST.IMAGE_SIZE}: {$file.nice_size} KB
- - - {if $media.manage || {serendipity_getConfigVar key='showMediaToolbar'}} - - {/if} -
- {if NOT $media.enclose} -
-
-

{$file.realname}

- {$CONST.SORT_ORDER_EXTENSION}: {$file.mime}{if $file.realname != $file.diskname}, {$file.diskname}{/if} -
+ -
-
    -
  • {$CONST.SORT_ORDER_DATE}: {if $file.authorid != 0}{$CONST.POSTED_BY} {$file.authorname} {/if}{$CONST.ON} {$file.date|formatTime:DATE_FORMAT_SHORT}
  • - {if $file.hotlink} -
  • {$file.nice_hotlink}
  • - {elseif $file.is_image} -
  • {$CONST.ORIGINAL_SHORT}: {$file.dimensions_width}x{$file.dimensions_height}
  • -
  • {$CONST.THUMBNAIL_SHORT}: {$file.dim.0}x{$file.dim.1}
  • - {/if} -
  • {$CONST.IMAGE_SIZE}: {$file.nice_size} KB
  • -
-
- - +
+

{$CONST.MEDIA_PROP}

+ {foreach from=$file.base_property key="prop_fieldname" item="prop_content"} -
-

{$CONST.MEDIA_PROP}

- {foreach from=$file.base_property key="prop_fieldname" item="prop_content"} -
- - {if $prop_content.type == 'textarea'} - - {elseif $prop_content.type == 'readonly'} - {$prop_content.val|escape} - {elseif $prop_content.type == 'input'} - - {/if} -
- {/foreach} - {if NOT $file.hotlink} -
- - - -
- {/if} -
+
+ + {if $prop_content.type == 'textarea'} -
-

{$CONST.MEDIA_KEYWORDS}

+ + {elseif $prop_content.type == 'readonly'} + {$prop_content.val|escape} + {elseif $prop_content.type == 'input'} -
    - {foreach from=$file.base_keywords key="keyword_row" item="keyword_cells"} - {foreach from=$keyword_cells key="keyword_cell" item="keyword"} - {if $keyword.name} -
  • -
  • + {/if} - {/foreach} - {/foreach} -
-
-
+ {/foreach} + {if NOT $file.hotlink} + +
+ + + +
{/if} - {/foreach} -
- {if $file.references} -
-

{$CONST.REFERER}

-
+ +
+

{$CONST.MEDIA_KEYWORDS}

+ +
    + {foreach from=$file.base_keywords key="keyword_row" item="keyword_cells"} + {foreach from=$keyword_cells key="keyword_cell" item="keyword"} + {if $keyword.name} + +
  • + + +
  • + {/if} + {/foreach} + {/foreach} + +
+
+ + + + + {if $file.references} +
+ +

{$CONST.REFERER}

+ + +
+ {/if} + +
{/if} -
- {/if} {/foreach}