/** * @see DatabaseObjectList::readObjects() */ public function readObjects() { parent::readObjects(); // group by container id $groupedAttachments = array(); foreach ($this->attachments as $attachment) { if (!isset($groupedAttachments[$attachment->containerID])) { $groupedAttachments[$attachment->containerID] = array(); } $groupedAttachments[$attachment->containerID][$attachment->attachmentID] = $attachment; } $this->attachments = $groupedAttachments; }
function showListStart() { $this->out->element('h3', 'attachments-title', _('Attachments')); parent::showListStart(); }
function showNoticeAttachments() { $al = new AttachmentList($this->notice, $this->out); $al->show(); }
<option value="' . "{$i}\" " . ($login_percentage == $i ? ' selected="selected"' : '') . ' >' . $i . '</option>'; } echo ' </select> <input type="submit" value="' . translate('Update') . '" /> </form> </td> <tr>'; } } if (Doc::attachmentsEnabled() && $rss_view == false) { echo ' <tr> <td class="aligntop bold">' . translate('Attachments') . ':</td> <td>'; $attList = new AttachmentList($id); for ($i = 0; $i < $attList->getSize(); $i++) { $a = $attList->getDoc($i); echo ' ' . $a->getSummary() . ($is_admin || $login == $a->getLogin() || user_is_assistant($login, $a->getLogin()) || $login == $create_by || user_is_assistant($login, $create_by) ? ' [<a href="docdel.php?blid=' . $a->getId() . '" onclick="return confirm( \'' . $areYouSureStr . '\' );">' . translate('Delete') . '</a>]' : '') . '<br />'; } $num_app = $num_rej = $num_wait = 0; $num_attach = $attList->getSize(); echo ($num_attach == 0 ? ' ' . translate('None') . '<br />' : '') . ' </td> </tr>'; } if (Doc::commentsEnabled()) { echo ' <tr>
/** * @see Page::readData() */ public function readData() { parent::readData(); $attachmentList = new AttachmentList(); // get available container types $this->availableContainerTypes = $attachmentList->getAvailableContainerTypes(); // get available file types $this->availableFileTypes = $attachmentList->getAvailableFileTypes(); }