Index: trunk/extensions/ArticleFeedbackv5/api/ApiViewActivityArticleFeedbackv5.php |
— | — | @@ -66,57 +66,60 @@ |
67 | 67 | // generate our html |
68 | 68 | $html = ''; |
69 | 69 | |
70 | | - // <div class="articleFeedbackv5-activity-pane"> |
71 | | - $html .= Html::openElement( 'div', array( |
72 | | - 'class' => 'articleFeedbackv5-activity-pane' |
73 | | - ) ); |
| 70 | + // only do this if continue < 1 |
| 71 | + if ($continue < 1) { |
| 72 | + // <div class="articleFeedbackv5-activity-pane"> |
| 73 | + $html .= Html::openElement( 'div', array( |
| 74 | + 'class' => 'articleFeedbackv5-activity-pane' |
| 75 | + ) ); |
| 76 | + |
| 77 | + // <div class="articleFeedbackv5-activity-feedback"> |
| 78 | + $html .= Html::openElement( 'div', array( |
| 79 | + 'class' => 'articleFeedbackv5-activity-feedback' |
| 80 | + ) ); |
| 81 | + |
| 82 | + // <div>Feedback Post #{$feedbackid} by {$user_link}</div> |
| 83 | + $html .= Html::openElement( 'div', array() ); |
| 84 | + $html .= wfMessage( 'articlefeedbackv5-activity-feedback-info', |
| 85 | + array($feedback->af_id))->text() |
| 86 | + . $this->getUserLink($feedback->af_user_id, $feedback->af_user_ip); |
| 87 | + $html .= Html::closeElement( 'div' ); |
| 88 | + |
| 89 | + //<div>Posted on {$date} (UTC)</div> |
| 90 | + $html .= Html::element( 'div', array(), |
| 91 | + wfMessage( 'articlefeedbackv5-activity-feedback-date', |
| 92 | + array( $wgLang->timeanddate( $feedback->af_created ) ))->text() ); |
| 93 | + |
| 94 | + // <div class="articleFeedbackv5-activity-feedback-permalink"> |
| 95 | + $html .= Html::openElement( 'div', array( |
| 96 | + 'class' => 'articleFeedbackv5-activity-feedback-permalink' |
| 97 | + ) ); |
| 98 | + |
| 99 | + // <a href="{$permalink}">permalink</a> |
| 100 | + $html .= Linker::link( |
| 101 | + SpecialPage::getTitleFor( 'ArticleFeedbackv5', $title . '/'. $feedback->af_id ), |
| 102 | + wfMessage( 'articlefeedbackv5-activity-permalink' )->text()); |
| 103 | + |
| 104 | + // </div> for class="articleFeedbackv5-activity-feedback-permalink" |
| 105 | + $html .= Html::closeElement( 'div' ); |
| 106 | + |
| 107 | + // </div> for class="articleFeedbackv5-activity-feedback" |
| 108 | + $html .= Html::closeElement( 'div' ); |
| 109 | + |
| 110 | + //<div class="articleFeedbackv5-activity-count">$n actions on this post</div> |
| 111 | + $html .= Html::element( 'div', array('class' => 'articleFeedbackv5-activity-count'), |
| 112 | + wfMessage( 'articlefeedbackv5-activity-count', |
| 113 | + array( $feedback->af_activity_count ))->text() ); |
| 114 | + |
| 115 | + // </div> for class="articleFeedbackv5-activity-pane" |
| 116 | + $html .= Html::closeElement( 'div' ); |
| 117 | + |
| 118 | + //<div class="articleFeedbackv5-activity-log-items"> |
| 119 | + $html .= Html::openElement( 'div', array( |
| 120 | + 'class' => 'articleFeedbackv5-activity-log-items' |
| 121 | + ) ); |
| 122 | + } |
74 | 123 | |
75 | | - // <div class="articleFeedbackv5-activity-feedback"> |
76 | | - $html .= Html::openElement( 'div', array( |
77 | | - 'class' => 'articleFeedbackv5-activity-feedback' |
78 | | - ) ); |
79 | | - |
80 | | - // <div>Feedback Post #{$feedbackid} by {$user_link}</div> |
81 | | - $html .= Html::openElement( 'div', array() ); |
82 | | - $html .= wfMessage( 'articlefeedbackv5-activity-feedback-info', |
83 | | - array($feedback->af_id))->text() |
84 | | - . $this->getUserLink($feedback->af_user_id, $feedback->af_user_ip); |
85 | | - $html .= Html::closeElement( 'div' ); |
86 | | - |
87 | | - //<div>Posted on {$date} (UTC)</div> |
88 | | - $html .= Html::element( 'div', array(), |
89 | | - wfMessage( 'articlefeedbackv5-activity-feedback-date', |
90 | | - array( $wgLang->timeanddate( $feedback->af_created ) ))->text() ); |
91 | | - |
92 | | - // <div class="articleFeedbackv5-activity-feedback-permalink"> |
93 | | - $html .= Html::openElement( 'div', array( |
94 | | - 'class' => 'articleFeedbackv5-activity-feedback-permalink' |
95 | | - ) ); |
96 | | - |
97 | | - // <a href="{$permalink}">permalink</a> |
98 | | - $html .= Linker::link( |
99 | | - SpecialPage::getTitleFor( 'ArticleFeedbackv5', $title . '/'. $feedback->af_id ), |
100 | | - wfMessage( 'articlefeedbackv5-activity-permalink' )->text()); |
101 | | - |
102 | | - // </div> for class="articleFeedbackv5-activity-feedback-permalink" |
103 | | - $html .= Html::closeElement( 'div' ); |
104 | | - |
105 | | - // </div> for class="articleFeedbackv5-activity-feedback" |
106 | | - $html .= Html::closeElement( 'div' ); |
107 | | - |
108 | | - //<div class="articleFeedbackv5-activity-count">$n actions on this post</div> |
109 | | - $html .= Html::element( 'div', array('class' => 'articleFeedbackv5-activity-count'), |
110 | | - wfMessage( 'articlefeedbackv5-activity-count', |
111 | | - array( $feedback->af_activity_count ))->text() ); |
112 | | - |
113 | | - // </div> for class="articleFeedbackv5-activity-pane" |
114 | | - $html .= Html::closeElement( 'div' ); |
115 | | - |
116 | | - //<div class="articleFeedbackv5-activity-log-items"> |
117 | | - $html .= Html::openElement( 'div', array( |
118 | | - 'class' => 'articleFeedbackv5-activity-log-items' |
119 | | - ) ); |
120 | | - |
121 | 124 | // divs of activity items |
122 | 125 | foreach($activities as $item) { |
123 | 126 | |
— | — | @@ -156,10 +159,12 @@ |
157 | 160 | // figure out if we have more based on our new continue value |
158 | 161 | $more = $this->fetchHasMore($title, $feedbackId, $continue); |
159 | 162 | |
160 | | - //optional <div class="articleFeedbackv5-activity-more">Show more Activity</div> |
| 163 | + //optional <a href="#" class="articleFeedbackv5-activity-more">Show more Activity</a> |
161 | 164 | if ($more) { |
162 | | - $html .= Html::element( 'div', array('class' => 'articleFeedbackv5-activity-more'), |
163 | | - wfMessage( 'articlefeedbackv5-activity-more', array())->text() ); |
| 165 | + $html .= Html::element( 'a', array( |
| 166 | + 'class' => "articleFeedbackv5-activity-more", |
| 167 | + 'href' => '#', |
| 168 | + ), wfMessage( "articlefeedbackv5-activity-more" )->text() ); |
164 | 169 | } |
165 | 170 | |
166 | 171 | // </div> for class="acticleFeedbackv5-activity-log-items" |