Exemplo n.º 1
0
 public function html_display($result)
 {
     $result = parent::html_display($result);
     if (Value::get(get_class($this) . '_commented', true) && Component::isActive('Comment')) {
         if ($result instanceof DBObject) {
             $comments = Comment::getComments($result->getMeta('table'), $result->getMeta('id'));
             Backend::addContent(Render::renderFile('comments.tpl.php', array('comment_list' => $comments)));
             if (Permission::check('create', 'comment')) {
                 $values = array('foreign_table' => $result->getMeta('table'), 'foreign_id' => $result->getMeta('id'));
                 Backend::addContent(Render::renderFile('comment.add.tpl.php', $values));
             }
         }
     }
     return $result;
 }
Exemplo n.º 2
0
 public function html_display($result)
 {
     if (!$result instanceof DBObject) {
         return parent::html_display($result);
     }
     Backend::add('Sub Title', $result->array['name']);
     $foreign_template = 'tag.' . class_for_url($result->array['foreign_table']);
     $foreign_template .= '.list.tpl.php';
     if (!Render::checkTemplateFile($foreign_template)) {
         $foreign_template = 'tag.display.list.tpl.php';
     }
     Backend::add('tag_list_template', $foreign_template);
     return parent::html_display($result);
 }
Exemplo n.º 3
0
 public function html_display($result)
 {
     parent::html_display($result);
     if ($result instanceof DBObject) {
         if ($_SESSION['BackendUser']->id == $result->array['id']) {
             Backend::add('Sub Title', 'My Account');
             Backend::addContent(Render::file('loginout.tpl.php'));
         } else {
             Backend::add('Sub Title', 'User: '******'username']);
         }
     }
 }