Index: trunk/phase3/skins/MonoBook.php |
— | — | @@ -96,28 +96,7 @@ |
97 | 97 | </div> |
98 | 98 | </div></div> |
99 | 99 | <div id="column-one"<?php $this->html('userlangattributes') ?>> |
100 | | - <div id="p-cactions" class="portlet"> |
101 | | - <h5><?php $this->msg('views') ?></h5> |
102 | | - <div class="pBody"> |
103 | | - <ul><?php |
104 | | - foreach($this->data['content_actions'] as $key => $tab) { |
105 | | - echo ' |
106 | | - <li id="' . Sanitizer::escapeId( "ca-$key" ) . '"'; |
107 | | - if( $tab['class'] ) { |
108 | | - echo ' class="'.htmlspecialchars($tab['class']).'"'; |
109 | | - } |
110 | | - echo '><a href="'.htmlspecialchars($tab['href']).'"'; |
111 | | - if( $tab["tooltiponly"] ) { |
112 | | - echo $skin->tooltip( "ca-$key" ); |
113 | | - } else { |
114 | | - echo $skin->tooltipAndAccesskey( "ca-$key" ); |
115 | | - } |
116 | | - echo '>'.htmlspecialchars($tab['text']).'</a></li>'; |
117 | | - } ?> |
118 | | - |
119 | | - </ul> |
120 | | - </div> |
121 | | - </div> |
| 100 | +<?php $this->cactions( $skin ); ?> |
122 | 101 | <div class="portlet" id="p-personal"> |
123 | 102 | <h5><?php $this->msg('personaltools') ?></h5> |
124 | 103 | <div class="pBody"> |
— | — | @@ -213,6 +192,42 @@ |
214 | 193 | <?php |
215 | 194 | } |
216 | 195 | |
| 196 | + /** |
| 197 | + * Prints the cactions bar. |
| 198 | + * Shared between MonoBook and Modern |
| 199 | + */ |
| 200 | + function cactions( Skin $skin ) { |
| 201 | +?> |
| 202 | + <div id="p-cactions" class="portlet"> |
| 203 | + <h5><?php $this->msg('views') ?></h5> |
| 204 | + <div class="pBody"> |
| 205 | + <ul><?php |
| 206 | + foreach($this->data['content_actions'] as $key => $tab) { |
| 207 | + echo ' |
| 208 | + <li id="' . Sanitizer::escapeId( "ca-$key" ) . '"'; |
| 209 | + if( $tab['class'] ) { |
| 210 | + echo ' class="'.htmlspecialchars($tab['class']).'"'; |
| 211 | + } |
| 212 | + echo '>'; |
| 213 | + $linkAttribs = array( 'href' => $tab['href'] ); |
| 214 | + |
| 215 | + if( isset( $tab["tooltiponly"] ) && $tab["tooltiponly"] ) { |
| 216 | + $title = $skin->titleAttrib( "ca-$key" ); |
| 217 | + if ( $title !== false ) { |
| 218 | + $linkAttribs['title'] = $title; |
| 219 | + } |
| 220 | + } else { |
| 221 | + $linkAttribs += $skin->tooltipAndAccesskeyAttribs( "ca-$key" ); |
| 222 | + } |
| 223 | + echo Html::element( 'a', $linkAttribs, $tab['text'] ); |
| 224 | + echo '</li>'; |
| 225 | + } ?> |
| 226 | + |
| 227 | + </ul> |
| 228 | + </div> |
| 229 | + </div> |
| 230 | +<?php |
| 231 | + } |
217 | 232 | /*************************************************************************************************/ |
218 | 233 | function toolbox() { |
219 | 234 | ?> |
Index: trunk/phase3/skins/Modern.php |
— | — | @@ -58,27 +58,7 @@ |
59 | 59 | <div id="mw_main"> |
60 | 60 | <div id="mw_contentwrapper"> |
61 | 61 | <!-- navigation portlet --> |
62 | | - <div id="p-cactions" class="portlet"> |
63 | | - <h5><?php $this->msg('views') ?></h5> |
64 | | - <div class="pBody"> |
65 | | - <ul> |
66 | | - <?php foreach($this->data['content_actions'] as $key => $tab) { |
67 | | - echo ' |
68 | | - <li id="' . Sanitizer::escapeId( "ca-$key" ) . '"'; |
69 | | - if( $tab['class'] ) { |
70 | | - echo ' class="'.htmlspecialchars($tab['class']).'"'; |
71 | | - } |
72 | | - echo'><a href="'.htmlspecialchars($tab['href']).'"'; |
73 | | - if( isset($tab["tooltiponly"]) && $tab["tooltiponly"] ) { |
74 | | - echo $skin->tooltip( "ca-$key" ); |
75 | | - } else { |
76 | | - echo $skin->tooltipAndAccesskey( "ca-$key" ); |
77 | | - } |
78 | | - echo '>'.htmlspecialchars($tab['text']).'</a></li>'; |
79 | | - } ?> |
80 | | - </ul> |
81 | | - </div> |
82 | | - </div> |
| 62 | +<?php $this->cactions( $skin ); ?> |
83 | 63 | |
84 | 64 | <!-- content --> |
85 | 65 | <div id="mw_content"> |