RFM pour les membres
'fontes' au lieu de 'fonte'
This commit is contained in:
parent
6ee961f618
commit
e0fe61ccc7
@ -341,14 +341,9 @@ class layout extends common
|
|||||||
) {
|
) {
|
||||||
$items .= '<span id="footerDisplayMemberAccount"';
|
$items .= '<span id="footerDisplayMemberAccount"';
|
||||||
$items .= $this->getData(['theme', 'footer', 'displaymemberAccount']) === false ? ' class="displayNone">' : '>';
|
$items .= $this->getData(['theme', 'footer', 'displaymemberAccount']) === false ? ' class="displayNone">' : '>';
|
||||||
$items .= '<wbr> | ' .
|
$items .= '<wbr> | ';
|
||||||
template::ico('user', [
|
|
||||||
'margin' => 'all',
|
|
||||||
'help' => 'Mon compte',
|
|
||||||
'href' => helper::baseUrl() . 'user/edit/' . $this->getUser('id') . '/' . $_SESSION['csrf']
|
|
||||||
]);
|
|
||||||
if (
|
if (
|
||||||
$this->getData(['user', $this->getUser('id'), 'files']) === true
|
$this->getgroup('folder', 'share') === true
|
||||||
) {
|
) {
|
||||||
$items .= '<wbr>' . template::ico('folder', [
|
$items .= '<wbr>' . template::ico('folder', [
|
||||||
'href' => helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR . 'core.json') . '&lang=' . $this->getData(['user', $this->getUser('id'), 'language']),
|
'href' => helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR . 'core.json') . '&lang=' . $this->getData(['user', $this->getUser('id'), 'language']),
|
||||||
@ -357,6 +352,11 @@ class layout extends common
|
|||||||
'help' => 'Fichiers du site'
|
'help' => 'Fichiers du site'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
$items .= '<wbr>' . template::ico('user', [
|
||||||
|
'margin' => 'all',
|
||||||
|
'help' => 'Mon compte',
|
||||||
|
'href' => helper::baseUrl() . 'user/edit/' . $this->getUser('id') . '/' . $_SESSION['csrf']
|
||||||
|
]);
|
||||||
$items .= '<wbr>' . template::ico('logout', [
|
$items .= '<wbr>' . template::ico('logout', [
|
||||||
'margin' => 'all',
|
'margin' => 'all',
|
||||||
'help' => 'Déconnecter',
|
'help' => 'Déconnecter',
|
||||||
@ -497,7 +497,7 @@ class layout extends common
|
|||||||
&& $this->getData(['theme', 'menu', 'memberBar']) === true
|
&& $this->getData(['theme', 'menu', 'memberBar']) === true
|
||||||
) {
|
) {
|
||||||
if (
|
if (
|
||||||
$this->getData(['user', $this->getUser('id'), 'files']) === true
|
$this->getGroup('folder', 'share') === true
|
||||||
) {
|
) {
|
||||||
$itemsRight .= '<li>' . template::ico('folder', [
|
$itemsRight .= '<li>' . template::ico('folder', [
|
||||||
'href' => helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR . 'core.json') . '&lang=' . $this->getData(['user', $this->getUser('id'), 'language']),
|
'href' => helper::baseUrl(false) . 'core/vendor/filemanager/dialog.php?type=0&akey=' . md5_file(self::DATA_DIR . 'core.json') . '&lang=' . $this->getData(['user', $this->getUser('id'), 'language']),
|
||||||
|
@ -97,8 +97,8 @@ class core extends common
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// Fonts disponibles
|
// Fonts disponibles
|
||||||
$fontsAvailable['files'] = $this->getData(['fonts', 'files']);
|
$fontsAvailable['files'] = $this->getData(['font', 'files']);
|
||||||
$fontsAvailable['imported'] = $this->getData(['fonts', 'imported']);
|
$fontsAvailable['imported'] = $this->getData(['font', 'imported']);
|
||||||
$fontsAvailable['websafe'] = self::$fontsWebSafe;
|
$fontsAvailable['websafe'] = self::$fontsWebSafe;
|
||||||
|
|
||||||
// Fontes installées
|
// Fontes installées
|
||||||
@ -139,8 +139,8 @@ class core extends common
|
|||||||
$fontFile = $gf ? '<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>' . $fontFile
|
$fontFile = $gf ? '<link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>' . $fontFile
|
||||||
: $fontFile;
|
: $fontFile;
|
||||||
// Enregistre la personnalisation
|
// Enregistre la personnalisation
|
||||||
if (!is_dir(self::DATA_DIR . 'fonts')) {
|
if (!is_dir(self::DATA_DIR . 'font')) {
|
||||||
mkdir(self::DATA_DIR . 'fonts');
|
mkdir(self::DATA_DIR . 'font');
|
||||||
}
|
}
|
||||||
file_put_contents(self::DATA_DIR . 'fonts/fonts.html', $fontFile);
|
file_put_contents(self::DATA_DIR . 'fonts/fonts.html', $fontFile);
|
||||||
|
|
||||||
@ -319,8 +319,8 @@ class core extends common
|
|||||||
$css .= '#footerCopyright{text-align:' . $this->getData(['theme', 'footer', 'copyrightAlign']) . '}';
|
$css .= '#footerCopyright{text-align:' . $this->getData(['theme', 'footer', 'copyrightAlign']) . '}';
|
||||||
|
|
||||||
// Enregistre les fontes
|
// Enregistre les fontes
|
||||||
if (!is_dir(self::DATA_DIR . 'fonts')) {
|
if (!is_dir(self::DATA_DIR . 'font')) {
|
||||||
mkdir(self::DATA_DIR . 'fonts');
|
mkdir(self::DATA_DIR . 'font');
|
||||||
}
|
}
|
||||||
file_put_contents(self::DATA_DIR . 'fonts/fonts.html', $fontFile);
|
file_put_contents(self::DATA_DIR . 'fonts/fonts.html', $fontFile);
|
||||||
|
|
||||||
@ -343,8 +343,8 @@ class core extends common
|
|||||||
$css = '/*' . md5(json_encode($this->getData(['admin']))) . '*/';
|
$css = '/*' . md5(json_encode($this->getData(['admin']))) . '*/';
|
||||||
|
|
||||||
// Fonts disponibles
|
// Fonts disponibles
|
||||||
$fontsAvailable['files'] = $this->getData(['fonts', 'files']);
|
$fontsAvailable['files'] = $this->getData(['font', 'files']);
|
||||||
$fontsAvailable['imported'] = $this->getData(['fonts', 'imported']);
|
$fontsAvailable['imported'] = $this->getData(['font', 'imported']);
|
||||||
$fontsAvailable['websafe'] = self::$fontsWebSafe;
|
$fontsAvailable['websafe'] = self::$fontsWebSafe;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -911,6 +911,23 @@ class common
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Accède aux données du groupe de l'utilisateur connecté
|
||||||
|
* @param int $key Clé de la valeur
|
||||||
|
* @return string|null
|
||||||
|
*/
|
||||||
|
public function getGroup($key1, $key2 = null) {
|
||||||
|
if (is_array($this->user) === false) {
|
||||||
|
return false;
|
||||||
|
} elseif ($key2 === null && array_key_exists($key1, $this->getData(['group', $this->user['group']]))) {
|
||||||
|
return $this->getData(['group', $this->user['group'], $key1]);
|
||||||
|
} elseif ($key2 && array_key_exists($key2, $this->getData(['group', $this->user['group'], $key1]))) {
|
||||||
|
return $this->getData(['group', $this->user['group'], $key1, $key2]);
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check qu'une valeur est transmise par la méthode _POST
|
* Check qu'une valeur est transmise par la méthode _POST
|
||||||
* @return bool
|
* @return bool
|
||||||
|
@ -347,7 +347,7 @@ class init extends common
|
|||||||
],
|
],
|
||||||
'1' => [
|
'1' => [
|
||||||
'name' => 'Membre',
|
'name' => 'Membre',
|
||||||
'readonly' => true,
|
'readonly' => false,
|
||||||
'comment' => 'Accède aux pages réservées et à un dossier partagé',
|
'comment' => 'Accède aux pages réservées et à un dossier partagé',
|
||||||
'path' => '/site/file/source/partage/',
|
'path' => '/site/file/source/partage/',
|
||||||
'file' => [
|
'file' => [
|
||||||
@ -368,7 +368,9 @@ class init extends common
|
|||||||
'delete' => false,
|
'delete' => false,
|
||||||
'rename' => false,
|
'rename' => false,
|
||||||
'copycut' => false,
|
'copycut' => false,
|
||||||
'permission' => false
|
'permission' => false,
|
||||||
|
'share' => false,
|
||||||
|
'path' => '.\/site\/file\/source\/partage\/',
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'2' => [
|
'2' => [
|
||||||
@ -394,7 +396,9 @@ class init extends common
|
|||||||
'delete' => true,
|
'delete' => true,
|
||||||
'rename' => true,
|
'rename' => true,
|
||||||
'copycut' => false,
|
'copycut' => false,
|
||||||
'permission' => false
|
'permission' => false,
|
||||||
|
'share' => false,
|
||||||
|
'path' => '.\/site\/file\/source\/partage\/',
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
'99' => [
|
'99' => [
|
||||||
@ -413,7 +417,9 @@ class init extends common
|
|||||||
'duplicate' => true,
|
'duplicate' => true,
|
||||||
'extract' => true,
|
'extract' => true,
|
||||||
'copycut' => true,
|
'copycut' => true,
|
||||||
'permission' => true
|
'permission' => true,
|
||||||
|
'share' => false,
|
||||||
|
'path' => '.\/site\/file\/source\/',
|
||||||
],
|
],
|
||||||
'folder' => [
|
'folder' => [
|
||||||
'create' => true,
|
'create' => true,
|
||||||
|
@ -31,7 +31,7 @@ class theme extends common
|
|||||||
'export' => self::GROUP_ADMIN,
|
'export' => self::GROUP_ADMIN,
|
||||||
'import' => self::GROUP_ADMIN,
|
'import' => self::GROUP_ADMIN,
|
||||||
'save' => self::GROUP_ADMIN,
|
'save' => self::GROUP_ADMIN,
|
||||||
'fonts' => self::GROUP_ADMIN,
|
'font' => self::GROUP_ADMIN,
|
||||||
'fontAdd' => self::GROUP_ADMIN,
|
'fontAdd' => self::GROUP_ADMIN,
|
||||||
'fontEdit' => self::GROUP_ADMIN,
|
'fontEdit' => self::GROUP_ADMIN,
|
||||||
'fontDelete' => self::GROUP_ADMIN
|
'fontDelete' => self::GROUP_ADMIN
|
||||||
@ -645,7 +645,7 @@ class theme extends common
|
|||||||
// Valeurs en sortie
|
// Valeurs en sortie
|
||||||
$this->addOutput([
|
$this->addOutput([
|
||||||
'title' => helper::translate('Fontes'),
|
'title' => helper::translate('Fontes'),
|
||||||
'view' => 'fonts'
|
'view' => 'font'
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -669,8 +669,8 @@ class theme extends common
|
|||||||
$fontFamilyName = str_replace('"', '\'', $fontFamilyName);
|
$fontFamilyName = str_replace('"', '\'', $fontFamilyName);
|
||||||
|
|
||||||
// Supprime la fonte si elle existe dans le type inverse
|
// Supprime la fonte si elle existe dans le type inverse
|
||||||
if (is_array($this->getData(['fonts', $type, $fontId]))) {
|
if (is_array($this->getData(['font', $type, $fontId]))) {
|
||||||
$this->deleteData(['fonts', $type, $fontId]);
|
$this->deleteData(['font', $type, $fontId]);
|
||||||
}
|
}
|
||||||
// Stocker la fonte
|
// Stocker la fonte
|
||||||
$this->setData([
|
$this->setData([
|
||||||
@ -733,8 +733,8 @@ class theme extends common
|
|||||||
$fontFamilyName = str_replace('"', '\'', $fontFamilyName);
|
$fontFamilyName = str_replace('"', '\'', $fontFamilyName);
|
||||||
|
|
||||||
// Supprime la fonte si elle existe dans le type inverse
|
// Supprime la fonte si elle existe dans le type inverse
|
||||||
if (is_array($this->getData(['fonts', $type, $fontId]))) {
|
if (is_array($this->getData(['font', $type, $fontId]))) {
|
||||||
$this->deleteData(['fonts', $type, $fontId]);
|
$this->deleteData(['font', $type, $fontId]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stocker les fontes
|
// Stocker les fontes
|
||||||
|
@ -487,6 +487,7 @@ class user extends common
|
|||||||
'rename' => $this->getInput('groupEditFolderRename', helper::FILTER_BOOLEAN),
|
'rename' => $this->getInput('groupEditFolderRename', helper::FILTER_BOOLEAN),
|
||||||
'copycut' => $this->getInput('groupEditFolderCopycut', helper::FILTER_BOOLEAN),
|
'copycut' => $this->getInput('groupEditFolderCopycut', helper::FILTER_BOOLEAN),
|
||||||
'permission' => $this->getInput('groupEditFolderPermission', helper::FILTER_BOOLEAN),
|
'permission' => $this->getInput('groupEditFolderPermission', helper::FILTER_BOOLEAN),
|
||||||
|
'share' => $this->getInput('groupEditShare', helper::FILTER_BOOLEAN),
|
||||||
'path' => $this->getInput('groupEditPath'),
|
'path' => $this->getInput('groupEditPath'),
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
@ -85,8 +85,7 @@
|
|||||||
<h4>
|
<h4>
|
||||||
<?php echo helper::translate('Opérations sur les dossiers'); ?>
|
<?php echo helper::translate('Opérations sur les dossiers'); ?>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col2">
|
<div class="col2">
|
||||||
<?php echo template::checkbox('groupEditFolderCreate', true, 'Création', [
|
<?php echo template::checkbox('groupEditFolderCreate', true, 'Création', [
|
||||||
'checked' => $this->getData(['group', $this->getUrl(2), 'folder', 'create'])
|
'checked' => $this->getData(['group', $this->getUrl(2), 'folder', 'create'])
|
||||||
@ -112,12 +111,16 @@
|
|||||||
'checked' => $this->getData(['group', $this->getUrl(2), 'folder', 'permission'])
|
'checked' => $this->getData(['group', $this->getUrl(2), 'folder', 'permission'])
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<div class="col2">
|
||||||
|
<?php echo template::checkbox('groupEditShare', true, 'Partage', [
|
||||||
|
'checked' => $this->getData(['group', $this->getUrl(2), 'folder', 'share'])
|
||||||
|
]); ?>
|
||||||
|
</div>
|
||||||
<div class="col6">
|
<div class="col6">
|
||||||
<?php echo template::select('groupEditPath', $module::$sharePath, [
|
<?php echo template::select('groupEditPath', $module::$sharePath, [
|
||||||
'label' => 'Racine du dossier partagé',
|
'label' => 'Racine du partage',
|
||||||
'selected' => $this->getData(['group', $this->getUrl(2), 'folder', 'path'])
|
'selected' => $this->getData(['group', $this->getUrl(2), 'folder', 'path'])
|
||||||
]); ?>
|
]); ?>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user