function getInstancesQueryComps($params, $logic, $order) { $res = parent::getInstancesQueryComps($params, $logic, $order); $res['from'] = '(' . $res['from'] . ') LEFT OUTER JOIN family family ON family_note.familyid = family.id'; $res['select'][] = 'family.family_name as family_name'; return $res; }
function getInstancesQueryComps($params, $logic, $order) { $res = parent::getInstancesQueryComps($params, $logic, $order); $res['from'] = '(' . $res['from'] . ') LEFT OUTER JOIN person person ON person_note.personid = person.id'; $res['select'][] = 'person.first_name as person_fn'; $res['select'][] = 'person.last_name as person_ln'; return $res; }
function processView() { $this->_notes = $this->_getNotesToShow(array_get($_REQUEST, 'assignee')); $this->_reassigning = $GLOBALS['user_system']->havePerm(PERM_BULKNOTE) && !empty($_REQUEST['reassigning']); if ($this->_reassigning && !empty($_POST['reassignments_submitted'])) { $dummy_note = new Abstract_Note(); foreach ($this->_notes as $id => $note) { $dummy_note->populate($id, $note); $dummy_note->setValue('assignee', $_POST['note_' . $id . '_assignee']); $dummy_note->save(); $dummy_note->releaseLock(); } add_message(_("Assignments Saved")); $this->_reassigning = FALSE; // these will have changed $this->_notes = $this->_getNotesToShow(); } }
function processForm($prefix) { parent::processForm($prefix); if ($this->values['subject']) { $this->processFieldInterface('action_date_type', $prefix); $this->processFieldInterface('action_date_offset', $prefix); $this->processFieldInterface('action_date_operator', $prefix); } }
function printForm($prefix = '', $fields = NULL) { Note_Template::printTemplateChooserRow($this->_template ? $this->_template->id : NULL); parent::printForm($prefix, $fields); }
<?php /* @var $assigning Whether we are assigning notes using this view */ if ($reassigning) { require_once 'db_objects/abstract_note.class.php'; $fake_note = new Abstract_Note(); $fake_note->fields['assignee']['class'] = 'autofocus'; ?> <form method="post"> <?php } ?> <table class="table table-condensed table-striped table-hover valign-middle"> <thead> <tr> <th>ID</th> <th>For</th> <th>Subject</th> <th>Assignee</th> <th>Action Date</th> <th> </th> </tr> </thead> <tbody> <?php foreach ($notes as $id => $note) { if (!empty($note['familyid'])) { $type = 'family'; $icon = 'home'; $notee_name = $note['family_name'] . ' Family'; $view_url = '?view=families&familyid=' . $note['familyid'] . '#note_' . $id;