diff options
| -rw-r--r-- | templates/mime_view.tpl | 10 | ||||
| -rw-r--r-- | view_file.php | 7 |
2 files changed, 16 insertions, 1 deletions
diff --git a/templates/mime_view.tpl b/templates/mime_view.tpl index 456a1f8..2ece534 100644 --- a/templates/mime_view.tpl +++ b/templates/mime_view.tpl @@ -37,6 +37,16 @@ </div> {/legend} + {if $usage} + {legend legend="Content this attachment is used in"} + <ul> + {foreach from=$usage item=use} + <li><a href="{$smarty.const.BIT_ROOT_URL}index.php?content_id={$use.content_id}">{$use.title}</a></li> + {/foreach} + </ul> + {/legend} + {/if} + </div><!-- end .body --> </div><!-- end .attachment --> {/strip} diff --git a/view_file.php b/view_file.php index 643621e..8fc43e9 100644 --- a/view_file.php +++ b/view_file.php @@ -1,6 +1,6 @@ <?php /** - * @version $Header: /cvsroot/bitweaver/_bit_liberty/view_file.php,v 1.4 2008/07/01 09:04:10 squareing Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_liberty/view_file.php,v 1.5 2008/07/18 12:39:38 squareing Exp $ * * @author xing <xing@synapse.plus.com> * @package treasury @@ -37,6 +37,11 @@ if( !empty( $_REQUEST['plugin_submit'] )) { $attachment = LibertyMime::getAttachment( $_REQUEST['attachment_id'] ); } +// attachment usage filter stuff is hardcoded for now - ugly as hell but we'll survive it as long as there's no demand for more of these. +if( $gLibertySystem->isPluginActive( 'filterattachment' )) { + $gBitSmarty->assign( 'usage', attachment_filter_get_usage( $attachment['attachment_id'] )); +} + $gBitSmarty->assign( 'attachment', $attachment ); $gBitSmarty->assign( 'gContent', $gContent ); $gBitSmarty->assign( 'feedback', $feedback ); |
