summaryrefslogtreecommitdiff
path: root/assign_content.php
diff options
context:
space:
mode:
authorNick Palmer <nick@sluggardy.net>2007-03-03 21:19:53 +0000
committerNick Palmer <nick@sluggardy.net>2007-03-03 21:19:53 +0000
commit3d45e27e478ddaa8859941d5bd953902d3808528 (patch)
tree8523551644f21d8900c7474180176943be081ad3 /assign_content.php
parent65c3e0a802c7550de65d5fec988e074a2c4d96c3 (diff)
downloadpigeonholes-3d45e27e478ddaa8859941d5bd953902d3808528.tar.gz
pigeonholes-3d45e27e478ddaa8859941d5bd953902d3808528.tar.bz2
pigeonholes-3d45e27e478ddaa8859941d5bd953902d3808528.zip
Added assign content pagination. Swapped rows and columns on page. This can be reversed back in admin for sites with few categories.
Diffstat (limited to 'assign_content.php')
-rw-r--r--assign_content.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/assign_content.php b/assign_content.php
index e7b676b..c8994fa 100644
--- a/assign_content.php
+++ b/assign_content.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_pigeonholes/assign_content.php,v 1.7 2006/12/31 13:01:16 squareing Exp $
+ * $Header: /cvsroot/bitweaver/_bit_pigeonholes/assign_content.php,v 1.8 2007/03/03 21:19:52 nickpalmer Exp $
*
* Copyright ( c ) 2004 bitweaver.org
* Copyright ( c ) 2003 tikwiki.org
@@ -8,7 +8,7 @@
* All Rights Reserved. See copyright.txt for details and a complete list of authors.
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details
*
- * $Id: assign_content.php,v 1.7 2006/12/31 13:01:16 squareing Exp $
+ * $Id: assign_content.php,v 1.8 2007/03/03 21:19:52 nickpalmer Exp $
* @package pigeonholes
* @subpackage functions
*/
@@ -41,10 +41,12 @@ $listHash = array(
'max_records' => ( @BitBase::verifyId( $_REQUEST['max_records'] ) ) ? $_REQUEST['max_records'] : 10,
'include_members' => ( ( !empty( $_REQUEST['include'] ) && $_REQUEST['include'] == 'members' ) ? TRUE : FALSE ),
'content_type' => $contentSelect,
+ 'list_page' => (empty($_REQUEST['list_page']) ? NULL : $_REQUEST['list_page']),
);
+
$assignableContent = $gContent->getAssignableContent( $listHash );
-if( !empty( $_REQUEST['insert_content'] ) && isset( $_REQUEST['pigeonhole'] ) ) {
+if( (!empty( $_REQUEST['insert_content'] ) || !empty( $_REQUEST['insert_content_and_next'])) && isset( $_REQUEST['pigeonhole'] ) ) {
// here we need to limit all killing to the selected structure
$deletableParentIds = array();
if( empty( $gStructure ) && @BitBase::verifyId( $_REQUEST['root_structure_id'] ) ) {
@@ -85,9 +87,14 @@ if( !empty( $_REQUEST['insert_content'] ) && isset( $_REQUEST['pigeonhole'] ) )
// we need to reload the assignableContent, since settings have changed
// reuse previous listhash since display settings aren't changed
+ if (!empty( $_REQUEST['insert_content_and_next'])) {
+ $listHash['list_page'] = $_REQUEST['list_page'];
+ }
$assignableContent = $gContent->getAssignableContent( $listHash );
}
+$gBitSmarty->assign_by_ref( 'listInfo', $listHash['listInfo'] );
+
$listHash = array(
'load_only_root' => TRUE,
'max_records' => -1,
@@ -103,8 +110,11 @@ $listHash = array(
'root_structure_id' => ( !empty( $_REQUEST['root_structure_id'] ) ? $_REQUEST['root_structure_id'] : NULL ),
'force_extras' => TRUE,
'max_records' => -1,
+ 'sort_mode' => 'ls.structure_id_asc',
);
+
$pigeonList = $gContent->getList( $listHash );
+
$gBitSmarty->assign( 'pigeonList', $pigeonList );
$gBitSmarty->assign( 'assignableContent', $assignableContent );
$gBitSmarty->assign( 'contentCount', count( $assignableContent ) );