Révision 64156087
Ajouté par Assos Assos il y a plus de 7 ans
drupal7/sites/all/modules/panels/panels_ipe/panels_ipe.module | ||
---|---|---|
1 | 1 |
<?php |
2 | 2 |
|
3 |
/** |
|
4 |
* @file |
|
5 |
*/ |
|
6 |
|
|
3 | 7 |
/** |
4 | 8 |
* Implementation of hook_ctools_plugin_directory(). |
5 | 9 |
*/ |
... | ... | |
90 | 94 |
'attributes' => array( |
91 | 95 |
'class' => array('ctools-use-modal', 'panels-ipe-hide-bar'), |
92 | 96 |
'title' => isset($content_type['edit text']) ? $content_type['edit text'] : t('Settings'), |
93 |
// 'id' => "pane-edit-panel-pane-$pane->pid", |
|
97 |
// 'id' => "pane-edit-panel-pane-$pane->pid",.
|
|
94 | 98 |
), |
95 | 99 |
); |
96 | 100 |
} |
97 | 101 |
|
98 |
// Add option to configure style in IPE |
|
102 |
// Add option to configure style in IPE.
|
|
99 | 103 |
if (user_access('administer panels pane styles')) { |
100 | 104 |
$vars['links']['style'] = array( |
101 | 105 |
'title' => '<span>' . t('Style') . '</span>', |
... | ... | |
108 | 112 |
); |
109 | 113 |
} |
110 | 114 |
|
115 |
// Add option to configure CSS. |
|
116 |
if (user_access('administer advanced pane settings')) { |
|
117 |
$vars['links']['css'] = array( |
|
118 |
'title' => '<span>' . t('CSS') . '</span>', |
|
119 |
'href' => $renderer->get_url('pane-css', $pane->pid), |
|
120 |
'html' => TRUE, |
|
121 |
'attributes' => array( |
|
122 |
'class' => array('ctools-use-modal', 'panels-ipe-hide-bar'), |
|
123 |
'title' => t('CSS'), |
|
124 |
), |
|
125 |
); |
|
126 |
} |
|
127 |
|
|
111 | 128 |
// Deleting is managed entirely in the js; this is just an attachment point |
112 |
// for it |
|
129 |
// for it.
|
|
113 | 130 |
$vars['links']['delete'] = array( |
114 | 131 |
'title' => '<span>' . t('Delete') . '</span>', |
115 | 132 |
'href' => '#', |
... | ... | |
124 | 141 |
$context = array( |
125 | 142 |
'pane' => $pane, |
126 | 143 |
'display' => $display, |
127 |
'renderer' => $renderer |
|
144 |
'renderer' => $renderer,
|
|
128 | 145 |
); |
129 | 146 |
drupal_alter('panels_ipe_pane_links', $vars['links'], $context); |
130 | 147 |
|
... | ... | |
140 | 157 |
); |
141 | 158 |
|
142 | 159 |
$type = ctools_get_content_type($pane->type); |
143 |
$title ='<span class = "panels-ipe-dragbar-admin-title">' . ctools_content_admin_title($type, $pane->subtype, $pane->configuration, $display->context) . '</span>'; |
|
160 |
$title = '<span class = "panels-ipe-dragbar-admin-title">' . ctools_content_admin_title($type, $pane->subtype, $pane->configuration, $display->context) . '</span>';
|
|
144 | 161 |
|
145 | 162 |
$links = theme('links', array('links' => $vars['links'], 'attributes' => $attributes)); |
146 | 163 |
|
147 | 164 |
if (!empty($pane->locks['type']) && $pane->locks['type'] == 'immovable') { |
148 |
$links = '<div class="panels-ipe-dragbar panels-ipe-nodraghandle clearfix">' . $links .$title .'</div>';
|
|
165 |
$links = '<div class="panels-ipe-dragbar panels-ipe-nodraghandle clearfix">' . $links . $title . '</div>';
|
|
149 | 166 |
} |
150 | 167 |
else { |
151 | 168 |
$links = '<div class="panels-ipe-dragbar panels-ipe-draghandle clearfix">' . $links . $title . '<span class="panels-ipe-draghandle-icon"><span class="panels-ipe-draghandle-icon-inner"></span></span></div>'; |
... | ... | |
164 | 181 |
$region_id = $vars['region_id']; |
165 | 182 |
$display = $vars['display']; |
166 | 183 |
$renderer = $vars['renderer']; |
167 |
$vars['links'] = '';
|
|
184 |
$vars['links'] = array();
|
|
168 | 185 |
|
169 |
// Add option to configure style in IPE |
|
186 |
// Add option to configure style in IPE.
|
|
170 | 187 |
if (user_access('administer panels region styles')) { |
171 | 188 |
$vars['links']['style'] = array( |
172 | 189 |
'title' => '<span>' . t('Region style') . '</span>', |
... | ... | |
179 | 196 |
); |
180 | 197 |
} |
181 | 198 |
|
182 |
// Add option to add items in the IPE |
|
199 |
// Add option to add items in the IPE.
|
|
183 | 200 |
$vars['links']['add-pane'] = array( |
184 | 201 |
'title' => '<span>' . t('Add new pane') . '</span>', |
185 | 202 |
'href' => $renderer->get_url('select-content', $region_id), |
... | ... | |
226 | 243 |
} |
227 | 244 |
|
228 | 245 |
/** |
229 |
* Implementation of hook_footer() |
|
246 |
* Implementation of hook_footer().
|
|
230 | 247 |
* |
231 | 248 |
* Adds the IPE control container. |
232 | 249 |
* |
Formats disponibles : Unified diff
Weekly update of contrib modules