diff --git a/com_oauthserver/administrator/forms/client.xml b/com_oauthserver/administrator/forms/client.xml index f904869..f8688c6 100644 --- a/com_oauthserver/administrator/forms/client.xml +++ b/com_oauthserver/administrator/forms/client.xml @@ -4,20 +4,48 @@
- - + + + + + + + + + + - + + label="COM_OAUTHSERVER_CLIENT_SECRET_LABEL" + description="COM_OAUTHSERVER_CLIENT_SECRET_DESCRIPTION"/>
\ No newline at end of file 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 e69de29..c541565 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 @@ -0,0 +1,4 @@ +COM_OAUTHSERVER_CLIENTS_HEADING_NAME = "Клиент" +COM_OAUTHSERVER_CLIENTS_HEADING_IDENTIFIER = "ID клиента" +COM_OAUTHSERVER_CLIENTS_HEADING_SECRET = "Ключ" +COM_OAUTHSERVER_CLIENTS_HEADING_PUBLIC = "Публичный" \ No newline at end of file diff --git a/com_oauthserver/administrator/src/Model/ClientsModel.php b/com_oauthserver/administrator/src/Model/ClientsModel.php index b857a80..d78cfa3 100644 --- a/com_oauthserver/administrator/src/Model/ClientsModel.php +++ b/com_oauthserver/administrator/src/Model/ClientsModel.php @@ -96,7 +96,7 @@ class ClientsModel extends ListModel $query = $db->getQuery(true); - $query->select(['client.id', 'client.client_name', 'client.client_token', 'client.client_id',]) + $query->select(['client.id', 'client.name', 'client.secret', 'client.identifier', 'client.public', 'client.redirect_uri', 'client.allow_plain_text_pkce']) ->from($db->qn('#__webmasterskaya_oauthserver_clients', 'client')); // Filter by search state diff --git a/com_oauthserver/administrator/src/View/Clients/HtmlView.php b/com_oauthserver/administrator/src/View/Clients/HtmlView.php index 6bd8052..0914812 100644 --- a/com_oauthserver/administrator/src/View/Clients/HtmlView.php +++ b/com_oauthserver/administrator/src/View/Clients/HtmlView.php @@ -9,6 +9,7 @@ use Joomla\CMS\Language\Text; use Joomla\CMS\MVC\View\GenericDataException; use Joomla\CMS\Object\CMSObject; use Joomla\CMS\Pagination\Pagination; +use Joomla\CMS\Toolbar\Toolbar; use Joomla\CMS\Toolbar\ToolbarFactoryInterface; use Joomla\CMS\Toolbar\ToolbarHelper; @@ -117,7 +118,7 @@ class HtmlView extends \Joomla\CMS\MVC\View\HtmlView $canDo = ContentHelper::getActions('com_oauthserver', 'clients'); $user = $this->getCurrentUser(); - $toolbar = Factory::getContainer()->get(ToolbarFactoryInterface::class)->createToolbar('toolbar'); + $toolbar = Toolbar::getInstance('toolbar'); // Set page title ToolbarHelper::title(Text::_('COM_OAUTHSERVER') . ': ' . Text::_('COM_OAUTHSERVER_CLIENTS')); diff --git a/com_oauthserver/administrator/tmpl/clients/default.php b/com_oauthserver/administrator/tmpl/clients/default.php index a4abe2d..19cc05d 100644 --- a/com_oauthserver/administrator/tmpl/clients/default.php +++ b/com_oauthserver/administrator/tmpl/clients/default.php @@ -1,2 +1,107 @@ document->getWebAssetManager(); +$wa->useScript('table.columns') + ->useScript('multiselect'); +$user = Factory::getApplication()->getIdentity(); +$userId = $user->get('id'); +$listOrder = $this->escape($this->state->get('list.ordering')); +$listDirn = $this->escape($this->state->get('list.direction')); +?> + +
+ +
+
+
+ $this]); + ?> + items)) : ?> +
+ + +
+ + + + + + + + + + + + + + + items as $i => $item) : ?> + + authorise('core.create', 'com_oauthserver.clients'); + $canEdit = $user->authorise('core.edit', 'com_oauthserver.clients'); + $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; ?> + + identifier; ?> + + secret; ?> + + public ? 'JYES' : 'JNO'); ?> + + id; ?> +
+ +
+
+
+ + + + +
\ No newline at end of file