{title help='Content Templates' url='tiki-admin_content_templates.php'}{tr}Content templates{/tr}{/title} {tabset} {tab name="{tr}Templates{/tr}"}

{tr}Templates{/tr}

{if $channels or ($find ne '')} {include file='find.tpl'} {/if} {if $prefs.lock_content_templates eq 'y'} {/if} {cycle values="odd,even" print=false advance=false} {section name=user loop=$channels} {if $prefs.lock_content_templates eq 'y'} {/if} {sectionelse} {norecords _colspan=6} {/section}
{tr}Id{/tr} {tr}Name{/tr} {tr}Last modified{/tr} {tr}Sections{/tr} {tr}Categories{/tr}
{$channels[user].templateId} {if $channels[user].edit} {$channels[user].name|escape} {else} {$channels[user].name|escape} {/if} {$channels[user].created|tiki_short_datetime} {if count($channels[user].sections) == 0}{tr}Visible in no sections{/tr}{/if} {section name=ix loop=$channels[user].sections} {$channels[user].sections[ix]} {if $channels[user].edit} {icon name='remove' alt="{tr}Remove section{/tr}"} {/if} {/section} {if count($channels[user].categories) == 0}{tr}Uncategorized{/tr}{/if} {foreach $channels[user].categories as $categId => $catName} {tr}{$catName}{/tr} {/foreach} {lock type='template' object=$channels[user].templateId} {if $channels[user].edit or $channels[user].remove} {actions} {strip} {if $channels[user].edit} {icon name='edit' _menu_text='y' _menu_icon='y' alt="{tr}Edit{/tr}"} {/if} {if $channels[user].remove} {icon name='remove' _menu_text='y' _menu_icon='y' alt="{tr}Remove{/tr}"} {/if} {/strip} {/actions} {/if}
{pagination_links cant=$cant_pages step=$prefs.maxRecords offset=$offset}{/pagination_links} {/tab} {if $canEdit} {if $templateId} {$tabtitle="{tr}Edit template:{/tr} {$info.name|escape}"} {else} {$tabtitle="{tr}Create template{/tr}"} {/if} {tab name=$tabtitle} {remarksbox type="tip" title="{tr}Tip{/tr}"}{tr}Use the Administration page of each enabled feature to allow the use of content templates.{/tr}{/remarksbox} {if $preview eq 'y'}

{tr}Preview{/tr}

{$parsed}
{/if}

{$tabtitle}

{if $templateId > 0 and $tiki_p_admin_content_templates eq 'y'} {button href="tiki-admin_content_templates.php" cookietab="2" _icon_name="create" _text="{tr}Create{/tr}"} {/if}
{ticket}
{if $emptyname} {tr}Name field is mandatory{/tr} {/if}
{$toolbar_section='admin'} {if $prefs.feature_cms_templates eq 'y'}
{/if} {if $prefs.feature_wiki_templates eq 'y'}
{/if} {if $prefs.feature_file_galleries_templates eq 'y'}
{/if} {if $prefs.feature_newsletters eq 'y'}
{/if} {if $prefs.feature_events eq 'y'}
{/if} {if $prefs.feature_html_pages eq 'y'}
{/if} {if ($prefs.feature_cms_templates ne 'y') and ($prefs.feature_wiki_templates ne 'y') and ($prefs.feature_file_galleries_templates ne 'y') and ($prefs.feature_newsletters ne 'y') and ($prefs.feature_events ne 'y') and ($prefs.feature_html_pages ne 'y')} {tr}No features are configured to use templates.{/tr} {/if}
{if $prefs.lock_content_templates eq 'y'}
{lock type='template' object=$templateId}
{/if}
{autocomplete element='input[name=page_name]' type='pagename'}
{include file='categorize.tpl'}
{if $prefs.feature_wysiwyg eq 'y' and $info.section_wiki_html eq 'y'} {$use_wysiwyg='y'} {if $prefs.wysiwyg_htmltowiki eq 'y'}{$is_html = 'y'}{else}{$is_html = 'n'}{/if} {else} {$use_wysiwyg='n'} {$is_html = 'n'} {/if} {textarea id="editwiki" name="content" switcheditor="y" _class="form-control" _wysiwyg=$use_wysiwyg _is_html=$is_html section=$toolbar_section}{$info.content}{/textarea}
{jq} $('#type-selector').change( function( e ) { $('.type-cond').hide(); var val = $('#type-selector').val(); $('.for-' + val).show(); } ).trigger('change'); needToConfirm = false; {/jq}
{/tab} {/if} {/tabset}