3 class ShownoticeAction extends Action {
5 function handle($args) {
7 $id = $this->arg('notice');
8 $notice = Notice::staticGet($id);
11 $this->no_such_notice();
14 if (!$notice->getProfile()) {
15 $this->no_such_notice();
18 # Looks like we're good; show the header
20 common_show_header($profile->nickname);
22 $this->show_notice($notice);
27 function no_such_notice() {
28 common_user_error('No such notice.');
31 function show_notice($notice) {
32 $profile = $notice->getProfile();
34 common_start_element('div', array('class' => 'notice'));
35 # FIXME: add the avatar
36 common_start_element('a', array('href' => $profile->profileurl,
37 'class' => 'nickname'),
39 # FIXME: URL, image, video, audio
40 common_element('span', array('class' => 'content'), $notice->content);
41 common_element('span', array('class' => 'date'),
42 common_date_string($notice->created));
43 common_end_element('div');