Annotation of /mambo/branches/4.6/administrator/components/com_menus/admin.menus.html.php
Parent Directory
|
Revision Log
Revision 1309 - (view) (download)
| 1 : | root | 1 | <?php |
| 2 : | /** | ||
| 3 : | elpie | 964 | * @package Mambo |
| 4 : | root | 1 | * @subpackage Menus |
| 5 : | cauld | 948 | * @copyright Refer to copyright.php |
| 6 : | root | 1 | * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL |
| 7 : | elpie | 964 | * @author Mambo Foundation Inc see README.php |
| 8 : | neilt | 616 | */ |
| 9 : | root | 1 | |
| 10 : | /** ensure this file is being included by a parent file */ | ||
| 11 : | defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); | ||
| 12 : | |||
| 13 : | class HTML_menusections { | ||
| 14 : | |||
| 15 : | function showMenusections( $rows, $pageNav, $search, $levellist, $menutype, $option ) { | ||
| 16 : | global $my; | ||
| 17 : | |||
| 18 : | mosCommonHTML::loadOverlib(); | ||
| 19 : | ?> | ||
| 20 : | <form action="index2.php" method="post" name="adminForm"> | ||
| 21 : | <table class="adminheading"> | ||
| 22 : | <tr> | ||
| 23 : | <th class="menus"> | ||
| 24 : | csouza | 165 | <?php printf(T_('Menu Manager <small><small>[ %s ]</small></small>'), $menutype) ?> |
| 25 : | root | 1 | </th> |
| 26 : | <td nowrap="true"> | ||
| 27 : | neilt | 616 | <?php echo T_('Max Levels'); ?> |
| 28 : | root | 1 | </td> |
| 29 : | <td> | ||
| 30 : | <?php echo $levellist;?> | ||
| 31 : | </td> | ||
| 32 : | <td> | ||
| 33 : | neilt | 616 | <?php echo T_('Filter:'); ?> |
| 34 : | root | 1 | </td> |
| 35 : | <td> | ||
| 36 : | <input type="text" name="search" value="<?php echo $search;?>" class="inputbox" /> | ||
| 37 : | </td> | ||
| 38 : | </tr> | ||
| 39 : | <?php | ||
| 40 : | if ( $menutype == 'mainmenu' ) { | ||
| 41 : | ?> | ||
| 42 : | <tr> | ||
| 43 : | <td align="right" nowrap style="color: red; font-weight: normal;" colspan="5"> | ||
| 44 : | neilt | 616 | * <?php echo T_('You cannot `delete` this menu as it is required for the proper operation of Mambo'); ?> * |
| 45 : | elpie | 1309 | <br /> |
| 46 : | neilt | 616 | <span style="color: black;"> |
| 47 : | * <?php echo T_('The 1st Published item in this menu [mainmenu] is the default `Homepage` for the site'); ?> * | ||
| 48 : | root | 1 | </span> |
| 49 : | </td> | ||
| 50 : | </tr> | ||
| 51 : | <?php | ||
| 52 : | } | ||
| 53 : | ?> | ||
| 54 : | </table> | ||
| 55 : | |||
| 56 : | <table class="adminlist"> | ||
| 57 : | <tr> | ||
| 58 : | <th width="20"> | ||
| 59 : | # | ||
| 60 : | </th> | ||
| 61 : | <th width="20"> | ||
| 62 : | <input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($rows); ?>);" /> | ||
| 63 : | </th> | ||
| 64 : | <th class="title" width="40%"> | ||
| 65 : | neilt | 616 | <?php echo T_('Menu Item'); ?> |
| 66 : | root | 1 | </th> |
| 67 : | <th width="5%"> | ||
| 68 : | neilt | 616 | <?php echo T_('Published'); ?> |
| 69 : | root | 1 | </th> |
| 70 : | <th colspan="2" width="5%"> | ||
| 71 : | neilt | 616 | <?php echo T_('Reorder'); ?> |
| 72 : | root | 1 | </th> |
| 73 : | <th width="2%"> | ||
| 74 : | neilt | 616 | <?php echo T_('Order'); ?> |
| 75 : | root | 1 | </th> |
| 76 : | <th width="1%"> | ||
| 77 : | neilt | 616 | <a href="javascript: saveorder( <?php echo count( $rows )-1; ?> )"><img src="images/filesave.png" border="0" width="16" height="16" alt="<?php echo T_('Save Order'); ?>" /></a> |
| 78 : | root | 1 | </th> |
| 79 : | <th width="10%"> | ||
| 80 : | neilt | 616 | <?php echo T_('Access'); ?> |
| 81 : | root | 1 | </th> |
| 82 : | <th> | ||
| 83 : | neilt | 616 | <?php echo T_('Itemid'); ?> |
| 84 : | root | 1 | </th> |
| 85 : | <th width="35%" align="left"> | ||
| 86 : | neilt | 616 | <?php echo T_('Type'); ?> |
| 87 : | root | 1 | </th> |
| 88 : | <th> | ||
| 89 : | neilt | 616 | <?php echo T_('CID'); ?> |
| 90 : | root | 1 | </th> |
| 91 : | </tr> | ||
| 92 : | <?php | ||
| 93 : | $k = 0; | ||
| 94 : | $i = 0; | ||
| 95 : | $n = count( $rows ); | ||
| 96 : | foreach ($rows as $row) { | ||
| 97 : | $access = mosCommonHTML::AccessProcessing( $row, $i ); | ||
| 98 : | $checked = mosCommonHTML::CheckedOutProcessing( $row, $i ); | ||
| 99 : | $published = mosCommonHTML::PublishedProcessing( $row, $i ); | ||
| 100 : | ?> | ||
| 101 : | <tr class="<?php echo "row$k"; ?>"> | ||
| 102 : | <td> | ||
| 103 : | <?php echo $i + 1 + $pageNav->limitstart;?> | ||
| 104 : | </td> | ||
| 105 : | <td> | ||
| 106 : | <?php echo $checked; ?> | ||
| 107 : | </td> | ||
| 108 : | <td nowrap="nowrap"> | ||
| 109 : | <?php | ||
| 110 : | if ( $row->checked_out && ( $row->checked_out != $my->id ) ) { | ||
| 111 : | echo $row->treename; | ||
| 112 : | } else { | ||
| 113 : | $link = 'index2.php?option=com_menus&menutype='. $row->menutype .'&task=edit&id='. $row->id . '&hidemainmenu=1'; | ||
| 114 : | ?> | ||
| 115 : | <a href="<?php echo $link; ?>"> | ||
| 116 : | <?php echo $row->treename; ?> | ||
| 117 : | </a> | ||
| 118 : | <?php | ||
| 119 : | } | ||
| 120 : | ?> | ||
| 121 : | </td> | ||
| 122 : | <td width="10%" align="center"> | ||
| 123 : | <?php echo $published;?> | ||
| 124 : | </td> | ||
| 125 : | <td> | ||
| 126 : | <?php echo $pageNav->orderUpIcon( $i ); ?> | ||
| 127 : | </td> | ||
| 128 : | <td> | ||
| 129 : | <?php echo $pageNav->orderDownIcon( $i, $n ); ?> | ||
| 130 : | </td> | ||
| 131 : | <td align="center" colspan="2"> | ||
| 132 : | <input type="text" name="order[]" size="5" value="<?php echo $row->ordering; ?>" class="text_area" style="text-align: center" /> | ||
| 133 : | </td> | ||
| 134 : | <td align="center"> | ||
| 135 : | <?php echo $access;?> | ||
| 136 : | </td> | ||
| 137 : | <td align="center"> | ||
| 138 : | <?php echo $row->id; ?> | ||
| 139 : | </td> | ||
| 140 : | <td align="left"> | ||
| 141 : | <?php | ||
| 142 : | echo mosToolTip( $row->descrip, '', 280, 'tooltip.png', $row->type, $row->edit ); | ||
| 143 : | ?> | ||
| 144 : | </td> | ||
| 145 : | <td align="center"> | ||
| 146 : | <?php echo $row->componentid; ?> | ||
| 147 : | </td> | ||
| 148 : | </tr> | ||
| 149 : | <?php | ||
| 150 : | $k = 1 - $k; | ||
| 151 : | $i++; | ||
| 152 : | } | ||
| 153 : | ?> | ||
| 154 : | </table> | ||
| 155 : | |||
| 156 : | <?php echo $pageNav->getListFooter(); ?> | ||
| 157 : | |||
| 158 : | <input type="hidden" name="option" value="<?php echo $option; ?>" /> | ||
| 159 : | <input type="hidden" name="menutype" value="<?php echo $menutype; ?>" /> | ||
| 160 : | <input type="hidden" name="task" value="" /> | ||
| 161 : | <input type="hidden" name="boxchecked" value="0" /> | ||
| 162 : | <input type="hidden" name="hidemainmenu" value="0" /> | ||
| 163 : | </form> | ||
| 164 : | <?php | ||
| 165 : | } | ||
| 166 : | |||
| 167 : | |||
| 168 : | /** | ||
| 169 : | * Displays a selection list for menu item types | ||
| 170 : | */ | ||
| 171 : | function addMenuItem( &$cid, $menutype, $option, $types_content, $types_component, $types_link, $types_other ) { | ||
| 172 : | |||
| 173 : | mosCommonHTML::loadOverlib(); | ||
| 174 : | ?> | ||
| 175 : | <form action="index2.php" method="post" name="adminForm"> | ||
| 176 : | <table class="adminheading"> | ||
| 177 : | <tr> | ||
| 178 : | <th class="menus"> | ||
| 179 : | neilt | 616 | <?php echo T_('New Menu Item'); ?> |
| 180 : | root | 1 | </th> |
| 181 : | <td valign="bottom" nowrap style="color: red;"> | ||
| 182 : | <?php //echo _MENU_GROUP; ?> | ||
| 183 : | </td> | ||
| 184 : | </tr> | ||
| 185 : | </table> | ||
| 186 : | <style type="text/css"> | ||
| 187 : | fieldset { | ||
| 188 : | border: 1px solid #777; | ||
| 189 : | } | ||
| 190 : | legend { | ||
| 191 : | font-weight: bold; | ||
| 192 : | } | ||
| 193 : | </style> | ||
| 194 : | <table class="adminform"> | ||
| 195 : | <tr> | ||
| 196 : | <td width="50%" valign="top"> | ||
| 197 : | <fieldset> | ||
| 198 : | neilt | 616 | <legend><?php echo T_('Content'); ?></legend> |
| 199 : | root | 1 | <table class="adminform"> |
| 200 : | <?php | ||
| 201 : | $k = 0; | ||
| 202 : | $count = count( $types_content ); | ||
| 203 : | for ( $i=0; $i < $count; $i++ ) { | ||
| 204 : | $row = &$types_content[$i]; | ||
| 205 : | |||
| 206 : | $link = 'index2.php?option=com_menus&menutype='. $menutype .'&task=edit&hidemainmenu=1&type='. $row->type; | ||
| 207 : | ?> | ||
| 208 : | <tr class="<?php echo "row$k"; ?>"> | ||
| 209 : | <td width="20"> | ||
| 210 : | <input type="radio" id="cb<?php echo $i;?>" name="type" value="<?php echo $row->type; ?>" onClick="isChecked(this.checked);" /> | ||
| 211 : | </td> | ||
| 212 : | <td> | ||
| 213 : | <a href="<?php echo $link; ?>"> | ||
| 214 : | andphe | 1000 | <?php echo T_($row->name); ?> |
| 215 : | root | 1 | </a> |
| 216 : | </td> | ||
| 217 : | <td align="center" width="20"> | ||
| 218 : | <?php | ||
| 219 : | andphe | 1000 | echo mosToolTip( T_($row->descrip), T_($row->name), 250 ); |
| 220 : | root | 1 | ?> |
| 221 : | </td> | ||
| 222 : | </tr> | ||
| 223 : | <?php | ||
| 224 : | $k = 1 - $k; | ||
| 225 : | } | ||
| 226 : | ?> | ||
| 227 : | </table> | ||
| 228 : | </fieldset> | ||
| 229 : | <fieldset> | ||
| 230 : | neilt | 616 | <legend><?php echo T_('Miscellaneous'); ?></legend> |
| 231 : | root | 1 | <table class="adminform"> |
| 232 : | <?php | ||
| 233 : | $k = 0; | ||
| 234 : | $count = count( $types_other ); | ||
| 235 : | for ( $i=0; $i < $count; $i++ ) { | ||
| 236 : | $row = &$types_other[$i]; | ||
| 237 : | |||
| 238 : | $link = 'index2.php?option=com_menus&menutype='. $menutype .'&task=edit&type='. $row->type; | ||
| 239 : | ?> | ||
| 240 : | <tr class="<?php echo "row$k"; ?>"> | ||
| 241 : | <td width="20"> | ||
| 242 : | <input type="radio" id="cb<?php echo $i;?>" name="type" value="<?php echo $row->type; ?>" onClick="isChecked(this.checked);" /> | ||
| 243 : | </td> | ||
| 244 : | <td> | ||
| 245 : | <a href="<?php echo $link; ?>"> | ||
| 246 : | andphe | 1000 | <?php echo T_($row->name); ?> |
| 247 : | root | 1 | </a> |
| 248 : | </td> | ||
| 249 : | <td align="center" width="20"> | ||
| 250 : | <?php | ||
| 251 : | andphe | 1000 | echo mosToolTip( T_($row->descrip), T_($row->name), 250 ); |
| 252 : | root | 1 | ?> |
| 253 : | </td> | ||
| 254 : | </tr> | ||
| 255 : | <?php | ||
| 256 : | $k = 1 - $k; | ||
| 257 : | } | ||
| 258 : | ?> | ||
| 259 : | </table> | ||
| 260 : | </fieldset> | ||
| 261 : | neilt | 616 | * <?php echo T_('Note that some menu types appear in more that one grouping, but they are still the same menu type.'); ?> |
| 262 : | root | 1 | </td> |
| 263 : | <td width="50%" valign="top"> | ||
| 264 : | <fieldset> | ||
| 265 : | neilt | 616 | <legend><?php echo T_('Components'); ?></legend> |
| 266 : | root | 1 | <table class="adminform"> |
| 267 : | <?php | ||
| 268 : | $k = 0; | ||
| 269 : | $count = count( $types_component ); | ||
| 270 : | for ( $i=0; $i < $count; $i++ ) { | ||
| 271 : | $row = &$types_component[$i]; | ||
| 272 : | |||
| 273 : | $link = 'index2.php?option=com_menus&menutype='. $menutype .'&task=edit&type='. $row->type; | ||
| 274 : | ?> | ||
| 275 : | <tr class="<?php echo "row$k"; ?>"> | ||
| 276 : | <td width="20"> | ||
| 277 : | <input type="radio" id="cb<?php echo $i;?>" name="type" value="<?php echo $row->type; ?>" onClick="isChecked(this.checked);" /> | ||
| 278 : | </td> | ||
| 279 : | <td> | ||
| 280 : | <a href="<?php echo $link; ?>"> | ||
| 281 : | andphe | 1000 | <?php echo T_($row->name); ?> |
| 282 : | root | 1 | </a> |
| 283 : | </td> | ||
| 284 : | <td align="center" width="20"> | ||
| 285 : | <?php | ||
| 286 : | andphe | 1000 | echo mosToolTip( T_($row->descrip), T_($row->name), 250 ); |
| 287 : | root | 1 | ?> |
| 288 : | </td> | ||
| 289 : | </tr> | ||
| 290 : | <?php | ||
| 291 : | $k = 1 - $k; | ||
| 292 : | } | ||
| 293 : | ?> | ||
| 294 : | </table> | ||
| 295 : | </fieldset> | ||
| 296 : | <fieldset> | ||
| 297 : | neilt | 616 | <legend><?php echo T_('Links'); ?></legend> |
| 298 : | root | 1 | <table class="adminform"> |
| 299 : | <?php | ||
| 300 : | $k = 0; | ||
| 301 : | $count = count( $types_link ); | ||
| 302 : | for ( $i=0; $i < $count; $i++ ) { | ||
| 303 : | $row = &$types_link[$i]; | ||
| 304 : | |||
| 305 : | $link = 'index2.php?option=com_menus&menutype='. $menutype .'&task=edit&type='. $row->type; | ||
| 306 : | ?> | ||
| 307 : | <tr class="<?php echo "row$k"; ?>"> | ||
| 308 : | <td width="20"> | ||
| 309 : | <input type="radio" id="cb<?php echo $i;?>" name="type" value="<?php echo $row->type; ?>" onClick="isChecked(this.checked);" /> | ||
| 310 : | </td> | ||
| 311 : | <td> | ||
| 312 : | <a href="<?php echo $link; ?>"> | ||
| 313 : | andphe | 1000 | <?php echo T_($row->name); ?> |
| 314 : | root | 1 | </a> |
| 315 : | </td> | ||
| 316 : | <td align="center" width="20"> | ||
| 317 : | <?php | ||
| 318 : | andphe | 1000 | echo mosToolTip( T_($row->descrip), T_($row->name), 250 ); |
| 319 : | root | 1 | ?> |
| 320 : | </td> | ||
| 321 : | </tr> | ||
| 322 : | <?php | ||
| 323 : | $k = 1 - $k; | ||
| 324 : | } | ||
| 325 : | ?> | ||
| 326 : | </table> | ||
| 327 : | </fieldset> | ||
| 328 : | </td> | ||
| 329 : | </tr> | ||
| 330 : | </table> | ||
| 331 : | |||
| 332 : | |||
| 333 : | |||
| 334 : | <input type="hidden" name="option" value="<?php echo $option; ?>" /> | ||
| 335 : | <input type="hidden" name="menutype" value="<?php echo $menutype; ?>" /> | ||
| 336 : | <input type="hidden" name="task" value="edit" /> | ||
| 337 : | <input type="hidden" name="boxchecked" value="0" /> | ||
| 338 : | <input type="hidden" name="hidemainmenu" value="0" /> | ||
| 339 : | </form> | ||
| 340 : | <?php | ||
| 341 : | } | ||
| 342 : | |||
| 343 : | |||
| 344 : | /** | ||
| 345 : | * Form to select Menu to move menu item(s) to | ||
| 346 : | */ | ||
| 347 : | function moveMenu( $option, $cid, $MenuList, $items, $menutype ) { | ||
| 348 : | ?> | ||
| 349 : | <form action="index2.php" method="post" name="adminForm"> | ||
| 350 : | <br /> | ||
| 351 : | <table class="adminheading"> | ||
| 352 : | <tr> | ||
| 353 : | <th> | ||
| 354 : | neilt | 616 | <?php echo T_('Move Menu Items'); ?> |
| 355 : | root | 1 | </th> |
| 356 : | </tr> | ||
| 357 : | </table> | ||
| 358 : | |||
| 359 : | <br /> | ||
| 360 : | <table class="adminform"> | ||
| 361 : | <tr> | ||
| 362 : | <td width="3%"></td> | ||
| 363 : | <td align="left" valign="top" width="30%"> | ||
| 364 : | neilt | 616 | <strong><?php echo T_('Move to Menu:'); ?></strong> |
| 365 : | root | 1 | <br /> |
| 366 : | <?php echo $MenuList ?> | ||
| 367 : | <br /><br /> | ||
| 368 : | </td> | ||
| 369 : | <td align="left" valign="top"> | ||
| 370 : | <strong> | ||
| 371 : | neilt | 616 | <?php echo T_('Menu Items being moved:'); ?> |
| 372 : | root | 1 | </strong> |
| 373 : | <br /> | ||
| 374 : | <ol> | ||
| 375 : | <?php | ||
| 376 : | foreach ( $items as $item ) { | ||
| 377 : | ?> | ||
| 378 : | <li> | ||
| 379 : | <?php echo $item->name; ?> | ||
| 380 : | </li> | ||
| 381 : | <?php | ||
| 382 : | } | ||
| 383 : | ?> | ||
| 384 : | </ol> | ||
| 385 : | </td> | ||
| 386 : | </tr> | ||
| 387 : | </table> | ||
| 388 : | <br /><br /> | ||
| 389 : | |||
| 390 : | <input type="hidden" name="option" value="<?php echo $option;?>" /> | ||
| 391 : | <input type="hidden" name="boxchecked" value="1" /> | ||
| 392 : | <input type="hidden" name="task" value="" /> | ||
| 393 : | <input type="hidden" name="menutype" value="<?php echo $menutype; ?>" /> | ||
| 394 : | <?php | ||
| 395 : | foreach ( $cid as $id ) { | ||
| 396 : | echo "\n <input type=\"hidden\" name=\"cid[]\" value=\"$id\" />"; | ||
| 397 : | } | ||
| 398 : | ?> | ||
| 399 : | </form> | ||
| 400 : | <?php | ||
| 401 : | } | ||
| 402 : | |||
| 403 : | |||
| 404 : | /** | ||
| 405 : | * Form to select Menu to copy menu item(s) to | ||
| 406 : | */ | ||
| 407 : | function copyMenu( $option, $cid, $MenuList, $items, $menutype ) { | ||
| 408 : | ?> | ||
| 409 : | <form action="index2.php" method="post" name="adminForm"> | ||
| 410 : | <br /> | ||
| 411 : | <table class="adminheading"> | ||
| 412 : | <tr> | ||
| 413 : | <th> | ||
| 414 : | neilt | 616 | <?php echo T_('Copy Menu Items'); ?> |
| 415 : | root | 1 | </th> |
| 416 : | </tr> | ||
| 417 : | </table> | ||
| 418 : | |||
| 419 : | <br /> | ||
| 420 : | <table class="adminform"> | ||
| 421 : | <tr> | ||
| 422 : | <td width="3%"></td> | ||
| 423 : | <td align="left" valign="top" width="30%"> | ||
| 424 : | <strong> | ||
| 425 : | neilt | 616 | <?php echo T_('Copy to Menu:'); ?> |
| 426 : | root | 1 | </strong> |
| 427 : | <br /> | ||
| 428 : | <?php echo $MenuList ?> | ||
| 429 : | <br /><br /> | ||
| 430 : | </td> | ||
| 431 : | <td align="left" valign="top"> | ||
| 432 : | <strong> | ||
| 433 : | neilt | 616 | <?php echo T_('Menu Items being copied:'); ?> |
| 434 : | root | 1 | </strong> |
| 435 : | <br /> | ||
| 436 : | <ol> | ||
| 437 : | <?php | ||
| 438 : | foreach ( $items as $item ) { | ||
| 439 : | ?> | ||
| 440 : | <li> | ||
| 441 : | <?php echo $item->name; ?> | ||
| 442 : | </li> | ||
| 443 : | <?php | ||
| 444 : | } | ||
| 445 : | ?> | ||
| 446 : | </ol> | ||
| 447 : | </td> | ||
| 448 : | </tr> | ||
| 449 : | </table> | ||
| 450 : | <br /><br /> | ||
| 451 : | |||
| 452 : | <input type="hidden" name="option" value="<?php echo $option;?>" /> | ||
| 453 : | <input type="hidden" name="boxchecked" value="0" /> | ||
| 454 : | <input type="hidden" name="task" value="" /> | ||
| 455 : | <input type="hidden" name="menutype" value="<?php echo $menutype; ?>" /> | ||
| 456 : | <?php | ||
| 457 : | foreach ( $cid as $id ) { | ||
| 458 : | echo "\n <input type=\"hidden\" name=\"cid[]\" value=\"$id\" />"; | ||
| 459 : | } | ||
| 460 : | ?> | ||
| 461 : | </form> | ||
| 462 : | <?php | ||
| 463 : | } | ||
| 464 : | |||
| 465 : | |||
| 466 : | } | ||
| 467 : | ?> |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |
Web Hosting provided by Network Redux.

