[dev] IMP "Redirect" Address Book functionality
Joe Jenkins
joe at nerdnet.com
Mon Feb 2 15:31:30 PST 2004
I noticed a bounty for this feature on the Horde website, so I thought I
would come up with an implementation based on the current code for Address
Book in the Compose window. See the attached patch. Since name expansion
is already in there, I only added a button for the address book to be used
on a redirect. If I qualify for the "bounty" for submitting this, please
donate it to the Horde project. I tried to follow the Horde coding
standards as best I could =D
Joe Jenkins
Patch is for /horde/imp/templates/compose/redirect.inc
-------------- next part --------------
--- redirect.inc Mon Feb 2 16:27:43 2004
+++ redirect.inc.new Mon Feb 2 16:23:46 2004
@@ -37,17 +37,23 @@
</tr>
<tr>
- <td> </td>
- <td align="center" class="header">
+
+ <td align="center" class="header" colspan="2">
<input type="submit" class="button" onclick="return redirectSubmit();" value="<?php echo _("Redirect Message") ?>" />
<input type="button" class="button" onclick="confirmCancel();" value="<?php echo _("Cancel Message") ?>" />
</td>
</tr>
-</table>
</form>
-<br />
+<tr>
+ <td> </td>
+<?php if ($registry->hasMethod('contacts/search')): ?>
+<?php $contacts_url = Horde::applicationUrl('contacts.php'); ?>
+ <?php echo Menu::createItem('', _("Address Book"), 'addressbook-red.gif', NULL, 'contacts', 'window.open(\'' . $contacts_url . '\', \'contacts\', \'toolbar=no,location=no,status=yes,scrollbars=yes,resizable=yes,width=650,height=350,left=100, top=100\'); return false;', 'item', 'widget'); ?>
+<?php endif; ?>
+</tr>
+</table>
<?php if ($browser->hasFeature('javascript')): ?>
<script language="JavaScript" type="text/javascript">
More information about the dev
mailing list