2010-08-13 18:28:53 +00:00
< ? php defined ( " SYSPATH " ) or die ( " No direct script access. " ) ?>
< fieldset >
< legend > < ? = t ( 'Edit Permissions' ) ?> </legend>
< table >
< tr >
< th > </ th >
< ? foreach ( $groups as $group ) : ?>
< th > < ? = html :: clean ( $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 ) ?>
< ? if ( $lock ) : ?>
< td class = " g-denied " >
2010-08-20 03:06:49 +00:00
< a href = " javascript:show(<?= $lock->id ?>) " title = " <?= t('denied and locked through parent album, click to go to parent album')->for_html_attr() ?> " class = " ui-icon ui-icon-locked " />
2010-08-13 18:28:53 +00:00
</ td >
< ? else : ?>
< ? if ( $intent === access :: INHERIT ) : ?>
< ? if ( $allowed ) : ?>
2010-08-20 03:06:49 +00:00
< td class = " g-allowed " >
< a href = " javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>) " title = " <?= t('allowed through parent album, click to deny')->for_html_attr() ?> " class = " ui-icon ui-icon-check " />
2010-08-13 18:28:53 +00:00
</ td >
< ? else : ?>
2010-08-20 03:06:49 +00:00
< td class = " g-denied " >
2010-08-13 18:28:53 +00:00
< a href = " javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>) "
2010-08-20 03:06:49 +00:00
title = " <?= t('denied through parent album, click to allow')->for_html_attr() ?> "
class = " ui-icon ui-icon-cancel " />
2010-08-13 18:28:53 +00:00
</ td >
< ? endif ?>
< ? elseif ( $intent === access :: DENY ) : ?>
2010-08-20 03:06:49 +00:00
< td class = " g-denied " >
2010-08-13 18:28:53 +00:00
< a href = " javascript:set('allow',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>) "
title = " <?= t('denied, click to allow')->for_html_attr() ?> "
2010-08-20 03:06:49 +00:00
class = " ui-icon ui-icon-cancel " />
2010-08-13 18:28:53 +00:00
</ td >
< ? elseif ( $intent === access :: ALLOW ) : ?>
2010-08-20 03:06:49 +00:00
< td class = " g-allowed " >
2010-08-13 18:28:53 +00:00
< a href = " javascript:set('deny',<?= $group->id ?>,<?= $permission->id ?>,<?= $item->id ?>) "
class = " ui-icon ui-icon-check "
2010-08-20 03:06:49 +00:00
title = " <?= t('allowed, click to deny')->for_html_attr() ?> " />
2010-08-13 18:28:53 +00:00
</ td >
< ? endif ?>
< ? endif ?>
</ td >
< ? endforeach ?>
</ tr >
< ? endforeach ?>
</ table >
</ fieldset >