6.0.0-beta1
9/24/25

[#5026] Correctly space calendar table and show number of appointments/events in period
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

History
02/27/2007 04:25:40 PM Jan Schneider Comment #5
State ⇒ Rejected
Reply to this comment
I agree with Chuck.
02/27/2007 03:56:04 PM Chuck Hagenbuch Comment #4 Reply to this comment
I'm not in favor of this because of the added clutter, and the fact 
that events are already available in tooltips.
02/27/2007 09:46:31 AM jon (at) spriggs (dot) org (dot) uk Comment #3 Reply to this comment
Apologies - this change is to show the number of events on a date. 
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;

          }




02/26/2007 10:21:14 PM Jan Schneider Comment #2
State ⇒ Feedback
Reply to this comment
This patch doesn't apply. Please upload a unified diff and explain 
what exactly this is supposed to fix or change.
02/23/2007 03:32:08 PM jon (at) spriggs (dot) org (dot) uk Comment #1
Priority ⇒ 1. Low
Type ⇒ Enhancement
Summary ⇒ Correctly space calendar table and show number of appointments/events in period
Queue ⇒ Kronolith
State ⇒ New
Reply to this comment
Index: month.php

===================================================================

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>';

---
             $html .= '<th class="item" width="14.2%">' . $weekday . '</th>';
158a159
                 $event_count = 0;
162a164
                     $event_count++;
164c166

<                 $cell = Horde::linkTooltip($url, _("View Day"), '', 
'', '', $day_events) . date('j', $dayStamp) . '</a>';

---
                 $cell = Horde::linkTooltip($url, _("View Day"), '', 
'', '', $day_events) . date('j', $dayStamp);
167c169

<                 $cell = Horde::linkTooltip($url, _("View Day")) . 
date('j', $dayStamp) . '</a>';

---
                 $cell = Horde::linkTooltip($url, _("View Day")) . 
date('j', $dayStamp);
172c174

<                 $cell = '<strong>' . $cell . '</strong>';

---
                 $cell = '<strong>' . $cell . '</strong> (' . 
$event_count . ')';
175c177

<             $html .= $cell . '</td>';

---
             $html .= $cell . '</a></td>';
Regards,



Jon Spriggs

Saved Queries