From 5b9df095415f988ac0528ad5786f9be8f093cda2 Mon Sep 17 00:00:00 2001 From: opi Date: Tue, 11 Feb 2014 10:45:13 +0100 Subject: [PATCH] Move home links definition into js. --- js/app.js | 11 ++++++++++- views/home.ms | 21 ++++----------------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/js/app.js b/js/app.js index 65a19652..85efd31d 100644 --- a/js/app.js +++ b/js/app.js @@ -234,7 +234,16 @@ app = Sammy('#main', function (sam) { // Show development note c.flash('info', 'You are using a development version.
' + 'Please note that you can use the moulinette if you want to access to more YunoHost\'s features.'); - c.view('home'); + + // Available sections + data = {links: [ + {name: "Users", path: '#/users'}, + {name: "Domains", path: '#/domains'}, + {name: "Applications", path: '#/apps'}, + {name: "Services", path: '#/services'}, + ]}; + + c.view('home', data); }); sam.get('#/login', function (c) { diff --git a/views/home.ms b/views/home.ms index cc63bc92..417e021c 100644 --- a/views/home.ms +++ b/views/home.ms @@ -5,25 +5,12 @@
- -

Users

- -
-
- -

Domains

- -
-
- -

Applications

- -
-
- -

Services

+{{#links}} +
+

{{name}}

+{{/links}}