From 23a1d42c8c401558a1ee16843d0c01947a31c01c Mon Sep 17 00:00:00 2001 From: Artem Vasilev Date: Sun, 3 Mar 2024 23:21:53 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BA=D0=BB=D0=B8=D0=B5=D0=BD=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../language/ru-RU/ru-RU.com_oauthserver.ini | 4 +- .../src/Controller/ClientsController.php | 34 ++++++++++++++ .../src/View/Clients/HtmlView.php | 8 ++-- .../administrator/tmpl/clients/default.php | 45 ++++++++++++------- 4 files changed, 72 insertions(+), 19 deletions(-) create mode 100644 com_oauthserver/administrator/src/Controller/ClientsController.php diff --git a/com_oauthserver/administrator/language/ru-RU/ru-RU.com_oauthserver.ini b/com_oauthserver/administrator/language/ru-RU/ru-RU.com_oauthserver.ini index 3fa3704..8f93213 100644 --- a/com_oauthserver/administrator/language/ru-RU/ru-RU.com_oauthserver.ini +++ b/com_oauthserver/administrator/language/ru-RU/ru-RU.com_oauthserver.ini @@ -21,4 +21,6 @@ COM_OAUTHSERVER_CLIENTS_HEADING_IDENTIFIER = "ID клиента" COM_OAUTHSERVER_CLIENTS_HEADING_SECRET = "Ключ" COM_OAUTHSERVER_CLIENTS_HEADING_PUBLIC = "Публичный" -COM_OAUTHSERVER_SAVE_AND_RESET = "Сохранить и сбросить" \ No newline at end of file +COM_OAUTHSERVER_SAVE_AND_RESET = "Сохранить и сбросить" + +COM_OAUTHSERVER_CLIENTS = "Клиенты" \ No newline at end of file diff --git a/com_oauthserver/administrator/src/Controller/ClientsController.php b/com_oauthserver/administrator/src/Controller/ClientsController.php new file mode 100644 index 0000000..503d1aa --- /dev/null +++ b/com_oauthserver/administrator/src/Controller/ClientsController.php @@ -0,0 +1,34 @@ + true)): BaseDatabaseModel + { + return parent::getModel($name, $prefix, $config); + } + +} \ No newline at end of file diff --git a/com_oauthserver/administrator/src/View/Clients/HtmlView.php b/com_oauthserver/administrator/src/View/Clients/HtmlView.php index 0914812..dab70c3 100644 --- a/com_oauthserver/administrator/src/View/Clients/HtmlView.php +++ b/com_oauthserver/administrator/src/View/Clients/HtmlView.php @@ -129,9 +129,11 @@ class HtmlView extends \Joomla\CMS\MVC\View\HtmlView $toolbar->addNew('client.add'); } - // Add actions dropdown - if (!$this->isEmptyState) { - // TODO: Что мы тут в дропдаун пихаем? + if ($canDo->get('core.delete')) { + $toolbar->delete('clients.delete') + ->text('JTOOLBAR_DELETE') + ->message('JGLOBAL_CONFIRM_DELETE') + ->listCheck(true); } // Add preferences button diff --git a/com_oauthserver/administrator/tmpl/clients/default.php b/com_oauthserver/administrator/tmpl/clients/default.php index 19cc05d..9074ee3 100644 --- a/com_oauthserver/administrator/tmpl/clients/default.php +++ b/com_oauthserver/administrator/tmpl/clients/default.php @@ -49,16 +49,16 @@ $listDirn = $this->escape($this->state->get('list.direction')); - + - + - + - + @@ -74,22 +74,37 @@ $listDirn = $this->escape($this->state->get('list.direction')); $canCheckin = $user->authorise('core.manage', 'com_checkin') || $item->checked_out == $userId || is_null($item->checked_out); $canChange = $user->authorise('core.edit.state', 'com_oauthserver.clients') && $canCheckin; ?> - + id, false, 'cid', 'cb', $item->name); ?> - - name; ?> + +
+ checked_out) : ?> + editor, $item->checked_out_time, 'clients.', $canCheckin); ?> + + + + escape($item->name); ?> + + escape($item->name); ?> + +
+ + + + identifier; ?> + - - identifier; ?> + + + secret) ? substr($item->secret, 0, 29) . '...' : ''; ?> + - - secret; ?> + + public ? 'JYES' : 'JNO'); ?> - - public ? 'JYES' : 'JNO'); ?> - - + id; ?>