8 $this->origRecords = array();
9 foreach ( array_keys($this->records) as $key){
10 $r = $this->records[$key];
11 if ( is_a($this->records[$key],
'Dataface_RelatedRecord') ){
12 $this->records[$key] = $this->records[$key]->toRecord();
14 $this->origRecords[$this->records[$key]->getId()] = $r;
22 df_display(array(
'records'=>&$this->records,
'list'=>&$this),
'Dataface_GlanceList.html');
23 $out = ob_get_contents();
29 $del =& $record->_table->getDelegate();
30 $origRecord = $this->origRecords[$record->getId()];
31 if ( !$origRecord ) $origRecord = $record;
33 if ( is_a($origRecord,
'Dataface_RelatedRecord') ){
34 $origDel = $origRecord->_record->table()->getDelegate();
36 if ( isset($origDel) and method_exists($origDel, $method) ){
37 return $del->$method($origRecord);
40 if ( isset($del) and method_exists($del,
'oneLineDescription') ){
41 return $del->oneLineDescription($record);
45 $adel =&
$app->getDelegate();
46 if ( isset($adel) and method_exists($adel,
'oneLineDescription') ){
47 return $adel->oneLineDescription($record);
49 $out =
'<span class="Dataface_GlanceList-oneLineDescription">
50 <span class="Dataface_GlanceList-oneLineDescription-title"><a href="'.htmlspecialchars($record->getURL(
'-action=view')).
'" title="View this record">'.htmlspecialchars($origRecord->getTitle()).
'</a></span> ';
51 if ( $creator = $record->getCreator() ){
53 if ( isset(
$app->prefs[
'hide_posted_by']) and
$app->prefs[
'hide_posted_by'] ) $show =
false;
54 if ( isset($record->_table->_atts[
'__prefs__'][
'hide_posted_by']) and $record->_table->_atts[
'__prefs__'][
'hide_posted_by'] ) $show =
false;
57 '<span class="Dataface_GlanceList-oneLineDescription-posted-by">Posted by '.htmlspecialchars($creator).
'.</span> ';
61 if ( $modified = $record->getLastModified() ){
63 if ( isset(
$app->prefs[
'hide_updated']) and
$app->prefs[
'hide_updated'] ) $show =
false;
64 if ( isset($record->_table->_atts[
'__prefs__'][
'hide_updated']) and $record->_table->_atts[
'__prefs__'][
'hide_updated'] ) $show =
false;
66 $out .=
'<span class="Dataface_GlanceList-oneLineDescription-updated">Updated '.htmlspecialchars(df_offset(date(
'Y-m-d H:i:s', $modified))).
'</span>';