mirror of
https://github.com/danpros/htmly.git
synced 2026-04-18 03:26:20 +05:30
Update update.html.php
This commit is contained in:
parent
461f30bf5d
commit
df69a8f8d7
1 changed files with 8 additions and 8 deletions
|
|
@ -11,22 +11,22 @@ $updater = new HubUpdater(array(
|
|||
|
||||
if ($updater->able()) {
|
||||
$info = $updater->getNewestInfo();
|
||||
echo '<h2>Update Available</h2>';
|
||||
echo '<p>Release Title: <strong>'. $info['name'] .'</strong></p>';
|
||||
echo '<h2>Update Available</h2><hr>';
|
||||
echo '<h4>'. $info['name'] .'</h4>';
|
||||
echo '<p>Version: <strong>'. $info['tag_name'] .'</strong></p>';
|
||||
echo '<h4>Release Notes</h4>';
|
||||
echo '<div style="background-color:#f9f9f9;border:1px solid #ccc;border-radius:4px;color:#333;display:block;font-size:13px;margin:20px 0;padding:0 1em;">';
|
||||
echo '<h5>Release Notes</h5>';
|
||||
echo '<div>';
|
||||
echo \Michelf\MarkdownExtra::defaultTransform($info['body']);
|
||||
echo '</div>';
|
||||
echo '<p><strong>Important:</strong> Please always backup your files before upgrading to newer version.</p>';
|
||||
echo '<p><a class="btn btn-primary" href="' . site_url() . 'admin/update/now/' . $CSRF . '" alt="' . $info['name'] . '">Update to ' . $info['tag_name'] . ' now</a></p>';
|
||||
} else {
|
||||
echo '<h2>Congrats! You have the latest version of HTMLy</h2>';
|
||||
echo '<h2>Congrats! You have the latest version of HTMLy</h2><hr>';
|
||||
$info = $updater->getCurrentInfo();
|
||||
echo '<p>Release Title: <strong>'. $info['name'] .'</strong></p>';
|
||||
echo '<h4>'. $info['name'] .'</h4>';
|
||||
echo '<p>Installed Version: <strong>'. $info['tag_name'] .'</strong></p>';
|
||||
echo '<h4>Release Notes: </h4>';
|
||||
echo '<div style="background-color:#f9f9f9;border:1px solid #ccc;border-radius:4px;color:#333;display:block;font-size:13px;margin:20px 0;padding:0 1em;">';
|
||||
echo '<h5>Release Notes: </h5>';
|
||||
echo '<div>';
|
||||
echo \Michelf\MarkdownExtra::defaultTransform($info['body']);
|
||||
echo '</div>';
|
||||
echo '<p><a class="btn btn-primary" target="_blank" href="' . $info['html_url'] . '">Read on Github</a></p>';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue