Skip to content

Commit

Permalink
Style
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Mar 7, 2016
1 parent 62ae628 commit 2099d1c
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 49 deletions.
15 changes: 9 additions & 6 deletions kronolith/templates/delete/delete.inc
Expand Up @@ -14,19 +14,22 @@ if (empty($url)) {
<input type="hidden" name="calendar" value="<?php echo htmlspecialchars($this->event->calendar) ?>" />
<input type="hidden" name="type" value="<?php echo htmlspecialchars($this->event->calendarType) ?>" />

<table class="striped" cellspacing="0">
<tr><td class="warning"><?php echo _("This is a recurring event. Delete the current event only, this<br />occurrence and all future occurences, or all occurences?") ?></td></tr>
<p class="horde-content warning"><?php echo _("This is a recurring event. Delete the current event only, this<br />occurrence and all future occurences, or all occurences?") ?></p>

<?php if (count($this->event->attendees)): ?>
<tr><td><input id="sendupdates_del" type="checkbox" class="checkbox" name="sendupdates" checked="checked" /><label for="sendupdates_del"> <?php echo _("Send a cancel notification to all attendees when deleting this event?") ?></label></td></tr>
<p class="horde-content">
<label>
<input id="sendupdates_del" type="checkbox" class="checkbox" name="sendupdates" checked="checked" />
<?php echo _("Send a cancel notification to all attendees when deleting this event?") ?>
</label>
</p>
<?php endif ?>

<tr><td>
<p class="horde-form-buttons">
<input type="submit" class="horde-delete" name="current" value="<?php echo _("Current") ?>" />
<input type="submit" class="horde-delete" name="future" value="<?php echo _("Future") ?>" />
<input type="submit" class="horde-delete" name="all" value="<?php echo _("All") ?>" />
<a class="horde-cancel" href="<?php echo htmlspecialchars($url) ?>"><?php echo _("Cancel") ?></a>
</td></tr>
</table>
</p>

</form>
12 changes: 8 additions & 4 deletions kronolith/templates/delete/one.inc
Expand Up @@ -14,15 +14,19 @@ if (empty($url)) {
<input type="hidden" name="calendar" value="<?php echo htmlspecialchars(Horde_Util::getFormData('calendar')) ?>" />
<input type="hidden" name="type" value="<?php echo htmlspecialchars($this->event->calendarType) ?>" />

<div class="headerbox">
<?php if (count($this->event->attendees)): ?>
<p><input id="sendupdates_del" type="checkbox" class="checkbox" name="sendupdates" checked="checked" /><label for="sendupdates_del"> <?php echo _("Send a cancel notification to all attendees when deleting this event?") ?></label></p>
<p class="horde-content">
<label>
<input id="sendupdates_del" type="checkbox" class="checkbox" name="sendupdates" checked="checked" />
<?php echo _("Send a cancel notification to all attendees when deleting this event?") ?>
</label>
</p>
<?php endif ?>

<p><?php echo _("Permanently delete this event?") ?></p>
<p class="horde-content"><?php echo _("Permanently delete this event?") ?></p>

<p class="horde-form-buttons">
<input type="submit" class="horde-delete" name="delete" value="<?php echo _("Delete") ?>" />
<a class="horde-cancel" href="<?php echo htmlspecialchars($url) ?>"><?php echo _("Cancel") ?></a>
</div>

</form>
3 changes: 1 addition & 2 deletions kronolith/templates/edit/edit.inc
Expand Up @@ -37,8 +37,7 @@ $hide_img = Horde::img('minus.png', _("Hide"), 'style="display:none"');
$GLOBALS['injector']->getInstance('Horde_Core_Perms')->hasAppPermission('max_events') > Kronolith::countEvents())): ?>
<!-- recurrence editing -->
<tr>
<td></td>
<td colspan="4" class="warning">
<td colspan="5" class="warning">
<?php echo _("This is a recurring event. Edit the current event only, this occurrence<br />and all future occurences, all occurences, or save this event as new?") ?><br /><br />
<input type="radio" name="edit_recur" value="current" id="edit_current" /> <?php echo Horde::label('edit_current', _("Current")) ?>
<input type="radio" name="edit_recur" value="future" id="edit_future" /> <?php echo Horde::label('edit_future', _("Future")) ?>
Expand Down
72 changes: 35 additions & 37 deletions kronolith/templates/view/view.inc
@@ -1,52 +1,53 @@
<table cellspacing="0" width="100%" class="striped">
<div class="horde-form">
<table>

<?php if (!$private): ?>
<!-- location -->
<tr>
<td class="rightAlign"><strong><?php echo _("Location") ?>&nbsp;&nbsp;</strong></td>
<td class="rightAlign"><strong><?php echo _("Location") ?></strong></td>
<td><?php echo empty($location) ? '&nbsp;' : $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($location, 'text2html', array('parselevel' => Horde_Text_Filter_Text2html::MICRO, 'class' => 'text')) ?> </td>
</tr>
<?php endif; ?>

