writefreely/templates/user/admin/app-updates.tmpl

31 lines
1007 B
Cheetah
Raw Normal View History

{{define "app-updates"}}
{{template "header" .}}
<style type="text/css">
</style>
<div class="content-container snug">
{{template "admin-header" .}}
{{if not .UpdateAvailable}}
<p class="alert info">WriteFreely is up to date.</p>
{{else}}
<p class="alert info">WriteFreely {{.LatestVersion}} is available.</p>
<section class="changelog">
For details on features, bug fixes or notes on upgrading, <a href="{{.LatestReleaseNotesURL}}">read the release notes</a>.
</section>
{{end}}
<p>Last checked at: <time class="dt-published" datetime="{{.LastChecked8601}}">{{.LastChecked}}</time>. <a href="/admin/updates?check=now">Check now</a>.</p>
<script>
// Code modified from /js/localdate.js
var displayEl = document.querySelector("time");
var d = new Date(displayEl.getAttribute("datetime"));
displayEl.textContent = d.toLocaleDateString(navigator.language || "en-US", { dateStyle: 'long', timeStyle: 'short' });
</script>
{{template "footer" .}}
{{template "body-end" .}}
{{end}}