diff options
author | Jeffery To <jeffery.to@gmail.com> | 2009-06-24 01:18:35 +0800 |
---|---|---|
committer | Jeffery To <jeffery.to@gmail.com> | 2009-06-24 01:18:35 +0800 |
commit | 65f784120b45dc187e28313fa2c2dca2c976c150 (patch) | |
tree | cf1cb3e34483466d4f4a312c528579292e7603fc /actions/shownotice.php | |
parent | f7d488d4b2bfdc8dfa6b5a2bc2931dbf824509a0 (diff) | |
parent | eb40fbc17ad1efb0a4c51ee00b1e9408d2af382f (diff) |
Merge branch '0.8.x' into notice-search-no-results
Diffstat (limited to 'actions/shownotice.php')
-rw-r--r-- | actions/shownotice.php | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/actions/shownotice.php b/actions/shownotice.php index b0d973a99..0d89af5ac 100644 --- a/actions/shownotice.php +++ b/actions/shownotice.php @@ -209,7 +209,7 @@ class ShownoticeAction extends Action function showContent() { $this->elementStart('ol', array('class' => 'notices xoxo')); - $nli = new NoticeListItem($this->notice, $this); + $nli = new SingleNoticeItem($this->notice, $this); $nli->show(); $this->elementEnd('ol'); } @@ -264,3 +264,29 @@ class ShownoticeAction extends Action } } } + +class SingleNoticeItem extends NoticeListItem +{ + /** + * recipe function for displaying a single notice. + * + * We overload to show attachments. + * + * @return void + */ + + function show() + { + $this->showStart(); + $this->showNotice(); + $this->showNoticeAttachments(); + $this->showNoticeInfo(); + $this->showNoticeOptions(); + $this->showEnd(); + } + + function showNoticeAttachments() { + $al = new AttachmentList($this->notice, $this->out); + $al->show(); + } +} |