2012-06-14 00:00:24 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorUINotificationExample extends PhabricatorUIExample {
|
|
|
|
|
|
|
|
public function getName() {
|
|
|
|
return 'Notifications';
|
|
|
|
}
|
|
|
|
|
|
|
|
public function getDescription() {
|
2013-02-08 21:07:44 +01:00
|
|
|
return hsprintf('Use <tt>JX.Notification</tt> to create notifications.');
|
2012-06-14 00:00:24 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function renderExample() {
|
|
|
|
|
|
|
|
require_celerity_resource('phabricator-notification-css');
|
|
|
|
Javelin::initBehavior('phabricator-notification-example');
|
|
|
|
|
2013-01-25 21:57:17 +01:00
|
|
|
$content = javelin_tag(
|
2012-06-14 00:00:24 +02:00
|
|
|
'a',
|
|
|
|
array(
|
|
|
|
'sigil' => 'notification-example',
|
|
|
|
'class' => 'button green',
|
|
|
|
),
|
|
|
|
'Show Notification');
|
|
|
|
|
2013-02-13 23:50:15 +01:00
|
|
|
$content = hsprintf('<div style="padding: 1em 3em;">%s</div>', $content);
|
2012-06-14 00:00:24 +02:00
|
|
|
|
|
|
|
return $content;
|
|
|
|
}
|
|
|
|
}
|