summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-05-28 00:06:09 -0700
committerBharat Mediratta <bharat@menalto.com>2009-05-28 00:06:09 -0700
commit1988d77039b67c34521b5f8a1cec200d35249745 (patch)
treef65d901e6b0d4de29d8d01510cd923d7a43d0b9c
parent38708920181f3bb7787ccd11128e5f6f0b74cbf7 (diff)
Remove unnecessary (and broken) <form/>
-rw-r--r--modules/gallery/views/permissions_form.html.php155
1 files changed, 76 insertions, 79 deletions
diff --git a/modules/gallery/views/permissions_form.html.php b/modules/gallery/views/permissions_form.html.php
index 3dbd0d98..94103705 100644
--- a/modules/gallery/views/permissions_form.html.php
+++ b/modules/gallery/views/permissions_form.html.php
@@ -1,94 +1,91 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<form method="post" action="<?= url::site('permissions/edit/$item->id') ?>">
- <?= access::csrf_form_field() ?>
- <fieldset>
- <legend> <?= t('Edit Permissions') ?> </legend>
+<fieldset>
+ <legend> <?= t('Edit Permissions') ?> </legend>
- <table>
- <tr>
- <th> </th>
- <? foreach ($groups as $group): ?>
- <th> <?= $group->name ?> </th>
- <? endforeach ?>
- </tr>
-
- <? foreach ($permissions as $permission): ?>
- <tr>
- <td> <?= t($permission->display_name) ?> </td>
- <? foreach ($groups as $group): ?>
- <? $intent = access::group_intent($group, $permission->name, $item) ?>
- <? $allowed = access::group_can($group, $permission->name, $item) ?>
- <? $lock = access::locked_by($group, $permission->name, $item) ?>
+ <table>
+ <tr>
+ <th> </th>
+ <? foreach ($groups as $group): ?>
+ <th> <?= $group->name ?> </th>
+ <? endforeach ?>
+ </tr>
- <? if ($lock): ?>
- <td class="gDenied">
- <img src="<?= url::file('themes/default/images/ico-denied.png') ?>" title="<?= t('denied and locked through parent album') ?>" alt="<?= t('denied icon') ?>" />
- <a href="javascript:show(<?= $lock->id ?>)" title="<?= t('click to go to parent album') ?>">
- <img src="<?= url::file('themes/default/images/ico-lock.png') ?>" alt="<?= t('locked icon') ?>" />
- </a>
- </td>
- <? else: ?>
- <? if ($intent === null): ?>
- <? if ($allowed): ?>
- <td class="gAllowed">
- <a href="javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
- title="<?= t('allowed through parent album, click to allow explicitly') ?>">
- <img src="<?= url::file('themes/default/images/ico-success-pale.png') ?>" alt="<?= t('passive allowed icon') ?>" />
- </a>
- <a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
- title="<?= t('click to deny') ?>">
- <img src="<?= url::file('themes/default/images/ico-denied-gray.png') ?>" alt="<?= t('inactive denied icon') ?>" />
- </a>
- </td>
- <? else: ?>
- <td class="gDenied">
- <a href="javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
- title="<?= t('click to allow') ?>">
- <img src="<?= url::file('themes/default/images/ico-success-gray.png') ?>" alt="<?= t('inactive allowed icon') ?>" />
- </a>
- <a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
- title="<?= t('denied through parent album, click to deny explicitly') ?>">
- <img src="<?= url::file('themes/default/images/ico-denied-pale.png') ?>" alt="<?= t('passive denied icon') ?>" />
- </a>
- </td>
- <? endif ?>
+ <? foreach ($permissions as $permission): ?>
+ <tr>
+ <td> <?= t($permission->display_name) ?> </td>
+ <? foreach ($groups as $group): ?>
+ <? $intent = access::group_intent($group, $permission->name, $item) ?>
+ <? $allowed = access::group_can($group, $permission->name, $item) ?>
+ <? $lock = access::locked_by($group, $permission->name, $item) ?>
- <? elseif ($intent === access::DENY): ?>
+ <? if ($lock): ?>
+ <td class="gDenied">
+ <img src="<?= url::file('themes/default/images/ico-denied.png') ?>" title="<?= t('denied and locked through parent album') ?>" alt="<?= t('denied icon') ?>" />
+ <a href="javascript:show(<?= $lock->id ?>)" title="<?= t('click to go to parent album') ?>">
+ <img src="<?= url::file('themes/default/images/ico-lock.png') ?>" alt="<?= t('locked icon') ?>" />
+ </a>
+ </td>
+ <? else: ?>
+ <? if ($intent === null): ?>
+ <? if ($allowed): ?>
+ <td class="gAllowed">
+ <a href="javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
+ title="<?= t('allowed through parent album, click to allow explicitly') ?>">
+ <img src="<?= url::file('themes/default/images/ico-success-pale.png') ?>" alt="<?= t('passive allowed icon') ?>" />
+ </a>
+ <a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
+ title="<?= t('click to deny') ?>">
+ <img src="<?= url::file('themes/default/images/ico-denied-gray.png') ?>" alt="<?= t('inactive denied icon') ?>" />
+ </a>
+ </td>
+ <? else: ?>
<td class="gDenied">
<a href="javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
title="<?= t('click to allow') ?>">
<img src="<?= url::file('themes/default/images/ico-success-gray.png') ?>" alt="<?= t('inactive allowed icon') ?>" />
</a>
- <? if ($item->id == 1): ?>
- <img src="<?= url::file('themes/default/images/ico-denied.png') ?>" alt="<?= t('denied icon') ?>" title="<?= t('denied') ?>"/>
- <? else: ?>
- <a href="javascript:set('reset',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
- title="<?= t('denied, click to reset') ?>">
- <img src="<?= url::file('themes/default/images/ico-denied.png') ?>" alt="<?= t('denied icon') ?>" />
- </a>
- <? endif ?>
- </td>
- <? elseif ($intent === access::ALLOW): ?>
- <td class="gAllowed">
- <? if ($item->id == 1): ?>
- <img src="<?= url::file('themes/default/images/ico-success.png') ?>" title="allowed" alt="<?= t('allowed icon') ?>" />
- <? else: ?>
- <a href="javascript:set('reset',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
- title="<?= t('allowed, click to reset') ?>">
- <img src="<?= url::file('themes/default/images/ico-success.png') ?>" alt="<?= t('allowed icon') ?>" />
- </a>
- <? endif ?>
<a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
- title="<?= t('click to deny') ?>">
- <img src="<?= url::file('themes/default/images/ico-denied-gray.png') ?>" alt="<?= t('inactive denied icon') ?>" />
+ title="<?= t('denied through parent album, click to deny explicitly') ?>">
+ <img src="<?= url::file('themes/default/images/ico-denied-pale.png') ?>" alt="<?= t('passive denied icon') ?>" />
</a>
</td>
<? endif ?>
+
+ <? elseif ($intent === access::DENY): ?>
+ <td class="gDenied">
+ <a href="javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
+ title="<?= t('click to allow') ?>">
+ <img src="<?= url::file('themes/default/images/ico-success-gray.png') ?>" alt="<?= t('inactive allowed icon') ?>" />
+ </a>
+ <? if ($item->id == 1): ?>
+ <img src="<?= url::file('themes/default/images/ico-denied.png') ?>" alt="<?= t('denied icon') ?>" title="<?= t('denied') ?>"/>
+ <? else: ?>
+ <a href="javascript:set('reset',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
+ title="<?= t('denied, click to reset') ?>">
+ <img src="<?= url::file('themes/default/images/ico-denied.png') ?>" alt="<?= t('denied icon') ?>" />
+ </a>
+ <? endif ?>
+ </td>
+ <? elseif ($intent === access::ALLOW): ?>
+ <td class="gAllowed">
+ <? if ($item->id == 1): ?>
+ <img src="<?= url::file('themes/default/images/ico-success.png') ?>" title="allowed" alt="<?= t('allowed icon') ?>" />
+ <? else: ?>
+ <a href="javascript:set('reset',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
+ title="<?= t('allowed, click to reset') ?>">
+ <img src="<?= url::file('themes/default/images/ico-success.png') ?>" alt="<?= t('allowed icon') ?>" />
+ </a>
+ <? endif ?>
+ <a href="javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>)"
+ title="<?= t('click to deny') ?>">
+ <img src="<?= url::file('themes/default/images/ico-denied-gray.png') ?>" alt="<?= t('inactive denied icon') ?>" />
+ </a>
+ </td>
<? endif ?>
- </td>
- <? endforeach ?>
- </tr>
+ <? endif ?>
+ </td>
<? endforeach ?>
- </table>
- </fieldset>
-</form>
+ </tr>
+ <? endforeach ?>
+ </table>
+</fieldset>