updated: issues (add video to collection in watch video, pagination in manage collection items)
This commit is contained in:
parent
71289e02b1
commit
8fef6a2468
5 changed files with 36 additions and 7 deletions
|
@ -44,8 +44,7 @@ class Collections extends CBCategory
|
||||||
|
|
||||||
$this->cat_tbl = "collection_categories";
|
$this->cat_tbl = "collection_categories";
|
||||||
$this->section_tbl = "collections";
|
$this->section_tbl = "collections";
|
||||||
// Video type is temporarily removed. Full features will be developed soon.
|
$this->types = array('videos' => lang("Videos"),'photos' => lang("Photos"));
|
||||||
$this->types = array('photos' => lang("Photos")); //'videos' => lang("Videos"),
|
|
||||||
ksort($this->types);
|
ksort($this->types);
|
||||||
$this->setting_up_collections();
|
$this->setting_up_collections();
|
||||||
$this->init_actions();
|
$this->init_actions();
|
||||||
|
|
|
@ -120,7 +120,17 @@ switch($mode)
|
||||||
$eh->flush();
|
$eh->flush();
|
||||||
e(sprintf("selected_items_removed","videos"),"m");
|
e(sprintf("selected_items_removed","videos"),"m");
|
||||||
}
|
}
|
||||||
$objs = $cbvideo->collection->get_collection_items_with_details($cid,$order);
|
|
||||||
|
$get_limit = create_query_limit($page,COLLIP);
|
||||||
|
|
||||||
|
$objs = $cbvideo->collection->get_collection_items_with_details($cid,$order,$get_limit);
|
||||||
|
|
||||||
|
|
||||||
|
$total_rows = $cbvideo->collection->get_collection_items_with_details($cid,$order,NULL,TRUE);
|
||||||
|
$total_pages = count_pages($total_rows,COLLIP);
|
||||||
|
|
||||||
|
//Pagination
|
||||||
|
$pages->paginate($total_pages,$page);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -137,7 +147,14 @@ switch($mode)
|
||||||
$eh->flush();
|
$eh->flush();
|
||||||
e(sprintf("selected_items_removed","photos"),"m");
|
e(sprintf("selected_items_removed","photos"),"m");
|
||||||
}
|
}
|
||||||
$objs = $cbphoto->collection->get_collection_items_with_details($cid,$order);
|
$get_limit = create_query_limit($page,COLLIP);
|
||||||
|
$objs = $cbphoto->collection->get_collection_items_with_details($cid,$order,$get_limit);
|
||||||
|
|
||||||
|
$total_rows = $cbphoto->collection->get_collection_items_with_details($cid,$order,NULL,TRUE);
|
||||||
|
$total_pages = count_pages($total_rows,COLLIP);
|
||||||
|
|
||||||
|
//Pagination
|
||||||
|
$pages->paginate($total_pages,$page);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,8 @@
|
||||||
<label for="checkbox"></label></td>
|
<label for="checkbox"></label></td>
|
||||||
<td valign="middle">
|
<td valign="middle">
|
||||||
<div style="padding-left:10px; float:left;width:300px">
|
<div style="padding-left:10px; float:left;width:300px">
|
||||||
<label for="check_item-{$collection.videoid}"> <img src="{getThumb vdetails=$collection}" width="40" height="30" border="0" class="acc_usr_video_thumb" /></label>{$collection.title|truncate:100}<br />
|
<label for="check_item-{$collection.videoid}"> <img src="{getThumb vdetails=$collection}" border="0" class="acc_usr_video_thumb" /></label>
|
||||||
|
<span>{$collection.title|truncate:100}</span><br />
|
||||||
<span class="video_control"><a href="{$cbcollection->collection_links($collection,'view_item')}">{lang code="view"}</a></span>
|
<span class="video_control"><a href="{$cbcollection->collection_links($collection,'view_item')}">{lang code="view"}</a></span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
@ -65,7 +66,7 @@
|
||||||
<td valign="middle">
|
<td valign="middle">
|
||||||
<div style="padding-left:10px; float:left;">
|
<div style="padding-left:10px; float:left;">
|
||||||
<label for="check_item-{$collection.photo_id}">{get_photo style='padding:1px; border:1px solid #999; float:left;' details=$collection output="html"}</label>
|
<label for="check_item-{$collection.photo_id}">{get_photo style='padding:1px; border:1px solid #999; float:left;' details=$collection output="html"}</label>
|
||||||
{$collection.photo_title|truncate:100}<br />
|
<span>{$collection.photo_title|truncate:100}</span><br />
|
||||||
<span class="video_control"><a href="{$cbphoto->photo_links($collection,'view_item')}">{lang code="view"}</a></span>
|
<span class="video_control"><a href="{$cbphoto->photo_links($collection,'view_item')}">{lang code="view"}</a></span>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -139,7 +139,8 @@
|
||||||
{include file="$style_dir/blocks/manage/account_collections.html" display_type="items" collection=$objs[olist]}
|
{include file="$style_dir/blocks/manage/account_collections.html" display_type="items" collection=$objs[olist]}
|
||||||
{sectionelse}
|
{sectionelse}
|
||||||
<div align="center" style="font:bold 11px Tahoma; margin-top:5px;">{lang code="no_items_found_in_collect"}</div>
|
<div align="center" style="font:bold 11px Tahoma; margin-top:5px;">{lang code="no_items_found_in_collect"}</div>
|
||||||
{/section}
|
{/section}
|
||||||
|
{include file="$style_dir/blocks/pagination.html"}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{if $mode == "favorite"}
|
{if $mode == "favorite"}
|
||||||
|
|
|
@ -141,6 +141,17 @@
|
||||||
<div class="alert ">
|
<div class="alert ">
|
||||||
{show_playlist_form id=$vdo.videoid type=video}
|
{show_playlist_form id=$vdo.videoid type=video}
|
||||||
</div>
|
</div>
|
||||||
|
{if userid()}
|
||||||
|
<div class="alert ">
|
||||||
|
<div class="clearfix"></div>
|
||||||
|
<div align="right"><a href="javascript:void(0)"
|
||||||
|
onclick="$('#addCollectionCont').toggle()"
|
||||||
|
style="text-decoration:none"><strong>+ {lang code='add_to_my_collection'}</strong></a>
|
||||||
|
</div>
|
||||||
|
<div id="addCollectionCont" style="display:none">{show_collection_form id=$vdo.videoid type=Video}</div>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab-pane" id="cb-item-report">
|
<div class="tab-pane" id="cb-item-report">
|
||||||
|
|
Loading…
Add table
Reference in a new issue