2014-01-23 14:00:36 +00:00
{assign var=requiredFields value=$cbcollection->load_required_fields($data)}
{assign var=otherFields value=$cbcollection->load_other_fields($data)}
< form action = "" method = "post" enctype = "multipart/form-data" name = "edit_collection" id = "edit_collection" >
< div class = "row" >
< div class = "lead dropdown" > Editing {$data.collection_name}
< a class = "btn btn-primary btn-sm dropdown-toggle pull-right" data-toggle = "dropdown" href = "" > Actions < i class = "caret" > < / i > < / a >
< ul class = "dropdown-menu pull-right" role = "menu" aria-labelledby = "dropdownMenu1" >
{if $data.active!='yes'}
< li role = "presentation" > < a role = "menuitem" tabindex = "-1" href = "edit_collection.php?collection={$data.collection_id}&mode=ac" > Activate< / a > < / li >
{else}
< li role = "presentation" > < a role = "menuitem" tabindex = "-1" href = "edit_collection.php?collection={$data.collection_id}&mode=dac" > Deactivate< / a > < / li >
{/if}
{if $data.featured!='yes'}
< li role = "presentation" > < a role = "menuitem" tabindex = "-1" href = "edit_collection.php?collection={$data.collection_id}&mode=mcf" > Make Featured< / a > < / li >
{else}
< li role = "presentation" > < a role = "menuitem" tabindex = "-1" href = "edit_collection.php?collection={$data.collection_id}&mode=mcuf" > Make Unfeatured< / a > < / li >
{/if}
2014-02-12 13:10:18 +00:00
< li role = "presentation" > < a role = "menuitem" tabindex = "-1" href = "javascript:void(0)" onClick = "javascript:_cb.Confirm_Delete('collection_manager.php?delete_collection={$data.collection_id}')" > Delete This Collection< / a >
2014-01-23 14:00:36 +00:00
< / ul >
< / div >
< div class = "col-sm-6 col-md-6 col-lg-6 col x1-12" >
< input class = "form-control" name = "admin" type = "hidden" id = "admin" value = "true" / >
< input name = "collection_id" type = "hidden" value = "{$data.collection_id}" / >
< div class = "form-group" >
< legend > User Information< / legend >
< img src = "{$userquery->getUserThumb($u,'small')}" class = "img-thumbnail oneUserImage" / >
< label > Useid< / label >
< a href = "view_user.php?uid={$data.userid}" > {$data.userid|get_username}< / a >
< / div >
< div class = "form-group" >
< legend > Collection Details< / legend >
< label for = "collecionID" > Collection ID< / label >
< input disabled = "disabled" class = "form-control" name = "collecionID" type = "text" id = "collecionID" value = "{$data.collection_id}" size = "45" / >
< / div >
{foreach from=$requiredFields item=field}
{$field.class='form-control'}
< div class = "form-group" >
< label > {$field.title} :< / label >
< td > {$field.hint_1}< br / >
{$formObj->createField($field)}< br / >
{$field.hint_2}< / td >
< / div >
{/foreach}
< div class = "form-group" >
< legend > Collection Stats< / legend >
< label for = "total_objects" > Total Objects< / label >
< input class = "form-control" name = "total_objects" type = "text" id = "total_objects" value = "{$data.total_objects}" / >
< / div >
< div class = "form-group" >
< label for = "total_comments" > Total Comments< / label >
< input name = "total_comments" class = "form-control" type = "text" id = "total_comments" value = "{$data.total_comments}" / >
< / div >
< input type = "submit" class = "btn btn-primary" value = "Update Collection Details" style = "margin:15px 0px 0px 15px" name = "update_collection" >
< / div >
< div class = "col-sm-6 col-md-6 col-lg-6 col x1-12 pull-right" >
< div class = "head" > Items< / div >
{if $objects}
{section name=list loop=$objects}
{if $data.type == 'photos'}
{get_photo details=$objects[list] output='html' title=$photos[list].photo_title}
{/if}
{if $data.type == 'videos'}
< img src = "{get_thumb vdetails=$objects[list]}" width = "120" height = "70" / >
{/if}
{/section}
{assign var=rest value=$data.total_objects-4}
< a style = "display:block; font:bold 11px Tahoma; text-align:center; padding:4px; background:#fafafa;border:1px solid #aaa;" href = "manage_items.php?collection={$data.collection_id}&type={$data.type}" > Manage Items{if $rest & & $rest>0} - {$rest} more item{if $rest>1}s{/if}{/if}< / a >
{else}
Collection has 0 items
{/if}
< legend > Other Fields< / legend >
< div class = "form-group" >
{foreach from=$otherFields item=field}
< label for = "{$field.id}" > {$field.title} :< / label >
{$field.hint_1}< br / >
{$formObj->createField($field)}< br / >
{$field.hint_2}
{/foreach}
< / div >
< legend > Collection Preview< / legend >
< div class = "form-group" >
< label > Collection Preview :< / label >
< img style = "padding:2px; border:1px solid #ccc;" src = "{$cbcollection->get_thumb($data,NULL,TRUE)}" / >
< input class = "forum-control" type = "checkbox" value = "{$data.collection_id}" name = "delete_preview" id = "del_{$data.collection_id}_preview" / > < label for = "del_{$data.collection_id}_preview" > Delete Preview< / label >
< / div >
< div class = "form-group" >
< label for = "collection_thumb" > Upload New :< / label >
< input type = "file" name = "collection_thumb" id = "collection_thumb" >
< / div >
< / div >
< / div >
< / form >