Re: howto enable whups with a print button in the menu bar.

Joseph Malone <[email protected]>
Newsgroups gmane.comp.horde.whups
Message-ID <[email protected]>
--
Joseph Malone
J.E. Higgins Lumber Co.
MIS Department
(925)245-4359
6999 Southfront Rd,
Livermore, CA
94551





----- Forwarded message from [email protected] -----
    Date: Mon,  2 Aug 2004 13:52:58 -0700
    From: Joseph Malone <[email protected]>
Reply-To: Joseph Malone <[email protected]>
 Subject: Re: [whups] howto enable whups with a print button in the menu bar.
      To: Chuck Hagenbuch <[email protected]>

Sure thing, here are you unified diff files.. however it seems that
details.php
in no more... It is gone in the latest update, so this diff file might be
obsolete.... also is something going on with cvs.horde.org? it seems to be
down..

- --
Joseph Malone
J.E. Higgins Lumber Co.
MIS Department
(925)245-4359
6999 Southfront Rd,
Livermore, CA
94551


Quoting Chuck Hagenbuch <[email protected]>:

> Quoting Joseph Malone <[email protected]>:
>
>> I've attached a copy of details.php and templates/menu/menu.inc that
>> will enable whups to have a print button that will print the ticket
>> your looking at.
>
> Can you please send your changes as a unified diff against HEAD instead
> of whole
> files?
>
> -chuck
>
> --
> "Regard my poor demoralized mule!" - Juan Valdez
> --
> Whups mailing list - Join the hunt: http://horde.org/bounties/#whups
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: [email protected]

- ----- End forwarded message -----

-- 
Whups mailing list - Join the hunt: http://horde.org/bounties/#whups
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: [email protected]
menu.inc.diff (text/x-patch, 748 B)
--- menu.inc	2004-07-30 09:13:48.000000000 -0700
+++ menu.inc.old	2004-08-02 13:49:55.000000000 -0700
@@ -17,10 +17,6 @@
 if (($conf['prefs']['driver'] != '') && ($conf['prefs']['driver'] != 'none')) {
     echo Menu::createItem(Horde::url($registry->getParam('webroot', 'horde') . '/services/prefs.php?app=whups'), _("Options"), 'prefs.gif', $registry->getParam('graphics', 'horde'));
 }
-//TO PRINT
-if (Auth::getAuth() && isset($print_link)){
-	echo Menu::createItem('#', _("_Print"), 'print.gif', $registry->getParam('graphics', 'horde'), '', "open_print_win('$print_link'); return false;");
-}
 /* Administration. */
 if (Auth::isAdmin('whups:admin')) {
     echo Menu::createItem(Horde::applicationUrl('admin.php'), _("Admin"), 'whups.gif');
details.php.diff (text/x-patch, 1.3 KB)
--- details.php	2004-08-02 13:44:12.000000000 -0700
+++ details.php.old	2004-07-29 15:08:49.000000000 -0700
@@ -1,6 +1,6 @@
 <?php
 /**
- * $Horde: whups/details.php,v 1.97 2004/07/30 17:36:05 chuck Exp $
+ * $Horde: whups/details.php,v 1.96 2004/05/25 17:36:05 chuck Exp $
  *
  * Copyright 2001-2004 Robert E. Coyle <[email protected]>
  *
@@ -15,7 +15,9 @@
 require_once 'Horde/Links.php';
 require_once 'Horde/Variables.php';
 require_once WHUPS_TEMPLATES . '/comment.inc';
+
 $vars = &Variables::getDefaultVariables();
+
 $ticket = $vars->get('id');
 $ticket = preg_replace('|\D|', '', $ticket);
 if (!$ticket) {
@@ -400,17 +402,7 @@
 //////// Main ticket details page
 $title = '[#' . $ticket . '] ' . $details['summary'];
 require WHUPS_TEMPLATES . '/common-header.inc';
-$print_view = (Util::getFormData('print') == 'true');
-if ($print_view) {
-    include_once $registry->getParam('templates', 'horde') . '/javascript/print.js';
-} else {
-$print_link = Util::addParameter('details.php', 'id', $ticket);
-$print_link = Util::addParameter($print_link, 'print', 'true');
-$print_link = Horde::url($print_link);
-if ($browser->hasFeature('javascript')) {
-        include_once $registry->getParam('templates', 'horde') . '/javascript/open_print_win.js';
-    }
-Whups::menu();}
+Whups::menu();
 require WHUPS_TEMPLATES . '/prevnext.inc';
 echo $ACTIONS->render();
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.