Index: branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Resource/Index.cshtml
===================================================================
--- branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Resource/Index.cshtml	(revision 13782)
+++ branches/WebJobManager/HeuristicLab.Clients.Hive.WebJobManager/Views/Resource/Index.cshtml	(revision 13795)
@@ -8,6 +8,19 @@
 
     <div class="col-sm-4">
-        <div class="btn btn-block btn-success" ng-click="clearTreeSelect()">Add group</div>
-        <div data-angular-treeview="true"
+        <div class="btn-group btn-group-justified" style="padding:3px;margin-bottom:-10px"
+             role="group">
+            <a class="btn btn-info btn-lg btn-block disabled"
+               style="width:6%; box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
+                            text-shadow:2px 2px black;">
+                <i class="fa fa-sitemap"></i> Resource groups
+            </a>
+            <div class="btn btn-block btn-success"
+                 style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
+                            text-shadow:2px 2px black;"
+                 ng-click="clearTreeSelect()"><i class="fa fa-plus-circle"></i></div>
+        </div>
+
+        <div style=""
+             data-angular-treeview="true"
              data-tree-id="treeview"
              data-tree-model="tree"
@@ -24,5 +37,5 @@
             <h3>
                 {{treeview.currentNode.Name}}
-                <span ng-if="treeview.currentNode.IsDisposable === undefined"> - Client group</span>
+                <span ng-if="treeview.currentNode.IsDisposable === undefined"> - Resource group</span>
                 <a ng-if="treeview.currentNode.IsDisposable !== undefined"
                    class="btn pull-right"
@@ -34,5 +47,56 @@
                 </a>
             </h3>
-            <form method="post"
+            <ul class="nav nav-pills nav-justified">
+                <li role="presentation" ng-class="{ 'active': !permission }" ng-style="{ 'text-decoration': !permission ? 'underline' : ''}">
+                    <a style="text-shadow:2px 2px black; color:white; font-weight:bold; border: 1px solid white;"
+                       href=""
+                       ng-click="permission = false">
+                        Resource info
+                    </a>
+                </li>
+                <li role="presentation" ng-class="{ 'active': permission }" ng-style="{ 'text-decoration': permission ? 'underline' : ''}">
+                    <a style="text-shadow:2px 2px black; color:white; font-weight:bold; border: 1px solid white;"
+                       href=""
+                       ng-click="permission = true">
+                        Permissions
+                    </a>
+                </li>
+            </ul>
+            
+            <form ng-show="permission"
+                  method="post"
+                  asp-action="editPermissions"
+                  asp-controller="Resource"
+                  enctype="multipart/form-data"
+                  class="row panel-heading"
+                  > 
+                <div
+                     class="row" style="padding:10px;">
+                    <h4>Groups</h4>
+                    <label class="col-sm-3" ng-repeat="group in permGroups">
+                        <input type="checkbox" 
+                               name="permgroups" 
+                               value="{{group.Id}}"
+                               ng-model="group.state"> {{group.Name}}
+                    </label>
+                </div>
+                <div class="row" style="padding:10px;">
+                    <h4>Users</h4>
+                    <label class="col-sm-3 col-lg-2" ng-repeat="user in permUsers">
+                        <input type="checkbox" 
+                               name="permusers" 
+                               value="{{user.Id}}"
+                               ng-model="user.state"> {{user.UserName}}
+                    </label>
+                </div>
+                <div class="btn btn-info pull-right" 
+                     style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
+                            text-shadow:2px 2px black;"
+                     ng-click="pushPermissions()">
+                <i ng-if="permissionLoader" class="fa fa-spin fa-save"></i> 
+                Save permission changes</div>
+            </form>
+            <form ng-show="!permission"
+                  method="post"
                   asp-action="deleteClientGroup"
                   ng-init="checkDel = false"
@@ -40,5 +104,5 @@
                   enctype="multipart/form-data"
                   class="row panel-heading"
