This commit is contained in:
Fred Tempez 2020-10-04 17:14:15 +02:00
parent a5327a959c
commit 3d140e1a36
5 changed files with 51 additions and 5 deletions

View File

@ -17,11 +17,12 @@ class user extends common {
public static $actions = [
'add' => self::GROUP_ADMIN,
'delete' => self::GROUP_ADMIN,
'edit' => self::GROUP_MEMBER,
'forgot' => self::GROUP_VISITOR,
'import' => self::GROUP_ADMIN,
'index' => self::GROUP_ADMIN,
'login' => self::GROUP_VISITOR,
'edit' => self::GROUP_MEMBER,
'logout' => self::GROUP_MEMBER,
'forgot' => self::GROUP_VISITOR,
'login' => self::GROUP_VISITOR,
'reset' => self::GROUP_VISITOR
];
@ -536,4 +537,16 @@ class user extends common {
]);
}
}
/**
* Importation CSV d'utilisateurs
*/
public function import() {
// Valeurs en sortie
$this->addOutput([
'title' => 'Importation d\'utilisateurs',
'view' => 'import'
]);
}
}

View File

@ -5,7 +5,6 @@
<div class="row">
<div class="col3 offset6">
<?php echo template::button('userForgotBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'user/login/' . $this->getUrl(2),
'ico' => 'left',
'value' => 'Retour'

16
core/module/user/view/import/import.css vendored Normal file
View File

@ -0,0 +1,16 @@
/**
* This file is part of Zwii.
*
* For full copyright and license information, please see the LICENSE
* file that was distributed with this source code.
*
* @author Rémi Jean <remi.jean@outlook.com>
* @copyright Copyright (C) 2008-2018, Rémi Jean
* @author Frédéric Tempez <frederic.tempez@outlook.com>
* @copyright Copyright (C) 2018-2020, Frédéric Tempez
* @license GNU General Public License, version 3
* @link http://zwiicms.fr/
*/
@import url("site/data/admin.css");

View File

@ -0,0 +1,12 @@
<?php echo template::formOpen('userImportForm'); ?>
<div class="row">
<div class="col2">
<?php echo template::button('userImportBack', [
'class' => 'buttonGrey',
'href' => helper::baseUrl() . 'user',
'ico' => 'left',
'value' => 'Retour'
]); ?>
</div>
</div>
<?php echo template::formClose(); ?>

View File

@ -7,7 +7,13 @@
'value' => 'Accueil'
]); ?>
</div>
<div class="col2 offset8">
<div class="col2 offset6">
<?php echo template::button('userImport', [
'href' => helper::baseUrl() . 'user/import',
'value' => 'Importation CSV'
]); ?>
</div>
<div class="col2">
<?php echo template::button('userAdd', [
'href' => helper::baseUrl() . 'user/add',
'ico' => 'plus',