show.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /**
  3. * show.php
  4. *
  5. * @author Spyros Soldatos <spyros@valor.gr>
  6. * @link http://code.google.com/p/srbac/
  7. */
  8. /**
  9. * The auth items information view. Also this view is used for deleting
  10. * confirmation.
  11. *
  12. * @author Spyros Soldatos <spyros@valor.gr>
  13. * @package srbac.views.authitem.manage
  14. * @since 1.0.0
  15. */
  16. ?>
  17. <?php if($updateList) :?>
  18. <script language="javascript">
  19. <?php echo SHtml::ajax(array(
  20. 'type'=>'POST',
  21. 'url'=>array('manage'),
  22. 'update'=>'#list',
  23. )); ?>
  24. </script>
  25. <?php else : ?>
  26. <h2><?php echo $model->name; ?></h2>
  27. <table class="srbacDataGrid">
  28. <tr>
  29. <th class="label"><?php echo SHtml::encode($model->getAttributeLabel('type')); ?></th>
  30. <td><?php echo SHtml::encode(AuthItem::$TYPES[$model->type]); ?></td>
  31. </tr>
  32. <tr>
  33. <th class="label"><?php echo SHtml::encode($model->getAttributeLabel('description')); ?></th>
  34. <td><?php echo SHtml::encode($model->description); ?></td>
  35. </tr>
  36. <tr>
  37. <th class="label"><?php echo SHtml::encode($model->getAttributeLabel('bizrule')); ?></th>
  38. <td><?php echo SHtml::encode($model->bizrule); ?></td>
  39. </tr>
  40. <tr>
  41. <th class="label"><?php echo SHtml::encode($model->getAttributeLabel('data')); ?></th>
  42. <td><?php echo SHtml::encode($model->data); ?></td>
  43. </tr>
  44. </table>
  45. <div class="simple">
  46. <?php if($delete) :?>
  47. <?php echo Helper::translate('srbac','Really delete')?> <?php echo $model->name; ?> ?
  48. <?php echo SHtml::ajaxButton(Helper::translate('srbac','Yes'),
  49. array('delete','id'=>$model->name),
  50. array(
  51. 'type'=>'POST',
  52. 'update'=>'#preview'
  53. ), array('id'=>'deleteButton')) ?>
  54. <?php endif ?>
  55. </div>
  56. <?php endif ?>