add thumbnails and an mp4 download in the events list
This commit is contained in:
parent
6aaa0fe39f
commit
53f4276cb7
|
@ -25,7 +25,6 @@ function exportHeader($title) {
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title><?php echo $title ?></title>
|
<title><?php echo $title ?></title>
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
<!--
|
|
||||||
<?php include(ZM_PATH_WEB.'/'.ZM_SKIN_PATH.'/css/'.ZM_SKIN_NAME.'/export.css'); ?>
|
<?php include(ZM_PATH_WEB.'/'.ZM_SKIN_PATH.'/css/'.ZM_SKIN_NAME.'/export.css'); ?>
|
||||||
|
|
||||||
ul.tabs {
|
ul.tabs {
|
||||||
|
@ -67,7 +66,6 @@ html ul.tabs li.active, html ul.tabs li.active a:hover {
|
||||||
background: #dddddd;
|
background: #dddddd;
|
||||||
border-bottom: 1px solid #e0e0e0;
|
border-bottom: 1px solid #e0e0e0;
|
||||||
}
|
}
|
||||||
-->
|
|
||||||
</style>
|
</style>
|
||||||
<script type="text/javascript" src="<?php echo ($title == translate('Images').' Master' ? '' : '../') ?>jquery.js"></script>
|
<script type="text/javascript" src="<?php echo ($title == translate('Images').' Master' ? '' : '../') ?>jquery.js"></script>
|
||||||
<!--<script type="text/javascript" src="<?php echo ($title == translate('Images').' Master' ? '' : '../') ?>video.js"></script>-->
|
<!--<script type="text/javascript" src="<?php echo ($title == translate('Images').' Master' ? '' : '../') ?>video.js"></script>-->
|
||||||
|
@ -94,7 +92,6 @@ html ul.tabs li.active, html ul.tabs li.active a:hover {
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
// ]]>
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<?php
|
<?php
|
||||||
|
@ -587,6 +584,33 @@ else if (document.layers) window.onload=start_slider;
|
||||||
return ob_get_clean();
|
return ob_get_clean();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function eventlist_html($Event) {
|
||||||
|
?>
|
||||||
|
<div class="event">
|
||||||
|
<?php
|
||||||
|
if ( $Event->SaveJPEGs() ) {
|
||||||
|
?>
|
||||||
|
<a href="#" onclick="switchevent('<?php echo $Event->Id(); ?>/zmEventImages.html');return false;">
|
||||||
|
<?php if ( ZM_WEB_LIST_THUMBS ) { ?>
|
||||||
|
<img width="<?php echo ZM_WEB_LIST_THUMB_WIDTH ?>" src="<?php echo $Event->Id(); ?>/snapshot.jpg" alt="<?php echo $Event->Id()?>"/>
|
||||||
|
<?php } else { echo $Event->Id(); } ?>
|
||||||
|
</a>
|
||||||
|
<?php
|
||||||
|
} # end if has jpegs
|
||||||
|
if ( $Event->DefaultVideo() ) {
|
||||||
|
if ( ZM_WEB_LIST_THUMBS ) {
|
||||||
|
?>
|
||||||
|
<a href="<?php echo $Event->Id().'/'.$Event->DefaultVideo() ?>">
|
||||||
|
<img width="<?php echo ZM_WEB_LIST_THUMB_WIDTH ?>" src="<?php echo $Event->Id(); ?>/snapshot.jpg" alt="<?php echo $Event->Id()?>"/>
|
||||||
|
</a>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div><!--event-->
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
function exportEventImagesMaster($eids) {
|
function exportEventImagesMaster($eids) {
|
||||||
ob_start();
|
ob_start();
|
||||||
exportHeader(translate('Images').' Master');
|
exportHeader(translate('Images').' Master');
|
||||||
|
@ -631,25 +655,20 @@ function exportEventImagesMaster($eids) {
|
||||||
<?php
|
<?php
|
||||||
foreach($eids as $eid) {
|
foreach($eids as $eid) {
|
||||||
$Event = new Event($eid);
|
$Event = new Event($eid);
|
||||||
if ( $Event->SaveJPEGs() ) {
|
eventlist_html($Event);
|
||||||
?>
|
|
||||||
<div><a href="#" onclick="switchevent('<?php echo $eid; ?>/zmEventImages.html');return false;"><?php echo $eid; ?></a></div>
|
|
||||||
<?php
|
|
||||||
} # end if saveJPEGs
|
|
||||||
} # end foreach event id
|
} # end foreach event id
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
foreach ($monitors as $monitor) {
|
foreach ($monitors as $monitor_id) {
|
||||||
echo "<div class=\"tab_content\" id=\"tab$monitor\">";
|
echo "<div class=\"tab_content\" id=\"tab$monitor_id\">";
|
||||||
echo '<h2>Monitor: ' . $monitorNames[$monitor] . ' </h2>';
|
echo '<h2>Monitor: ' . $monitorNames[$monitor_id] . ' </h2>';
|
||||||
foreach ( $eids as $eid ) {
|
foreach ( $eids as $eid ) {
|
||||||
if ( $eventMonitorId[$eid] == $monitor ) {
|
$Event = new Event($eid);
|
||||||
?>
|
if ( $Event->MonitorId() == $monitor_id ) {
|
||||||
<div><a href="#" onclick="switchevent('<?php echo $eid; ?>/zmEventImages.html');return false;"><?php echo $eid; ?></a></div>
|
eventlist_html($Event);
|
||||||
<?php
|
} # end if its the right monitor
|
||||||
}
|
} # end foreach event
|
||||||
}
|
|
||||||
echo '</div>';
|
echo '</div>';
|
||||||
} # end foreach monitor
|
} # end foreach monitor
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -125,14 +125,15 @@ $disk_space_total = 0;
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php
|
<?php
|
||||||
|
$event_count = 0;
|
||||||
while ( $event_row = dbFetchNext($results) ) {
|
while ( $event_row = dbFetchNext($results) ) {
|
||||||
$event = new Event($event_row);
|
$event = new Event($event_row);
|
||||||
$scale = max( reScale( SCALE_BASE, $event->DefaultScale(), ZM_WEB_DEFAULT_SCALE ), SCALE_BASE );
|
$scale = max( reScale( SCALE_BASE, $event->DefaultScale(), ZM_WEB_DEFAULT_SCALE ), SCALE_BASE );
|
||||||
echo '<input type="hidden" name="eids[]" value="'.validInt($event->Id())."\"/>\n";
|
echo '<input type="hidden" name="eids[]" value="'.validInt($event->Id())."\"/>\n";
|
||||||
?>
|
?>
|
||||||
<tr<?php echo $event->Archived() ? ' class="archived"' : '' ?>>
|
<tr<?php echo $event->Archived() ? ' class="archived"' : '' ?>>
|
||||||
<td class="colId"><a href="?view=event&eid=<?php echo $event->Id().$filterQuery.$sortQuery.'&page=1"> '.$event->Id().($event->Archived()?'*':'') ?></a></td>
|
<td class="colId"><a href="?view=event&eid=<?php echo $event->Id().$filterQuery.$sortQuery ?>&page=1"><?php echo $event->Id().($event->Archived()?'*':'') ?></a></td>
|
||||||
<td class="colName"><a href="?view=event&eid=<?php echo $event->Id().$filterQuery.$sortQuery.'&page=1"> '.validHtmlStr($event->Name()).($event->Archived()?'*':'') ?></a></td>
|
<td class="colName"><a href="?view=event&eid=<?php echo $event->Id().$filterQuery.$sortQuery ?>&page=1"><?php echo validHtmlStr($event->Name()).($event->Archived()?'*':'') ?></a></td>
|
||||||
<td class="colMonitorName"><?php echo makePopupLink( '?view=monitor&mid='.$event->MonitorId(), 'zmMonitor'.$event->Monitorid(), 'monitor', $event->MonitorName(), canEdit( 'Monitors' ) ) ?></td>
|
<td class="colMonitorName"><?php echo makePopupLink( '?view=monitor&mid='.$event->MonitorId(), 'zmMonitor'.$event->Monitorid(), 'monitor', $event->MonitorName(), canEdit( 'Monitors' ) ) ?></td>
|
||||||
<td class="colCause"><?php echo makePopupLink( '?view=eventdetail&eid='.$event->Id(), 'zmEventDetail', 'eventdetail', validHtmlStr($event->Cause()), canEdit( 'Events' ), 'title="'.htmlspecialchars($event->Notes()).'"' ) ?></td>
|
<td class="colCause"><?php echo makePopupLink( '?view=eventdetail&eid='.$event->Id(), 'zmEventDetail', 'eventdetail', validHtmlStr($event->Cause()), canEdit( 'Events' ), 'title="'.htmlspecialchars($event->Notes()).'"' ) ?></td>
|
||||||
<td class="colTime"><?php echo strftime(STRF_FMT_DATETIME_SHORTER, strtotime($event->StartTime())) .
|
<td class="colTime"><?php echo strftime(STRF_FMT_DATETIME_SHORTER, strtotime($event->StartTime())) .
|
||||||
|
@ -149,6 +150,7 @@ while ( $event_row = dbFetchNext($results) ) {
|
||||||
<?php
|
<?php
|
||||||
if ( ZM_WEB_EVENT_DISK_SPACE ) {
|
if ( ZM_WEB_EVENT_DISK_SPACE ) {
|
||||||
$disk_space_total += $event->DiskSpace();
|
$disk_space_total += $event->DiskSpace();
|
||||||
|
$event_count += 1;
|
||||||
?>
|
?>
|
||||||
<td class="colDiskSpace"><?php echo human_filesize($event->DiskSpace()) ?></td>
|
<td class="colDiskSpace"><?php echo human_filesize($event->DiskSpace()) ?></td>
|
||||||
<?php
|
<?php
|
||||||
|
@ -157,6 +159,10 @@ while ( $event_row = dbFetchNext($results) ) {
|
||||||
} # end foreach event
|
} # end foreach event
|
||||||
?>
|
?>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
<tfoot>
|
||||||
|
<td colspan="11"><?php echo $event_count ?> events</td>
|
||||||
|
<td class="colDiskSpace"><?php echo human_filesize($disk_space_total);?></td>
|
||||||
|
</tfoot>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table id="contentTable" class="minor">
|
<table id="contentTable" class="minor">
|
||||||
|
|
Loading…
Reference in New Issue