<@cms.dictionary id=extend.dictionaryId;dictionary>
    <#if 'view'=type>
        <@cms.dictionaryData dictionaryId=extend.dictionaryId values=value><#list map as k,data>${data.text}<#sep>,</#list></@cms.dictionaryData>
    <#else>
        <#assign dictionaryId='dictionary_'+.now?long/>
        <#if 'customform'=type>
<@dictionaryElement extend.dictionaryId inputName extend.required dictionary.childDepth extend.multiple type value/>
        <#else>
            <div class="dictionary" data-id="${dictionary.id.id}" data-ref="<@cms.dictionaryExcludeList dictionaryId=dictionary.id.id><#list list as a>${a.id.excludeDictionaryId}<#sep>,</#list></@cms.dictionaryExcludeList>" data-url="common/dictionaryExclude.html" id="${dictionaryId}">
               <@dictionaryElement extend.dictionaryId inputName extend.required dictionary.childDepth extend.multiple type value/>
            </div>
        </#if>
        <#if 'customform'!=type>
            <@sys.authorized roleIds=admin.roles url='cmsDictionary/add'>
                <a class="button" href="common/dictionary.html?id=${dictionary.id.id?url}&inputName=${inputName?url}&required=${extend.required!}&multiple=${extend.multiple!}&value=${value!}" target="ajax" rel="${dictionaryId}"><i class="icon-refresh"></i><@t.page 'button.refresh'/></a>
                <#if dictionary.childDepth gt 0>
                    <a class="button" href="cmsDictionary/addChild.html?id=${dictionary.id.id?url}" target="dialog" mask="true"><@t.page 'dictionary.edit'/></a>
                <#else>
                    <a class="button" href="cmsDictionary/add.html?id=${dictionary.id.id?url}" target="navTab" rel="cmsDictionary/edit"><@t.page 'dictionary.edit'/></a>
                </#if>
            </@sys.authorized>
        </#if>
    </#if>
</@cms.dictionary>