Commit 451bf873 authored by Francesc Guasch's avatar Francesc Guasch
Browse files

Merge branch '0.2.9' of https://github.com/UPC/ravada into 0.2.9

parents b0594bed bb3265c0
......@@ -121,12 +121,17 @@
$scope.has_public = false;
$scope.toggle_has_public=function() {
$scope.has_public = true;
$scope.has_public = true;
};
$scope.has_private = false;
$scope.toggle_has_private =function() {
$scope.has_private = true;
};
$scope.only_public = false;
$scope.toggle_only_public=function() {
$scope.only_public = !$scope.only_public;
$scope.only_public = !$scope.only_public;
};
};
......
......@@ -23,7 +23,7 @@
<div class="panel-heading">
<h2><%=l 'Choose a Machine to Start' %></h2>
% if ($user->is_admin) {
<div ng-show="has_public" ng-cloak>
<div ng-show="has_public and has_private" ng-cloak>
<a ng-click="toggle_only_public()" class="label label-primary"
align="right" ng-show="!only_public">Hide Private</a>
<a ng-click="toggle_only_public()" class="label label-primary"
......@@ -48,7 +48,7 @@
% for my $machine (@$machines) {
% next if !$machine->{is_public} && !$user->is_admin;
<div class="col-sm-4"
<% if (!$machine->{is_public}) { %> ng-show="!only_public" <% } %>
<% if (!$machine->{is_public}) { %> ng-show="!only_public" ng-init="toggle_has_private()" <% } %>
<% if ($machine->{is_public}) { %> ng-init="toggle_has_public()" <% } %> >
<div class="panel panel-success">
<div class="panel-heading">
......
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 to comment