Skip to content
Snippets Groups Projects
Commit 886444ed authored by Ghislain Loas's avatar Ghislain Loas
Browse files

dev #63069 fix rt comments

parent 39721d2f
Branches
Tags
3 merge requests!2334Master,!2323Dev#63069 batch moissonner un calendrier externe,!2307Dev#63069 batch moissonner un calendrier externe
Pipeline #2330 passed with stage
in 21 minutes and 14 seconds
......@@ -23,7 +23,7 @@
class Admin_ExternalAgendasController extends ZendAfi_Controller_Action {
public function getPlugins() {
return ['ZendAfi_Controller_Plugin_ResourceDefinition_ExternalAgenda',
'ZendAfi_Controller_Plugin_Manager_Manager'];
'ZendAfi_Controller_Plugin_Manager_ExternalAgenda'];
}
......
......@@ -34,25 +34,6 @@ $category = function($model, $attribs) {
Class_ArticleCategorie::find($cat_id)->getLibelle());
};
$actions = function($model) {
$map = [['url' => '/admin/external-agendas/import/id/%s',
'icon' => 'test',
'label' => $this->_('Moissonner')
],
['url' => '/admin/external-agendas/edit/id/%s',
'icon' => 'edit',
'label' => $this->_('Modifier'),
'anchorOptions' => ['data-popup' => 'true']],
['url' => '/admin/external-agendas/delete/id/%s',
'label' => $this->_('Supprimer'),
'icon' => 'delete'],
'anchorOptions' => ['data-popup' => 'true']];
return $this->renderModelActions($model, $map);
};
$description = (new Class_TableDescription('agendas'))
->addColumn($this->_('Libellé'), 'label')
->addColumn($this->_('Nombre d\'événements'), $number_of_events)
......@@ -62,6 +43,6 @@ $description = (new Class_TableDescription('agendas'))
{
return $model->autoharvest ? $this->_('Oui') : $this->_('Non');
})
->addRowAction($actions);
->addRowAction(function($model) { return $this->renderPluginsActions($model); });
echo $this->renderTable($description, $this->agendas, ['sorter' => true]);
<?php
/**
* Copyright (c) 2012-2017, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* BOKEH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class ZendAfi_Controller_Plugin_Manager_ExternalAgenda extends ZendAfi_Controller_Plugin_Manager_Manager {
public function getActions($model) {
return [
['url' => '/admin/external-agendas/import/id/%s',
'icon' => 'test',
'label' => $this->_('Moissonner')
],
['url' => '/admin/external-agendas/edit/id/%s',
'icon' => 'edit',
'label' => $this->_('Modifier'),
'anchorOptions' => ['data-popup' => 'true']],
['url' => '/admin/external-agendas/delete/id/%s',
'label' => $this->_('Supprimer'),
'icon' => 'delete',
'anchorOptions' => ['data-popup' => 'true']]
];
}
}
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment