Ejemplo n.º 1
0
 function render()
 {
     return h()->div->class('item')->div->class('header')->a->href('forms/' . $this->data->id)->c($this->data->name)->end->div->class('ui horizontal right floated label')->c($this->data->count)->c(UTF8::chr(0x2004) . 'submissions')->end->end->c(count($this->data->views) === 0 ? null : h()->div->class('ui horizontal list low-line-height')->div->class('item header')->c('Views: ')->end->c(array_map(function ($view) {
         return new ViewInfoView($view, $this->data);
     }, $this->data->views))->end)->end;
 }
Ejemplo n.º 2
0
 function makeTableViewPart($v)
 {
     if ($v === null) {
         return null;
     }
     # Format the phone number with pretty unicode spaces
     # before displaying it in a table
     if (preg_match('/^[0-9]{10}$/', $v)) {
         $showValue = '(' . UTF8::substr($v, 0, 3) . ')' . UTF8::chr(0x2006) . UTF8::substr($v, 3, 3) . UTF8::chr(0x2006) . UTF8::substr($v, 6, 4);
     } else {
         $showValue = $v;
     }
     return new LinkTableCell('tel:' . $v, $showValue);
 }