
Updated : Photo Manager Page Updated : Added 1px top for buttons Added : mature param in get_photos function Added : Two new actions in photo_actions Added : Comments for few functions Updated : cbphoto-actions.js plugin
244 lines
No EOL
13 KiB
HTML
244 lines
No EOL
13 KiB
HTML
<h2>Photo Manager</h2>
|
||
<p> Manage your photos here.</p>
|
||
<div class="modal hide fade" id="search-photos">
|
||
<div class="modal-header">
|
||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||
<h3>Advanced Search</h3>
|
||
</div>
|
||
|
||
<div class="modal-body">
|
||
<form action="photo_manager.php" method="get" name="search_photos" class="form-horizontal" id="search-photos-form">
|
||
<input type="hidden" name="search" value="Search" />
|
||
<div class="control-group">
|
||
<label class="control-label" for="title">Photo Title</label>
|
||
<div class="controls">
|
||
<input type="text" class="input input-xlarge" id="title" name="title" value="{'title'|get_form_val:true}">
|
||
<p class="help-block"></p>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="control-group">
|
||
<label class="control-label" for="photokey">Photo Key</label>
|
||
<div class="controls">
|
||
<input type="text" class="input input-xlarge" id="photokey" name="photokey" value="{'photokey'|get_form_val:true}">
|
||
<p class="help-block"></p>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="control-group">
|
||
<label class="control-label" for="photoid">Photo ID</label>
|
||
<div class="controls">
|
||
<input type="text" class="input input-xlarge" id="photoid" name="photoid" value="{'photoid'|get_form_val:true}">
|
||
<p class="help-block"></p>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="control-group">
|
||
<label class="control-label" for="tags">Photo Tags</label>
|
||
<div class="controls">
|
||
<input type="text" class="input input-xlarge" id="tags" name="tags" value="{'tags'|get_form_val:true}">
|
||
<p class="help-block"></p>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="control-group">
|
||
<label class="control-label" for="userid">UserID</label>
|
||
<div class="controls">
|
||
<input type="text" class="input input-xlarge" id="userid" name="userid" value="{'userid'|get_form_val:true}">
|
||
<p class="help-block"></p>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="control-group">
|
||
<label class="control-label" for="active">Active</label>
|
||
<div class="controls">
|
||
<select name="active" id="active" class="input-xlarge">
|
||
<option value="" ></option>
|
||
<option value="yes" {if $smarty.get.active=='yes'} selected="selected"{/if}>Yes</option>
|
||
<option value="no" {if $smarty.get.active=='no'} selected="selected"{/if}>No</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="control-group">
|
||
<label class="control-label" for="featured">Featured</label>
|
||
<div class="controls">
|
||
<select name="featured" id="featured" class="input-xlarge">
|
||
<option value="" ></option>
|
||
<option value="yes" {if $smarty.get.featured=='yes'} selected="selected"{/if}>Yes</option>
|
||
<option value="no" {if $smarty.get.featured=='no'} selected="selected"{/if}>No</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="control-group">
|
||
<label class="control-label" for="mature">Mature</label>
|
||
<div class="controls">
|
||
<select name="mature" id="mature" class="input-xlarge">
|
||
<option value="" ></option>
|
||
<option value="yes" {if $smarty.get.mature=='yes'} selected="selected"{/if}>Yes</option>
|
||
<option value="no" {if $smarty.get.mature=='no'} selected="selected"{/if}>No</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="control-group">
|
||
<label class="control-label" for="extension">Extension</label>
|
||
<div class="controls">
|
||
<select name="extension" id="extension" class="input-xlarge">
|
||
<option value="" ></option>
|
||
{foreach from=$cbphoto->exts item=ext}
|
||
<option value="{$ext}"{if $smarty.get.extension == $ext} selected="selected"{/if}>{$ext|strtoupper}</option>
|
||
{/foreach}
|
||
</select>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="control-group">
|
||
<label class="control-label" for="order">Order By</label>
|
||
<div class="controls">
|
||
<select name="order" id="order" class="input-xlarge">
|
||
<option value="" ></option>
|
||
<option value="photo_id" {if $smarty.get.order == 'photo_id'}selected="selected"{/if}>ID</option>
|
||
<option value="photo_title" {if $smarty.get.order == 'photo_title'}selected="selected"{/if}>Name</option>
|
||
<option value="views" {if $smarty.get.order == 'views'}selected="selected"{/if}>Views</option>
|
||
</select>
|
||
</div>
|
||
</div>
|
||
</form>
|
||
</div>
|
||
|
||
<div class="modal-footer">
|
||
<a href="javascript:void(0)" class="btn" data-dismiss="modal">Cancel</a>
|
||
<input type="button" class="btn btn-primary" name="search" value="Search" onclick="$('#search-photos-form').submit();" />
|
||
</div>
|
||
</div>
|
||
|
||
<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 class="btn" onclick="$('#do-action').attr('name','activate_selected'); $('#photo_manager_form').submit(); return false;">Activate</a>
|
||
<a class="btn" onclick="$('#do-action').attr('name','deactivate_selected'); $('#photo_manager_form').submit(); return false;">Deactivate</a>
|
||
<a href="#" data-toggle="dropdown" class="btn dropdown-toggle">More Actions <span class='caret'></span></a>
|
||
<ul class="dropdown-menu pull-right">
|
||
<li><a href="#" onclick="$('#do-action').attr('name','make_featured_selected'); $('#photo_manager_form').submit(); return false;">Make Featured</a></li>
|
||
<li><a href="#" onclick="$('#do-action').attr('name','make_unfeatured_selected'); $('#photo_manager_form').submit(); return false;">Make Unfeatured</a></li>
|
||
<li><a href="#" onclick="$('#do-action').attr('name','add_mature_selected'); $('#photo_manager_form').submit(); return false;">Add Mature Flag</a></li>
|
||
<li><a href="#" onclick="$('#do-action').attr('name','remove_mature_selected'); $('#photo_manager_form').submit(); return false;">Remove Mature Flag</a></li>
|
||
<li class="divider"></li>
|
||
<li><a href="#" onclick=" cb_confirm('Delete Selected Photos','Are you sure you want delete selected photos ?', function() {
|
||
$('#do-action').attr('name','delete_selected'); $('#photo_manager_form').submit();
|
||
}); return false;">Delete Photos</a></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="right-button">
|
||
<form name="quick-form-search" method="get" id="quick-form-search" action="">
|
||
<input class="input valignTop" name="title" value="{'title'|get}">
|
||
<button class="btn btn-primary" name="search" value="do" type="submit">
|
||
<i class="icon-search icon-white"></i>
|
||
Search
|
||
</button>
|
||
<a class="btn" data-toggle="modal" data-target="#search-photos">
|
||
Advanced Search
|
||
</a>
|
||
</form>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<form id="photo_manager_form" method="post" name="photo_manager_form">
|
||
<input type="hidden" name="" value="do_action" 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="70">Uploader</th>
|
||
<th width="150">Collection</th>
|
||
<th width="130">Date</th>
|
||
<th width="120"></th>
|
||
</tr>
|
||
</thead>
|
||
|
||
{if $photos}
|
||
{foreach from=$photos item=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><a href="view_user.php?uid={$photo.userid}">{$photo.username}</a></td>
|
||
<td><a href="edit_collection.php?collection={$photo.collection_id}">{$photo.collection_name}</a></td>
|
||
<td>{$photo.date_added|niceTime}</td>
|
||
<td>
|
||
<div class="dropdown pull-right btn-group">
|
||
<a href="edit_photo.php?photo={$photo.photo_id}" class="btn">Edit</a>
|
||
<button class="btn dropdown-toggle" data-toggle="dropdown">
|
||
<span class="caret"></span>
|
||
</button>
|
||
<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="?remove_mature={$photo.photo_id}">Remove Mature Flag</a></li>
|
||
{else}
|
||
<li><a href="?add_mature={$photo.photo_id}">Add Mature Flag</a></li>
|
||
{/if}
|
||
|
||
{if $photo.featured == 'yes'}
|
||
<li><a href="?make_unfeature={$photo.photo_id}">Unfeature It</a></li>
|
||
{else}
|
||
<li><a href="?make_feature={$photo.photo_id}">Make Featured</a></li>
|
||
{/if}
|
||
|
||
{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}
|
||
{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 = '?delete_photo={$photo.photo_id}'
|
||
}); return false;">Delete Photo</a></li>
|
||
</ul>
|
||
</div>
|
||
|
||
</td>
|
||
</tr>
|
||
{/foreach}
|
||
{/if}
|
||
</table>
|
||
</form>
|
||
|
||
{if !$photos}
|
||
<div class="alert">{lang code='There are no photos....'}</div>
|
||
{/if}
|
||
</div>
|
||
|
||
{include file="$style_dir/blocks/pagination.html" } |