<?php if (!$private && strlen($eventurl)): ?>
<!-- url -->
<tr>
<td class="rightAlign"><strong><?php echo _("URL") ?>&nbsp;&nbsp;</strong></td>
<td class="rightAlign"><strong><?php echo _("URL") ?></strong></td>
<td><?php echo $GLOBALS['injector']->getInstance('Horde_Core_Factory_TextFilter')->filter($eventurl, 'linkurls') ?></td>
</tr>
<?php endif; ?>

<!-- status -->
<tr>
<td width="10%" class="rightAlign"><strong><?php echo _("Status") ?>&nbsp;&nbsp;</strong></td>
<td width="10%" class="rightAlign"><strong><?php echo _("Status") ?></strong></td>
<td width="90%"><?php echo empty($status) ? '&nbsp;' : htmlspecialchars($status) ?> </td>
</tr>

<?php if (!empty($owner)): ?>
<!-- owner -->
<tr>
<td class="rightAlign"><strong><?php echo _("Owner") ?>&nbsp;&nbsp;</strong></td>
<td class="rightAlign"><strong><?php echo _("Owner") ?></strong></td>
<td><?php echo htmlspecialchars($owner) ?> </td>
</tr>
<?php endif; ?>

<!-- start date -->
<tr>
<td class="rightAlign"><strong><?php echo _("Start On") ?>&nbsp;&nbsp;</strong></td>
<td class="rightAlign"><strong><?php echo _("Start On") ?></strong></td>
<td><?php echo $this->event->start->strftime($dateFormat) . ' '; echo $this->event->isAllDay() ? _("All day event") : $this->event->start->format($timeFormat) ?></td>
</tr>

<?php if (!$this->event->isAllDay()): ?>
<!-- end date -->
<tr>
<td class="rightAlign"><strong><?php echo _("End On") ?>&nbsp;&nbsp;</strong></td>
<td class="rightAlign"><strong><?php echo _("End On") ?></strong></td>
<td><?php echo $this->event->end->strftime($dateFormat) . ' ' . $this->event->end->format($timeFormat) ?></td>
</tr>
<?php endif; ?>

<!-- alarm -->
<tr>
<td class="rightAlign"><strong><?php echo _("Alarm") ?>&nbsp;&nbsp;</strong></td>
<td class="rightAlign"><strong><?php echo _("Alarm") ?></strong></td>
<td>
<?php
if ($this->event->initialized && $this->event->alarm > 0):
Expand All @@ -73,14 +74,14 @@ if ($this->event->initialized && $this->event->alarm > 0):

<?php if ($this->event->created): ?>
<tr>
<td class="nowrap rightAlign"><strong><?php echo _("Created") ?></strong>&nbsp;&nbsp;</td>
<td class="nowrap rightAlign"><strong><?php echo _("Created") ?></strong></td>
<td class="nowrap"><?php echo $this->event->created->strftime($dateFormat) . ' ' . $this->event->created->format($timeFormat) . ' ' . htmlspecialchars($this->event->createdby) ?></td>
</tr>
<?php endif; ?>

<?php if ($this->event->modified): ?>
<tr>
<td class="nowrap rightAlign"><strong><?php echo _("Last Modified") ?></strong>&nbsp;&nbsp;</td>
<td class="nowrap rightAlign"><strong><?php echo _("Last Modified") ?></strong></td>
<td class="nowrap"><?php echo $this->event->modified->strftime($dateFormat) . ' ' . $this->event->modified->format($timeFormat) . ' ' . htmlspecialchars($this->event->modifiedby) ?></td>
</tr>
<?php endif; ?>
Expand All @@ -92,7 +93,7 @@ if ($this->event->initialized && $this->event->alarm > 0):
<td colspan="2" class="control"><strong><?php echo _("Recurrence") ?></strong></td>
</tr>
<tr>
<td class="rightAlign" valign="top"><strong><?php echo _("Pattern") ?>&nbsp;&nbsp;</strong></td>
<td class="rightAlign" valign="top"><strong><?php echo _("Pattern") ?></strong></td>
<td valign="top">
<?php if ($this->event->baseid):?>
<?php echo sprintf(_("This is an exception to a recurring event originally scheduled on %s at %s"), $this->event->exceptionoriginaldate->strftime($GLOBALS['prefs']->getValue('date_format')), $this->event->exceptionoriginaldate->strftime(($GLOBALS['prefs']->getValue('twentyFour') ? '%H:%M' : '%I:%M %p')));?>
Expand Down Expand Up @@ -127,14 +128,14 @@ if ($this->event->initialized && $this->event->alarm > 0):
<!-- recur end date -->
<?php if ($this->event->recurs()): ?>
<tr>
<td class="rightAlign"><strong><?php echo _("Recur Until") ?>&nbsp;&nbsp;</strong></td>
<td class="rightAlign"><strong><?php echo _("Recur Until") ?></strong></td>
<td><?php echo $this->event->recurrence->hasRecurEnd() ? $this->event->recurrence->recurEnd->strftime($dateFormat) . ($this->event->recurrence->recurEnd->hour == 23 && $this->event->recurrence->recurEnd->min == 59 ? '' : ' ' . $this->event->recurrence->recurEnd->format($timeFormat)) : ($this->event->recurrence->getRecurCount() ? sprintf(_("%d times"), $this->event->recurrence->getRecurCount()) : _("No end date")) ?></td>
</tr>

