Révision 6331c987
Ajouté par Assos Assos il y a environ 10 ans
drupal7/sites/all/modules/i18n/i18n_taxonomy/i18n_taxonomy.admin.inc | ||
---|---|---|
199 | 199 |
$path = 'taxonomy/term/' . $translation_term->tid; |
200 | 200 |
$title = l($translation_term->name, $path); |
201 | 201 |
|
202 |
$options[] = l(t('edit'), $path . '/edit'); |
|
202 |
$options['edit'] = array( |
|
203 |
'#type' => 'link', |
|
204 |
'#title' => t('edit'), |
|
205 |
'#href' => $path . '/edit', |
|
206 |
'#options' => array( |
|
207 |
'query' => drupal_get_destination(), |
|
208 |
), |
|
209 |
); |
|
203 | 210 |
|
204 | 211 |
if ($translation_term->tid == $i18n_tsid) { |
205 | 212 |
$language_name = t('<strong>@language_name</strong> (source)', array('@language_name' => $language_name)); |
... | ... | |
208 | 215 |
else { |
209 | 216 |
// No such translation in the set yet: help user to create it. |
210 | 217 |
$title = t('n/a'); |
211 |
$options[] = l(t('add translation'), 'admin/structure/taxonomy/' . $term->vocabulary_machine_name . '/add', array('query' => array('translation' => $term->tid, 'target' => $langcode) + drupal_get_destination())); |
|
218 |
$options['add'] = array( |
|
219 |
'#type' => 'link', |
|
220 |
'#title' => t('add translation'), |
|
221 |
'#href' => 'admin/structure/taxonomy/' . $term->vocabulary_machine_name . '/add', |
|
222 |
'#options' => array( |
|
223 |
'query' => array('translation' => $term->tid, 'target' => $langcode) + drupal_get_destination() |
|
224 |
), |
|
225 |
); |
|
212 | 226 |
} |
213 |
$rows[] = array($language_name, $title, implode(" | ", $options)); |
|
227 |
$rows[$langcode] = array( |
|
228 |
'language' => $language_name, |
|
229 |
'title' => $title, |
|
230 |
'operations' => array('data' => $options), |
|
231 |
); |
|
214 | 232 |
} |
215 | 233 |
|
216 | 234 |
drupal_set_title(t('Translations of term %title', array('%title' => $term->name)), PASS_THROUGH); |
217 | 235 |
|
218 |
$build['translation_node_overview'] = array(
|
|
236 |
$build['translation_overview'] = array( |
|
219 | 237 |
'#theme' => 'table', |
220 | 238 |
'#header' => $header, |
221 | 239 |
'#rows' => $rows, |
Formats disponibles : Unified diff
Weekly update of contrib modules