Skip to content

Instantly share code, notes, and snippets.

@ianmjones
Last active April 11, 2016 11:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ianmjones/273478d81b649554ac77281103c51690 to your computer and use it in GitHub Desktop.
Save ianmjones/273478d81b649554ac77281103c51690 to your computer and use it in GitHub Desktop.
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