<?php if ($this->event->recurrence->getExceptions()): ?>
<!-- exceptions -->
<tr>
<td class="rightAlign"><strong><?php echo _("Exceptions") ?>&nbsp;&nbsp;</strong></td>
<td class="rightAlign"><strong><?php echo _("Exceptions") ?></strong></td>
<td><?php echo $this->event->exceptionsList(); ?></td>
</tr>
<?php endif; endif; endif; ?>
Expand Down Expand Up @@ -162,44 +163,41 @@ if ($this->event->initialized && $this->event->alarm > 0):
<?php endif; ?>

</table>
</div>

<?php if (!$private): ?>
<table cellspacing="0">
<div class="horde-content">
<table>
<?php if (count($attendees)): ?>
<!-- attendees -->
<tr>
<td colspan="3" class="control"><strong><?php echo _("Attendees") ?></strong></td>
</tr>
<tr class="item leftAlign">
<th width="50%"><?php echo _("Attendee") ?></th>
<th width="25%"><?php echo _("Attendance") ?></th>
<th width="25%"><?php echo _("Response") ?></th>
<tr class="leftAlign">
<th><?php echo _("Attendee") ?></th>
<th><?php echo _("Attendance") ?></th>
<th><?php echo _("Response") ?></th>
</tr>
<?php $link_emails = $GLOBALS['registry']->hasMethod('mail/compose'); foreach ($attendees as $attendee): ?>
<?php $link_emails = $GLOBALS['registry']->hasMethod('mail/compose'); foreach ($attendees as $attendee): ?>
<tr>
<td class="nowrap"><?php echo ($link_emails && strpos($attendee->addressObject, '@') !== false) ? ($GLOBALS['registry']->call('mail/compose', array(array('to' => $attendee->addressObject)))->link(array('title' => sprintf(_("Send an email to %s"), empty($attendee->name) ? $attendee->email : $attendee->name))) . htmlspecialchars($attendee->addressObject) . '</a>') : htmlspecialchars($attendee->addressObject) ?></td>
<td class="nowrap"><?php echo ($link_emails && $attendee->addressObject->host) ? ($GLOBALS['registry']->call('mail/compose', array(array('to' => $attendee->addressObject)))->link(array('title' => sprintf(_("Send an email to %s"), $attendee->displayName))) . htmlspecialchars($attendee->addressObject) . '</a>') : htmlspecialchars($attendee) ?></td>
<td><?php echo Kronolith::partToString($attendee->role) ?></td>
<td><?php echo Kronolith::responseToString($attendee->response) ?></td>
</tr>
<?php endforeach; ?>
<?php endforeach; ?>
<?php endif; ?>
<!-- resources -->
<?php if (!empty($resources)): ?>
<tr>
<td colspan="3" class="control"><strong><?php echo _("Resources") ?></strong></td>
</tr>
<tr class="item leftAlign">
<th width="50%"><?php echo _("Resource") ?></th>
<th width="25%"><?php echo _("Attendance") ?></th>
<th width="25%"><?php echo _("Response") ?></th>
<?php if (!empty($resources)): ?>
<tr class="leftAlign">
<th><?php echo _("Resource") ?></th>
<th><?php echo _("Attendance") ?></th>
<th><?php echo _("Response") ?></th>
</tr>
<?php foreach ($resources as $id => $resource):?>
<tr>
<td class="nowrap"><?php echo htmlspecialchars($resource['name'])?></td>
<td><?php echo Kronolith::partToString($resource['attendance']) ?></td>
<td><?php echo Kronolith::responseToString($resource['response']) ?></td>
</tr>
<tr>
<td class="nowrap"><?php echo htmlspecialchars($resource['name'])?></td>
<td><?php echo Kronolith::partToString($resource['attendance']) ?></td>
<td><?php echo Kronolith::responseToString($resource['response']) ?></td>
</tr>
<?php endforeach;?>
<?php endif; ?>
</table>
</div>
<?php endif; ?>

0 comments on commit 2099d1c

Please sign in to comment.