2012-07-23 19:44:23 +00:00
{$photo=$data}
{if $view}
{if $view == 'tags'}
< h2 > Photo Tags< / h2 >
< p > Complete list of tags for current photo< / p >
< div class = "manager-list" >
< div class = "controller scrtolltoFixed white-grad" >
< div class = "buttons clearfix" >
< div class = "btn-toolbar" >
< div class = "btn-group" >
< label class = "btn check-all" > < input type = "checkbox" > < / label >
< / div >
< div class = "btn-group" >
< a href = "#" class = "btn btn-danger" > Delete< / a >
< / div >
< / div >
< div class = "right-button" >
< a href = "edit_photo.php?photo={$photo.photo_id}" class = "btn btn-primary" > Back to details< / a >
< / div >
< / div >
2012-04-28 20:11:43 +00:00
< / div >
2012-07-23 19:44:23 +00:00
< table id = "photo_manager_table" class = "table table-striped list-block {if !$tags}display-none{/if}" >
< thead >
< tr >
< th width = "50" > < / th >
< th width = "70" > #< / th >
< th > Tag Hash < span class = "icon-info-sign popover-class" rel = "popover" title = "What is Tag Hash ?" data-content = "Tag Hash is unique identifier for tag string. This helps in keeping tags unique for current photo." > < / span > < / th >
< th width = "150" > Tag< / th >
< th width = "150" > Tagged By< / th >
< th width = "150" > Date< / th >
< th width = "120" > < / th >
< / tr >
< / thead >
{if $tags}
{foreach $tags as $tag}
< tr >
< td > < input type = "checkbox" class = "check-item" name = "check_tag[]" value = "{$tag.pag_id}" / > < / td >
< td > {$tag.ptag_id}< / td >
< td > {$tag.ptag_key}< / td >
< td >
{if $tag.ptag_isuser}
< a href = "view_user.php?uid={$tag.ptag_userid}" > {$tag.ptag_username}< / a >
{else}
{$tag.ptag_username}
{/if}
< / td >
< td > < a href = "view_user.php?uid={$tag.ptag_by_userid}" > {$tag.ptag_by_username}< / a > < / td >
< td > {$tag.date_added|niceTime:true}< / td >
< td > < a href = "#" onclick = "cb_confirm('Remove Tag ' , ' Are you sure you want to remove this tag ? ' , function ( ) {
window.location = '?photo={$tag.photo_id}&view=tags&delete_tag={$tag.ptag_id}';
}); return false;" class="btn btn-mini">Remove Tag< / a > < / td >
< / tr >
{/foreach}
{/if}
2012-04-28 20:11:43 +00:00
< / table >
2012-07-23 19:44:23 +00:00
{if !$tags}
< div class = "alert" > This photo has no tags ..< / div >
{/if}
< / div >
{/if}
{if $view == 'exif'}
< script >
$(function(){
$('#settings-container').masonry({
// options
itemSelector : '.settings-block',
columnWidth: 400,
isResizable : true
});
});
< / script >
< h2 > Exif Data< / h2 >
< p > Exif data is a record of the settings a camera used to take a photo. This information is embedded into the files the camera saves< / p >
< div class = "manager-list" >
< div class = "controller scrtolltoFixed white-grad" >
< div class = "buttons clearfix" >
< div class = "btn-toolbar" >
< div class = "btn-group" >
< a href = "edit_photo.php?photo={$photo.photo_id}" class = "btn btn-primary" > Back to details< / a >
< / div >
< / div >
< / div >
< / div >
< / div >
< div id = "settings-container" >
{if $exif.rest}
< div class = "settings-block" >
< fieldset >
< legend > Other Information< / legend >
< table class = "table" >
{foreach $exif.rest as $name => $value}
{if $value}
< tr >
< td > {$name|format_exif_camelCase|capitalize}:< / td >
< td > {$value}< / td >
< / tr >
{/if}
{/foreach}
< / table >
< / fieldset >
2012-04-28 20:11:43 +00:00
< / div >
2012-07-23 19:44:23 +00:00
{/if}
2012-04-28 20:11:43 +00:00
2012-07-23 19:44:23 +00:00
< div class = "settings-block" >
< fieldset >
< legend > Dates< / legend >
< table class = "table" >
{if $exif.dates.taken}
< tr >
< td > Taken on:< / td >
< td > {$exif.dates.taken} ( {$exif.dates.taken|niceTime} )< / td >
< / tr >
{/if}
< tr >
< td > {lang code='Added on %s'|sprintf:'here'}:< / td >
< td > {$exif.dates.uploaded} ( {$exif.dates.uploaded|niceTime} )< / td >
< / tr >
< / table >
< / fieldset >
< / div >
{if $exif.base}
< div class = "settings-block" >
< fieldset >
< legend > Base Information< / legend >
< table class = "table" >
{foreach $exif.base as $name => $base}
{if $base}
< tr >
< td > {lang code="$name"|capitalize}< / td >
< td > {$base}< / td >
< / tr >
{/if}
{/foreach}
< / table >
< / fieldset >
< / div >
{/if}
< / div >
{/if}
{else}
< h2 > Edit Photo : {$photo.photo_title}< / h2 >
< p > This is a complete list of information that is displayed or used for displaying a photo.< / p >
< script >
$(function(){
$('#settings-container').masonry({
// options
itemSelector : '.settings-block',
columnWidth: 400,
isResizable : true
});
});
< / script >
< div class = "controller scrolltoFixed white-grad" >
< div class = "buttons" >
< div class = "btn-toolbar" >
< div class = "btn-group" >
< a class = "btn" onclick = "" > < span class = "icon icon-eye-open" > < / span > < / a >
< / div >
< div class = "btn-group dropdown" >
< a class = "btn" > Options< / a >
< a class = "btn dropdown-toggle" onclick = "" data-toggle = "dropdown" > < span class = "caret" > < / span > < / a >
< ul class = "dropdown-menu" >
< li > < a href = "{$cbphoto->photo_links($photo,'view_photo')}" > View Photo< / a > < / li >
{if $photo.is_mature == 'yes'}
< li > < a href = "?mode=rm&photo={$photo.photo_id}" > Remove Mature Flag< / a > < / li >
{else}
< li > < a href = "?mode=am&photo={$photo.photo_id}" > Add Mature Flag< / a > < / li >
{/if}
{if $photo.featured == 'yes'}
< li > < a href = "?mode=ufp&photo={$photo.photo_id}" > Unfeature It< / a > < / li >
{else}
< li > < a href = "?mode=fp&photo={$photo.photo_id}" > Make Featured< / a > < / li >
{/if}
{if $photo.active == 'yes'}
< li > < a href = "?mode=dap&photo={$photo.photo_id}" > Deactivate< / a > < / li >
{else}
< li > < a href = "?mode=ap&photo={$photo.photo_id}" > Activate< / a > < / li >
{/if}
{display_manager_links($photo)}
< li class = "divider" > < / li >
< li > < a href = "#" onclick = " cb_confirm ( ' Delete Photo ' , ' Are you sure you want to delete this photo ? ' , function ( ) {
window.location = 'photo_manager.php?delete_photo={$photo.photo_id}'
}); return false;">Delete Photo< / a > < / li >
< / ul >
< / div >
< div class = "btn-group" >
< a href = "#" class = "btn btn-danger" onclick = " cb_confirm ( ' Delete Photo ' , ' Are you sure you want to delete this photo ? ' , function ( ) {
window.location = 'photo_manager.php?delete_photo={$photo.photo_id}'
}); return false;">Delete< / a >
< / div >
< div class = "btn-group" >
{$colors=get_photo_meta_value($photo.photo_id,'colors')}
{if $photo.ptags_count > 0}
< a href = "edit_photo.php?photo={$photo.photo_id}&view=tags" class = "btn" > Photo Tags< / a >
{/if}
{if $colors}
< a href = "#{$photo.photo_id}-colors-modal" class = "btn" data-toggle = "modal" > View Colors< / a >
{/if}
{if $photo.exif_data == 'yes'}
< a href = "edit_photo.php?photo={$photo.photo_id}&view=exif" class = "btn" > Exif Data< / a >
{/if}
< / div >
< div class = "right-button" >
< button class = "btn btn-primary" name = "save_photo" value = "do-action" > Save< / button >
< / div >
< / div >
< / div >
< / div >
< form action = "" method = "post" name = "edit_photo" id = "edit_photo" class = "form form-vertical" >
< div id = "settings-container" >
< div class = "settings-block" >
{get_photo details=$photo size='l' width='360' output='html' style='display:block; margin:auto;'}
< / div >
< div class = "settings-block" >
< fieldset >
< legend > Important Details< / legend >
< div class = "control-group" >
< label class = "control-label" for = "userid" > Uploader Userid< / label >
< div class = "controls" >
< div class = " input-append" >
< input type = "text" class = "input-xlarge" id = "userid" name = "userid" value = "{$photo.userid}" { if $ photo . is_avatar = = ' yes ' } disabled = "disabled" { / if } > < span class = "add-on" > {$photo.username}< / span >
< / div >
< / div >
< / div >
< div class = "control-group" >
< label class = "control-label" for = "photo_id" > Photo ID< / label >
< div class = "controls" >
< input disabled = "disabled" class = "input-xlarge" name = "photo_id" type = "text" id = "photo_id" value = "{$data.photo_id}" / >
< / div >
< / div >
< div class = "control-group" >
< label class = "control-label" for = "photo_key" > Photo Key< / label >
< div class = "controls" >
< input disabled = "disabled" class = "input-xlarge" name = "photo_key" type = "text" id = "photo_key" value = "{$data.photo_key}" / >
< / div >
< / div >
< div class = "control-group" >
< label class = "control-label" for = "filename" > Filename< / label >
< div class = "controls" >
< input disabled = "disabled" class = "input-xlarge" name = "filename" type = "text" id = "filename" value = "{$data.filename}" / >
< / div >
< / div >
< div class = "control-group" >
< label class = "control-label" for = "ext" > Extension< / label >
< div class = "controls" >
< input disabled = "disabled" class = "input-xlarge" name = "ext" type = "text" id = "ext" value = "{$data.ext|strtoupper}" / >
< / div >
< / div >
< / fieldset >
< / div >
< div class = "settings-block" >
< fieldset >
< legend > Required Fields< / legend >
{foreach from=$requiredFields item=field}
< div class = "control-group" >
< label for = "{$field.id}" class = "control-label" > {$field.title}< / label >
< div class = "controls" >
{$field.class='input-xlarge'}
{$formObj->createField($field)}
{if $field.hint_2}< p class = "help-block" > {$field.hint_2}< / p > {/if}
< / div >
< / div >
{/foreach}
< / fieldset >
< / div >
< div class = "settings-block" >
< fieldset >
< legend > Other Fields< / legend >
{foreach from=$otherFields item=field}
< div class = "control-group" >
< label for = "{$field.id}" class = "control-label" > {$field.title}< / label >
< div class = "controls" >
{$field.class='input-xlarge'}
{if $field.type=='checkbox' || $field.type=='radiobutton'}
{$field.sep=' '}
{if $field.type=='checkbox'}
{$field.class='checkbox'}
{else}
{$field.class='radio'}
{/if}
{/if}
{$formObj->createField($field)}
{if $field.hint_2}< p class = "help-block" > {$field.hint_2}< / p > {/if}
< / div >
< / div >
{/foreach}
< / fieldset >
< / div >
< div class = "settings-block" >
< fieldset >
< legend > Photos Stats and Info< / legend >
< div class = "control-group" >
< label class = "control-label" for = "views" > Views< / label >
< div class = "controls" >
< input type = "text" class = "input-xlarge" id = "views" name = "views" value = "{$photo.views}" / >
< p class = "help-block" > < / p >
< / div >
< / div >
< div class = "control-group" >
< label class = "control-label" for = "total_favorites" > Total Favorites< / label >
< div class = "controls" >
< input type = "text" class = "input-xlarge" id = "total_favorites" name = "total_favorites" value = "{$photo.total_favorites}" / >
< p class = "help-block" > < / p >
< / div >
< / div >
< div class = "control-group" >
< label class = "control-label" for = "total_comments" > Total Comments< / label >
< div class = "controls" >
< input type = "text" class = "input-xlarge" id = "total_comments" name = "total_comments" value = "{$photo.total_comments}" / >
< p class = "help-block" > < / p >
< / div >
< / div >
< div class = "control-group" >
< label class = "control-label" for = "downloaded" > Total Downloads< / label >
< div class = "controls" >
< input type = "text" class = "input-xlarge" id = "downloaded" name = "downloaded" value = "{$photo.downloaded}" / >
< p class = "help-block" > < / p >
< / div >
< / div >
< div class = "control-group" >
< label class = "control-label" for = "rating" > Rating< / label >
< div class = "controls" >
< div class = " input-append" >
< input class = "input-xlarge" name = "rating" type = "text" id = "rating" value = "{$photo.rating}" > < span class = "add-on" > of 10< / span >
< / div >
< p class = "help-block" > < / p >
< / div >
< / div >
< div class = "control-group" >
< label class = "control-label" for = "rated_by" > Rated By< / label >
< div class = "controls" >
< input type = "text" class = "input-xlarge" id = "rated_by" name = "rated_by" value = "{$photo.rated_by}" / >
< p class = "help-block" > < / p >
< / div >
< / div >
< / fieldset >
< / div >
< / div >
< / form >
{if $colors}
< script type = "text/javascript" >
$(document).ready(function(){
$('div[rel=tooltip]').tooltip();
});
< / script >
{$basedir=$smarty.const.STYLES_DIR}
{include file="$basedir/global/colors.html" colors=$colors|json_decode}
{/if}
{/if}