summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Fowler <spider@viovio.com>2009-02-22 06:21:15 +0000
committerChristian Fowler <spider@viovio.com>2009-02-22 06:21:15 +0000
commitcda97bdb7bfc0f184b3380b8f22521a10bdba475 (patch)
tree6daae50e36f30a0d56126e03be215b0d70b0956b
parent956b77541763bcb32f13a44367dcced2013c0efe (diff)
downloadliberty-cda97bdb7bfc0f184b3380b8f22521a10bdba475.tar.gz
liberty-cda97bdb7bfc0f184b3380b8f22521a10bdba475.tar.bz2
liberty-cda97bdb7bfc0f184b3380b8f22521a10bdba475.zip
add whitespace for conditional levels so code is readable, call {php} include (LIBERTY_PKG_PATH.'edit_storage_inc.php'); {/php} in LibertyMime default scenario, else deleteAttachment does not work
-rw-r--r--templates/edit_storage.tpl85
1 files changed, 39 insertions, 46 deletions
diff --git a/templates/edit_storage.tpl b/templates/edit_storage.tpl
index 738f464..b9cd482 100644
--- a/templates/edit_storage.tpl
+++ b/templates/edit_storage.tpl
@@ -12,62 +12,55 @@
{include file=$tpl}
{/foreach}
+ {if $gBitUser->hasPermission('p_liberty_attach_attachments') }
+ {php} include (LIBERTY_PKG_PATH."edit_storage_inc.php"); {/php}
+ {/if}
{include file="bitpackage:liberty/edit_storage_list.tpl" uploadTab=TRUE}
+
{else}
-{* this condition is a temporary hack to disable ajax uploads on new content to avoid bogus entires in liberty_attachments.
- * we all want to see this working asap and are thinking of the best way to fix this - xing - Wednesday Nov 14, 2007 18:38:18 CET *}
-{if $gBitSystem->getConfig('liberty_attachment_style') != 'ajax' || $gContent->isValid()}
+ {* this condition is a temporary hack to disable ajax uploads on new content to avoid bogus entires in liberty_attachments.
+ * we all want to see this working asap and are thinking of the best way to fix this - xing - Wednesday Nov 14, 2007 18:38:18 CET *}
+ {if $gBitSystem->getConfig('liberty_attachment_style') != 'ajax' || $gContent->isValid()}
-{if $gBitUser->hasPermission('p_liberty_attach_attachments') }
- {php} include (LIBERTY_PKG_PATH."edit_storage_inc.php"); {/php}
- {foreach from=$gLibertySystem->mPlugins item=plugin key=guid}
- {* $no_plugins is set by the including template *}
- {if $plugin.is_active eq 'y' and $plugin.edit_field and $plugin.plugin_type eq 'storage' and !$no_plugins}
- <div class="row">
- {formlabel label=`$plugin.edit_label`}
- {forminput}
- {eval var=$plugin.edit_field}
- {formhelp note=`$plugin.edit_help`}
- {/forminput}
- </div>
+ {if $gBitUser->hasPermission('p_liberty_attach_attachments') }
+ {php} include (LIBERTY_PKG_PATH."edit_storage_inc.php"); {/php}
+ {foreach from=$gLibertySystem->mPlugins item=plugin key=guid}
+ {* $no_plugins is set by the including template *}
+ {if $plugin.is_active eq 'y' and $plugin.edit_field and $plugin.plugin_type eq 'storage' and !$no_plugins}
+ <div class="row">
+ {formlabel label=`$plugin.edit_label`}
+ {forminput}
+ {eval var=$plugin.edit_field}
+ {formhelp note=`$plugin.edit_help`}
+ {/forminput}
+ </div>
+ {/if}
+ {/foreach}
{/if}
- {/foreach}
-{/if}
-{include file="bitpackage:liberty/edit_storage_list.tpl" uploadTab=TRUE}
-{else}
+ {include file="bitpackage:liberty/edit_storage_list.tpl" uploadTab=TRUE}
+ {else}
-{if $gBitUser->hasPermission('p_liberty_attach_attachments') }
- {php} include (LIBERTY_PKG_PATH."edit_storage_inc.php"); {/php}
- {foreach from=$gLibertySystem->mPlugins item=plugin key=guid}
- {* $no_plugins is set by the including template *}
- {if $plugin.is_active eq 'y' and $plugin.edit_field and $plugin.plugin_type eq 'storage' and !$no_plugins}
- <div class="row">
- {formlabel label=`$plugin.edit_label`}
- {forminput}
- {eval var=$plugin.edit_field_new}
- {formhelp note=`$plugin.edit_help_new`}
- {/forminput}
- </div>
+ {if $gBitUser->hasPermission('p_liberty_attach_attachments') }
+ {php} include (LIBERTY_PKG_PATH."edit_storage_inc.php"); {/php}
+ {foreach from=$gLibertySystem->mPlugins item=plugin key=guid}
+ {* $no_plugins is set by the including template *}
+ {if $plugin.is_active eq 'y' and $plugin.edit_field and $plugin.plugin_type eq 'storage' and !$no_plugins}
+ <div class="row">
+ {formlabel label=`$plugin.edit_label`}
+ {forminput}
+ {eval var=$plugin.edit_field_new}
+ {formhelp note=`$plugin.edit_help_new`}
+ {/forminput}
+ </div>
+ {/if}
+ {/foreach}
{/if}
- {/foreach}
-{/if}
-{/if}
-{* end of annoying ajax upload prevention hack *}
+ {/if}
-{* The new attachment browser is supposd to only provide an easy means of
-viewing existing content that can be inserted into the contnet using
-{attachment} or {content} or similar. there is no means to attach and detach
-content anymore *}
-{*if $gBitUser->hasPermission('p_liberty_attach_attachments') }
- <h2 class="clear"><a href="javascript:void(0);" onclick="BitAjax.updater( 'attbrowser', '{$smarty.const.LIBERTY_PKG_URL}ajax_attachment_browser.php', 'ajax=true&amp;content_id={$gContent->mContentId}' );">{tr}Attachment Browser{/tr}</a></h2>
- <noscript><div class="warning">{tr}The attachment browser only works with javascript enabled.{/tr}</div></noscript>
- <div id="attbrowser" class="attbrowser"><p>{tr}Please click on the Attachement Browser link above to view available attachments.{/tr}</p></div>
-{else}
- <p>{tr}Sorry - you do not have permission to attach files to this content.{/tr}</p>
-{/if*}
+ {* end of annoying ajax upload prevention hack *}
{/if}
{/strip}