2012-08-01 11:00:12 +00:00
< h2 > Edit templates< / h2 >
< p > < / p >
{assign var='templates' value=$cbtpl->get_templates()}
2012-04-28 20:11:43 +00:00
2012-08-01 11:00:12 +00:00
< div class = "row show-grid" >
< div class = "span3" >
< h4 > Layout Files< / h4 >
< div class = "height10" > < / div >
< div class = "well" style = "padding: 8px 0;" >
< ul class = "nav nav-list" >
{foreach from=$tpl_files item=tplfile key=folder}
{if !is_array($tplfile)}
< li { if $ smarty . get . file = =$tplfile | | ( ! $ smarty . get . file & & $ tplfile = = ' index . html ' ) } class = "active" { / if } > < a href = "?dir={$sel_dir}&file={$tplfile}&folder=layout" > {$tplfile}< / a > < / li >
{/if}
2012-04-28 20:11:43 +00:00
{/foreach}
2012-08-01 11:00:12 +00:00
{foreach from=$layoutDirs item=dir key=name}
< li class = "nav-header" > {$name}< / li >
< ul class = "nav nav-list" >
{if $dir.dirs}
{foreach from=$dir.dirs item=subdir key=subname}
< li class = "nav-header" > {$subname}< / li >
< ul class = "nav nav-list" >
{foreach from=$subdir item=subfile key=subfilename}
< li { if $ smarty . get . file = =$subfile & & $ smarty . get . folder = ="layout/$name/$subname"} class = "active" { / if } >
< a href = "?dir={$sel_dir}&file={$subfile}&folder=layout/{$name}/{$subname}" > {$subfile}< / a > < / li >
{/foreach}
< / ul >
2012-04-28 20:11:43 +00:00
{/foreach}
2012-08-01 11:00:12 +00:00
{/if}
{foreach from=$dir.files item=file}
< li { if $ smarty . get . file = =$file & & $ smarty . get . folder = ="layout/$name"} class = "active" { / if } > < a href = "?dir={$sel_dir}&file={$file}&folder=layout/{$name}" > {$file}< / a > < / li >
{/foreach}
< / ul >
{/foreach}
2012-04-28 20:11:43 +00:00
< / ul >
2012-08-01 11:00:12 +00:00
< / div >
< h4 > CSS Files< / h4 >
< div class = "height10" > < / div >
< div class = "well" style = "padding: 8px 0px" >
< ul class = "nav nav-list" >
{foreach from=$css_files item=cssfile}
{if !is_array($cssfile)}
< li { if $ smarty . get . file = =$cssfile} class = "active" { / if } > < a href = "?dir={$sel_dir}&file={$cssfile}&folder=theme" > {$cssfile}< / a > < / li >
{/if}
{/foreach}
< / ul >
< / div >
< / div >
2012-04-28 20:11:43 +00:00
2012-08-01 19:21:53 +00:00
< div class = "span8 relative" >
2012-08-01 11:00:12 +00:00
{if $templates}
< form name = "select_template" action = "" method = "get" class = "form-horizontal pull-right marginB0 absolute" style = "right:0px; top:-7px;" >
< select name = "dir" id = "template_to_edit" >
{foreach from=$templates item=template}
< option value = "{$template.dir}" { if $ sel_dir = =$template.dir} selected { / if } > {$template.name}< / option >
{/foreach}
< / select >
< input type = "submit" name = "select" value = "Select" class = "btn btn-primary" / >
< / form >
2012-04-28 20:11:43 +00:00
{/if}
2012-08-01 11:00:12 +00:00
< h4 class = "inlineblock" style = "vertical-align: middle" > {$tpl.name}: {if $smarty.get.folder}{$smarty.get.folder}/{else}layout/{/if}{if $smarty.get.file}{$smarty.get.file}{else}index.html{/if}< / h4 >
< div class = "height10" > < / div >
< form name = "file_content" action = "" method = "post" >
< textarea name = "thecontent" class = "border-box file_content" > {if $content}{$content}{else}No File Selected{/if}< / textarea >
< div class = "form-actions" >
{if $writeable == 'no'}
< h4 > This file is not writable, please set '{$smarty.get.file}' permissions to < code > 0777< / code > - < a href = "http://docs.clip-bucket.com/clipbucket-docs/files-folder-permissions" target = "_blank" > More Details< / a > < / h4 >
{else}
< input type = "submit" name = "update_file" value = "Update File" class = "btn btn-primary btn-large" / >
{/if}
< / div >
< / form >
< / div >
2012-04-28 20:11:43 +00:00
< / div >