Index: trunk/extensions/MarkAsHelpful/includes/MarkAsHelpfulUtil.php |
— | — | @@ -25,11 +25,15 @@ |
26 | 26 | } |
27 | 27 | } |
28 | 28 | |
29 | | - return '<div class="mw-mah-wrapper">' . $html . '</div>'; |
| 29 | + return $html; |
30 | 30 | |
31 | 31 | } |
32 | 32 | |
33 | 33 | private static function otherMarkedTemplate( $helpfulUserList ) { |
| 34 | + if ( count( $helpfulUserList ) == 0 ) { |
| 35 | + return ''; |
| 36 | + } |
| 37 | + |
34 | 38 | $userList = ''; |
35 | 39 | |
36 | 40 | foreach ( $helpfulUserList as $val ) { |
— | — | @@ -43,9 +47,11 @@ |
44 | 48 | } |
45 | 49 | |
46 | 50 | return <<<HTML |
| 51 | + <div class='mw-mah-wrapper'> |
47 | 52 | <span class='mah-helpful-marked-state'> |
48 | 53 | $data |
49 | 54 | </span> |
| 55 | + </div> |
50 | 56 | HTML; |
51 | 57 | } |
52 | 58 | |
— | — | @@ -54,19 +60,23 @@ |
55 | 61 | $undoLinkText = wfMessage( 'mah-undo-mark-text' )->escaped(); |
56 | 62 | |
57 | 63 | return <<<HTML |
58 | | - <span class='mah-helpful-marked-state'> |
59 | | - $mahMarkedText |
60 | | - </span> |
61 | | - (<a class='markashelpful-undo'>$undoLinkText</a>) |
| 64 | + <div class='mw-mah-wrapper'> |
| 65 | + <span class='mah-helpful-marked-state'> |
| 66 | + $mahMarkedText |
| 67 | + </span> |
| 68 | + (<a class='markashelpful-undo'>$undoLinkText</a>) |
| 69 | + </div> |
62 | 70 | HTML; |
63 | 71 | } |
64 | 72 | |
65 | 73 | private static function requestToMarkTemplate() { |
66 | 74 | $mahLinkText = wfMessage( 'mah-mark-text' )->escaped(); |
67 | 75 | return <<<HTML |
68 | | - <a class='mah-helpful-state markashelpful-mark'> |
69 | | - $mahLinkText |
70 | | - </a> |
| 76 | + <div class='mw-mah-wrapper'> |
| 77 | + <a class='mah-helpful-state markashelpful-mark'> |
| 78 | + $mahLinkText |
| 79 | + </a> |
| 80 | + </div> |
71 | 81 | HTML; |
72 | 82 | } |
73 | 83 | |