Changes between Version 56 and Version 57 of AjaxList
- Timestamp:
- 2010-09-08T16:06:34Z (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
AjaxList
v56 v57 126 126 The Actions array is an array-of-arrays that lets you define a set of actions for each entry in the list. These will be accessible when the user right click an action item. The general syntax for the actions array is: 127 127 {{{ 128 #!php 128 129 $actions = array( 129 130 array(<action 1 name>, [warning message 1], [restrictions array 1], [controller 1], <function>, [param 1 [, param 2am 3 etc...]]]), … … 143 144 The access restriction array is (again :-) an array or array, and has the following general format 144 145 {{{ 146 #!php 145 147 $actionRestrictions = array( 146 148 <Column ID 1> => array ( … … 161 163 Every column ID corresponds to a map-type column. When the column's entry (raw, not yet translated), marched the map entry's in the above structure, then the boolean true or false varible will deterime wherether the user is allowed to perform an action. The "!default" map entry takes effect when the column's cell contents don't match any of the other entries. For example, the following real example is taken from the user's controller, designed to allow instructors to only edit students, and not other user types 162 164 {{{ 165 #!php 163 166 $actionRestrictions = array( 164 167 "User.role" => array ( … … 171 174 {{{WHERE key1=value1 AND key2=value2 AND key3=value3 AND etc...}}}[[br]] 172 175 for an array like:[[br]] 173 {{{ $extraFilters = array(key1 => value1, key2 => value2, key3 => value3);}}}176 {{{#!php $extraFilters = array(key1 => value1, key2 => value2, key3 => value3);}}} 174 177 175 178 ==== Join Tables ==== … … 180 183 If simply joining in tables, without join filter, the $joinTable array contains an array for each table joined in: 181 184 {{{ 182 !php185 #!php 183 186 $joinTables = array( 184 187 array( "joinTable" => "table_name", // The name of the table to be joined in