Create a gist now

Instantly share code, notes, and snippets.

Cron_Pixie::dashboard_widget_content()
<?php
/**
* Provides the initial content for the widget.
*/
public function dashboard_widget_content() {
?>
<!-- Schedule Item template -->
<script type="text/template" id="cron-pixie-schedule-item-tmpl">
<span class="cron-pixie-schedule-display"><%= display %></span>
<ul class="cron-pixie-events"></ul>
</script>
<!-- Event Item template -->
<script type="text/template" id="cron-pixie-event-item-tmpl">
<% if ( undefined == hook ) { %>
<span class="cron-pixie-event-empty"><%= CronPixie.strings.no_events %></span>
<% } else { %>
<span class="cron-pixie-event-run dashicons dashicons-controls-forward" title="<%- CronPixie.strings.run_now %>"></span>
<span class="cron-pixie-event-hook"><%= hook %></span>
<div class="cron-pixie-event-timestamp dashicons-before dashicons-clock">
<span class="cron-pixie-event-due"><%- CronPixie.strings.due %>:&nbsp;<%= new Date( timestamp * 1000 ).toLocaleString() %></span>
&nbsp;
<span class="cron-pixie-event-seconds-due">(<%= CronPixie.displayInterval( seconds_due ) %>)</span>
</div>
<% } %>
</script>
<!-- Main content -->
<div id="cron-pixie-main">
<h3>Schedules</h3>
<ul class="cron-pixie-schedules"></ul>
</div>
<?php
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment