1
0

admin.php 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. script('updatenotification', 'admin');
  3. /** @var array $_ */
  4. /** @var bool $isNewVersionAvailable */
  5. $isNewVersionAvailable = $_['isNewVersionAvailable'];
  6. /** @var string $newVersionString */
  7. $newVersionString = $_['newVersionString'];
  8. /** @var string $lastCheckedDate */
  9. $lastCheckedDate = $_['lastChecked'];
  10. /** @var array $channels */
  11. $channels = $_['channels'];
  12. /** @var string $currentChannel */
  13. $currentChannel = $_['currentChannel'];
  14. ?>
  15. <form id="oca_updatenotification_section" class="followupsection">
  16. <?php if($isNewVersionAvailable === true): ?>
  17. <strong><?php p($l->t('A new version is available: %s', [$newVersionString])); ?></strong>
  18. <input type="button" id="oca_updatenotification_button" value="<?php p($l->t('Open updater')) ?>">
  19. <?php else: ?>
  20. <strong><?php print_unescaped($l->t('Your version is up to date.')); ?></strong>
  21. <span class="icon-info svg" title="<?php p($l->t('Checked on %s', [$lastCheckedDate])) ?>"></span>
  22. <?php endif; ?>
  23. <p>
  24. <label for="release-channel"><?php p($l->t('Update channel:')) ?></label>
  25. <select id="release-channel">
  26. <option value="<?php p($currentChannel); ?>"><?php p($currentChannel); ?></option>
  27. <?php foreach ($channels as $channel => $channelTitle){ ?>
  28. <option value="<?php p($channelTitle) ?>">
  29. <?php p($channelTitle) ?>
  30. </option>
  31. <?php } ?>
  32. </select>
  33. <span id="channel_save_msg"></span>
  34. </p>
  35. <p>
  36. <em><?php p($l->t('You can always update to a newer version / experimental channel. But you can never downgrade to a more stable channel.')); ?></em>
  37. </p>
  38. <p id="oca_updatenotification_groups">
  39. <br />
  40. <?php p($l->t('Notify members of the following groups about available updates:')); ?>
  41. <input name="oca_updatenotification_groups_list" type="hidden" id="oca_updatenotification_groups_list" value="<?php p($_['notify_groups']) ?>" style="width: 400px">
  42. <em class="<?php if (!in_array($currentChannel, ['daily', 'git'])) p('hidden'); ?>">
  43. <br />
  44. <?php p($l->t('Only notification for app updates are available.')); ?>
  45. <?php if ($currentChannel === 'daily') p($l->t('The selected update channel makes dedicated notifications for the server obsolete.')); ?>
  46. <?php if ($currentChannel === 'git') p($l->t('The selected update channel does not support updates of the server.')); ?>
  47. </em>
  48. </p>
  49. </form>