From 04afd774aecc70dca37559fdd8b9a716829c18cd Mon Sep 17 00:00:00 2001
From: Roberto Sánchez <roberto.sanchez@curisit.net>
Date: Fri, 17 Jan 2014 12:27:16 +0000
Subject: [PATCH] #396 feature - Added LocalStorage support and http interceptor for unauthorized access
---
securis/src/main/resources/static/licenses.html | 165 ++++++++++++++++++++++++++++++++++++++++++++++--------
1 files changed, 139 insertions(+), 26 deletions(-)
diff --git a/securis/src/main/resources/static/licenses.html b/securis/src/main/resources/static/licenses.html
index a3f3c43..53e911a 100644
--- a/securis/src/main/resources/static/licenses.html
+++ b/securis/src/main/resources/static/licenses.html
@@ -1,32 +1,145 @@
- <div class="navbar navbar-inverse navbar-fixed-top">
- <div class="container">
- <div class="navbar-header">
- <button type="button" class="navbar-toggle" data-toggle="collapse"
- data-target=".navbar-collapse">
- <span class="icon-bar"></span> <span class="icon-bar"></span> <span
- class="icon-bar"></span>
- </button>
- <a class="navbar-brand" href="#">SeCuris</a>
- </div>
- <div class="navbar-collapse collapse">
- <ul class="nav navbar-nav navbar-right">
- <li><a href="#about">About</a></li>
- <li><a href="#contact">Contact</a></li>
- </ul>
- </div>
- </div>
- </div>
-
- <!-- Main jumbotron for a primary marketing message or call to action -->
- <div class="jumbotron">
- <div class="container">
- <h2>SeCuris</h2>
- <p>Licenses management</p>
- </div>
- </div>
+ <div ng-include="'header.html'" ></div>
<div class="container">
+ <div class="col-md-12"> </div>
+ <div id="packs_section" class="col-md-6">
+ <nav class="navbar navbar-default navbar-static-top">
+ <!-- Brand and toggle get grouped for better mobile display -->
+ <div class="navbar-header">
+ <a class="navbar-brand" i18n >Packs</a>
+ </div>
+
+ <!-- Collect the nav links, forms, and other content for toggling -->
+ <div class="collapse navbar-collapse"
+ id="bs-example-navbar-collapse-1">
+ <ul class="nav navbar-nav">
+ <li><a i18n ng-click="editNew()"><span class="glyphicon glyphicon-plus"></span>
+ New</a></li>
+ <li><a i18n ng-click="cancel()"> <span
+ class="glyphicon glyphicon-ban-circle"></span> Cancel
+ </a></li>
+ </ul>
+ <div class="navbar-form navbar-right">
+ <div class="input-group input-group-sm">
+ <span class="input-group-addon glyphicon glyphicon-search" style="top: 0px;"></span>
+ <input type="text" class="form-control" placeholder="Search" ng-model="$parent.searchText" >
+ <span class="btn input-group-addon glyphicon glyphicon-remove" ng-click="$parent.searchText = ''" style="top: 0px;"></span>
+ </div>
+ </div>
+ </div>
+ </nav>
+ <div class="panel panel-default" >
+ <div class="panel-heading">
+ Packs <span class="badge pull-right" ng-bind="packs.length || 0"></span>
+ </div>
+
+ <table class="table table-hover table-condensed">
+ <thead>
+ <tr>
+ <th i18n >Organization</th>
+ <th i18n >Application</th>
+ <th i18n >Code</th>
+ <th i18n >Licenses</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr ng-repeat="pack in packs | filter:searchText" ng-dblclick="editPack(row)" ng-class="{success: currentPack.id === pack.id}" ng-click="selectPack(pack)">
+ <td ng-bind="ellipsis(pack.organization_name, 20)" title="{{pack.organization_name}}" ></td>
+ <td ng-bind="pack.application_name"></td>
+ <td style="white-space: nowrap;" ng-bind="pack.code"></td>
+ <td title="Total: {{pack.licenses}}, avaliable: {{pack.lic_available}}">{{pack.licenses}} ({{pack.lic_available}})</td>
+ <td><span ng-click="editPack(row)"
+ class="glyphicon glyphicon-pencil"></span>
+ <span ng-click="deletePack(row)"
+ class="glyphicon glyphicon-remove"></span>
+ </td>
+ </tr>
+ </tbody>
+ <tfoot>
+ </tfoot>
+ </table>
+ </div>
+ </div>
+
+ <div id="licenses_section" class="col-md-6" >
+ <nav class="navbar navbar-default navbar-static-top" ng-disabled="!!currentPack">
+ <!-- Brand and toggle get grouped for better mobile display -->
+ <div class="navbar-header success">
+ <a class="navbar-brand" i18n>Licenses</a>
+ </div>
+
+ <!-- Collect the nav links, forms, and other content for toggling -->
+ <div class="collapse navbar-collapse"
+ id="bs-example-navbar-collapse-1">
+ <ul class="nav navbar-nav">
+ <li><a i18n ng-click="editNewLicense()"><span class="glyphicon glyphicon-plus"></span>
+ New</a></li>
+ <li><a i18n ng-click="cancelEditionLicense()"> <span
+ class="glyphicon glyphicon-ban-circle"></span> Cancel
+ </a></li>
+ </ul>
+ <div class="navbar-form navbar-right">
+ <div class="input-group input-group-sm">
+ <span class="input-group-addon glyphicon glyphicon-search" style="top: 0px;"></span>
+ <input type="text" class="form-control" placeholder="Search" ng-model="$searchPacksText" >
+ <span class="btn input-group-addon glyphicon glyphicon-remove" ng-click="$searchPacksText = ''" style="top: 0px;"></span>
+ </div>
+ </div>
+ </div>
+ </nav>
+
+ <div ng-if="!currentPack" class="well well-lg">
+ <h4 i18n>No pack selected</h4>
+ <p i18n>Please, select a pack to manage its licenses</p>
+ </div>
+
+ <div class="panel panel-default" ng-if="currentPack">
+ <div class="panel-heading">
+ <span i18n>Licenses for pack: </span>{{currentPack.code}}
+ <span style="color: lightgreen;" class="badge pull-right" ng-bind="currentPack.lic_available || 0"></span>
+ <span class="badge pull-right" ng-bind="licenses.length || 0"></span>
+ </div>
+
+
+ <table class="table table-hover table-condensed" >
+ <thead>
+ <tr>
+ <th i18n >License code</th>
+ <th i18n >User fullname</th>
+ <th i18n >Email</th>
+ <th i18n >Status</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr ng-repeat="lic in licenses | filter:searchLicenseText" ng-dblclick="editLicense(lic)" >
+ <td style="white-space: nowrap;" ng-bind="lic.code"></td>
+ <td ng-bind="ellipsis(lic.user_fullname, 20)" title="{{lic.user_fullname}}" ></td>
+ <td ng-bind="ellipsis(lic.user_email, 30)" title="{{lic.user_email}}" ></td>
+ <td ng-bind="lic.status"></td>
+ <td>
+ <div class="dropdown">
+ <a class="dropdown-toggle" data-toggle="dropdown" >
+ <span class="glyphicon glyphicon-align-justify"></span> <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu">
+ <li><a ng-click="editLicense(lic)"><span class="glyphicon glyphicon-pencil"></span> <span i18n>Edit</span></a></li>
+ <li><a ng-click="activateLicense(lic)"><span class="glyphicon glyphicon-check"></span> <span i18n>Activate</span></a></li>
+ <li><a ng-click="sendEmail(lic)"><span class="glyphicon glyphicon-send"></span> <span i18n>Send email</span></a></li>
+ <li><a ng-click="editLicense(lic)"><span class="glyphicon glyphicon-remove"></span> <span i18n>Remove</span></a></li>
+ </ul>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+ <tfoot>
+ </tfoot>
+ </table>
+ </div>
+
+ </div>
</div>
--
Gitblit v1.3.2