Révision 661d64c9
Ajouté par Assos Assos il y a plus de 7 ans
drupal7/sites/all/modules/diff/diff.theme.inc | ||
---|---|---|
48 | 48 |
'data' => drupal_render($form['diff']['new'][$key]), |
49 | 49 |
'class' => array('revision-current'), |
50 | 50 |
); |
51 |
$revision = $form['info'][$key]['#revision']; |
|
52 |
if ($revision && !empty($revision->status)) { |
|
53 |
$message = t('This is the published revision.'); |
|
54 |
} |
|
55 |
else { |
|
56 |
$message = t('This is the current revision.'); |
|
57 |
} |
|
51 | 58 |
$row[] = array( |
52 |
'data' => t('current revision'),
|
|
59 |
'data' => '<strong>' . $message . '</strong>',
|
|
53 | 60 |
'class' => array('revision-current'), |
54 | 61 |
'colspan' => '2', |
55 | 62 |
); |
56 | 63 |
$rows[] = array( |
57 | 64 |
'data' => $row, |
58 |
'class' => array('error diff-revision'),
|
|
65 |
'class' => array('revision-published diff-revision'),
|
|
59 | 66 |
); |
60 | 67 |
} |
61 | 68 |
} |
... | ... | |
64 | 71 |
'header' => $header, |
65 | 72 |
'rows' => $rows, |
66 | 73 |
'sticky' => FALSE, |
67 |
'attributes' => array('class' => 'diff-revisions'),
|
|
74 |
'attributes' => array('class' => array('diff-revisions')),
|
|
68 | 75 |
)); |
69 | 76 |
|
70 | 77 |
$output .= drupal_render_children($form); |
71 | 78 |
return $output; |
72 | 79 |
} |
73 | 80 |
|
74 |
/** |
|
75 |
* Theme functions |
|
76 |
*/ |
|
77 |
|
|
78 | 81 |
/** |
79 | 82 |
* Theme function for a header line in the diff. |
80 | 83 |
*/ |
... | ... | |
139 | 142 |
switch ($vars['type']) { |
140 | 143 |
case 'add': |
141 | 144 |
return "<span class='diff-added'>{$vars['text']}</span>"; |
145 |
|
|
142 | 146 |
case 'change': |
143 | 147 |
return "<span class='diff-changed'>{$vars['text']}</span>"; |
148 |
|
|
144 | 149 |
case 'delete': |
145 | 150 |
return "<span class='diff-deleted'>{$vars['text']}</span>"; |
151 |
|
|
146 | 152 |
default: |
147 | 153 |
return $vars['text']; |
154 |
|
|
148 | 155 |
} |
149 | 156 |
} |
Formats disponibles : Unified diff
Weekly update of contrib modules