Révision 64156087
Ajouté par Assos Assos il y a plus de 7 ans
drupal7/sites/all/modules/panels/plugins/export_ui/panels_layouts_ui.class.php | ||
---|---|---|
4 | 4 |
* @file |
5 | 5 |
* Contains the administrative UI for reusable layouts. |
6 | 6 |
*/ |
7 |
|
|
8 | 7 |
class panels_layouts_ui extends ctools_export_ui { |
9 | 8 |
var $lipsum = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam egestas congue nibh, vel dictum ante posuere vitae. Cras gravida massa tempor metus eleifend sed elementum tortor scelerisque. Vivamus egestas, tortor quis luctus tristique, sem velit adipiscing risus, et tempus enim felis in massa. Morbi viverra, nisl quis rhoncus imperdiet, turpis massa vestibulum turpis, egestas faucibus nibh metus vel nunc. In hac habitasse platea dictumst. Nunc sit amet nisi quis ipsum tincidunt semper. Donec ac urna enim, et placerat arcu. Morbi eu laoreet justo. Nullam nec velit eu neque mattis pulvinar sed non libero. Sed sed vulputate erat. Fusce sit amet dui nibh."; |
10 | 9 |
|
... | ... | |
18 | 17 |
// Change the item to a tab on the Panels page. |
19 | 18 |
$this->plugin['menu']['items']['list callback']['type'] = MENU_LOCAL_TASK; |
20 | 19 |
|
21 |
// Establish a base for adding plugins |
|
20 |
// Establish a base for adding plugins.
|
|
22 | 21 |
$base = $this->plugin['menu']['items']['add']; |
23 | 22 |
// Remove the default 'add' menu item. |
24 | 23 |
unset($this->plugin['menu']['items']['add']); |
... | ... | |
27 | 26 |
$this->builders = panels_get_layout_builders(); |
28 | 27 |
asort($this->builders); |
29 | 28 |
foreach ($this->builders as $name => $builder) { |
30 |
// Create a new menu item for the builder |
|
29 |
// Create a new menu item for the builder.
|
|
31 | 30 |
$item = $base; |
32 | 31 |
$item['title'] = !empty($builder['builder tab title']) ? $builder['builder tab title'] : 'Add ' . $builder['title']; |
33 | 32 |
$item['page arguments'][] = $name; |
... | ... | |
78 | 77 |
$display->layout_settings = $form_state['item']->settings; |
79 | 78 |
$display->cache_key = $cache_key; |
80 | 79 |
$display->editing_layout = TRUE; |
80 |
$display->storage_type = 'panels_layouts_ui'; |
|
81 |
$display->storage_id = 'panels_layouts_ui'; |
|
81 | 82 |
|
82 | 83 |
$cache->display = $display; |
83 | 84 |
$cache->content_types = $content_types; |
... | ... | |
193 | 194 |
} |
194 | 195 |
|
195 | 196 |
function list_build_row($item, &$form_state, $operations) { |
196 |
// Set up sorting |
|
197 |
// Set up sorting.
|
|
197 | 198 |
switch ($form_state['values']['order']) { |
198 | 199 |
case 'disabled': |
199 | 200 |
$this->sorts[$item->name] = empty($item->disabled) . $item->admin_title; |
200 | 201 |
break; |
202 |
|
|
201 | 203 |
case 'title': |
202 | 204 |
$this->sorts[$item->name] = $item->admin_title; |
203 | 205 |
break; |
206 |
|
|
204 | 207 |
case 'name': |
205 | 208 |
$this->sorts[$item->name] = $item->name; |
206 | 209 |
break; |
210 |
|
|
207 | 211 |
case 'category': |
208 | 212 |
$this->sorts[$item->name] = ($item->category ? $item->category : t('Miscellaneous')) . $item->admin_title; |
209 | 213 |
break; |
214 |
|
|
210 | 215 |
case 'plugin': |
211 | 216 |
$this->sorts[$item->name] = $item->plugin; |
212 | 217 |
break; |
218 |
|
|
213 | 219 |
case 'storage': |
214 | 220 |
$this->sorts[$item->name] = $item->type . $item->admin_title; |
215 | 221 |
break; |
... | ... | |
242 | 248 |
array('data' => t('Operations'), 'class' => array('ctools-export-ui-operations')), |
243 | 249 |
); |
244 | 250 |
} |
251 |
|
|
245 | 252 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules