<div class="control">
 <span style="float:left" class="nowrap">
 <?php echo Horde::widget('', $listType == 'list' ? _("Remove from this list") : _("Delete"), 'widget', '', "Submit('delete'); return false;", $listType == 'list' ? _("_Remove from this list") : _("_Delete")) ?>

 <?php if ($conf['menu']['import_export']): ?>
 | <?php echo Horde::widget('', _("Export"), 'widget', '', "document.contacts.action='" . Horde::applicationUrl('data.php') . "'; Submit('select'); return false;", _("Export")) ?>
 <?php endif; ?>

 <?php if (!empty($add_source_options)): $id = md5(mt_rand()); ?>
  <form style="display:inline" name="f<?php echo $id ?>" action="javascript:void(0);" onsubmit="return false;">
  <?php echo Horde::link('', _("Move"), 'widget', '', "CopyMove('move', document.f" . $id . '.s' . $id . "); return false;") . _("Move") . '</a> ';
        echo Horde::link('', _("Copy"), 'widget', '', "CopyMove('copy', document.f" . $id . '.s' . $id . "); return false;") . _("Copy") . '</a>' ?>
  <select name="s<?php echo $id ?>" id="s<?php echo $id ?>">
   <option value=""><?php echo _("to Selected Address Book") ?></option>
   <?php echo $add_source_options ?>
  </select>
 </form>
 <?php endif; ?>

 <?php if (!empty($cfgSources[$source]['map']['__type'])): $id = md5(mt_rand()); ?>
  <form style="display:inline" name="f<?php echo $id ?>" action="javascript:void(0);" onsubmit="return false;">
  | <?php echo Horde::link('', _("Add to"), 'widget', '', "Add(document.f" . $id . '.s' . $id . "); return false;") . _("Add to") . '</a>' ?>
  <select name="s<?php echo $id ?>" id="s<?php echo $id ?>">
   <option value=""><?php echo _("Select List") ?></option>
   <option value="">-----</option>
   <option value="*new*"><?php echo _("New List") ?></option>
   <option value="">-----</option>
   <?php foreach ($addToList as $list): ?>
   <option value="<?php echo $list['key'] ?>"><?php echo $list['name'] ?></option>
   <?php endforeach; ?>
  </select>
  </form>
 <?php endif; ?>

 </span>
 <span style="float:right" class="nowrap">
<?php
$browse_link = Util::addParameter(Horde::applicationUrl('browse.php'), 'source', $source);
if ($listType == 'directory' && !empty($cfgSources[$source]['map']['__type'])) {
    echo Horde::widget(Util::addParameter($browse_link, 'show', 'lists'), _("Show Lists"), 'widget', '', '', _("Show _Lists")) . ' ';
    echo ' | ' . Horde::widget(Util::addParameter($browse_link, 'show', 'contacts'), _("Show Contacts"), 'widget', '', '', _("Show _Contacts")) . ' ';
    echo ' | ' . Horde::widget(Util::addParameter($browse_link, 'show', 'all'), _("Show All"), 'widget', '', '', _("Sho_w All"));
} elseif ($listType == 'list' && !empty($cfgSources[$source]['map']['__type'])) {
    echo Horde::widget(Util::addParameter($browse_link, 'show', 'all'), sprintf(_("Back to %s"), $cfgSources[$source]['title']), 'widget', '', '', sprintf(_("Ba_ck to %s"), $cfgSources[$source]['title']));
} elseif ($listType == 'search') {
    if ($conf['search']['cache']) {
        $search_link = Util::addParameter(Horde::applicationUrl('search.php'), 'source', $source);
        echo Horde::widget(Util::addParameter($search_link, 'clear', '1'), _("Clear Search"), 'widget', '', '', _("C_lear Search"));
    }
}
?>
 </span>
 <br class="clear" />
</div>
