Index: branches/2.8.x/wb/admin/pages/index.php
===================================================================
--- branches/2.8.x/wb/admin/pages/index.php	(revision 1179)
+++ branches/2.8.x/wb/admin/pages/index.php	(revision 1180)
@@ -28,7 +28,12 @@
 $admin = new admin('Pages', 'pages');
 // Include the WB functions file
 require_once(WB_PATH.'/framework/functions.php');
+// eggsurplus: add child pages for a specific page
+?>
+<script type="text/javascript" src="<?php print ADMIN_URL; ?>/pages/eggsurplus.js"></script>
+<?php
 
+
 function make_list($parent, $editable_pages) {
 	// Get objects and vars from outside this function
 	global $admin, $template, $database, $TEXT, $MESSAGE, $HEADING, $page_tmp_id;
@@ -118,7 +123,7 @@
 							<img src="<?php echo THEME_URL; ?>/images/none_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['NONE']; ?>" class="page_list_rights" />
 						<?php } elseif($page['visibility'] == 'deleted') { ?>
 							<img src="<?php echo THEME_URL; ?>/images/deleted_16.png" alt="<?php echo $TEXT['VISIBILITY']; ?>: <?php echo $TEXT['DELETED']; ?>" class="page_list_rights" />
-						<?php } 
+						<?php }
 						echo '<span class="modify_link">'.($page['menu_title']).'</span>'; ?>
 					</a>
 				</td>
@@ -222,6 +227,20 @@
 					</a>
 					<?php } ?>
 				</td>
+				<?php
+				// eggsurplus: Add action to add a page as a child
+				?>
+				<td class="list_actions">
+					<?php if($admin->get_permission('pages_delete') == true AND $can_modify == true) { ?>
+					<a href="javascript:add_child_page('<?php echo $page['page_id']; ?>');" title="<?php echo $TEXT['ADD']; ?>">
+						<img src="<?php echo THEME_URL; ?>/images/plus_16.png" name="addpage_<?php echo $page['page_id']; ?>" border="0" alt="Add Child Page" />
+					</a>
+					<?php } ?>
+				</td>
+				<?php
+				// end [IC] jeggers 2009/10/14: Add action to add a page as a child
+				?>
+
 			</tr>
 			</table>
 			</li>
Index: branches/2.8.x/wb/admin/pages/eggsurplus.js
===================================================================
--- branches/2.8.x/wb/admin/pages/eggsurplus.js	(nonexistent)
+++ branches/2.8.x/wb/admin/pages/eggsurplus.js	(revision 1180)
@@ -0,0 +1,15 @@
+	function add_child_page(page_id)
+    {
+		//find and select the page in the parent dropdown
+		var selectBox = document.add.parent;
+		for (var i = 0; i < selectBox.options.length; i++)
+		{
+			  if (selectBox.options[i].value == page_id)
+			  {
+					selectBox.selectedIndex = i;
+					break;
+			  }
+		}
+		//set focus to add form
+		document.add.title.focus();
+	}
