Commit dc08ee41 by Arturo Montejo Ráez

Merge branch 'develop' of http://gitlab.ujaen.es/yotta/pictogram into develop

parents 2d632ebb 57e77a10
......@@ -194,6 +194,8 @@
"license_invalid": "Invalid license number",
"license_missing": "Account without license",
"license_number": "License number",
"license_pro": "Pictogram PRO license",
"license_warning": "Only available for professional licenses (Pictogram Pro).",
"licenses_created": "Licenses created",
"licenses_left": "{{number}} licenses left",
"light_up": "Light up",
......@@ -217,6 +219,7 @@
"minutes": "minutes",
"month_totals": "Month totals",
"monthly":"Monthly",
"more_info":"More information",
"msg_change_password": "Please enter a new password for your account:",
"msg_request_change_password": "Enter your email to request for a password change. An e-mail will be sent to access password change form.",
"name": "Name",
......
......@@ -194,6 +194,8 @@
"license_created": "Licencia creada",
"license_invalid": "Licencia inválida",
"license_number": "Número de licencia",
"license_pro": "Licencia Pictogram PRO",
"license_warning": "Sólo disponible para licencias profesionales (Pictogram Pro).",
"license_missing": "Cuenta sin licencia",
"licenses_created": "Licencias creadas",
"light_up": "Iluminar",
......@@ -217,6 +219,7 @@
"minutes": "minutos",
"month_totals": "Totales mes",
"monthly":"Mensual",
"more_info":"Más información",
"msg_change_password": "Por favor, introduzca la nueva clave para su cuenta:",
"msg_request_change_password": "Introduzca su correo electrónico para solicitar el cambio de clave. Recibirá un correo con la dirección de acceso al formulario de cambio de clave.",
"name": "Nombre",
......
......@@ -31,6 +31,7 @@ dashboardControllers.controller('StudentCtrl', function StudentCtrl(
license: {
number: ''
},
license_expired: false,
office: {
id: '',
name: ''
......@@ -75,12 +76,15 @@ dashboardControllers.controller('StudentCtrl', function StudentCtrl(
});
$scope.updateLicenseExpiration = function () {
if (!$scope.studentData.license)
if (!$scope.studentData.license){
$scope.studentData.license_expired = true;
return;
}
$scope.studentData.license_expired = new Date($scope.studentData.license.expiration_ts) - new Date() < 0;
moment.locale($translate.use().substr(0, 2));
$scope.studentData.expiration_date = moment($scope.studentData.license.expiration_ts).format('L');
console.log("updateLicenseExpiration");
};
// ----------------------------------------------------------------------
......
<!-- Reports tab-->
<div class="panel panel-default student_tab_panel">
<div class="panel-body">
<div class="panel-body" ng-show="!studentData.license_expired">
<!-- reports title -->
<div id="reportsTitle" hidden>
<br>
......@@ -173,5 +173,11 @@
<!--/. inform-content -->
</div>
<!-- END .panel-body -->
<div class="panel-body" ng-show="studentData.license_expired">
<div class="alert alert-warning" role="alert">
<span class="glyphicon glyphicon-exclamation-sign text-warning" aria-hidden="true"></span>
{{ 'license_warning' | translate }} <a href="http://pictogramweb.com/caracteristicas-de-pictogram/">{{ 'more_info' | translate }}</a>
</div>
</div>
</div>
<!-- END .panel -->
<div class="panel panel-default student_tab_panel">
<div class="panel-body">
<div class="panel-body" ng-show="!studentData.license_expired">
<div class="form-group">
<div class="btn-group">
......@@ -349,4 +349,11 @@
<!-- / sessions list -->
</div> <!-- / tries -->
</div> <!-- / panel-body -->
<div class="panel-body" ng-show="studentData.license_expired">
<div class="alert alert-warning" role="alert">
<span class="glyphicon glyphicon-exclamation-sign text-warning" aria-hidden="true"></span>
{{ 'license_warning' | translate }} <a href="http://pictogramweb.com/caracteristicas-de-pictogram/">{{ 'more_info' | translate }}</a>
</div>
</div>
</div> <!-- /panel -->
......@@ -39,7 +39,8 @@
</div>
</td>
<td>
<span ng-show="!student.licenseIsValid" class="license-warning text-danger glyphicon glyphicon-exclamation-sign" aria-hidden="true" popover="{{ 'license_invalid' | translate}}" popover-trigger="mouseenter"></span>
<span ng-show="!student.licenseIsValid" class="license-warning text-danger glyphicon glyphicon-exclamation-sign" aria-hidden="true" popover="{{ 'license_missing' | translate}}" popover-trigger="mouseenter"></span>
<i ng-show="student.licenseIsValid" class="fa fa-certificate license-warning text-primary" aria-hidden="true" popover="{{ 'license_pro' | translate}}" popover-trigger="mouseenter"></i>
</td>
<td>
<h4>{{student.surname}}, {{student.name}}</h4>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment