/
device_table.html.php
47 lines (47 loc) · 2.62 KB
/
device_table.html.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<table class="horde-table activesync-devices striped">
<tr class="header">
<?php if ($this->isAdmin):?><th class="smallheader"><?php echo _("User")?></th><?php endif?>
<th class="smallheader"><?php echo _("Device") ?></th>
<th class="smallheader"><?php echo _("Last Sync Time") ?></th>
<th class="smallheader"><?php echo _("Status") ?></th>
<th class="smallheader"><?php echo _("Device Information") ?></th>
<th class="smallheader"><?php echo _("Actions")?></th>
</tr>
<?php foreach ($this->devices as $d): ?>
<?php if ($d->rwstatus == Horde_ActiveSync::RWSTATUS_PENDING): ?>
<?php $status = $this->contentTag('span', _("Wipe Pending"), array('class' => 'notice')) ?>
<?php elseif ($d->rwstatus == Horde_ActiveSync::RWSTATUS_WIPED): ?>
<?php $status = $this->contentTag('span', _("Device is Wiped. Remove device state to allow device to reconnect."), array('class' => 'notice')) ?>
<?php elseif ($d->blocked):?>
<?php $status = $this->contentTag('span', _("Deivce is Blocked."), array('class' => 'notice'))?>
<?php else: ?>
<?php $status = $d->policykey ? _("Provisioned") : _("Not Provisioned") ?>
<?php endif; ?>
<tr>
<?php if ($this->isAdmin):?><td><?php echo $d->user?></td><?php endif?>
<td><?php echo $d->deviceType ?></td>
<td><?php echo $d->getLastSyncTimestamp() ? strftime($GLOBALS['prefs']->getValue('date_format') . ' %H:%M', $d->getLastSyncTimestamp()) : _("None") ?></td>
<td><?php echo $status ?></td>
<td>
<?php foreach ($d->getFormattedDeviceProperties() as $key => $value): ?>
<?php echo '<b>' . $key . '</b>: ' . $value . '<br />' ?>
<?php endforeach; ?>
</td>
<td>
<?php if ($d->policykey): ?>
<input class="horde-delete" type="button" value="<?php echo _("Wipe") ?>" id="wipe_<?php echo $d->id ?>" />
<?php endif; ?>
<?php if ($d->rwstatus == Horde_ActiveSync::RWSTATUS_PENDING): ?>
<input type="button" value="<?php echo _("Cancel Wipe") ?>" id="cancel_<?php echo $d->id ?>" />
<?php endif; ?>
<input class="horde-delete" type="button" value="<?php echo _("Remove") ?>" id="remove_<?php echo $d->id ?>" /><br />
<br class="spacer" />
<?php if ($d->blocked && $this->isAdmin): ?>
<input class="horde-button" type="button" value="<?php echo _("Unblock")?>" id="unblock_<?php echo $d->id?>" />
<?php elseif ($this->isAdmin): ?>
<input class="horde-delete" type="button" value="<?php echo _("Block")?>" id="block_<?php echo $d->id?>" />
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</table>