Summary | Correctly space calendar table and show number of appointments/events in period |
Queue | Kronolith |
Queue Version | HEAD |
Type | Enhancement |
State | Rejected |
Priority | 1. Low |
Owners | |
Requester | jon (at) spriggs (dot) org (dot) uk |
Created | 02/23/2007 (6788 days ago) |
Due | |
Updated | 02/27/2007 (6784 days ago) |
Assigned | |
Resolved | 02/27/2007 (6784 days ago) |
Milestone | |
Patch | No |
State ⇒ Rejected
that events are already available in tooltips.
This change also ensures column widths on the Kronolith Portal Block
"Month View" do not change dramatically when additional data is
provided for that date.
The unified diff follows - sorry about that - selected the wrong
option in the cvs diff command.
Index: month.php
===================================================================
RCS file: /repository/kronolith/lib/Block/month.php,v
retrieving revision 1.34
diff -u -r1.34 month.php
--- month.php 2 Feb 2007 05:56:28 -0000 1.34
+++ month.php 27 Feb 2007 09:42:13 -0000
@@ -111,7 +111,7 @@
$weekdays[] = _("Su");
}
foreach ($weekdays as $weekday) {
- $html .= '<th class="item">' . $weekday . '</th>';
+ $html .= '<th class="item" width="14.2%">' . $weekday . '</th>';
}
if (isset($this->_params['calendar']) &&
$this->_params['calendar'] != '__all') {
@@ -156,23 +156,25 @@
/* There are events; create a cell with tooltip to
* list them. */
$day_events = '';
+ $event_count = 0;
foreach ($all_events[$dayStamp] as $event) {
$day_events .=
date($prefs->getValue('twentyFour') ? 'G:i' : 'g:ia',
$event->start->timestamp()) . ' - ' .
date($prefs->getValue('twentyFour') ? 'G:i' : 'g:ia',
$event->end->timestamp());
$day_events .= ($event->getLocation()) ? ' (' .
$event->getLocation() . ')' : '';
$day_events .= ' ' . $event->getTitle() . "\n";
+ $event_count++;
}
- $cell = Horde::linkTooltip($url, _("View Day"), '',
'', '', $day_events) . date('j', $dayStamp) . '</a>';
+ $cell = Horde::linkTooltip($url, _("View Day"), '',
'', '', $day_events) . date('j', $dayStamp);
} else {
/* No events, plain link to the day. */
- $cell = Horde::linkTooltip($url, _("View Day")) .
date('j', $dayStamp) . '</a>';
+ $cell = Horde::linkTooltip($url, _("View Day")) .
date('j', $dayStamp);
}
/* Bold the cell if there are events. */
if (!empty($all_events[$dayStamp])) {
- $cell = '<strong>' . $cell . '</strong>';
+ $cell = '<strong>' . $cell . '</strong> (' .
$event_count . ')';
}
- $html .= $cell . '</td>';
+ $html .= $cell . '</a></td>';
++$weekday;
}
State ⇒ Feedback
what exactly this is supposed to fix or change.
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Correctly space calendar table and show number of appointments/events in period
Queue ⇒ Kronolith
State ⇒ New
===================================================================
RCS file: /repository/kronolith/lib/Block/month.php,v
retrieving revision 1.34
diff -r1.34 month.php
114c114
< $html .= '<th class="item">' . $weekday . '</th>';
---
< $cell = Horde::linkTooltip($url, _("View Day"), '',
'', '', $day_events) . date('j', $dayStamp) . '</a>';
---
'', '', $day_events) . date('j', $dayStamp);
< $cell = Horde::linkTooltip($url, _("View Day")) .
date('j', $dayStamp) . '</a>';
---
date('j', $dayStamp);
< $cell = '<strong>' . $cell . '</strong>';
---
$event_count . ')';
< $html .= $cell . '</td>';
---
Jon Spriggs