Subversion Repositories enhancedezbinaryfile

[/] [design/] [standard/] [templates/] [content/] [datatype/] [result/] [info/] [enhancedezbinaryfile.tpl] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1 steven.bailey
{def    $ShowFullPath=ezini( "Security", "ShowFullPath", 'module.ini' )
2
        $current_user=fetch('user','current_user')
3
        $inGroup=false()
4
}
5
 
6
{if $mail} {*set in content/collectedinfo/form only for mail*}
7
        {if eq(ezini( "Security", "FullPathMail", 'module.ini' ),"enabled")}
8
                {set $inGroup=true()}
9
        {/if}
10
{/if}
11
 
12
{if $attribute.data_text}
13
        {if and(eq($ShowFullPath,"enabled"),$inGroup|not)}
14
                {*No need to do this check if $inGroup is already true*}
15
                {def $FullPathGroups=ezini( "Security", "FullPathGroups", 'module.ini' )}
16
                {foreach $FullPathGroups as $group}
17
                        {if $current_user.groups|contains($group)}
18
                                {set $inGroup=true()}
19
                                {break}
20
                        {/if}
21
                {/foreach}
22
        {/if}
23
{$attribute.data_text|parsexml("OriginalFilename")|wash} {'succesfully uploaded.'|i18n( 'design/standard/content/datatype' )}
24
        {if $inGroup}
25 3 steven.bailey
                {if eq($attribute.data_text|filecheck,true)}
26
                        {if $mail} {*text*}
27
                                {* This goes to the collectedinfo admin mail if enabled*}
28 1 steven.bailey
http://{ezini( "SiteSettings", "SiteURL" )}{$attribute.data_text|parsexml("Filename")|wash|ezroot(no)}
29 3 steven.bailey
                        {else} {*html*}
30
                                        <br>{'Link'|i18n( 'design/standard/content/datatype' )}: <a href={$attribute.data_text|parsexml('Filename')|ezroot}>{$attribute.data_text|parsexml("OriginalFilename")}</a>
31
                        {/if}
32 1 steven.bailey
                {/if}
33
        {/if}
34
{else}
35
{'No file uploaded.'|i18n( 'design/standard/content/datatype' )}
36
{/if}