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:08:57 +01:00
|
|
|
$content = '<div style="padding: 1em 3em;">'.$content.'</content>';
|
2012-06-14 00:00:24 +02:00
|
|
|
|
|
|
|
return $content;
|
|
|
|
}
|
|
|
|
}
|