</h2> <div class="zenpagechecklist"> <?php if (is_object($result)) { ?> <ul> <?php printNestedItemsList('cats-checkboxlist', $result->getID()); ?> </ul> <?php } else { ?> <ul> <?php printNestedItemsList('cats-checkboxlist', '', 'all'); ?> </ul> <?php } ?> </div> <br /> <?php } // if article for categories } // if !category end ?> </td>
?> <?php $checkarray = array(gettext('*Bulk actions*') => 'noaction', gettext('Delete') => 'deleteall', gettext('Add tags to articles') => 'alltags', gettext('Clear tags of articles') => 'clearalltags', gettext('Reset hitcounter') => 'resethitcounter'); printBulkActions($checkarray); ?> </div> <div class="subhead" > <label style="float: right"><?php echo gettext("Check All"); ?> <input type="checkbox" name="allbox" id="allbox" onclick="checkAll(this.form, 'ids[]', this.checked);" /> </label> </div> <ul class="page-list"> <?php $toodeep = printNestedItemsList('cats-sortablelist', '', ''); ?> </ul> </div> <?php if ($toodeep) { echo '<div class="errorbox">'; echo '<h2>' . gettext('The sort position of the indicated items cannot be recorded because the nesting is too deep. Please move them to a higher level and save your order.') . '</h2>'; echo '</div>'; } ?> <span id="serializeOutput" /></span> <input name="update" type="hidden" value="Save Order" /> <p class="buttons"> <button class="serialize" type="submit" title="<?php echo gettext('Apply');
if (extensionEnabled('hitcounter')) { $checkarray['Reset hitcounter'] = 'resethitcounter'; } printBulkActions($checkarray); ?> </div> <div class="subhead"> <label style="float: right"><?php echo gettext("Check All"); ?> <input type="checkbox" name="allbox" id="allbox" onclick="checkAll(this.form, 'ids[]', this.checked);" /> </label> </div> <ul class="page-list"> <?php $toodeep = printNestedItemsList('pages-sortablelist'); ?> </ul> </div> <br class="clearall" /><br class="clearall" /> <?php if ($toodeep) { echo '<div class="errorbox">'; echo '<h2>' . gettext('The sort position of the indicated pages cannot be recorded because the nesting is too deep. Please move them to a higher level and save your order.') . '</h2>'; echo '</div>'; } ?> <span id="serializeOutput"></span> <input name="update" type="hidden" value="Save Order" /> <p class="buttons">
/** * Edit tab bulk actions drop-down * @param array $checkarray the list of actions * @param bool $checkAll set true to include check all box */ function printBulkActions($checkarray, $checkAll = false) { $customInfo = $colorboxBookmark = array(); foreach ($checkarray as $key => $value) { if (is_array($value)) { $checkarray[$key] = $value['name']; switch ($action = $value['action']) { case 'mass_customTextarea_data': $data['size'] = -1; case 'mass_customText_data': $customInfo[$value['name']] = $value; $action = 'mass_' . $value['name'] . '_data'; break; } $colorboxBookmark[$value['name']] = $action; } } if (!empty($colorboxBookmark)) { ?> <script type="text/javascript"> //<!-- <![CDATA[ function checkFor(obj) { var sel = obj.options[obj.selectedIndex].value; var mark; switch (sel) { <?php foreach ($colorboxBookmark as $key => $mark) { ?> case '<?php echo $key; ?> ': mark = '<?php echo $mark; ?> '; break; <?php } ?> default: mark = false; break; } if (mark) { $.colorbox({ href: '#' + mark, inline: true, open: true, close: '<?php echo gettext("ok"); ?> ' }); } } // ]]> --> </script> <?php } ?> <span style="float:right"> <select class="ignoredirty" name="checkallaction" id="checkallaction" size="1" onchange="checkFor(this);" > <?php generateListFromArray(array('noaction'), $checkarray, false, true); ?> </select> <?php if ($checkAll) { ?> <br /> <?php echo gettext("Check All"); ?> <input class="ignoredirty" type="checkbox" name="allbox" id="allbox" onclick="checkAll(this.form, 'ids[]', this.checked);" /> <?php } ?> </span> <?php foreach ($customInfo as $key => $data) { ?> <div id="mass_<?php echo $key; ?> " style="display:none; "> <div id="mass_<?php echo $key; ?> _data"> <?php printf('Value for %s:', $data['desc']); if ($data['action'] == 'mass_customText_data') { if (isset($data['size']) && $data['size'] >= 0) { $size = max(5, min($data['size'], 200)); } else { $size = 100; } ?> <input type="text" name="<?php echo $key; ?> " size="<?php echo $size; ?> " value=""> <?php } else { ?> <textarea name="<?php echo $key; ?> " cols="<?php echo TEXTAREA_COLUMNS; ?> " style="width: 320px" rows="6"></textarea> <?php } ?> </div> </div> <?php } if (in_array('mass_tags_data', $colorboxBookmark)) { ?> <div id="mass_tags" style="display:none;"> <div id="mass_tags_data"> <?php tagSelector(NULL, 'mass_tags_', false, getTagOrder(), true, false, 'checkTagsAuto ignoredirty'); ?> </div> </div> <?php } if (in_array('mass_cats_data', $colorboxBookmark)) { ?> <div id="mass_cats" style="display:none;"> <div id="mass_cats_data"> <?php echo gettext('New categorys:'); ?> <ul> <?php printNestedItemsList('cats-checkboxlist', '', 'all', 'ignoredirty'); ?> </ul> </div> </div> <?php } if (in_array('mass_owner_data', $colorboxBookmark)) { ?> <div id="mass_owner" style="display:none;"> <div id="mass_owner_data"> <?php echo gettext('New owner:'); ?> <ul> <select class="ignoredirty" id="massownermenu" name="massownerselect" onchange=""> <?php echo admin_album_list(NULL); ?> </select> </ul> </div> </div> <?php } if (in_array('mass_movecopy_data', $colorboxBookmark)) { global $mcr_albumlist, $album, $bglevels; ?> <div id="mass_movecopy_copy" style="display:none;"> <div id="mass_movecopy_data"> <input type="hidden" name="massfolder" value="<?php echo $album->name; ?> " /> <?php echo gettext('Destination'); ?> <select class="ignoredirty" id="massalbumselectmenu" name="massalbumselect" onchange=""> <?php foreach ($mcr_albumlist as $fullfolder => $albumtitle) { $singlefolder = $fullfolder; $saprefix = ""; $salevel = 0; $selected = ""; if ($album->name == $fullfolder) { $selected = " selected=\"selected\" "; } // Get rid of the slashes in the subalbum, while also making a subalbum prefix for the menu. while (strstr($singlefolder, '/') !== false) { $singlefolder = substr(strstr($singlefolder, '/'), 1); $saprefix = " " . $saprefix; $salevel++; } echo '<option value="' . $fullfolder . '"' . ($salevel > 0 ? ' style="background-color: ' . $bglevels[$salevel] . ';"' : '') . "{$selected}>" . $saprefix . $singlefolder . "</option>\n"; } ?> </select> </div> </div> <?php } }
/** * Edit tab bulk actions drop-down * @param array $checkarray the list of actions * @param bool $checkAll set true to include check all box */ function printBulkActions($checkarray, $checkAll = false) { $tags = in_array('addtags', $checkarray) || in_array('alltags', $checkarray); $movecopy = in_array('moveimages', $checkarray) || in_array('copyimages', $checkarray); $categories = in_array('addcats', $checkarray) || in_array('clearcats', $checkarray); $changeowner = in_array('changeowner', $checkarray); if ($tags || $movecopy || $categories || $changeowner) { ?> <script type="text/javascript"> //<!-- <![CDATA[ function checkFor(obj) { var sel = obj.options[obj.selectedIndex].value; <?php if ($tags) { ?> if (sel == 'addtags' || sel == 'alltags') { $.colorbox({ href: "#mass_tags_data", inline: true, open: true, close: '<?php echo gettext("ok"); ?> ' }); } <?php } if ($movecopy) { ?> if (sel == 'moveimages' || sel == 'copyimages') { $.colorbox({ href: "#mass_movecopy_data", inline: true, open: true, close: '<?php echo gettext("ok"); ?> ' }); } <?php } if ($categories) { ?> if (sel == 'addcats') { $.colorbox({ href: "#mass_cats_data", inline: true, open: true, close: '<?php echo gettext("ok"); ?> ' }); } <?php } if ($changeowner) { ?> if (sel == 'changeowner') { $.colorbox({ href: "#mass_owner_data", inline: true, open: true, close: '<?php echo gettext("ok"); ?> ' }); } <?php } ?> } // ]]> --> </script> <?php } ?> <span style="float:right"> <select class="ays-ignore" name="checkallaction" id="checkallaction" size="1" onchange="checkFor(this);" > <?php generateListFromArray(array('noaction'), $checkarray, false, true); ?> </select> <?php if ($checkAll) { ?> <br /> <?php echo gettext("Check All"); ?> <input class="ays-ignore" type="checkbox" name="allbox" id="allbox" onclick="checkAll(this.form, 'ids[]', this.checked);" /> <?php } ?> </span> <?php if ($tags) { ?> <div id="mass_tags" style="display:none;"> <div id="mass_tags_data"> <?php tagSelector(NULL, 'mass_tags_', false, false, true, false, 'checkTagsAuto ays-ignore'); ?> </div> </div> <?php } if ($categories) { ?> <div id="mass_cats" style="display:none;"> <ul id="mass_cats_data"> <?php printNestedItemsList('cats-checkboxlist', '', 'all', 'ays-ignore'); ?> </ul> </div> <?php } if ($changeowner) { ?> <div id="mass_owner" style="display:none;"> <ul id="mass_owner_data"> <select class="ays-ignore" id="massownermenu" name="massownerselect" onchange=""> <?php echo admin_album_list(NULL); ?> </select> </ul> </div> <?php } if ($movecopy) { global $mcr_albumlist, $album, $bglevels; ?> <div id="mass_movecopy_copy" style="display:none;"> <div id="mass_movecopy_data"> <input type="hidden" name="massfolder" value="<?php echo $album->name; ?> " /> <?php echo gettext('Destination'); ?> <select class="ays-ignore" id="massalbumselectmenu" name="massalbumselect" onchange=""> <?php foreach ($mcr_albumlist as $fullfolder => $albumtitle) { $singlefolder = $fullfolder; $saprefix = ""; $salevel = 0; $selected = ""; if ($album->name == $fullfolder) { $selected = " selected=\"selected\" "; } // Get rid of the slashes in the subalbum, while also making a subalbum prefix for the menu. while (strstr($singlefolder, '/') !== false) { $singlefolder = substr(strstr($singlefolder, '/'), 1); $saprefix = " " . $saprefix; $salevel++; } echo '<option value="' . $fullfolder . '"' . ($salevel > 0 ? ' style="background-color: ' . $bglevels[$salevel] . ';"' : '') . "{$selected}>" . $saprefix . $singlefolder . "</option>\n"; } ?> </select> </div> </div> <?php } }