Indicate that an event is an exception, and don't show the recurrence
authorMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 8 May 2010 15:45:24 +0000 (11:45 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Sat, 8 May 2010 15:45:24 +0000 (11:45 -0400)
related form fields.

kronolith/lib/Event.php
kronolith/templates/edit/edit.inc

index f2bc69d..98fc166 100644 (file)
@@ -1666,9 +1666,13 @@ abstract class Kronolith_Event
      */
     public function getRecurName()
     {
-        return $this->recurs()
-            ? $this->recurrence->getRecurName()
-            : _("No recurrence");
+        if (empty($this->baseid)) {
+            return $this->recurs()
+                ? $this->recurrence->getRecurName()
+                : _("No recurrence");
+        } else {
+            return _("Exception");
+        }
     }
 
     /**
index 96c6151..e1c7e1a 100644 (file)
@@ -271,6 +271,10 @@ if ($event->alarm) {
 </tr>
 <tbody id="section_recurrence">
 <tr>
+<?php if (!empty($event->baseid)):?>
+ <td>&nbsp;</td>
+ <td colspan="4"><?php echo sprintf(_("This is an exception to a recurring event originally scheduled on %s"), $event->exceptionoriginaldate->strftime($GLOBALS['prefs']->getValue('date_format')));?></td>
+<?php else:?>
  <td class="rightAlign" valign="top"><strong><?php echo Horde::label('recurnone', _("Pattern")) ?></strong></td>
  <td valign="top" colspan="4">
   <table cellspacing="0" width="100%">
@@ -386,6 +390,7 @@ endif;
  <?php endforeach; ?>
  </td>
 </tr>
+ <?php endif;?>
 <?php endif; ?>
 </tbody>