Annotation of /mambo/branches/4.6/administrator/components/com_categories/admin.categories.html.php
Parent Directory
|
Revision Log
Revision 964 - (view) (download)
| 1 : | root | 1 | <?php |
| 2 : | /** | ||
| 3 : | elpie | 964 | * @package Mambo |
| 4 : | root | 1 | * @subpackage Categories |
| 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 categories_html { | ||
| 14 : | |||
| 15 : | /** | ||
| 16 : | * Writes a list of the categories for a section | ||
| 17 : | * @param array An array of category objects | ||
| 18 : | * @param string The name of the category section | ||
| 19 : | */ | ||
| 20 : | function show( &$rows, $section, $section_name, &$pageNav, &$lists, $type ) { | ||
| 21 : | global $my, $mosConfig_live_site; | ||
| 22 : | |||
| 23 : | mosCommonHTML::loadOverlib(); | ||
| 24 : | ?> | ||
| 25 : | <form action="index2.php" method="post" name="adminForm"> | ||
| 26 : | <table class="adminheading"> | ||
| 27 : | <tr> | ||
| 28 : | <?php | ||
| 29 : | if ( $section == 'content') { | ||
| 30 : | ?> | ||
| 31 : | <th class="categories"> | ||
| 32 : | neilt | 616 | <?php echo T_('Category Manager'); ?> <small><small>[ <?php echo T_('Content: All'); ?> ]</small></small> |
| 33 : | root | 1 | </th> |
| 34 : | <td width="right"> | ||
| 35 : | <?php echo $lists['sectionid'];?> | ||
| 36 : | </td> | ||
| 37 : | <?php | ||
| 38 : | } else { | ||
| 39 : | if ( is_numeric( $section ) ) { | ||
| 40 : | $query = 'com_content§ionid=' . $section; | ||
| 41 : | } else { | ||
| 42 : | if ( $section == 'com_contact_details' ) { | ||
| 43 : | $query = 'com_contact'; | ||
| 44 : | } else { | ||
| 45 : | $query = $section; | ||
| 46 : | } | ||
| 47 : | } | ||
| 48 : | ?> | ||
| 49 : | <th class="categories"> | ||
| 50 : | neilt | 616 | <?php echo T_('Category Manager'); ?> <small><small>[ <?php echo $section_name;?> ]</small></small> |
| 51 : | root | 1 | </th> |
| 52 : | <?php | ||
| 53 : | } | ||
| 54 : | ?> | ||
| 55 : | </tr> | ||
| 56 : | </table> | ||
| 57 : | |||
| 58 : | <table class="adminlist"> | ||
| 59 : | <tr> | ||
| 60 : | <th width="10" align="left"> | ||
| 61 : | # | ||
| 62 : | </th> | ||
| 63 : | <th width="20"> | ||
| 64 : | <input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count( $rows );?>);" /> | ||
| 65 : | </th> | ||
| 66 : | <th class="title"> | ||
| 67 : | neilt | 616 | <?php echo T_('Category Name'); ?> |
| 68 : | root | 1 | </th> |
| 69 : | <th width="10%"> | ||
| 70 : | neilt | 616 | <?php echo T_('Published'); ?> |
| 71 : | root | 1 | </th> |
| 72 : | <?php | ||
| 73 : | if ( $section <> 'content') { | ||
| 74 : | ?> | ||
| 75 : | <th colspan="2" width="5%"> | ||
| 76 : | neilt | 616 | <?php echo T_('Reorder'); ?> |
| 77 : | root | 1 | </th> |
| 78 : | <?php | ||
| 79 : | } | ||
| 80 : | ?> | ||
| 81 : | <th width="2%"> | ||
| 82 : | neilt | 616 | <?php echo T_('Order'); ?> |
| 83 : | root | 1 | </th> |
| 84 : | <th width="1%"> | ||
| 85 : | 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> |
| 86 : | root | 1 | </th> |
| 87 : | <th width="10%"> | ||
| 88 : | neilt | 616 | <?php echo T_('Access'); ?> |
| 89 : | root | 1 | </th> |
| 90 : | <?php | ||
| 91 : | if ( $section == 'content') { | ||
| 92 : | ?> | ||
| 93 : | <th width="12%" align="left"> | ||
| 94 : | neilt | 616 | <?php echo T_('Section'); ?> |
| 95 : | root | 1 | </th> |
| 96 : | <?php | ||
| 97 : | } | ||
| 98 : | ?> | ||
| 99 : | <th width="5%" nowrap> | ||
| 100 : | neilt | 616 | <?php echo T_('Category ID'); ?> |
| 101 : | root | 1 | </th> |
| 102 : | <?php | ||
| 103 : | if ( $type == 'content') { | ||
| 104 : | ?> | ||
| 105 : | <th width="5%"> | ||
| 106 : | neilt | 616 | # <?php echo T_('Active'); ?> |
| 107 : | root | 1 | </th> |
| 108 : | <th width="5%"> | ||
| 109 : | neilt | 616 | # <?php echo T_('Trash'); ?> |
| 110 : | root | 1 | </th> |
| 111 : | <?php | ||
| 112 : | } else { | ||
| 113 : | ?> | ||
| 114 : | <th width="20%"> | ||
| 115 : | </th> | ||
| 116 : | <?php | ||
| 117 : | } | ||
| 118 : | ?> | ||
| 119 : | </tr> | ||
| 120 : | <?php | ||
| 121 : | $k = 0; | ||
| 122 : | for ($i=0, $n=count( $rows ); $i < $n; $i++) { | ||
| 123 : | $row = &$rows[$i]; | ||
| 124 : | |||
| 125 : | $row->sect_link = 'index2.php?option=com_sections&task=editA&hidemainmenu=1&id='. $row->section; | ||
| 126 : | |||
| 127 : | $link = 'index2.php?option=com_categories§ion='. $section .'&task=editA&hidemainmenu=1&id='. $row->id; | ||
| 128 : | |||
| 129 : | $access = mosCommonHTML::AccessProcessing( $row, $i ); | ||
| 130 : | $checked = mosCommonHTML::CheckedOutProcessing( $row, $i ); | ||
| 131 : | $published = mosCommonHTML::PublishedProcessing( $row, $i ); | ||
| 132 : | ?> | ||
| 133 : | <tr class="<?php echo "row$k"; ?>"> | ||
| 134 : | <td> | ||
| 135 : | <?php echo $pageNav->rowNumber( $i ); ?> | ||
| 136 : | </td> | ||
| 137 : | <td> | ||
| 138 : | <?php echo $checked; ?> | ||
| 139 : | </td> | ||
| 140 : | <td> | ||
| 141 : | <?php | ||
| 142 : | if ( $row->checked_out_contact_category && ( $row->checked_out_contact_category != $my->id ) ) { | ||
| 143 : | echo $row->name .' ( '. $row->title .' )'; | ||
| 144 : | } else { | ||
| 145 : | ?> | ||
| 146 : | <a href="<?php echo $link; ?>"> | ||
| 147 : | <?php echo $row->name .' ( '. $row->title .' )'; ?> | ||
| 148 : | </a> | ||
| 149 : | <?php | ||
| 150 : | } | ||
| 151 : | ?> | ||
| 152 : | </td> | ||
| 153 : | <td align="center"> | ||
| 154 : | <?php echo $published;?> | ||
| 155 : | </td> | ||
| 156 : | <?php | ||
| 157 : | if ( $section <> 'content' ) { | ||
| 158 : | ?> | ||
| 159 : | <td> | ||
| 160 : | <?php echo $pageNav->orderUpIcon( $i ); ?> | ||
| 161 : | </td> | ||
| 162 : | <td> | ||
| 163 : | <?php echo $pageNav->orderDownIcon( $i, $n ); ?> | ||
| 164 : | </td> | ||
| 165 : | <?php | ||
| 166 : | } | ||
| 167 : | ?> | ||
| 168 : | <td align="center" colspan="2"> | ||
| 169 : | <input type="text" name="order[]" size="5" value="<?php echo $row->ordering; ?>" class="text_area" style="text-align: center" /> | ||
| 170 : | </td> | ||
| 171 : | <td align="center"> | ||
| 172 : | <?php echo $access;?> | ||
| 173 : | </td> | ||
| 174 : | <?php | ||
| 175 : | if ( $section == 'content' ) { | ||
| 176 : | ?> | ||
| 177 : | <td align="left"> | ||
| 178 : | neilt | 616 | <a href="<?php echo $row->sect_link; ?>" title="<?php echo T_('Edit Section'); ?>"> |
| 179 : | root | 1 | <?php echo $row->section_name; ?> |
| 180 : | </a> | ||
| 181 : | </td> | ||
| 182 : | <?php | ||
| 183 : | } | ||
| 184 : | ?> | ||
| 185 : | <td align="center"> | ||
| 186 : | <?php echo $row->id; ?> | ||
| 187 : | </td> | ||
| 188 : | <?php | ||
| 189 : | if ( $type == 'content') { | ||
| 190 : | ?> | ||
| 191 : | <td align="center"> | ||
| 192 : | <?php echo $row->active; ?> | ||
| 193 : | </td> | ||
| 194 : | <td align="center"> | ||
| 195 : | <?php echo $row->trash; ?> | ||
| 196 : | </td> | ||
| 197 : | <?php | ||
| 198 : | } else { | ||
| 199 : | ?> | ||
| 200 : | <td> | ||
| 201 : | </td> | ||
| 202 : | <?php | ||
| 203 : | } | ||
| 204 : | $k = 1 - $k; | ||
| 205 : | ?> | ||
| 206 : | </tr> | ||
| 207 : | <?php | ||
| 208 : | } | ||
| 209 : | ?> | ||
| 210 : | </table> | ||
| 211 : | |||
| 212 : | <?php echo $pageNav->getListFooter(); ?> | ||
| 213 : | |||
| 214 : | <input type="hidden" name="option" value="com_categories" /> | ||
| 215 : | <input type="hidden" name="section" value="<?php echo $section;?>" /> | ||
| 216 : | <input type="hidden" name="task" value="" /> | ||
| 217 : | <input type="hidden" name="chosen" value="" /> | ||
| 218 : | <input type="hidden" name="act" value="" /> | ||
| 219 : | <input type="hidden" name="boxchecked" value="0" /> | ||
| 220 : | <input type="hidden" name="type" value="<?php echo $type; ?>" /> | ||
| 221 : | <input type="hidden" name="hidemainmenu" value="0" /> | ||
| 222 : | </form> | ||
| 223 : | <?php | ||
| 224 : | } | ||
| 225 : | |||
| 226 : | /** | ||
| 227 : | * Writes the edit form for new and existing categories | ||
| 228 : | * @param mosCategory The category object | ||
| 229 : | * @param string | ||
| 230 : | * @param array | ||
| 231 : | */ | ||
| 232 : | function edit( &$row, &$lists, $redirect, $menus ) { | ||
| 233 : | if ($row->image == "") { | ||
| 234 : | $row->image = 'blank.png'; | ||
| 235 : | } | ||
| 236 : | |||
| 237 : | if ( $redirect == 'content' ) { | ||
| 238 : | csouza | 149 | $component = T_('Content'); |
| 239 : | root | 1 | } else { |
| 240 : | $component = ucfirst( substr( $redirect, 4 ) ); | ||
| 241 : | if ( $redirect == 'com_contact_details' ) { | ||
| 242 : | csouza | 149 | $component = T_('Contact'); |
| 243 : | root | 1 | } |
| 244 : | } | ||
| 245 : | mosMakeHtmlSafe( $row, ENT_QUOTES, 'description' ); | ||
| 246 : | ?> | ||
| 247 : | <script language="javascript" type="text/javascript"> | ||
| 248 : | function submitbutton(pressbutton, section) { | ||
| 249 : | var form = document.adminForm; | ||
| 250 : | if (pressbutton == 'cancel') { | ||
| 251 : | submitform( pressbutton ); | ||
| 252 : | return; | ||
| 253 : | } | ||
| 254 : | |||
| 255 : | if ( pressbutton == 'menulink' ) { | ||
| 256 : | if ( form.menuselect.value == "" ) { | ||
| 257 : | neilt | 616 | alert( "<?php echo T_('Please select a Menu'); ?>" ); |
| 258 : | root | 1 | return; |
| 259 : | } else if ( form.link_type.value == "" ) { | ||
| 260 : | neilt | 616 | alert( "<?php echo T_('Please select a menu type'); ?>" ); |
| 261 : | root | 1 | return; |
| 262 : | } else if ( form.link_name.value == "" ) { | ||
| 263 : | neilt | 616 | alert( "<?php echo T_('Please enter a Name for this menu item'); ?>" ); |
| 264 : | root | 1 | return; |
| 265 : | } | ||
| 266 : | } | ||
| 267 : | |||
| 268 : | if ( form.name.value == "" ) { | ||
| 269 : | neilt | 616 | alert("<?php echo T_('Category must have a name'); ?>"); |
| 270 : | root | 1 | } else { |
| 271 : | <?php getEditorContents( 'editor1', 'description' ) ; ?> | ||
| 272 : | submitform(pressbutton); | ||
| 273 : | } | ||
| 274 : | } | ||
| 275 : | // show / hide publishing information | ||
| 276 : | function displayParameterInfo() | ||
| 277 : | { | ||
| 278 : | neilt | 616 | |
| 279 : | root | 1 | if(document.getElementById('simpleediting').style.display == 'block') |
| 280 : | { | ||
| 281 : | neilt | 616 | document.getElementById('simpleediting').style.display = 'none'; |
| 282 : | document.getElementById('show').style.display = 'block'; | ||
| 283 : | root | 1 | document.getElementById('hide').style.display = 'none'; |
| 284 : | document.adminForm.simple_editing.value ='on'; | ||
| 285 : | } | ||
| 286 : | else | ||
| 287 : | { | ||
| 288 : | document.getElementById('simpleediting').style.display = 'block'; | ||
| 289 : | neilt | 616 | document.getElementById('show').style.display = 'none'; |
| 290 : | root | 1 | document.getElementById('hide').style.display = 'block'; |
| 291 : | document.adminForm.simple_editing.value ='off'; | ||
| 292 : | } | ||
| 293 : | neilt | 616 | |
| 294 : | root | 1 | } |
| 295 : | </script> | ||
| 296 : | mambo | 116 | <?php |
| 297 : | root | 1 | if($_SESSION['simple_editing'] == 'on') |
| 298 : | { | ||
| 299 : | $simpleediting ='none'; | ||
| 300 : | $simple = 'block'; | ||
| 301 : | $advanced = 'none'; | ||
| 302 : | } | ||
| 303 : | else | ||
| 304 : | { | ||
| 305 : | neilt | 616 | |
| 306 : | root | 1 | $advanced = 'block'; |
| 307 : | $simple = 'none'; | ||
| 308 : | $simpleediting ='block'; | ||
| 309 : | } | ||
| 310 : | neilt | 616 | |
| 311 : | root | 1 | ?> |
| 312 : | <form action="index2.php" method="post" name="adminForm"> | ||
| 313 : | cauld | 854 | <input type ="hidden" name="simple_editing" value='' /> |
| 314 : | root | 1 | <table class="adminheading"> |
| 315 : | <tr> | ||
| 316 : | <th class="categories"> | ||
| 317 : | neilt | 616 | <?php echo T_('Category:'); ?> |
| 318 : | root | 1 | <small> |
| 319 : | csouza | 149 | <?php echo $row->id ? T_('Edit') : T_('New');?> |
| 320 : | root | 1 | </small> |
| 321 : | <small><small> | ||
| 322 : | [ <?php echo $component; ?>: <?php echo $row->name; ?> ] | ||
| 323 : | </small></small> | ||
| 324 : | </th> | ||
| 325 : | </tr> | ||
| 326 : | </table> | ||
| 327 : | <table width="100%"> | ||
| 328 : | <tr> | ||
| 329 : | <td valign="top" align="right"> | ||
| 330 : | <div id = "show" style="display:<?php echo $simple;?>"> | ||
| 331 : | neilt | 616 | <a href="javascript:displayParameterInfo();"><?php echo T_('Show Advanced Details'); ?></a> |
| 332 : | root | 1 | </div> |
| 333 : | <div id = "hide" style="display:<?php echo $advanced;?>"> | ||
| 334 : | neilt | 616 | <a href="javascript:displayParameterInfo();"><?php echo T_('Hide Advanced Details'); ?></a> |
| 335 : | root | 1 | </div> |
| 336 : | </td> | ||
| 337 : | </tr> | ||
| 338 : | </table> | ||
| 339 : | <table width="100%"> | ||
| 340 : | <tr> | ||
| 341 : | <td valign="top" > | ||
| 342 : | <table class="adminform"> | ||
| 343 : | <tr> | ||
| 344 : | <th colspan="3"> | ||
| 345 : | neilt | 616 | <?php echo T_('Category Details'); ?> |
| 346 : | root | 1 | </th> |
| 347 : | cauld | 854 | </tr> |
| 348 : | root | 1 | <tr> |
| 349 : | <td> | ||
| 350 : | neilt | 616 | <?php echo T_('Category Title:'); ?> |
| 351 : | root | 1 | </td> |
| 352 : | <td colspan="2"> | ||
| 353 : | neilt | 616 | <input class="text_area" type="text" name="title" value="<?php echo $row->title; ?>" size="50" maxlength="50" title="<?php echo T_('A short name to appear in menus'); ?>" /> |
| 354 : | root | 1 | </td> |
| 355 : | </tr> | ||
| 356 : | <tr> | ||
| 357 : | <td> | ||
| 358 : | neilt | 616 | <?php echo T_('Category Name:'); ?> |
| 359 : | root | 1 | </td> |
| 360 : | <td colspan="2"> | ||
| 361 : | neilt | 616 | <input class="text_area" type="text" name="name" value="<?php echo $row->name; ?>" size="50" maxlength="255" title="<?php echo T_('A long name to be displayed in headings'); ?>" /> |
| 362 : | root | 1 | </td> |
| 363 : | </tr> | ||
| 364 : | <tr> | ||
| 365 : | <td> | ||
| 366 : | neilt | 616 | <?php echo T_('Section:'); ?> |
| 367 : | root | 1 | </td> |
| 368 : | <td colspan="2"> | ||
| 369 : | <?php echo $lists['section']; ?> | ||
| 370 : | </td> | ||
| 371 : | </tr> | ||
| 372 : | <tr> | ||
| 373 : | <td> | ||
| 374 : | neilt | 616 | <?php echo T_('Image:'); ?> |
| 375 : | root | 1 | </td> |
| 376 : | <td> | ||
| 377 : | <?php echo $lists['image']; ?> | ||
| 378 : | </td> | ||
| 379 : | <td rowspan="4" width="50%"> | ||
| 380 : | <script language="javascript" type="text/javascript"> | ||
| 381 : | if (document.forms[0].image.options.value!=''){ | ||
| 382 : | jsimg='../images/stories/' + getSelectedValue( 'adminForm', 'image' ); | ||
| 383 : | } else { | ||
| 384 : | jsimg='../images/M_images/blank.png'; | ||
| 385 : | } | ||
| 386 : | neilt | 616 | document.write('<img src=' + jsimg + ' name="imagelib" width="80" height="80" border="2" alt="<?php echo T_('Preview'); ?>" />'); |
| 387 : | root | 1 | </script> |
| 388 : | </td> | ||
| 389 : | </tr> | ||
| 390 : | <tr> | ||
| 391 : | <td> | ||
| 392 : | neilt | 616 | <?php echo T_('Image Position:'); ?> |
| 393 : | root | 1 | </td> |
| 394 : | <td> | ||
| 395 : | <?php echo $lists['image_position']; ?> | ||
| 396 : | </td> | ||
| 397 : | </tr> | ||
| 398 : | <tr> | ||
| 399 : | <td> | ||
| 400 : | neilt | 616 | <?php echo T_('Ordering:'); ?> |
| 401 : | root | 1 | </td> |
| 402 : | <td> | ||
| 403 : | <?php echo $lists['ordering']; ?> | ||
| 404 : | </td> | ||
| 405 : | </tr> | ||
| 406 : | <tr> | ||
| 407 : | <td> | ||
| 408 : | neilt | 616 | <?php echo T_('Access Level:'); ?> |
| 409 : | root | 1 | </td> |
| 410 : | <td> | ||
| 411 : | <?php echo $lists['access']; ?> | ||
| 412 : | </td> | ||
| 413 : | </tr> | ||
| 414 : | <tr> | ||
| 415 : | <td> | ||
| 416 : | neilt | 616 | <?php echo T_('Published:'); ?> |
| 417 : | root | 1 | </td> |
| 418 : | <td> | ||
| 419 : | <?php echo $lists['published']; ?> | ||
| 420 : | </td> | ||
| 421 : | </tr> | ||
| 422 : | <tr> | ||
| 423 : | <td valign="top"> | ||
| 424 : | neilt | 616 | <?php echo T_('Description:'); ?> |
| 425 : | root | 1 | </td> |
| 426 : | <td colspan="2"> | ||
| 427 : | <?php | ||
| 428 : | // parameters : areaname, content, hidden field, width, height, rows, cols | ||
| 429 : | editorArea( 'editor1', $row->description , 'description', '100%;', '300', '60', '20' ) ; ?> | ||
| 430 : | </td> | ||
| 431 : | </tr> | ||
| 432 : | </table> | ||
| 433 : | </td> | ||
| 434 : | <td valign="top" align="right"> | ||
| 435 : | <div id="simpleediting" style="display:<?php echo $simpleediting;?>"> | ||
| 436 : | <table cellspacing="0" cellpadding="0" border="0" width="100%" > | ||
| 437 : | <tr> | ||
| 438 : | <td width="40%"> | ||
| 439 : | <?php | ||
| 440 : | if ( $row->id > 0 ) { | ||
| 441 : | ?> | ||
| 442 : | <table class="adminform"> | ||
| 443 : | <tr> | ||
| 444 : | <th colspan="2"> | ||
| 445 : | neilt | 616 | <?php echo T_('Link to Menu'); ?> |
| 446 : | root | 1 | </th> |
| 447 : | cauld | 854 | </tr> |
| 448 : | root | 1 | <tr> |
| 449 : | <td colspan="2"> | ||
| 450 : | neilt | 616 | <?php echo T_('This will create a new menu item in the menu you select'); ?> |
| 451 : | root | 1 | <br /><br /> |
| 452 : | </td> | ||
| 453 : | cauld | 854 | </tr> |
| 454 : | root | 1 | <tr> |
| 455 : | <td valign="top" width="100px"> | ||
| 456 : | neilt | 616 | <?php echo T_('Select a Menu'); ?> |
| 457 : | root | 1 | </td> |
| 458 : | <td> | ||
| 459 : | <?php echo $lists['menuselect']; ?> | ||
| 460 : | </td> | ||
| 461 : | cauld | 854 | </tr> |
| 462 : | root | 1 | <tr> |
| 463 : | <td valign="top" width="100px"> | ||
| 464 : | ninekrit | 873 | <?php echo T_('Select Menu Type'); ?> |
| 465 : | root | 1 | </td> |
| 466 : | <td> | ||
| 467 : | <?php echo $lists['link_type']; ?> | ||
| 468 : | </td> | ||
| 469 : | cauld | 854 | </tr> |
| 470 : | root | 1 | <tr> |
| 471 : | <td valign="top" width="100px"> | ||
| 472 : | neilt | 616 | <?php echo T_('Menu Item Name'); ?> |
| 473 : | root | 1 | </td> |
| 474 : | <td> | ||
| 475 : | <input type="text" name="link_name" class="inputbox" value="" size="25" /> | ||
| 476 : | </td> | ||
| 477 : | cauld | 854 | </tr> |
| 478 : | root | 1 | <tr> |
| 479 : | <td> | ||
| 480 : | </td> | ||
| 481 : | <td> | ||
| 482 : | neilt | 616 | <input name="menu_link" type="button" class="button" value="<?php echo T_('Link to Menu'); ?>" onClick="submitbutton('menulink');" /> |
| 483 : | root | 1 | </td> |
| 484 : | cauld | 854 | </tr> |
| 485 : | root | 1 | <tr> |
| 486 : | <th colspan="2"> | ||
| 487 : | neilt | 616 | <?php echo T_('Existing Menu Links'); ?> |
| 488 : | root | 1 | </th> |
| 489 : | </tr> | ||
| 490 : | <?php | ||
| 491 : | if ( $menus == NULL ) { | ||
| 492 : | ?> | ||
| 493 : | <tr> | ||
| 494 : | <td colspan="2"> | ||
| 495 : | neilt | 616 | <?php echo T_('None'); ?> |
| 496 : | root | 1 | </td> |
| 497 : | </tr> | ||
| 498 : | <?php | ||
| 499 : | } else { | ||
| 500 : | mosCommonHTML::menuLinksSecCat( $menus ); | ||
| 501 : | } | ||
| 502 : | ?> | ||
| 503 : | <tr> | ||
| 504 : | <td colspan="2"> | ||
| 505 : | </td> | ||
| 506 : | </tr> | ||
| 507 : | </table> | ||
| 508 : | <?php | ||
| 509 : | } else { | ||
| 510 : | ?> | ||
| 511 : | <table class="adminform" width="40%"> | ||
| 512 : | <tr><th> </th></tr> | ||
| 513 : | neilt | 616 | <tr><td><?php echo T_('Menu links available when saved'); ?></td></tr> |
| 514 : | root | 1 | </table> |
| 515 : | <?php | ||
| 516 : | } | ||
| 517 : | ?> | ||
| 518 : | </td> | ||
| 519 : | </tr> | ||
| 520 : | </table> | ||
| 521 : | cauld | 854 | </div> |
| 522 : | </td> | ||
| 523 : | </tr> | ||
| 524 : | </table> | ||
| 525 : | root | 1 | <input type="hidden" name="option" value="com_categories" /> |
| 526 : | <input type="hidden" name="oldtitle" value="<?php echo $row->title ; ?>" /> | ||
| 527 : | <input type="hidden" name="id" value="<?php echo $row->id; ?>" /> | ||
| 528 : | <input type="hidden" name="sectionid" value="<?php echo $row->section; ?>" /> | ||
| 529 : | <input type="hidden" name="task" value="" /> | ||
| 530 : | <input type="hidden" name="redirect" value="<?php echo $redirect; ?>" /> | ||
| 531 : | <input type="hidden" name="hidemainmenu" value="0" /> | ||
| 532 : | </form> | ||
| 533 : | cauld | 854 | </td> |
| 534 : | </tr> | ||
| 535 : | </table> | ||
| 536 : | root | 1 | <?php |
| 537 : | } | ||
| 538 : | |||
| 539 : | |||
| 540 : | /** | ||
| 541 : | * Form to select Section to move Category to | ||
| 542 : | */ | ||
| 543 : | function moveCategorySelect( $option, $cid, $SectionList, $items, $sectionOld, $contents, $redirect ) { | ||
| 544 : | ?> | ||
| 545 : | <form action="index2.php" method="post" name="adminForm"> | ||
| 546 : | <br /> | ||
| 547 : | <table class="adminheading"> | ||
| 548 : | <tr> | ||
| 549 : | <th class="categories"> | ||
| 550 : | neilt | 616 | <?php echo T_('Move Category'); ?> |
| 551 : | root | 1 | </th> |
| 552 : | </tr> | ||
| 553 : | </table> | ||
| 554 : | |||
| 555 : | <br /> | ||
| 556 : | <table class="adminform"> | ||
| 557 : | <tr> | ||
| 558 : | <td width="3%"></td> | ||
| 559 : | <td align="left" valign="top" width="30%"> | ||
| 560 : | neilt | 616 | <strong><?php echo T_('Move to Section:'); ?></strong> |
| 561 : | root | 1 | <br /> |
| 562 : | <?php echo $SectionList ?> | ||
| 563 : | <br /><br /> | ||
| 564 : | </td> | ||
| 565 : | <td align="left" valign="top" width="20%"> | ||
| 566 : | neilt | 616 | <strong><?php echo T_('Categories being moved:'); ?></strong> |
| 567 : | root | 1 | <br /> |
| 568 : | <?php | ||
| 569 : | echo "<ol>"; | ||
| 570 : | foreach ( $items as $item ) { | ||
| 571 : | echo "<li>". $item->name ."</li>"; | ||
| 572 : | } | ||
| 573 : | echo "</ol>"; | ||
| 574 : | ?> | ||
| 575 : | </td> | ||
| 576 : | <td valign="top" width="20%"> | ||
| 577 : | neilt | 616 | <strong><?php echo T_('Content Items being moved:'); ?></strong> |
| 578 : | root | 1 | <br /> |
| 579 : | <?php | ||
| 580 : | neilt | 618 | if ($contents) { |
| 581 : | echo "<ol>"; | ||
| 582 : | foreach ( $contents as $content ) { | ||
| 583 : | echo "<li>". $content->title ."</li>"; | ||
| 584 : | } | ||
| 585 : | echo "</ol>"; | ||
| 586 : | } else { | ||
| 587 : | echo '<br />None'; | ||
| 588 : | } | ||
| 589 : | root | 1 | ?> |
| 590 : | </td> | ||
| 591 : | <td valign="top"> | ||
| 592 : | ninekrit | 876 | <?php echo T_('This will move the Categories listed <br />and all the items within the category (also listed) <br />to the selected Section.'); ?> |
| 593 : | root | 1 | </td>. |
| 594 : | </tr> | ||
| 595 : | </table> | ||
| 596 : | <br /><br /> | ||
| 597 : | |||
| 598 : | <input type="hidden" name="option" value="<?php echo $option;?>" /> | ||
| 599 : | <input type="hidden" name="section" value="<?php echo $sectionOld;?>" /> | ||
| 600 : | <input type="hidden" name="boxchecked" value="1" /> | ||
| 601 : | <input type="hidden" name="redirect" value="<?php echo $redirect; ?>" /> | ||
| 602 : | <input type="hidden" name="task" value="" /> | ||
| 603 : | <?php | ||
| 604 : | foreach ( $cid as $id ) { | ||
| 605 : | echo "\n <input type=\"hidden\" name=\"cid[]\" value=\"$id\" />"; | ||
| 606 : | } | ||
| 607 : | ?> | ||
| 608 : | </form> | ||
| 609 : | <?php | ||
| 610 : | } | ||
| 611 : | |||
| 612 : | |||
| 613 : | /** | ||
| 614 : | * Form to select Section to copy Category to | ||
| 615 : | */ | ||
| 616 : | function copyCategorySelect( $option, $cid, $SectionList, $items, $sectionOld, $contents, $redirect ) { | ||
| 617 : | ?> | ||
| 618 : | <form action="index2.php" method="post" name="adminForm"> | ||
| 619 : | <br /> | ||
| 620 : | <table class="adminheading"> | ||
| 621 : | <tr> | ||
| 622 : | <th class="categories"> | ||
| 623 : | neilt | 616 | <?php echo T_('Copy Category'); ?> |
| 624 : | root | 1 | </th> |
| 625 : | </tr> | ||
| 626 : | </table> | ||
| 627 : | |||
| 628 : | <br /> | ||
| 629 : | <table class="adminform"> | ||
| 630 : | <tr> | ||
| 631 : | <td width="3%"></td> | ||
| 632 : | <td align="left" valign="top" width="30%"> | ||
| 633 : | neilt | 616 | <strong><?php echo T_('Copy to Section:'); ?></strong> |
| 634 : | root | 1 | <br /> |
| 635 : | <?php echo $SectionList ?> | ||
| 636 : | <br /><br /> | ||
| 637 : | </td> | ||
| 638 : | <td align="left" valign="top" width="20%"> | ||
| 639 : | neilt | 616 | <strong><?php echo T_('Categories being copied:'); ?></strong> |
| 640 : | root | 1 | <br /> |
| 641 : | <?php | ||
| 642 : | echo "<ol>"; | ||
| 643 : | foreach ( $items as $item ) { | ||
| 644 : | echo "<li>". $item->name ."</li>"; | ||
| 645 : | } | ||
| 646 : | echo "</ol>"; | ||
| 647 : | ?> | ||
| 648 : | </td> | ||
| 649 : | <td valign="top" width="20%"> | ||
| 650 : | neilt | 616 | <strong><?php echo T_('Content Items being copied:'); ?></strong> |
| 651 : | root | 1 | <br /> |
| 652 : | <?php | ||
| 653 : | echo "<ol>"; | ||
| 654 : | foreach ( $contents as $content ) { | ||
| 655 : | echo "<li>". $content->title ."</li>"; | ||
| 656 : | echo "\n <input type=\"hidden\" name=\"item[]\" value=\"$content->id\" />"; | ||
| 657 : | } | ||
| 658 : | echo "</ol>"; | ||
| 659 : | ?> | ||
| 660 : | </td> | ||
| 661 : | csouza | 149 | <td valign="top"><?php echo T_(' |
| 662 : | root | 1 | This will copy the Categories listed |
| 663 : | <br /> | ||
| 664 : | and all the items within the category (also listed) | ||
| 665 : | <br /> | ||
| 666 : | neilt | 616 | to the selected Section.'); ?> |
| 667 : | root | 1 | </td>. |
| 668 : | </tr> | ||
| 669 : | </table> | ||
| 670 : | <br /><br /> | ||
| 671 : | |||
| 672 : | <input type="hidden" name="option" value="<?php echo $option;?>" /> | ||
| 673 : | <input type="hidden" name="section" value="<?php echo $sectionOld;?>" /> | ||
| 674 : | <input type="hidden" name="boxchecked" value="1" /> | ||
| 675 : | <input type="hidden" name="redirect" value="<?php echo $redirect; ?>" /> | ||
| 676 : | <input type="hidden" name="task" value="" /> | ||
| 677 : | <?php | ||
| 678 : | foreach ( $cid as $id ) { | ||
| 679 : | echo "\n <input type=\"hidden\" name=\"cid[]\" value=\"$id\" />"; | ||
| 680 : | } | ||
| 681 : | ?> | ||
| 682 : | </form> | ||
| 683 : | <?php | ||
| 684 : | } | ||
| 685 : | |||
| 686 : | } | ||
| 687 : | ?> |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |
Web Hosting provided by Network Redux.

