PageRenderTime 37ms CodeModel.GetById 11ms RepoModel.GetById 0ms app.codeStats 0ms

/framework/applications/noviusos_media/views/admin/media_delete.view.php

https://github.com/jay3/core
PHP | 41 lines | 30 code | 3 blank | 8 comment | 4 complexity | 2b938dce693369c24fd4713a8a8641f0 MD5 | raw file
Possible License(s): LGPL-2.1
  1. <?php
  2. /**
  3. * NOVIUS OS - Web OS for digital communication
  4. *
  5. * @copyright 2011 Novius
  6. * @license GNU Affero General Public License v3 or (at your option) any later version
  7. * http://www.gnu.org/licenses/agpl-3.0.html
  8. * @link http://www.novius-os.org
  9. */
  10. Nos\I18n::current_dictionary(array('noviusos_media::common', 'nos::common'));
  11. $usage_count = count($item->link);
  12. ?>
  13. <input type="hidden" name="id" value="<?= $item->{$crud['pk']} ?>" />
  14. <div id="<?= $uniqid = uniqid('id_') ?>" class="fieldset standalone">
  15. <p>
  16. <?php
  17. if ($usage_count == 0) {
  18. ?>
  19. <p><?= __('The media is not used anywhere and can be safely deleted.') ?></p>
  20. <?php
  21. } else {
  22. ?>
  23. <p><?= strtr(__(
  24. $usage_count == 1 ? __('The media is used <strong>once</strong> by an application.')
  25. : __('The media is used <strong>{{count}} times</strong> by your applications.')
  26. ), array(
  27. '{{count}}' => $usage_count,
  28. )) ?></p>
  29. <p><?= $crud['config']['i18n']['deleting confirmation number'] ?></p>
  30. <p><?= strtr(__('Yes, I want to delete this media file even though it is used {{count}} times.'), array(
  31. '{{count}}' => '<input class="verification" data-verification="'.$usage_count.'" size="'.(mb_strlen($usage_count) + 1).'" />',
  32. )); ?></p>
  33. <?php
  34. }
  35. ?>
  36. </p>
  37. <input type="checkbox" name="contexts[]" class="count" data-count="1" value="all" checked style="display:none;" />
  38. </div>