-                  style="padding:10px">
+                  style="padding:10px;">
                 <table class="table" style="margin-bottom:0px">
                     <tbody>
@@ -71,5 +135,7 @@
                                         id="inpsaver"
                                         ng-disabled="!checkDel"
-                                        class="btn btn-danger">
+                                        class="btn btn-danger"
+                                        style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
+                            text-shadow:2px 2px black;">
                                     <i class="fa fa-trash-o"></i>
                                     Delete group (irriversible action!)
@@ -100,17 +166,16 @@
                   enctype="multipart/form-data"
                   class="row"
-                  style="padding:10px"
-                  >
+                  style="padding:10px;">
                 <input style="display:none" type="text" id="inpid" name="inpid" value="{{treeview.currentNode.Id}}" />
 
                 <span style="padding:0px" class="col-sm-4">Change parent resource: </span>
-                
-                <select class="form-control col-sm-5" 
-                        style="width:200px" 
-                        id="inpidpar" 
-                        name="inpidpar" 
+
+                <select class="form-control col-sm-5"
+                        style="width:200px"
+                        id="inpidpar"
+                        name="inpidpar"
                         ng-model="treeview.currentNode.ParentResourceId">
                     <option value="">None</option>
-                    <option ng-repeat="group in groups | orderBy:'Name'" 
+                    <option ng-repeat="group in groups | orderBy:'Name'"
                             value="{{group.Id}}"
                             ng-if="group.Id !=treeview.currentNode.Id && group.ParentResourceId != treeview.currentNode.Id">
@@ -121,5 +186,7 @@
                 <button type="submit"
                         id="inpsaver"
-                        class="btn btn-warning col-sm-3 pull-right">
+                        class="btn btn-warning col-sm-3 pull-right"
+                        style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
+                            text-shadow:2px 2px black;">
                     <i class="fa fa-save"></i>
                     Change parent
@@ -326,5 +393,6 @@
         <div class="row panel-footer">
             <h2>All events </h2><h5>(sorted by changed and start date)</h5>
-            <div class="row" ng-repeat="ev in currentcal.down[0] | orderBy:['!changed','start'] track by $index">
+            <div class="row" ng-repeat="ev in currentcal.down[0] | orderBy:['!changed','start'] track by $index"
+                 style="margin-bottom:4px">
                 <div class="btn-group-justified btn-block">
 
@@ -370,10 +438,10 @@
               asp-controller="Resource"
               enctype="multipart/form-data"
-              class="col-sm-8 panel  panel-primary">
+              class="col-sm-8 panel panel-primary">
             <div class="row panel-heading"
                  style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
                             text-shadow:2px 2px black;">
                 <h3>
-                    Add new client group
+                    Add new resource group
                 </h3>
                 <table class="table">
@@ -407,5 +475,7 @@
                         id="inpsaver"
                         ng-disabled="newName === ''"
-                        class="btn btn-success">
+                        class="btn btn-success"
+                        style="box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
+                            text-shadow:2px 2px black;font-weight:bold;">
                     <i class="fa fa-save"></i>
                     Add {{newName}} group
@@ -413,6 +483,6 @@
             </div>
             <div class="panel-body row">
-                <h3>Choose clients </h3>
-                <h5>(This will overwrite the group set for these clients)</h5>
+                <h3>Choose resources </h3>
+                <h5>(This will overwrite the group set for these resources)</h5>
                 <table>
                     <tr ng-repeat="client in clients  | orderBy:['Name'] track by $index" class="checkbox col-md-6 col-lg-4">
@@ -440,7 +510,7 @@
                 Ungrouped
             </h2>
-            <h3>
-                All unassigned clients arrive here. Assign them to a group to remove them from this group.
-            </h3>
+            <h4>
+                All unassigned resources arrive here. Assign them to a group to remove them from this group.
+            </h4>
 
         </div>
