-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add extended slider permissions (#75)
- Loading branch information
Showing
11 changed files
with
665 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php | ||
/* | ||
* Copyright MADE/YOUR/DAY OG <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
use Contao\CoreBundle\DataContainer\PaletteManipulator; | ||
|
||
PaletteManipulator::create() | ||
->addLegend('rsts_slider_legend', 'amg_legend', PaletteManipulator::POSITION_BEFORE) | ||
->addField(array('rsts_sliders', 'rsts_permissions'), 'rsts_slider_legend', PaletteManipulator::POSITION_APPEND) | ||
->applyToPalette('extend', 'tl_user') | ||
->applyToPalette('custom', 'tl_user') | ||
; | ||
|
||
$GLOBALS['TL_DCA']['tl_user']['config']['onload_callback'][] = array('MadeYourDay\\RockSolidSlider\\Slider', 'userOnloadCallback'); | ||
|
||
$GLOBALS['TL_DCA']['tl_user']['fields']['rsts_sliders'] = array( | ||
'exclude' => true, | ||
'inputType' => 'checkbox', | ||
'foreignKey' => 'tl_rocksolid_slider.name', | ||
'eval' => array('multiple' => true), | ||
'sql' => "blob NULL", | ||
); | ||
|
||
$GLOBALS['TL_DCA']['tl_user']['fields']['rsts_permissions'] = array( | ||
'exclude' => true, | ||
'inputType' => 'checkbox', | ||
'options' => array('create', 'delete'), | ||
'reference' => &$GLOBALS['TL_LANG']['MSC'], | ||
'eval' => array('multiple' => true), | ||
'sql' => "blob NULL", | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
/* | ||
* Copyright MADE/YOUR/DAY OG <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
use Contao\CoreBundle\DataContainer\PaletteManipulator; | ||
|
||
PaletteManipulator::create() | ||
->addLegend('rsts_slider_legend', 'amg_legend', PaletteManipulator::POSITION_BEFORE) | ||
->addField(array('rsts_sliders', 'rsts_permissions'), 'rsts_slider_legend', PaletteManipulator::POSITION_APPEND) | ||
->applyToPalette('default', 'tl_user_group') | ||
; | ||
|
||
$GLOBALS['TL_DCA']['tl_user_group']['config']['onload_callback'][] = array('MadeYourDay\\RockSolidSlider\\Slider', 'userGroupOnloadCallback'); | ||
|
||
$GLOBALS['TL_DCA']['tl_user_group']['fields']['rsts_sliders'] = array( | ||
'exclude' => true, | ||
'inputType' => 'checkbox', | ||
'foreignKey' => 'tl_rocksolid_slider.name', | ||
'eval' => array('multiple' => true), | ||
'sql' => "blob NULL", | ||
); | ||
|
||
$GLOBALS['TL_DCA']['tl_user_group']['fields']['rsts_permissions'] = array( | ||
'exclude' => true, | ||
'inputType' => 'checkbox', | ||
'options' => array('create', 'delete'), | ||
'reference' => &$GLOBALS['TL_LANG']['MSC'], | ||
'eval' => array('multiple' => true), | ||
'sql' => "blob NULL", | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
/* | ||
* Copyright MADE/YOUR/DAY OG <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
/** | ||
* RockSolid Slider module translations | ||
* | ||
* @author Martin Auswöger <[email protected]> | ||
*/ | ||
|
||
$GLOBALS['TL_LANG']['tl_user']['rsts_slider_legend'] = 'RockSolid Slider'; | ||
$GLOBALS['TL_LANG']['tl_user']['rsts_sliders'][0] = 'Erlaubte Slider'; | ||
$GLOBALS['TL_LANG']['tl_user']['rsts_sliders'][1] = 'Hier können Sie den Zugriff auf einen oder mehrere Slider erlauben.'; | ||
$GLOBALS['TL_LANG']['tl_user']['rsts_permissions'][0] = 'Sliderrechte'; | ||
$GLOBALS['TL_LANG']['tl_user']['rsts_permissions'][1] = 'Hier können Sie die Sliderrechte festlegen.'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
/* | ||
* Copyright MADE/YOUR/DAY OG <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
/** | ||
* RockSolid Slider module translations | ||
* | ||
* @author Martin Auswöger <[email protected]> | ||
*/ | ||
|
||
$GLOBALS['TL_LANG']['tl_user_group']['rsts_slider_legend'] = 'RockSolid Slider'; | ||
$GLOBALS['TL_LANG']['tl_user_group']['rsts_sliders'][0] = 'Erlaubte Slider'; | ||
$GLOBALS['TL_LANG']['tl_user_group']['rsts_sliders'][1] = 'Hier können Sie den Zugriff auf einen oder mehrere Slider erlauben.'; | ||
$GLOBALS['TL_LANG']['tl_user_group']['rsts_permissions'][0] = 'Sliderrechte'; | ||
$GLOBALS['TL_LANG']['tl_user_group']['rsts_permissions'][1] = 'Hier können Sie die Sliderrechte festlegen.'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
/* | ||
* Copyright MADE/YOUR/DAY OG <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
/** | ||
* RockSolid Slider module translations | ||
* | ||
* @author Martin Auswöger <[email protected]> | ||
*/ | ||
|
||
$GLOBALS['TL_LANG']['tl_user']['rsts_slider_legend'] = 'RockSolid Slider'; | ||
$GLOBALS['TL_LANG']['tl_user']['rsts_sliders'][0] = 'Allowed sliders'; | ||
$GLOBALS['TL_LANG']['tl_user']['rsts_sliders'][1] = 'Here you can grant access to one or more sliders.'; | ||
$GLOBALS['TL_LANG']['tl_user']['rsts_permissions'][0] = 'Slider permissions'; | ||
$GLOBALS['TL_LANG']['tl_user']['rsts_permissions'][1] = 'Here you can define the slider permissions.'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
/* | ||
* Copyright MADE/YOUR/DAY OG <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
/** | ||
* RockSolid Slider module translations | ||
* | ||
* @author Martin Auswöger <[email protected]> | ||
*/ | ||
|
||
$GLOBALS['TL_LANG']['tl_user_group']['rsts_slider_legend'] = 'RockSolid Slider'; | ||
$GLOBALS['TL_LANG']['tl_user_group']['rsts_sliders'][0] = 'Allowed sliders'; | ||
$GLOBALS['TL_LANG']['tl_user_group']['rsts_sliders'][1] = 'Here you can grant access to one or more sliders.'; | ||
$GLOBALS['TL_LANG']['tl_user_group']['rsts_permissions'][0] = 'Slider permissions'; | ||
$GLOBALS['TL_LANG']['tl_user_group']['rsts_permissions'][1] = 'Here you can define the slider permissions.'; |
Oops, something went wrong.