TG-119 : update user space
This commit is contained in:
parent
1c24f91582
commit
a76d7a9604
@ -5,12 +5,61 @@
|
|||||||
.controller('UserSpaceCtrl', ['$scope', '$state',
|
.controller('UserSpaceCtrl', ['$scope', '$state',
|
||||||
function ($scope, $state) {
|
function ($scope, $state) {
|
||||||
|
|
||||||
|
$scope.toggleAccordion = toggleAccordion;
|
||||||
|
$scope.isOpenAccordion = isOpenAccordion;
|
||||||
|
$scope.logout = logout;
|
||||||
|
$scope.exportBooklet = exportBooklet;
|
||||||
|
|
||||||
init();
|
init();
|
||||||
|
|
||||||
// ---------------------------------------------------------------
|
// ---------------------------------------------------------------
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
|
|
||||||
|
$scope.periods = [
|
||||||
|
{
|
||||||
|
number : 2,
|
||||||
|
company: {
|
||||||
|
icon : 'add',
|
||||||
|
comment: ''
|
||||||
|
},
|
||||||
|
university: {
|
||||||
|
icon : 'add',
|
||||||
|
comment: ''
|
||||||
|
}
|
||||||
|
},{
|
||||||
|
number : 1,
|
||||||
|
company: {
|
||||||
|
icon : 'add',
|
||||||
|
comment: ''
|
||||||
|
},
|
||||||
|
university: {
|
||||||
|
icon : 'add',
|
||||||
|
comment: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleAccordion(value, isCompany, index) {
|
||||||
|
var newValue = (value === 'add') ? 'remove': 'add';
|
||||||
|
if(isCompany === 'true') {
|
||||||
|
$scope.periods[index].company.icon = newValue;
|
||||||
|
} else {
|
||||||
|
$scope.periods[index].university.icon = newValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function isOpenAccordion(value) {
|
||||||
|
return (value === 'remove');
|
||||||
|
}
|
||||||
|
|
||||||
|
function logout() {
|
||||||
|
$state.go('login');
|
||||||
|
}
|
||||||
|
|
||||||
|
function exportBooklet() {
|
||||||
|
console.log('export booklet .. TODO ');
|
||||||
}
|
}
|
||||||
|
|
||||||
// ---------------------------------------------------------------
|
// ---------------------------------------------------------------
|
||||||
|
@ -4,60 +4,82 @@
|
|||||||
<div class="md-toolbar-tools">
|
<div class="md-toolbar-tools">
|
||||||
<h2 md-truncate flex>Bienvenue Claire Veronneau</h2>
|
<h2 md-truncate flex>Bienvenue Claire Veronneau</h2>
|
||||||
|
|
||||||
<md-button>
|
<md-button ng-click="logout()">
|
||||||
Se déconnecter
|
Se déconnecter
|
||||||
</md-button>
|
</md-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</md-toolbar>
|
</md-toolbar>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div layout="row" layout-align="center none">
|
<div layout="row" layout-align="center none">
|
||||||
<md-content flex="80">
|
<md-content flex="80">
|
||||||
<div layout="row" layout-align="end">
|
<div layout="row" layout-align="end">
|
||||||
<md-button class="md-raised">Exporter le livret</md-button>
|
<md-button class="md-raised" ng-click="exportBooklet()">Exporter le livret</md-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<md-card>
|
<md-card ng-repeat="period in periods">
|
||||||
<md-card-title>
|
<md-card-title>
|
||||||
<md-card-title-text>
|
<md-card-title-text>
|
||||||
<span class="md-headline">Période 2</span>
|
<h2 class="md-display-1">Période {{period.number}}</h2>
|
||||||
</md-card-title-text>
|
</md-card-title-text>
|
||||||
</md-card-title>
|
</md-card-title>
|
||||||
<md-card-content>
|
<md-card-content>
|
||||||
<p>
|
|
||||||
The titles of Washed Out's breakthrough song and the first single from Paracosm share the two most important words in Ernest
|
|
||||||
Greene's musical language: feel it. It's a simple request, as well...
|
<div layout="column" layout-fill>
|
||||||
</p>
|
<div flex class="green darken-2">
|
||||||
<p>
|
<h3 class="md-headline" style="padding-left : 10px">
|
||||||
The titles of Washed Out's breakthrough song and the first single from Paracosm share the two most important words in Ernest
|
Université
|
||||||
Greene's musical language: feel it. It's a simple request, as well...
|
<md-button class="md-icon-button" ng-click="toggleAccordion(period.university.icon, 'false', $index)" aria-label="call">
|
||||||
</p>
|
<ng-md-icon icon="{{period.university.icon}}" style="fill: blue" size="24"></ng-md-icon>
|
||||||
<p>
|
</md-button>
|
||||||
The titles of Washed Out's breakthrough song and the first single from Paracosm share the two most important words in Ernest
|
</h3>
|
||||||
Greene's musical language: feel it. It's a simple request, as well...
|
|
||||||
</p>
|
<md-content flex layout-padding ng-if="isOpenAccordion(period.university.icon)">
|
||||||
</md-card-content>
|
<p>Lorem ipsum dolor sit amet, ne quod novum mei. Sea omnium invenire mediocrem at, in lobortis conclusionemque
|
||||||
</md-card>
|
nam. Ne deleniti appetere reprimique pro, inani labitur disputationi te sed. At vix sale omnesque, id pro
|
||||||
<md-card>
|
labitur reformidans accommodare, cum labores honestatis eu. Nec quem lucilius in, eam praesent reformidans
|
||||||
<md-card-title>
|
no. Sed laudem aliquam ne.</p><br/>
|
||||||
<md-card-title-text>
|
|
||||||
<span class="md-headline">Période 1</span>
|
<md-input-container class="md-block">
|
||||||
</md-card-title-text>
|
<label>Commentaire de période</label>
|
||||||
</md-card-title>
|
<textarea ng-model="period.university.comment" md-maxlength="150" rows="5" md-select-on-focus></textarea>
|
||||||
<md-card-content>
|
</md-input-container>
|
||||||
<p>
|
|
||||||
The titles of Washed Out's breakthrough song and the first single from Paracosm share the two most important words in Ernest
|
<div layout="row" layout-align="end">
|
||||||
Greene's musical language: feel it. It's a simple request, as well...
|
<md-button class="md-raised">Enregistrer</md-button>
|
||||||
</p>
|
</div>
|
||||||
<p>
|
</md-content>
|
||||||
The titles of Washed Out's breakthrough song and the first single from Paracosm share the two most important words in Ernest
|
</div>
|
||||||
Greene's musical language: feel it. It's a simple request, as well...
|
|
||||||
</p>
|
<div flex class="green darken-3">
|
||||||
<p>
|
<h3 class="md-headline" style="padding-left : 10px">
|
||||||
The titles of Washed Out's breakthrough song and the first single from Paracosm share the two most important words in Ernest
|
Entreprise
|
||||||
Greene's musical language: feel it. It's a simple request, as well...
|
<md-button class="md-icon-button" ng-click="toggleAccordion(period.company.icon, 'true', $index)" aria-label="call">
|
||||||
</p>
|
<ng-md-icon icon="{{period.company.icon}}" style="fill: blue" size="24"></ng-md-icon>
|
||||||
|
</md-button>
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<md-content flex layout-padding ng-if="isOpenAccordion(period.company.icon)">
|
||||||
|
<p>Lorem ipsum dolor sit amet, ne quod novum mei. Sea omnium invenire mediocrem at, in lobortis conclusionemque
|
||||||
|
nam. Ne deleniti appetere reprimique pro, inani labitur disputationi te sed. At vix sale omnesque, id pro
|
||||||
|
labitur reformidans accommodare, cum labores honestatis eu. Nec quem lucilius in, eam praesent reformidans
|
||||||
|
no. Sed laudem aliquam ne.</p>
|
||||||
|
|
||||||
|
<md-input-container class="md-block">
|
||||||
|
<label>Commentaire de période</label>
|
||||||
|
<textarea ng-model="period.company.comment" md-maxlength="150" rows="5" md-select-on-focus></textarea>
|
||||||
|
</md-input-container>
|
||||||
|
|
||||||
|
<div layout="row" layout-align="end">
|
||||||
|
<md-button class="md-raised">Enregistrer</md-button>
|
||||||
|
</div>
|
||||||
|
</md-content>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</md-card-content>
|
</md-card-content>
|
||||||
</md-card>
|
</md-card>
|
||||||
|
|
||||||
</md-content>
|
</md-content>
|
||||||
</div>
|
</div>
|
Reference in New Issue
Block a user