2015-10-28 07:23:38 +00:00
|
|
|
<?php
|
|
|
|
class EchoThanksPresentationModel extends EchoEventPresentationModel {
|
|
|
|
public function canRender() {
|
|
|
|
return (bool)$this->event->getTitle();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getIconType() {
|
|
|
|
return 'thanks';
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getHeaderMessage() {
|
|
|
|
$msg = parent::getHeaderMessage();
|
|
|
|
$msg->params( $this->event->getTitle()->getPrefixedText() );
|
|
|
|
|
2015-11-13 00:03:55 +00:00
|
|
|
$msg->params( $this->getViewingUserForGender() );
|
2015-10-28 07:23:38 +00:00
|
|
|
return $msg;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getPrimaryLink() {
|
|
|
|
return array(
|
|
|
|
$this->event->getTitle()->getLocalURL( array(
|
|
|
|
'oldid' => 'prev',
|
|
|
|
'diff' => $this->event->getExtraParam( 'revid' )
|
|
|
|
) ),
|
2015-11-12 21:56:43 +00:00
|
|
|
$this->msg( 'notification-link-text-view-edit' )->text()
|
2015-10-28 07:23:38 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getSecondaryLinks() {
|
|
|
|
$agent = $this->event->getAgent();
|
|
|
|
if ( !$agent || !$this->userCan( Revision::DELETED_USER ) ) {
|
|
|
|
return array();
|
|
|
|
}
|
|
|
|
|
|
|
|
return array(
|
2015-12-15 01:27:45 +00:00
|
|
|
array(
|
|
|
|
'url' => $agent->getUserPage()->getLocalURL(),
|
|
|
|
'label' => $agent->getName(),
|
|
|
|
'icon' => 'userAvatar',
|
|
|
|
'prioritized' => true,
|
|
|
|
)
|
2015-10-28 07:23:38 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|