@@ 38-61 (lines=24) @@ | ||
35 | * @return string A HTML <li> element representing this revision, showing |
|
36 | * change tags and everything |
|
37 | */ |
|
38 | public function getHTML() { |
|
39 | $difflink = $this->list->msg( 'parentheses' ) |
|
40 | ->rawParams( $this->getDiffLink() )->escaped(); |
|
41 | $revlink = $this->getRevisionLink(); |
|
42 | $userlink = Linker::revUserLink( $this->revision ); |
|
43 | $comment = Linker::revComment( $this->revision ); |
|
44 | if ( $this->isDeleted() ) { |
|
45 | $revlink = "<span class=\"history-deleted\">$revlink</span>"; |
|
46 | } |
|
47 | ||
48 | $content = "$difflink $revlink $userlink $comment"; |
|
49 | $attribs = []; |
|
50 | $tags = $this->getTags(); |
|
51 | if ( $tags ) { |
|
52 | list( $tagSummary, $classes ) = ChangeTags::formatSummaryRow( |
|
53 | $tags, |
|
54 | 'edittags', |
|
55 | $this->list->getContext() |
|
56 | ); |
|
57 | $content .= " $tagSummary"; |
|
58 | $attribs['class'] = implode( ' ', $classes ); |
|
59 | } |
|
60 | return Xml::tags( 'li', $attribs, $content ); |
|
61 | } |
|
62 | } |
|
63 |
@@ 154-176 (lines=23) @@ | ||
151 | * @return string A HTML <li> element representing this revision, showing |
|
152 | * change tags and everything |
|
153 | */ |
|
154 | public function getHTML() { |
|
155 | $difflink = $this->list->msg( 'parentheses' ) |
|
156 | ->rawParams( $this->getDiffLink() )->escaped(); |
|
157 | $revlink = $this->getRevisionLink(); |
|
158 | $userlink = Linker::revUserLink( $this->revision ); |
|
159 | $comment = Linker::revComment( $this->revision ); |
|
160 | if ( $this->isDeleted() ) { |
|
161 | $revlink = "<span class=\"history-deleted\">$revlink</span>"; |
|
162 | } |
|
163 | $content = "$difflink $revlink $userlink $comment"; |
|
164 | $attribs = []; |
|
165 | $tags = $this->getTags(); |
|
166 | if ( $tags ) { |
|
167 | list( $tagSummary, $classes ) = ChangeTags::formatSummaryRow( |
|
168 | $tags, |
|
169 | 'revisiondelete', |
|
170 | $this->list->getContext() |
|
171 | ); |
|
172 | $content .= " $tagSummary"; |
|
173 | $attribs['class'] = implode( ' ', $classes ); |
|
174 | } |
|
175 | return Xml::tags( 'li', $attribs, $content ); |
|
176 | } |
|
177 | ||
178 | /** |
|
179 | * @return string Comma-separated list of tags |