2012-04-28 20:11:43 +00:00
{if $mode == 'view'}
2012-07-25 21:17:44 +00:00
< h2 > Flagged Photos Manager< / h2 >
2012-07-30 20:51:10 +00:00
< p > < / p >
2012-04-28 20:11:43 +00:00
2012-07-25 21:17:44 +00:00
< div class = "manager-list" >
< div class = "controller scrolltoFixed white-grad" >
< div class = "buttons" >
< 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" onclick = "$('#do-action').attr('name','activate_selected'); $('#flagged_photo').submit(); return false;" > Activate< / a >
< a href = "#" class = "btn" onclick = "$('#do-action').attr('name','deactivate_selected'); $('#flagged_photo').submit(); return false;" > Deactivate< / a >
< / div >
< div class = "btn-group" >
< a href = "#" onclick = "cb_confirm('{lang code=" Delete Selected Photos " } ' , ' { lang code = "Are you sure you want to delete selected photos ?" } ' , function ( ) {
$('#do-action').attr('name','delete_selected'); $('#flagged_photo').submit(); return false;
}); return false;" class="btn btn-danger">Delete Photos< / a >
< a href = "#" onclick = "cb_confirm('{lang code=" Remove Selected Flags " } ' , ' { lang code = "Are you sure you want to remove flags from selected photos ?" } ' , function ( ) {
$('#do-action').attr('name','delete_flags'); $('#flagged_photo').submit(); return false;
}); return false;" class="btn btn-danger">Remove Flags< / a >
< / div >
2012-04-28 20:11:43 +00:00
< / div >
< / div >
< / div >
2012-07-25 21:17:44 +00:00
< form name = "flagged_photo" method = "post" id = "flagged_photo" >
< input type = "hidden" name = "" value = "do" id = "do-action" / >
< table id = "photo_manager_table" class = "table table-striped list-block {if !$photos}display-none{/if}" >
< thead >
< tr >
< th width = "50" > < / th >
< th width = "70" > #< / th >
< th width = "60" > Thumb< / th >
< th > Photo< / th >
< th width = "130" > Flags< / th >
< th width = "130" > Uploader< / th >
< th width = "130" > Date< / th >
< th width = "120" > < / th >
< / tr >
< / thead >
{if $photos}
{foreach $photos as $photo}
< tr >
< td width = "50" > < input type = "checkbox" class = "check-item" name = "check_photo[]" value = "{$photo.photo_id}" > < / td >
< td width = "70" > {$photo.photo_id}< / td >
{assign var=that_thumb value=$cbphoto->get_image_file($photo,'m')}
< td > {get_photo details=$photo width=60 output='html' extra=" rel='popover' data-content='< center > < img style = max-width:230px; src = $that_thumb / > < / center > ' " title="Thumbnail" class="popover-class"}< / td >
< td >
< a href = "edit_photo.php?photo={$photo.photo_id}" > {$photo.photo_title}< / a >
< div class = "height5" > < / div >
{if $photo.active=='yes'}
< span class = "label label-success" > {lang code='Active'}< / span >
{else}
< span class = "label label-warning" > {lang code='Inactive'}< / span >
{/if}
{if $photo.featured=='yes'}
< span class = "label label-success" > Featured< / span >
{/if}
{if $photo.is_mature=='yes'}
< span class = "label label-important" > Mature< / span >
{/if}
< / td >
< td > {$photo.total_flags|number_format}< / td >
< td > {$photo.username}< / td >
< td > {$photo.date_added|niceTime}< / td >
< td >
< div class = "dropdown pull-right btn-group" >
< a href = "?mode=view_flags&pid={$photo.photo_id}" class = "btn" > View Flags< / a >
< button class = "btn dropdown-toggle" data-toggle = "dropdown" >
< span class = "caret" > < / span >
< / button >
< ul class = "dropdown-menu" >
< li > < a href = "?mode=view_flags&pid={$photo.photo_id}" > View Flags< / a > < / li >
< li > < a href = "#" onclick = " cb_confirm ( ' Remove Flags ' , ' Are you sure you want to all flags from this photo ? ' , function ( ) {
window.location = '?delete_flags={$photo.photo_id}'
}); return false;">Remove Flags< / a > < / li >
< li class = "divider" > < / li >
< li > < a href = "{$cbphoto->photo_links($photo,'view_photo')}" > View Photo< / a > < / li >
< li > < a href = "edit_photo.php?photo={$photo.photo_id}" > Edit Photo< / a > < / li >
{if $photo.active == 'yes'}
< li > < a href = "?deactivate={$photo.photo_id}" > Deactivate< / a > < / li >
{else}
< li > < a href = "?activate={$photo.photo_id}" > Activate< / a > < / li >
{/if}
< li class = "divider" > < / li >
< li > < a href = "#" onclick = " cb_confirm ( ' Delete Photo ' , ' Are you sure you want to delete this photo ? ' , function ( ) {
window.location = '?delete_photo={$photo.photo_id}'
}); return false;">Delete Photo< / a > < / li >
< / ul >
< / div >
2012-04-28 20:11:43 +00:00
2012-07-25 21:17:44 +00:00
< / td >
< / tr >
{/foreach}
{/if}
< / table >
{if !$photos}
< div class = "alert" > {lang code='No flags found'}< / div >
{/if}
< / form >
< / div >
2012-04-28 20:11:43 +00:00
{include file="$style_dir/blocks/pagination.html" }
{/if}
{if $mode == 'view_flags'}
2012-07-25 21:17:44 +00:00
< h2 > {$photo.photo_title} Flags< / h2 >
< p > Following are details of flags< / p >
2012-04-28 20:11:43 +00:00
2012-07-25 21:17:44 +00:00
< div class = "manager-list" >
< div class = "controller scrolltoFixed white-grad" >
< div class = "buttons" >
< div class = "btn-toolbar" >
< div class = "btn-group" >
< a href = "{$cbphoto->photo_links($photo,'view_photo')}" class = "btn" > View Photo< / a >
< a href = "edit_photo.php?photo={$photo.photo_id}" class = "btn" > Edit Photo< / a >
< / 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 = 'flagged_photos.php?delete_photo={$photo.photo_id}'
}); return false;">Delete Photo< / a >
< a href = "#" class = "btn btn-danger" onclick = "cb_confirm('Remove Flags ' , ' Are you sure you want to all flags from this photo ? ' , function ( ) {
window.location = '?delete_flags={$photo.photo_id}'
}); return false;">Remove Flags< / a >
< / div >
< / div >
< / div >
2012-04-28 20:11:43 +00:00
< / div >
2012-07-25 21:17:44 +00:00
< form name = "photo_flag_manager" method = "post" id = "photo_flag_manager" >
< table id = "photo_manager_table" class = "table table-striped list-block {if !$flags}display-none{/if}" >
< thead >
< tr >
< th width = "70" > #< / th >
< th > Report< / th >
< th width = "70" > Reporter< / th >
< th width = "200" > Date< / th >
< / tr >
< / thead >
{if $flags}
{foreach $flags as $flag}
< tr >
< td > {$flag.flag_id}< / td >
< td > {$flag.flag_type|flag_type}< / td >
< td > {$flag.userid|get_username}< / td >
< td > {$flag.date_added|niceTime}< / td >
< / tr >
{/foreach}
{/if}
< / table >
< / form >
< / div >
2012-04-28 20:11:43 +00:00
{/if}