<tr class="item"><td>
<table width="100%" border="0" cellspacing="0" cellpadding="1">
<tr>
  <td align="left" nowrap="nowrap">
    <form name="select1" action="javascript:void(0)" onsubmit="return false;">
    <select name="filter" onchange="SelectAll();">
      <option value="" selected="selected"><?php echo _("Select") ?></option>
      <option value="1"><?php echo _("All") ?></option>
      <option value="0"><?php echo _("None") ?></option>
    </select>
    </form>
  </td>

  <td align="right" nowrap="nowrap">
<?php if (!empty($cfgSources[$source]['map']['__type'])): ?>
    <form name='targetList' action="javascript:void(0)" onsubmit="return false">
    <input type="button" class="button" onclick="ListUpdate(); Submit('add'); return false;" value="<?php echo _("Add to") ?>" />
    <select name="listList">
      <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; ?>
  </td>
</tr>

<tr>
  <td align="left" nowrap="nowrap">
    <?php echo Horde::widget('', addslashes(($listType == 'list' ? _("Remove from this list") : _("Delete"))), 'widget', '', "Submit('delete'); return false;", (($listType == 'list') ? _("Remove from this list") : _("Delete"))); ?>
  </td>

  <td align="right" nowrap="nowrap">
<?php
$browse_link = Horde::addParameter(Horde::applicationUrl('browse.php'), 'source', $source);
if ($listType == 'directory' && !empty($cfgSources[$source]['map']['__type'])) {
    echo Horde::widget(Horde::addParameter($browse_link, 'show', 'lists'), _("Show Lists"), 'widget', '', '', _("Show Lists")) . ' | ';
    echo Horde::widget(Horde::addParameter($browse_link, 'show', 'contacts'), _("Show Contacts"), 'widget', '', '', _("Show Contacts")) . ' | ';
    echo Horde::widget(Horde::addParameter($browse_link, 'show', 'all'), _("Show All"), 'widget', '', '', _("Show All"));
} elseif ($listType == 'list' && !empty($cfgSources[$source]['map']['__type'])) {
    echo Horde::widget(Horde::addParameter($browse_link, 'show', 'all'), sprintf(_("Back to %s"), $cfgSources[$source]['title']), 'widget', '', '', sprintf(_("Back to %s"), $cfgSources[$source]['title']));
} elseif ($listType == 'search') {
    $search_link = Horde::addParameter(Horde::applicationUrl('search.php'), 'source', $source);
    echo Horde::widget(Horde::addParameter($search_link, 'clear', '1'), _("Clear Search"), 'widget', '', '', _("Clear Search"));
}
?>
  </td>
</tr>
</table>

</td></tr>
