[whups] Trying again with attachments
Mike Baptiste
mike@msbnetworks.net
Mon Nov 11 18:38:11 2002
This is a multi-part message in MIME format.
---------------------- multipart/mixed attachment
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Here are the patches as an attachment - enigmail added strange chars to
the first version I sent. Sorry about that.
Mike
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQE9z/kTtbf8BjvL+3ERAhRmAJ4vltZf+ILb1XSjDWTrptUxXxcl5gCfRjuK
bBfJrJz/4U/tL4pxgvE5Jzw=
=ANLk
-----END PGP SIGNATURE-----
---------------------- multipart/mixed attachment
Index: searchresults.inc
===================================================================
RCS file: /repository/whups/templates/searchresults.inc,v
retrieving revision 1.17
diff -c -r1.17 searchresults.inc
*** searchresults.inc 23 Oct 2002 21:45:21 -0000 1.17
--- searchresults.inc 11 Nov 2002 18:26:47 -0000
***************
*** 65,71 ****
$thevalue = !empty($info[$value]) ? $info[$value] : '';
if ($value == 'timestamp' || $value == '_date_assigned' || $value == '_date_resolved') {
! $thevalue = Horde_Form_Type_date::getFormattedTime($thevalue);
} elseif ($value == 'id' || $value == 'summary') {
$thevalue = Horde::link($url, isset($info['summary']) ? $info['summary'] : '') . "<b>$thevalue</b></a>";
}
--- 65,71 ----
$thevalue = !empty($info[$value]) ? $info[$value] : '';
if ($value == 'timestamp' || $value == '_date_assigned' || $value == '_date_resolved') {
! $thevalue = Horde_Form_Type_date::getFormattedTimeCustom($thevalue, $prefs->getValue('report_time_format'), $prefs->getValue('show_days_ago'));
} elseif ($value == 'id' || $value == 'summary') {
$thevalue = Horde::link($url, isset($info['summary']) ? $info['summary'] : '') . "<b>$thevalue</b></a>";
}
Index: Form.php
===================================================================
RCS file: /repository/horde/lib/Form.php,v
retrieving revision 1.24
diff -c -r1.24 Form.php
*** Form.php 1 Nov 2002 15:48:50 -0000 1.24
--- Form.php 11 Nov 2002 18:27:12 -0000
***************
*** 928,933 ****
--- 928,946 ----
}
}
+ function getFormattedTimeCustom($timestamp, $format, $useago)
+ {
+ if (!empty($timestamp)) {
+ if ($useago) {
+ return strftime($format, $timestamp) . Horde_Form_Type_date::_getAgo($timestamp);
+ } else {
+ return strftime($format, $timestamp);
+ }
+ } else {
+ return '';
+ }
+ }
+
}
class Horde_Form_Type_monthYear extends Horde_Form_Type {
Index: prefs.php.dist
===================================================================
RCS file: /repository/whups/config/prefs.php.dist,v
retrieving revision 1.6
diff -c -r1.6 prefs.php.dist
*** prefs.php.dist 8 Nov 2002 20:54:38 -0000 1.6
--- prefs.php.dist 11 Nov 2002 18:30:35 -0000
***************
*** 11,17 ****
'column' => _("Other Options"),
'label' => _("Display Options"),
'desc' => _("Change display options such as the color scheme and how search results are sorted."),
! 'members' => array('sortby', 'sortdir', 'theme', 'summary_show_requested')
);
// user language
--- 11,17 ----
'column' => _("Other Options"),
'label' => _("Display Options"),
'desc' => _("Change display options such as the color scheme and how search results are sorted."),
! 'members' => array('sortby', 'sortdir', 'theme', 'summary_show_requested', 'report_time_format', 'show_days_ago')
);
// user language
***************
*** 81,83 ****
--- 81,104 ----
'shared' => false,
'type' => 'checkbox',
'desc' => _("Show tickets you have requested in the summary view?"));
+
+ // Allow custom time/date formats in reports
+ $_prefs['report_time_format'] = array(
+ 'value' => '%a %d %B',
+ 'locked' => false,
+ 'shared' => false,
+ 'type' => 'enum',
+ 'enum' => array('%a %d %B' => _("Weekday Day Month"),
+ '%c' => _("Weekday Day Month HH:MM:SS TZ"),
+ '%D' => _("MM/DD/YY"),
+ '%D %T' => _("MM/DD/YY HH:MM:SS")),
+ 'desc' => _("Date/Time Format for Reports")
+ );
+
+ // Show 'X Days Ago' in Timestamps??
+ $_prefs['show_days_ago'] = array(
+ 'value' => 1,
+ 'locked' => false,
+ 'shared' => false,
+ 'type' => 'checkbox',
+ 'desc' => _("Show \"(X Days Ago)\" in Date field of Reports?"));
---------------------- multipart/mixed attachment--
More information about the whups
mailing list