Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
For admins, add a direct access to admin settings in the home page.
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Sep 5, 2016
1 parent 9e0ce4d commit c4a7fee
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 2 deletions.
2 changes: 2 additions & 0 deletions core/src/plugins/access.ajxp_home/res/i18n/ca.php
Expand Up @@ -91,4 +91,6 @@
"73" => "Easily connect your mobile applications",
"74" => "Scan this QRCode with your mobile application to easily configure the connection",
"75"=> "Search all files...",
"76" => "Access the %1 through the top-right menu",
"77" => "admin dashboard",
);
2 changes: 2 additions & 0 deletions core/src/plugins/access.ajxp_home/res/i18n/de.php
Expand Up @@ -88,4 +88,6 @@
"73" => "Easily connect your mobile applications",
"74" => "Scan this QRCode with your mobile application to easily configure the connection",
"75"=> "Search all files...",
"76" => "Access the %1 through the top-right menu",
"77" => "admin dashboard",
);
2 changes: 2 additions & 0 deletions core/src/plugins/access.ajxp_home/res/i18n/en.php
Expand Up @@ -88,4 +88,6 @@
"73" => "Easily connect your mobile applications",
"74" => "Scan this QRCode with your mobile application to easily configure the connection",
"75"=> "Search all files...",
"76" => "Access the %1 through the top-right menu",
"77" => "admin dashboard",
);
2 changes: 2 additions & 0 deletions core/src/plugins/access.ajxp_home/res/i18n/es.php
Expand Up @@ -92,4 +92,6 @@
"73" => "Easily connect your mobile applications",
"74" => "Scan this QRCode with your mobile application to easily configure the connection",
"75"=> "Search all files...",
"76" => "Access the %1 through the top-right menu",
"77" => "admin dashboard",
);
2 changes: 2 additions & 0 deletions core/src/plugins/access.ajxp_home/res/i18n/fr.php
Expand Up @@ -87,4 +87,6 @@
"73" => "Connexion aux applications mobiles",
"74" => "Scannez ce QRCode avec votre application mobile pour configurer facilement la connexion.",
"75"=> "Chercher dans tous les fichiers...",
"76" => "Utilisez le menu en haut à droite pour acceder au %1.",
"77" => "panneau d'administration",
);
2 changes: 2 additions & 0 deletions core/src/plugins/access.ajxp_home/res/i18n/hu.php
Expand Up @@ -91,4 +91,6 @@
"73" => "Easily connect your mobile applications",
"74" => "Scan this QRCode with your mobile application to easily configure the connection",
"75"=> "Search all files...",
"76" => "Access the %1 through the top-right menu",
"77" => "admin dashboard",
);
2 changes: 2 additions & 0 deletions core/src/plugins/access.ajxp_home/res/i18n/it.php
Expand Up @@ -88,4 +88,6 @@
"73" => "Easily connect your mobile applications",
"74" => "Scan this QRCode with your mobile application to easily configure the connection",
"75"=> "Search all files...",
"76" => "Access the %1 through the top-right menu",
"77" => "admin dashboard",
);
2 changes: 2 additions & 0 deletions core/src/plugins/access.ajxp_home/res/i18n/nl.php
Expand Up @@ -88,5 +88,7 @@
"73" => "Easily connect your mobile applications",
"74" => "Scan this QRCode with your mobile application to easily configure the connection",
"75"=> "Search all files...",
"76" => "Access the %1 through the top-right menu",
"77" => "admin dashboard",
);

2 changes: 2 additions & 0 deletions core/src/plugins/access.ajxp_home/res/i18n/pt.php
Expand Up @@ -88,4 +88,6 @@
"73" => "Easily connect your mobile applications",
"74" => "Scan this QRCode with your mobile application to easily configure the connection",
"75"=> "Search all files...",
"76" => "Access the %1 through the top-right menu",
"77" => "admin dashboard",
);
2 changes: 2 additions & 0 deletions core/src/plugins/access.ajxp_home/res/i18n/ru.php
Expand Up @@ -88,4 +88,6 @@
"73" => "Easily connect your mobile applications",
"74" => "Scan this QRCode with your mobile application to easily configure the connection",
"75"=> "Search all files...",
"76" => "Access the %1 through the top-right menu",
"77" => "admin dashboard",
);
2 changes: 2 additions & 0 deletions core/src/plugins/access.ajxp_home/res/i18n/si.php
Expand Up @@ -89,4 +89,6 @@
"73" => "Easily connect your mobile applications",
"74" => "Scan this QRCode with your mobile application to easily configure the connection",
"75"=> "Search all files...",
"76" => "Access the %1 through the top-right menu",
"77" => "admin dashboard",
);
14 changes: 12 additions & 2 deletions core/src/plugins/access.ajxp_home/res/react/WelcomeComponents.js
Expand Up @@ -326,7 +326,8 @@
)
}

var gettingStartedBlock = '';
let gettingStartedBlock = null;
let adminAccessBlock = null;
var gettingStartedPanel;
if(this.props.enableGettingStarted){
var dgs = function(){
Expand All @@ -340,7 +341,15 @@
}.bind(this);
gettingStartedPanel = <TutorialPane closePane={close} open={this.state.showGettingStarted}/>;
}

let a = this.props.controller.getActionByName('switch_to_settings');
if(!a.deny){
let func = function(){
this.props.controller.fireAction('switch_to_settings');
}.bind(this);
let sentenceParts = MessageHash['user_home.76'].split("%1");
let dashName = MessageHash['user_home.77'];
adminAccessBlock = <small> {sentenceParts[0]} <a onClick={func}>{dashName}</a> {sentenceParts.length > 1 ? sentenceParts[1] : null}</small>;
}

return (
<div id="welcome">
Expand All @@ -349,6 +358,7 @@
<p>
{loginLink}
{gettingStartedBlock}
{adminAccessBlock}
</p>
</div>
)
Expand Down

0 comments on commit c4a7fee

Please sign in to comment.