manage.php 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. <?php
  2. /**
  3. * manage.php
  4. *
  5. * @author Spyros Soldatos <spyros@valor.gr>
  6. * @link http://code.google.com/p/srbac/
  7. */
  8. /**
  9. * The auth items main administration page
  10. *
  11. * @author Spyros Soldatos <spyros@valor.gr>
  12. * @package srbac.views.authitem.manage
  13. * @since 1.0.0
  14. */
  15. ?>
  16. <?php $this->breadcrumbs = array(
  17. 'Srbac Manage'
  18. )
  19. ?>
  20. <?php if($this->module->getMessage() != ""){ ?>
  21. <div id="srbacError">
  22. <?php echo $this->module->getMessage();?>
  23. </div>
  24. <?php } ?>
  25. <?php if(!$full){
  26. if($this->module->getShowHeader()) {
  27. $this->renderPartial($this->module->header);
  28. }
  29. $this->renderPartial("frontpage");
  30. ?>
  31. <div id="wizardButton" style="text-align:left" class="controlPanel marginBottom">
  32. <?php echo SHtml::ajaxLink(
  33. SHtml::image($this->module->getIconsPath().'/admin.png',
  34. Helper::translate('srbac','Manage AuthItem'),
  35. array('class'=>'icon',
  36. 'title'=>Helper::translate('srbac','Manage AuthItem'),
  37. 'border'=>0
  38. )
  39. )." " .
  40. ($this->module->iconText ?
  41. Helper::translate('srbac','Manage AuthItem') :
  42. ""),
  43. array('manage','full'=>true),
  44. array(
  45. 'type'=>'POST',
  46. 'update'=>'#wizard',
  47. 'beforeSend' => 'function(){
  48. $("#wizard").addClass("srbacLoading");
  49. }',
  50. 'complete' => 'function(){
  51. $("#wizard").removeClass("srbacLoading");
  52. }',
  53. ),
  54. array(
  55. 'name'=>'buttonManage',
  56. 'onclick'=>"$(this).css('font-weight', 'bold');$(this).siblings().css('font-weight', 'normal');",
  57. )
  58. );
  59. ?>
  60. <?php echo SHtml::ajaxLink(
  61. SHtml::image($this->module->getIconsPath().'/wizard.png',
  62. Helper::translate('srbac','Autocreate Auth Items'),
  63. array('class'=>'icon',
  64. 'title'=>Helper::translate('srbac','Autocreate Auth Items'),
  65. 'border'=>0
  66. )
  67. )." " .
  68. ($this->module->iconText ?
  69. Helper::translate('srbac','Autocreate Auth Items') :
  70. ""),
  71. array('auto'),
  72. array(
  73. 'type'=>'POST',
  74. 'update'=>'#wizard',
  75. 'beforeSend' => 'function(){
  76. $("#wizard").addClass("srbacLoading");
  77. }',
  78. 'complete' => 'function(){
  79. $("#wizard").removeClass("srbacLoading");
  80. }',
  81. ),
  82. array(
  83. 'name'=>'buttonAuto',
  84. 'onclick'=>"$(this).css('font-weight', 'bold');$(this).siblings().css('font-weight', 'normal');",
  85. )
  86. );
  87. ?>
  88. <?php echo SHtml::ajaxLink(
  89. SHtml::image($this->module->getIconsPath().'/allow.png',
  90. Helper::translate('srbac','Edit always allowed list'),
  91. array('class'=>'icon',
  92. 'title'=>Helper::translate('srbac','Edit always allowed list'),
  93. 'border'=>0
  94. )
  95. )." " .
  96. ($this->module->iconText ?
  97. Helper::translate('srbac','Edit always allowed list') :
  98. ""),
  99. array('editAllowed'),
  100. array(
  101. 'type'=>'POST',
  102. 'update'=>'#wizard',
  103. 'beforeSend' => 'function(){
  104. $("#wizard").addClass("srbacLoading");
  105. }',
  106. 'complete' => 'function(){
  107. $("#wizard").removeClass("srbacLoading");
  108. }',
  109. ),
  110. array(
  111. 'name'=>'buttonAllowed',
  112. 'onclick'=>"$(this).css('font-weight', 'bold');$(this).siblings().css('font-weight', 'normal');",
  113. )
  114. );
  115. ?>
  116. <?php echo SHtml::ajaxLink(
  117. SHtml::image($this->module->getIconsPath().'/eraser.png',
  118. Helper::translate('srbac','Clear obsolete authItems'),
  119. array('class'=>'icon',
  120. 'title'=>Helper::translate('srbac','Clear obsolete authItems'),
  121. 'border'=>0
  122. )
  123. )." " .
  124. ($this->module->iconText ?
  125. Helper::translate('srbac','Clear obsolete authItems') :
  126. ""),
  127. array('clearObsolete'),
  128. array(
  129. 'type'=>'POST',
  130. 'update'=>'#wizard',
  131. 'beforeSend' => 'function(){
  132. $("#wizard").addClass("srbacLoading");
  133. }',
  134. 'complete' => 'function(){
  135. $("#wizard").removeClass("srbacLoading");
  136. }',
  137. ),
  138. array(
  139. 'name'=>'buttonClear',
  140. 'onclick'=>"$(this).css('font-weight', 'bold');$(this).siblings().css('font-weight', 'normal');",
  141. )
  142. );
  143. ?>
  144. </div>
  145. <br />
  146. <?php } ?>
  147. <div id="wizard">
  148. <table class="srbacDataGrid" align="center">
  149. <tr>
  150. <th width="50%"><?php echo Helper::translate("srbac","Auth items");?></th>
  151. <th><?php echo Helper::translate('srbac','Actions')?></th>
  152. </tr>
  153. <tr>
  154. <td style="vertical-align: top;text-align: center">
  155. <div id="list">
  156. <?php echo $this->renderPartial('manage/list', array(
  157. 'models'=>$models,
  158. 'pages'=>$pages,
  159. 'sort'=>$sort,
  160. )); ?>
  161. </div>
  162. </td>
  163. <td style="vertical-align: top;text-align: center">
  164. <div id="preview">
  165. </div>
  166. </td>
  167. </tr>
  168. </table>
  169. </div>
  170. <?php if(!$full) {
  171. if($this->module->getShowFooter()) {
  172. $this->renderPartial($this->module->footer);
  173. }
  174. }?>