Stud.IP  5.4
_permission_table.php File Reference

Variables

if(!isset($show_delete_action)) if(!empty( $table_caption))( $table_caption) ?></caption ><? endif ?>< colgroup >< col classforeach( $custom_columns as $column_name)( 'Name') ?></th >< th data-sortif(!empty( $custom_columns)) (array_keys($custom_columns) as $column_name) ( $column_name) ?></th ><? endforeach ?><? endif ?></tr ></thead ><? if( $show_delete_action)
 
endifif(count( $permissions))($permissions as $permission) switch($permission->perms) if( $permission->user instanceof User)( $permission->user->getFullName( 'full_rev_username')) ?>(<? else = htmlReady($permission->user->perms)
 

Variable Documentation

◆ (array_keys($custom_columns) as $column_name)

if (!isset( $show_delete_action))if (!empty($table_caption)) ($table_caption) ?></caption> <? endif ?> <colgroup> <col classforeach ($custom_columns as $column_name) ('Name') ?></th> <th data-sortif(!empty($custom_columns)) (array_keys( $custom_columns) as $column_name)($column_name) ?></th ><? endforeach ?><? endif ?></tr ></thead ><? if($show_delete_action)
Initial value:
=> 'table.resource-permissions-table :checkbox:checked'
]

Template variables:

  • table_id: The ID of the table. This is required for the JS code which adds new users to the table to work.
  • table caption: An optional table caption.
  • permissions: An array of ResourcePermission objects.
  • single_user: The User object in case the table is used in single user mode where the permissions of one specific user are displayed.
  • custom_columns: An associative multi-dimensional array to display additional columns. Structure: The first layer has the column names as indexes. The second layer contains an associative array with the cells for the column. That array has the permission object IDs (see permissions above) as indexes.
  • custom_actions: A multi-dimensional array for additional actions in the actions column. The array has the following structure: The first layer contains associative arrays where each array represents one action. The second layer consists of associative arrays with the following structure: [ 'icon' => The Icon object for the action. 'title' => The descriptive title for the action. 'link_classes' => Classes which shall be added to the link element of the action. 'url' => An optional URL that shall be attached to the action's link element via the href attribute. 'js_action' => An optional JavaScript action that shall be attached to the link element using the onclick attribute. ]
  • show_delete_action: If the delete action shall be shown (true) or not (false). Defaults to true, if not set.

◆ else

endifif (count($permissions)) ( $permissions as $permission) switch ( $permission->perms)if ($permission->user instanceof User) ($permission->user->getFullName('full_rev_username')) ?> (<? else = htmlReady($permission->user->perms)