Permalink
Browse files

For admins, add a direct access to admin settings in the home page.

  • Loading branch information...
1 parent 9e0ce4d commit c4a7fee8f25d2c27dd34fb8c39b69d6e2fa59f49 @cdujeu cdujeu committed Sep 5, 2016
@@ -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",
);
@@ -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",
);
@@ -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",
);
@@ -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",
);
@@ -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",
);
@@ -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",
);
@@ -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",
);
@@ -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",
);
@@ -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",
);
@@ -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",
);
@@ -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",
);
@@ -326,7 +326,8 @@
)
}
- var gettingStartedBlock = '';
+ let gettingStartedBlock = null;
+ let adminAccessBlock = null;
var gettingStartedPanel;
if(this.props.enableGettingStarted){
var dgs = function(){
@@ -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">
@@ -349,6 +358,7 @@
<p>
{loginLink}
{gettingStartedBlock}
+ {adminAccessBlock}
</p>
</div>
)

0 comments on commit c4a7fee

Please sign in to comment.