public function getActionLinks() { $links = parent::getActionLinks(); if ($this->checkPermission(ACL::UPDATE)) { $links['todoaction'] = array('href' => '?q=todo.rpc&action=toggle&id=' . $this->id . '&destination=CURRENT', 'title' => $this->closed ? t('Реактивировать') : t('Выполнено'), 'icon' => 'todoaction'); } return $links; }
public function getActionLinks() { $links = parent::getActionLinks(); $user = Context::last()->user; if ($user->id != $this->id and $this->published and $user->hasAccess(ACL::UPDATE, 'user')) { $links['su'] = array('href' => 'auth/su.rpc?id=' . $this->id . '&destination=CURRENT', 'title' => 'Переключиться в пользователя', 'icon' => 'sudo'); } if ($count = $this->getDB()->fetch("SELECT COUNT(*) FROM node WHERE deleted = 0 AND class IN (SELECT name FROM node WHERE class = 'type' AND deleted = 0 AND published = 1) AND id IN (SELECT tid FROM node__rel WHERE nid = ? AND `key` = 'uid')", array($this->id))) { $links['search'] = array('href' => 'admin/content/list?search=uid%3A' . $this->id, 'title' => t('Найти документы пользователя'), 'icon' => 'search'); } return $links; }
public function getActionLinks() { $links = parent::getActionLinks(); $tmp = Node::create($this->name); if (in_array($this->name, self::getInternal())) { $links['delete'] = null; } if ($tmp->canEditFields()) { $links['fields'] = array('title' => t('Настроить поля'), 'href' => 'admin/structure/fields?type=' . $this->name . '&destination=CURRENT'); } else { if (isset($links['clone'])) { unset($links['clone']); } if (isset($links['delete'])) { unset($links['delete']); } } $links['touch'] = array('title' => t('Обновить документы'), 'href' => 'admin/structure/types/refresh?type=' . $this->name . '&destination=CURRENT', 'description' => t('Пересохраняет все документы этого типа, обновляет XML.')); $links['access'] = array('title' => t('Изменить права'), 'href' => 'admin/structure/access?type=' . urlencode($this->name) . '&destination=CURRENT'); return $links; }
public function getActionLinks() { $links = parent::getActionLinks(); $links['locate'] = null; return $links; }
/** * Дополнительные действия для предварительного просмотра. */ public function getActionLinks() { return array_merge(parent::getActionLinks(), array('find' => array('title' => t('Показать документы'), 'href' => 'admin/content/list?search=tags%3A' . $this->id), 'manage' => array('title' => t('Изменить документы'), 'href' => 'admin/content/labels/manage?id=' . $this->id . '&destination=CURRENT'))); }
/** * Дополнительные действия для предварительного просмотра. */ public function getActionLinks() { return array_merge(parent::getActionLinks(), array('find' => array('title' => t('Показать документы'), 'href' => 'admin/content/list?search=tags%3A' . $this->id))); }
public function getActionLinks() { $links = parent::getActionLinks(); $links['find'] = array('href' => 'admin/access/users?search=tags%3A' . $this->id, 'title' => t('Показать пользователей')); return $links; }
public function getActionLinks() { $list = parent::getActionLinks(); $list['locate'] = array('href' => "download/{$this->id}/{$this->filename}", 'title' => t('Скачать')); if (array_key_exists('clone', $list)) { unset($list['clone']); } if ($this->checkPermission(ACL::UPDATE)) { $list['replace'] = array('icon' => 'upload', 'title' => t('Заменить файл'), 'href' => "admin/node/{$this->id}/upload?destination=CURRENT"); } return $list; }