1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <?php
- if (!defined('GNUSOCIAL')) { exit(1); }
- class Attachment extends AttachmentListItem
- {
- function showNoticeAttachment() {
- if (Event::handle('StartShowAttachmentLink', array($this->out, $this->attachment))) {
- $this->out->elementStart('div', array('id' => 'attachment_view',
- 'class' => 'h-entry'));
- $this->out->elementStart('div', 'entry-title');
- $this->out->element('a', $this->linkAttr(), _('Download link'));
- $this->out->elementEnd('div');
- $this->out->elementStart('article', 'e-content');
- $this->showRepresentation();
- $this->out->elementEnd('article');
- Event::handle('EndShowAttachmentLink', array($this->out, $this->attachment));
- $this->out->elementEnd('div');
- }
- }
- function show() {
- $this->showNoticeAttachment();
- }
- function linkAttr() {
- return array('rel' => 'external', 'href' => $this->attachment->getAttachmentDownloadUrl());
- }
- }
|