Révision 7e72b748
Ajouté par Assos Assos il y a plus de 6 ans
drupal7/sites/all/modules/ctools/includes/context.theme.inc | ||
---|---|---|
19 | 19 |
); |
20 | 20 |
$theme['ctools_context_item_form'] = array( |
21 | 21 |
'render element' => 'form', |
22 |
// 'variables' => array('form' => NULL), |
|
23 | 22 |
'file' => 'includes/context.theme.inc', |
24 | 23 |
); |
25 | 24 |
$theme['ctools_context_item_row'] = array( |
... | ... | |
27 | 26 |
'file' => 'includes/context.theme.inc', |
28 | 27 |
); |
29 | 28 |
|
30 |
// For the access plugin |
|
29 |
// For the access plugin.
|
|
31 | 30 |
$theme['ctools_access_admin_add'] = array( |
32 | 31 |
'render element' => 'form', |
33 | 32 |
'file' => 'includes/context-access-admin.inc', |
... | ... | |
62 | 61 |
function theme_ctools_context_item_form($vars) { |
63 | 62 |
$form = $vars['form']; |
64 | 63 |
|
65 |
$output = ''; |
|
66 |
$type = $form['#ctools_context_type']; |
|
67 |
$module = $form['#ctools_context_module']; |
|
68 |
$cache_key = $form['#cache_key'];
|
|
64 |
$output = '';
|
|
65 |
$type = $form['#ctools_context_type'];
|
|
66 |
$module = $form['#ctools_context_module'];
|
|
67 |
$cache_key = $form['#cache_key']; |
|
69 | 68 |
|
70 | 69 |
$type_info = ctools_context_info($type); |
71 | 70 |
|
... | ... | |
104 | 103 |
|
105 | 104 |
if (!empty($form['buttons'])) { |
106 | 105 |
// Display the add context item. |
107 |
$row = array(); |
|
108 |
$row[] = array('data' => render($form['buttons'][$type]['item']), 'class' => array('title')); |
|
109 |
$row[] = array('data' => render($form['buttons'][$type]['add']), 'class' => array('add'), 'width' => "60%"); |
|
110 |
$output .= '<div class="buttons">'; |
|
111 |
$output .= render($form['buttons'][$type]); |
|
112 |
$theme_vars = array(); |
|
113 |
$theme_vars['header'] = array(); |
|
114 |
$theme_vars['rows'] = array($row); |
|
106 |
$row = array();
|
|
107 |
$row[] = array('data' => render($form['buttons'][$type]['item']), 'class' => array('title'));
|
|
108 |
$row[] = array('data' => render($form['buttons'][$type]['add']), 'class' => array('add'), 'width' => "60%");
|
|
109 |
$output .= '<div class="buttons">';
|
|
110 |
$output .= render($form['buttons'][$type]);
|
|
111 |
$theme_vars = array();
|
|
112 |
$theme_vars['header'] = array();
|
|
113 |
$theme_vars['rows'] = array($row);
|
|
115 | 114 |
$theme_vars['attributes'] = array('id' => $type . '-add-table'); |
116 |
$output .= theme('table', $theme_vars); |
|
117 |
$output .= '</div>'; |
|
115 |
$output .= theme('table', $theme_vars);
|
|
116 |
$output .= '</div>';
|
|
118 | 117 |
} |
119 | 118 |
if (!empty($form['description'])) { |
120 | 119 |
$output .= render($form['description']); |
... | ... | |
139 | 138 |
$description = (!empty($vars['description'])) ? $vars['description'] : NULL; |
140 | 139 |
$titles = array(); |
141 | 140 |
$output = ''; |
142 |
$count = 1;
|
|
141 |
$count = 1; |
|
143 | 142 |
|
144 | 143 |
$contexts = ctools_context_load_contexts($object); |
145 | 144 |
|
... | ... | |
209 | 208 |
} |
210 | 209 |
} |
211 | 210 |
|
212 |
// And relationships |
|
211 |
// And relationships.
|
|
213 | 212 |
if (!empty($object->relationships)) { |
214 | 213 |
foreach ($object->relationships as $relationship) { |
215 | 214 |
$output .= '<tr>'; |
... | ... | |
253 | 252 |
} |
254 | 253 |
|
255 | 254 |
/** |
256 |
* ctools_context_list() but not in a table format because tabledrag
|
|
257 |
* won't let us have tables within tables and still drag. |
|
255 |
* The ctools_context_list() function but not in a table format because
|
|
256 |
* tabledrag won't let us have tables within tables and still drag.
|
|
258 | 257 |
*/ |
259 | 258 |
function theme_ctools_context_list_no_table($vars) { |
260 | 259 |
$object = $vars['object']; |
261 | 260 |
ctools_add_css('context'); |
262 | 261 |
$titles = array(); |
263 | 262 |
$output = ''; |
264 |
$count = 1;
|
|
263 |
$count = 1; |
|
265 | 264 |
// Describe 'built in' contexts. |
266 | 265 |
if (!empty($object->base_contexts)) { |
267 | 266 |
foreach ($object->base_contexts as $id => $context) { |
... | ... | |
312 | 311 |
$count++; |
313 | 312 |
} |
314 | 313 |
} |
315 |
// And relationships |
|
314 |
// And relationships.
|
|
316 | 315 |
if (!empty($object->relationships)) { |
317 | 316 |
foreach ($object->relationships as $relationship) { |
318 | 317 |
$output .= '<div class="ctools-context-holder clearfix">'; |
... | ... | |
341 | 340 |
|
342 | 341 |
return $output; |
343 | 342 |
} |
344 |
|
Formats disponibles : Unified diff
Weekly update of contrib modules