Conditions | 1 |
Paths | 1 |
Total Lines | 19 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
26 | public function getRecordSummary() |
||
27 | { |
||
28 | /** @var DBField $owner */ |
||
29 | $owner = $this->getOwner(); |
||
30 | $html = '<div class="record-summary">'; |
||
31 | $html .= '<div class="record-summary-id">' . $owner->ID . '</div>'; |
||
32 | $html .= '<div class="record-summary-dropdown">'; |
||
33 | //created |
||
34 | $created = $owner->obj('Created'); |
||
35 | $html .= '<div class="record-summary-more">Created: ' . $created->Ago() . '</div>'; |
||
36 | //last edited |
||
37 | $lastEdited = $owner->obj('LastEdited'); |
||
38 | $html .= '<div class="record-summary-more">Last Edited: ' . $lastEdited->Ago() . '</div>'; |
||
39 | // close |
||
40 | $html .= '</div>'; |
||
41 | $html .= '</div>'; |
||
42 | // prepare for output |
||
43 | $html = DBField::create_field('HTMLText', $html); |
||
44 | return $html; |
||
45 | } |
||
47 |