| .. | .. |
|---|
| 1 | 1 | |
|---|
| 2 | | - <div ng-include="'header.html'" ></div> |
|---|
| 2 | +<div ng-include="'header.html'"></div> |
|---|
| 3 | 3 | |
|---|
| 4 | | - <div class="container"> |
|---|
| 5 | | - <div class="col-md-12"> </div> |
|---|
| 6 | | - <div id="packs_section" class="col-md-6" ng-controller="PacksCtrl"> |
|---|
| 7 | | - <nav class="navbar navbar-default navbar-static-top"> |
|---|
| 8 | | - <!-- Brand and toggle get grouped for better mobile display --> |
|---|
| 9 | | - <div class="navbar-header"> |
|---|
| 10 | | - <a class="navbar-brand" i18n >Packs</a> |
|---|
| 11 | | - </div> |
|---|
| 12 | | - |
|---|
| 13 | | - <!-- Collect the nav links, forms, and other content for toggling --> |
|---|
| 14 | | - <div class="collapse navbar-collapse" |
|---|
| 15 | | - id="bs-example-navbar-collapse-1"> |
|---|
| 16 | | - <ul class="nav navbar-nav"> |
|---|
| 17 | | - <li><a i18n ng-click="newPack()"><span class="glyphicon glyphicon-plus"></span> |
|---|
| 18 | | - New</a></li> |
|---|
| 19 | | - <li><a i18n ng-click="cancel()"> <span |
|---|
| 20 | | - class="glyphicon glyphicon-ban-circle"></span> Cancel |
|---|
| 21 | | - </a></li> |
|---|
| 22 | | - </ul> |
|---|
| 23 | | - <div class="navbar-form navbar-right"> |
|---|
| 24 | | - <div class="input-group input-group-sm"> |
|---|
| 25 | | - <span class="input-group-addon glyphicon glyphicon-search" style="top: 0px;"></span> |
|---|
| 26 | | - <input type="text" class="form-control" placeholder="Search" ng-model="searchText" > |
|---|
| 27 | | - <span class="btn input-group-addon glyphicon glyphicon-remove" ng-click="searchText = ''" style="top: 0px;"></span> |
|---|
| 28 | | - </div> |
|---|
| 29 | | - </div> |
|---|
| 30 | | - </div> |
|---|
| 31 | | - </nav> |
|---|
| 32 | | - |
|---|
| 33 | | - <div class="panel panel-default animate-show ng-hide" ng-show="showForm"> |
|---|
| 34 | | - <form role="form" class="form-horizontal " name="packForm" id="packForm" ng-submit="save()" > |
|---|
| 35 | | - <div class="form-group" ng-if="!isNew"> |
|---|
| 36 | | - <label class="col-md-3 control-label" >ID</label> |
|---|
| 37 | | - <div class="col-md-8"> |
|---|
| 38 | | - <p class="form-control-static" ng-bind="pack.id"></p> |
|---|
| 39 | | - </div> |
|---|
| 40 | | - </div> |
|---|
| 41 | | - <div class="form-group" > |
|---|
| 42 | | - <label class="col-md-3 control-label" for="code" i18n>Code</label> |
|---|
| 43 | | - <div class="col-md-8"> |
|---|
| 44 | | - <input type="string" id="code" name="code" placeholder="" class="form-control" ng-model="pack.code" ng-required="mandatory.code" ng-maxlength="{{maxlength.code}}" /> |
|---|
| 45 | | - <div class="alert inline-alert alert-warning" ng-show="packForm.code.$invalid"> |
|---|
| 46 | | - <span class="glyphicon glyphicon-warning-sign"></span> |
|---|
| 47 | | - <span ng-show="packForm.code.$error.maxlength" ng-bind="maxlengthErrorMsg('Code', maxlength.code)"></span> |
|---|
| 48 | | - <span ng-show="packForm.code.$error.required" ng-bind="mandatoryFieldErrorMsg('Code')"></span> |
|---|
| 49 | | - </div> |
|---|
| 50 | | - </div> |
|---|
| 51 | | - </div> |
|---|
| 52 | | - |
|---|
| 53 | | - <div class="form-group" > |
|---|
| 54 | | - <label class="col-md-3 control-label" for="num_licenses" i18n>Num. Licenses</label> |
|---|
| 55 | | - <div class="col-md-8"> |
|---|
| 56 | | - <input type="number" id="num_licenses" name="num_licenses" placeholder="" class="form-control" ng-model="pack.num_licenses" ng-required="mandatory.num_licenses" /> |
|---|
| 57 | | - <div class="alert inline-alert alert-warning" ng-show="packForm.num_licenses.$invalid"> |
|---|
| 58 | | - <span class="glyphicon glyphicon-warning-sign"></span> |
|---|
| 59 | | - <span ng-show="packForm.num_licenses.$error.maxlength" ng-bind="maxlengthErrorMsg('Num. Licenses', maxlength.num_licenses)"></span> |
|---|
| 60 | | - <span ng-show="packForm.num_licenses.$error.required" ng-bind="mandatoryFieldErrorMsg('Num. Licenses')"></span> |
|---|
| 61 | | - </div> |
|---|
| 62 | | - </div> |
|---|
| 63 | | - </div> |
|---|
| 64 | | - |
|---|
| 65 | | - <div class="form-group" > |
|---|
| 66 | | - <label class="col-md-3 control-label" for="license_type_id" i18n>License type</label> |
|---|
| 67 | | - <div class="col-md-8"> |
|---|
| 68 | | - <select class="form-control" ng-required="mandatory.license_type_id" ng-model="pack.license_type_id" |
|---|
| 69 | | - ng-options="o.id as o.label for o in refs.license_type_id" > |
|---|
| 70 | | - <option selected="true" ng-if="!mandatory.license_type_id" value=""></option> |
|---|
| 71 | | - </select> |
|---|
| 72 | | - <div class="alert inline-alert alert-warning" ng-show="packForm.license_type_id.$invalid"> |
|---|
| 73 | | - <span class="glyphicon glyphicon-warning-sign"></span> |
|---|
| 74 | | - <span ng-show="packForm.license_type_id.$error.required" ng-bind="mandatoryFieldErrorMsg('License type')"></span> |
|---|
| 75 | | - </div> |
|---|
| 76 | | - </div> |
|---|
| 77 | | - </div> |
|---|
| 78 | | - |
|---|
| 79 | | - <div class="form-group" > |
|---|
| 80 | | - <label class="col-md-3 control-label" for="organization_id" i18n>Organization</label> |
|---|
| 81 | | - <div class="col-md-8"> |
|---|
| 82 | | - <select class="form-control" ng-required="field.mandatory" ng-model="pack.organization_id" |
|---|
| 83 | | - ng-options="o.id as o.label for o in refs.organization_id" > |
|---|
| 84 | | - <option selected="true" ng-if="!mandatory.organization_id" value=""></option> |
|---|
| 85 | | - </select> |
|---|
| 86 | | - <div class="alert inline-alert alert-warning" ng-show="packForm.organization_id.$invalid"> |
|---|
| 87 | | - <span class="glyphicon glyphicon-warning-sign"></span> |
|---|
| 88 | | - <span ng-show="packForm.organization_id.$error.required" ng-bind="mandatoryFieldErrorMsg('Organization')"></span> |
|---|
| 89 | | - </div> |
|---|
| 90 | | - </div> |
|---|
| 91 | | - </div> |
|---|
| 92 | | - <div class="form-group" > |
|---|
| 93 | | - <label class="col-md-3 control-label" for="license_preactivation" i18n>License preactivation</label> |
|---|
| 94 | | - <div class="col-md-8"> |
|---|
| 95 | | - <input type="checkbox" class="form-control" ng-model="pack.license_preactivation" /> |
|---|
| 96 | | - </div> |
|---|
| 97 | | - </div> |
|---|
| 98 | | - |
|---|
| 99 | | - |
|---|
| 100 | | - <div class="form-group" > |
|---|
| 101 | | - <label class="col-md-3 control-label" for="comments" i18n>Comments</label> |
|---|
| 102 | | - <div class="col-md-8"> |
|---|
| 103 | | - <textarea type="string" id="comments" name="comments" placeholder="" |
|---|
| 104 | | - class="form-control" ng-model="pack.comments" rows="2" ng-required="mandatory.comments" ng-maxlength="{{maxlength.comments}}"></textarea> |
|---|
| 105 | | - <div class="alert inline-alert alert-warning" ng-show="packForm.comments.$invalid"> |
|---|
| 106 | | - <span class="glyphicon glyphicon-warning-sign"></span> |
|---|
| 107 | | - <span ng-show="packForm.comments.$error.maxlength" ng-bind="maxlengthErrorMsg('Comments', maxlength.comments)"></span> |
|---|
| 108 | | - <span ng-show="packForm.comments.$error.required" ng-bind="mandatoryFieldErrorMsg('comments')"></span> |
|---|
| 109 | | - </div> |
|---|
| 110 | | - </div> |
|---|
| 111 | | - </div> |
|---|
| 112 | | - |
|---|
| 113 | | - <div class="form-group" ng-if="!isNew"> |
|---|
| 114 | | - <label class="col-md-3 control-label" >Created by</label> |
|---|
| 115 | | - <div class="col-md-8"> |
|---|
| 116 | | - <p class="form-control-static" ng-bind="pack.created_by_name"></p> |
|---|
| 117 | | - </div> |
|---|
| 118 | | - </div> |
|---|
| 119 | | - |
|---|
| 120 | | - <div class="form-group" ng-if="!isNew"> |
|---|
| 121 | | - <label class="col-md-3 control-label" >Creation date</label> |
|---|
| 122 | | - <div class="col-md-8"> |
|---|
| 123 | | - <p class="form-control-static" ng-bind="pack.creationTimestamp | date:'medium'"></p> |
|---|
| 124 | | - </div> |
|---|
| 125 | | - </div> |
|---|
| 126 | | - |
|---|
| 127 | | - <div class="form-group"> |
|---|
| 128 | | - <div class="col-md-offset-3 col-md-10" id="saveContainer"> |
|---|
| 129 | | - <button id="save" type="submit" class="btn btn-primary" > |
|---|
| 130 | | - <span i18n class="glyphicon glyphicon-floppy-disk"></span> Save |
|---|
| 131 | | - </button> |
|---|
| 132 | | - </div> |
|---|
| 133 | | - </div> |
|---|
| 134 | | - </form> |
|---|
| 4 | +<div class="container"> |
|---|
| 5 | + <div class="col-md-12"> </div> |
|---|
| 6 | + <div id="packs_section" class="col-md-6" ng-controller="PacksCtrl"> |
|---|
| 7 | + <nav class="navbar navbar-default navbar-static-top" role="navigation"> |
|---|
| 8 | + <div class="container-fluid"> |
|---|
| 9 | + <!-- Brand and toggle get grouped for better mobile display --> |
|---|
| 10 | + <div class="navbar-header"> |
|---|
| 11 | + <a class="navbar-brand" i18n>Packs</a> |
|---|
| 135 | 12 | </div> |
|---|
| 136 | 13 | |
|---|
| 137 | | - |
|---|
| 138 | | - <div class="panel panel-default" > |
|---|
| 139 | | - <div class="panel-heading"> |
|---|
| 140 | | - Packs <span class="badge pull-right" ng-bind="packs.length || 0"></span> |
|---|
| 14 | + <!-- Collect the nav links, forms, and other content for toggling --> |
|---|
| 15 | + <div class="collapse navbar-collapse"> |
|---|
| 16 | + <ul class="nav navbar-nav"> |
|---|
| 17 | + <li><a i18n ng-click="newPack()"><span |
|---|
| 18 | + class="glyphicon glyphicon-plus"></span> New</a></li> |
|---|
| 19 | + <li><a i18n ng-click="cancel()"> <span |
|---|
| 20 | + class="glyphicon glyphicon-ban-circle"></span> Cancel |
|---|
| 21 | + </a></li> |
|---|
| 22 | + </ul> |
|---|
| 23 | + <div class="navbar-form navbar-right form-group"> |
|---|
| 24 | + <span class="input-group input-group-sm"> |
|---|
| 25 | + <div class="input-group-addon" style="width: 28px;" > |
|---|
| 26 | + <span class=" glyphicon glyphicon-search"></span> |
|---|
| 27 | + </div> |
|---|
| 28 | + <input type="text" class="form-control" placeholder="Search" ng-model="$searchPacksText"> |
|---|
| 29 | + <div class="input-group-addon" style="width: 20px;" > |
|---|
| 30 | + <span class=" glyphicon glyphicon-remove" ng-click="$searchPacksText = '';"></span> |
|---|
| 31 | + </div> |
|---|
| 32 | + </span> |
|---|
| 33 | + </div> |
|---|
| 141 | 34 | </div> |
|---|
| 142 | | - |
|---|
| 143 | | - <table class="table table-hover table-condensed"> |
|---|
| 144 | | - <thead> |
|---|
| 145 | | - <tr> |
|---|
| 146 | | - <th i18n >Code</th> |
|---|
| 147 | | - <th i18n >Organization</th> |
|---|
| 148 | | - <th i18n >Application</th> |
|---|
| 149 | | - <th i18n >Licenses</th> |
|---|
| 150 | | - <th></th> |
|---|
| 151 | | - </tr> |
|---|
| 152 | | - </thead> |
|---|
| 153 | | - <tbody> |
|---|
| 154 | | - <tr ng-repeat="p in packs | filter:searchText" ng-dblclick="editPack(p)" ng-class="{success: currentPack.id === p.id}" ng-click="selectPack(p)"> |
|---|
| 155 | | - <td style="white-space: nowrap;" ng-bind="p.code"></td> |
|---|
| 156 | | - <td ng-bind="ellipsis(p.organization_name, 20)" title="{{pack.organization_name}}" ></td> |
|---|
| 157 | | - <td ng-bind="p.application_name"></td> |
|---|
| 158 | | - <td title="Total: {{p.num_licenses}}, available: {{p.num_available}}">{{p.num_licenses}} ({{p.num_available}})</td> |
|---|
| 159 | | - <td><span ng-click="editPack(p)" |
|---|
| 160 | | - class="glyphicon glyphicon-pencil"></span> |
|---|
| 161 | | - <span ng-click="deletePack(p)" |
|---|
| 162 | | - class="glyphicon glyphicon-remove"></span> |
|---|
| 163 | | - </td> |
|---|
| 164 | | - </tr> |
|---|
| 165 | | - </tbody> |
|---|
| 166 | | - <tfoot> |
|---|
| 167 | | - </tfoot> |
|---|
| 168 | | - </table> |
|---|
| 169 | 35 | </div> |
|---|
| 170 | | - |
|---|
| 171 | | - </div> |
|---|
| 172 | | -{{license | json}} |
|---|
| 173 | | - <div id="licenses_section" class="col-md-6" ng-controller="LicensesCtrl"> |
|---|
| 174 | | - <nav class="navbar navbar-default navbar-static-top" ng-disabled="!currentPack"> |
|---|
| 175 | | - <!-- Brand and toggle get grouped for better mobile display --> |
|---|
| 176 | | - <div class="navbar-header success"> |
|---|
| 177 | | - <a class="navbar-brand" i18n>Licenses</a> |
|---|
| 178 | | - </div> |
|---|
| 36 | + </nav> |
|---|
| 179 | 37 | |
|---|
| 180 | | - <!-- Collect the nav links, forms, and other content for toggling --> |
|---|
| 181 | | - <div class="collapse navbar-collapse" |
|---|
| 182 | | - id="bs-example-navbar-collapse-1"> |
|---|
| 183 | | - <ul class="nav navbar-nav"> |
|---|
| 184 | | - <li><a i18n ng-click="newLicense()"><span class="glyphicon glyphicon-plus"></span> |
|---|
| 185 | | - New</a></li> |
|---|
| 186 | | - <li><a i18n ng-click="cancel()"> <span |
|---|
| 187 | | - class="glyphicon glyphicon-ban-circle"></span> Cancel |
|---|
| 188 | | - </a></li> |
|---|
| 189 | | - </ul> |
|---|
| 190 | | - <div class="navbar-form navbar-right"> |
|---|
| 191 | | - <div class="input-group input-group-sm"> |
|---|
| 192 | | - <span class="input-group-addon glyphicon glyphicon-search" style="top: 0px;"></span> |
|---|
| 193 | | - <input type="text" class="form-control" placeholder="Search" ng-model="$searchPacksText" > |
|---|
| 194 | | - <span class="btn input-group-addon glyphicon glyphicon-remove" ng-click="$searchPacksText = ''" style="top: 0px;"></span> |
|---|
| 195 | | - </div> |
|---|
| 38 | + <div class="panel panel-default animate-show ng-hide" |
|---|
| 39 | + ng-show="showForm"> |
|---|
| 40 | + <form role="form" class="form-horizontal " name="packForm" |
|---|
| 41 | + id="packForm" ng-submit="save()"> |
|---|
| 42 | + <div class="form-group" ng-if="!isNew"> |
|---|
| 43 | + <label class="col-md-3 control-label">ID</label> |
|---|
| 44 | + <div class="col-md-8"> |
|---|
| 45 | + <p class="form-control-static" ng-bind="pack.id"></p> |
|---|
| 46 | + </div> |
|---|
| 47 | + </div> |
|---|
| 48 | + <div class="form-group"> |
|---|
| 49 | + <label class="col-md-3 control-label" for="code" i18n>Code</label> |
|---|
| 50 | + <div class="col-md-8"> |
|---|
| 51 | + <input type="string" id="code" name="code" placeholder="" |
|---|
| 52 | + class="form-control" ng-model="pack.code" |
|---|
| 53 | + ng-required="mandatory.code" ng-maxlength="{{maxlength.code}}" /> |
|---|
| 54 | + <div class="alert inline-alert alert-warning" |
|---|
| 55 | + ng-show="packForm.code.$invalid"> |
|---|
| 56 | + <span class="glyphicon glyphicon-warning-sign"></span> <span |
|---|
| 57 | + ng-show="packForm.code.$error.maxlength" |
|---|
| 58 | + ng-bind="maxlengthErrorMsg('Code', maxlength.code)"></span> <span |
|---|
| 59 | + ng-show="packForm.code.$error.required" |
|---|
| 60 | + ng-bind="mandatoryFieldErrorMsg('Code')"></span> |
|---|
| 196 | 61 | </div> |
|---|
| 197 | 62 | </div> |
|---|
| 198 | | - </nav> |
|---|
| 199 | | - |
|---|
| 200 | | - <div ng-if="!currentPack" class="well well-lg"> |
|---|
| 201 | | - <h4 i18n>No pack selected</h4> |
|---|
| 202 | | - <p i18n>Please, select a pack to manage its licenses</p> |
|---|
| 203 | | - </div> |
|---|
| 204 | | - |
|---|
| 205 | | - <div ng-if="currentPack" class="panel panel-default animate-show ng-hide" ng-show="showForm"> |
|---|
| 206 | | - <form role="form" class="form-horizontal " name="licenseForm" id="licenseForm" ng-submit="save()" > |
|---|
| 207 | | - <div class="form-group" ng-if="!isNew"> |
|---|
| 208 | | - <label class="col-md-3 control-label" >ID</label> |
|---|
| 209 | | - <div class="col-md-8"> |
|---|
| 210 | | - <p class="form-control-static" ng-bind="license.id"></p> |
|---|
| 211 | | - </div> |
|---|
| 212 | | - </div> |
|---|
| 213 | | - <div class="form-group" > |
|---|
| 214 | | - <label class="col-md-3 control-label" for="pack_id" i18n>Pack</label> |
|---|
| 215 | | - <div class="col-md-8"> |
|---|
| 216 | | - <p class="form-control-static" ng-bind="currentPack.code"></p> |
|---|
| 217 | | - <input type="hidden" id="pack_id" name="pack_id" ng-model="license.pack_id" /> |
|---|
| 218 | | - </div> |
|---|
| 219 | | - </div> |
|---|
| 220 | | - <div class="form-group" > |
|---|
| 221 | | - <label class="col-md-3 control-label" for="code" i18n>Code</label> |
|---|
| 222 | | - <div class="col-md-8"> |
|---|
| 223 | | - <input type="string" id="code" name="code" placeholder="" class="form-control" ng-model="license.code" ng-required="mandatory.code" ng-maxlength="{{maxlength.code}}" /> |
|---|
| 224 | | - <div class="alert inline-alert alert-warning" ng-show="licenseForm.code.$invalid"> |
|---|
| 225 | | - <span class="glyphicon glyphicon-warning-sign"></span> |
|---|
| 226 | | - <span ng-show="licenseForm.code.$error.maxlength" ng-bind="maxlengthErrorMsg('Code', maxlength.code)"></span> |
|---|
| 227 | | - <span ng-show="licenseForm.code.$error.required" ng-bind="mandatoryFieldErrorMsg('Code')"></span> |
|---|
| 228 | | - </div> |
|---|
| 229 | | - </div> |
|---|
| 230 | | - </div> |
|---|
| 231 | | - <div class="form-group" ng-if="!isNew"> |
|---|
| 232 | | - <label class="col-md-3 control-label" i18n>Status</label> |
|---|
| 233 | | - <div class="col-md-8"> |
|---|
| 234 | | - <p class="form-control-static" ng-bind="showStatusComplete(license)"></p> |
|---|
| 235 | | - </div> |
|---|
| 236 | | - </div> |
|---|
| 237 | | - |
|---|
| 238 | | - <div class="form-group" > |
|---|
| 239 | | - <label class="col-md-3 control-label" for="full_name" i18n>User full name</label> |
|---|
| 240 | | - <div class="col-md-8"> |
|---|
| 241 | | - <input type="string" id="full_name" name="full_name" placeholder="" class="form-control" ng-model="license.full_name" ng-required="mandatory.full_name" /> |
|---|
| 242 | | - <div class="alert inline-alert alert-warning" ng-show="licenseForm.full_name.$invalid"> |
|---|
| 243 | | - <span class="glyphicon glyphicon-warning-sign"></span> |
|---|
| 244 | | - <span ng-show="licenseForm.full_name.$error.maxlength" ng-bind="maxlengthErrorMsg('User full name', maxlength.full_name)"></span> |
|---|
| 245 | | - <span ng-show="licenseForm.full_name.$error.required" ng-bind="mandatoryFieldErrorMsg('User full name')"></span> |
|---|
| 246 | | - </div> |
|---|
| 247 | | - </div> |
|---|
| 248 | | - </div> |
|---|
| 249 | | - |
|---|
| 250 | | - <div class="form-group" > |
|---|
| 251 | | - <label class="col-md-3 control-label" for="email" i18n>User email</label> |
|---|
| 252 | | - <div class="col-md-8"> |
|---|
| 253 | | - <input type="email" id="email" name="email" placeholder="" class="form-control" ng-model="license.email" ng-required="mandatory.email" /> |
|---|
| 254 | | - <div class="alert inline-alert alert-warning" ng-show="licenseForm.email.$invalid"> |
|---|
| 255 | | - <span class="glyphicon glyphicon-warning-sign"></span> |
|---|
| 256 | | - <span ng-show="licenseForm.email.$error.email" ng-bind="'Please, write a valid email address'"></span> |
|---|
| 257 | | - <span ng-show="licenseForm.email.$error.maxlength" ng-bind="maxlengthErrorMsg('User email', maxlength.email)"></span> |
|---|
| 258 | | - <span ng-show="licenseForm.email.$error.required" ng-bind="mandatoryFieldErrorMsg('User email')"></span> |
|---|
| 259 | | - </div> |
|---|
| 260 | | - </div> |
|---|
| 261 | | - </div> |
|---|
| 262 | | - <div class="form-group" ng-if="isNew || !license.request_data" > |
|---|
| 263 | | - <label class="col-md-3 control-label" for="request_data" i18n>Request data</label> |
|---|
| 264 | | - <div class="col-md-8"> |
|---|
| 265 | | - <textarea id="request_data" name="request_data" placeholder="" |
|---|
| 266 | | - class="form-control" ng-model="license.request_data" rows="2" ng-required="mandatory.request_data" ng-maxlength="{{maxlength.request_data}}"></textarea> |
|---|
| 267 | | - <input file-loader="license.request_data" type="file" title="" > |
|---|
| 268 | | - <div class="alert inline-alert alert-warning" ng-show="licenseForm.request_data.$invalid"> |
|---|
| 269 | | - <span class="glyphicon glyphicon-warning-sign"></span> |
|---|
| 270 | | - <span ng-show="licenseForm.request_data.$error.maxlength" ng-bind="maxlengthErrorMsg('Request data', maxlength.request_data)"></span> |
|---|
| 271 | | - <span ng-show="licenseForm.request_data.$error.required" ng-bind="mandatoryFieldErrorMsg('Request data')"></span> |
|---|
| 272 | | - </div> |
|---|
| 273 | | - </div> |
|---|
| 274 | | - </div> |
|---|
| 275 | | - |
|---|
| 276 | | - <div class="form-group" > |
|---|
| 277 | | - <label class="col-md-3 control-label" for="comments" i18n>Comments</label> |
|---|
| 278 | | - <div class="col-md-8"> |
|---|
| 279 | | - <textarea type="string" id="comments" name="comments" placeholder="" |
|---|
| 280 | | - class="form-control" ng-model="license.comments" rows="2" ng-required="mandatory.comments" ng-maxlength="{{maxlength.comments}}"></textarea> |
|---|
| 281 | | - |
|---|
| 282 | | - <div class="alert inline-alert alert-warning" ng-show="licenseForm.comments.$invalid"> |
|---|
| 283 | | - <span class="glyphicon glyphicon-warning-sign"></span> |
|---|
| 284 | | - <span ng-show="licenseForm.comments.$error.maxlength" ng-bind="maxlengthErrorMsg('Comments', maxlength.comments)"></span> |
|---|
| 285 | | - <span ng-show="licenseForm.comments.$error.required" ng-bind="mandatoryFieldErrorMsg('comments')"></span> |
|---|
| 286 | | - </div> |
|---|
| 287 | | - </div> |
|---|
| 288 | | - </div> |
|---|
| 289 | | - |
|---|
| 290 | | - <div class="form-group" ng-if="!isNew && license.request_data"> |
|---|
| 291 | | - <label class="col-md-3 control-label" i18n>Request data</label> |
|---|
| 292 | | - <div class="col-md-8"> |
|---|
| 293 | | - <pre class="form-control-static" ng-bind="license.request_data | json"></pre> |
|---|
| 294 | | - </div> |
|---|
| 295 | | - </div> |
|---|
| 296 | | - |
|---|
| 297 | | - <div class="form-group" ng-if="!isNew && license.license_data"> |
|---|
| 298 | | - <label class="col-md-3 control-label" i18n >License file</label> |
|---|
| 299 | | - <div class="col-md-8"> |
|---|
| 300 | | - <p class="form-control-static" ng-bind="license.license_data"></p> |
|---|
| 301 | | - <button id="downloadLicense" class="btn btn-xs btn-link" ng-click="downloadLicense(license)"> |
|---|
| 302 | | - <span i18n class="glyphicon glyphicon-download"></span> |
|---|
| 303 | | - </button> |
|---|
| 304 | | - </div> |
|---|
| 305 | | - </div> |
|---|
| 306 | | - |
|---|
| 307 | | - <div class="form-group" ng-if="!isNew"> |
|---|
| 308 | | - <label class="col-md-3 control-label" i18n>Created by</label> |
|---|
| 309 | | - <div class="col-md-8"> |
|---|
| 310 | | - <p class="form-control-static" ng-bind="license.created_by_name"></p> |
|---|
| 311 | | - </div> |
|---|
| 312 | | - </div> |
|---|
| 313 | | - |
|---|
| 314 | | - <div class="form-group" ng-if="!isNew && license.canceled_by_name"> |
|---|
| 315 | | - <label class="col-md-3 control-label" >Canceled by</label> |
|---|
| 316 | | - <div class="col-md-8"> |
|---|
| 317 | | - <p class="form-control-static" ng-bind="license.canceled_by_name"></p> |
|---|
| 318 | | - </div> |
|---|
| 319 | | - </div> |
|---|
| 320 | | - |
|---|
| 321 | | - <div class="form-group" ng-if="!isNew"> |
|---|
| 322 | | - <label class="col-md-3 control-label" i18n>Creation date</label> |
|---|
| 323 | | - <div class="col-md-8"> |
|---|
| 324 | | - <p class="form-control-static" ng-bind="license.creationTimestamp | date:'medium'"></p> |
|---|
| 325 | | - </div> |
|---|
| 326 | | - </div> |
|---|
| 327 | | - |
|---|
| 328 | | - <div class="form-group" ng-if="!isNew"> |
|---|
| 329 | | - <label class="col-md-3 control-label" i18n >Modification date</label> |
|---|
| 330 | | - <div class="col-md-8"> |
|---|
| 331 | | - <p class="form-control-static" ng-bind="license.modificationTimestamp | date:'medium'"></p> |
|---|
| 332 | | - </div> |
|---|
| 333 | | - </div> |
|---|
| 334 | | - |
|---|
| 335 | | - <div class="form-group" ng-if="!isNew && license.activationTimestamp"> |
|---|
| 336 | | - <label class="col-md-3 control-label" i18n >Activation date</label> |
|---|
| 337 | | - <div class="col-md-8"> |
|---|
| 338 | | - <p class="form-control-static" ng-bind="license.activationTimestamp | date:'medium'"></p> |
|---|
| 339 | | - </div> |
|---|
| 340 | | - </div> |
|---|
| 341 | | - |
|---|
| 342 | | - <div class="form-group" ng-if="!isNew && license.sendTimestamp"> |
|---|
| 343 | | - <label class="col-md-3 control-label" i18n >Send date</label> |
|---|
| 344 | | - <div class="col-md-8"> |
|---|
| 345 | | - <p class="form-control-static" ng-bind="license.sendTimestamp | date:'medium'"></p> |
|---|
| 346 | | - </div> |
|---|
| 347 | | - </div> |
|---|
| 348 | | - |
|---|
| 349 | | - <div class="form-group" ng-if="!isNew && license.cancelationTimestamp"> |
|---|
| 350 | | - <label class="col-md-3 control-label" i18n >Cancelation date</label> |
|---|
| 351 | | - <div class="col-md-8"> |
|---|
| 352 | | - <p class="form-control-static" ng-bind="license.cancelationTimestamp | date:'medium'"></p> |
|---|
| 353 | | - </div> |
|---|
| 354 | | - </div> |
|---|
| 355 | | - |
|---|
| 356 | | - <div class="form-group" ng-if="!isNew && license.lastAccessTimestamp"> |
|---|
| 357 | | - <label class="col-md-3 control-label" i18n>Last access date</label> |
|---|
| 358 | | - <div class="col-md-8"> |
|---|
| 359 | | - <p class="form-control-static" ng-bind="license.lastAccessTimestamp | date:'medium'"></p> |
|---|
| 360 | | - </div> |
|---|
| 361 | | - </div> |
|---|
| 362 | | - |
|---|
| 363 | | - <div class="form-group"> |
|---|
| 364 | | - <div class="col-md-offset-3 col-md-10" id="saveContainer"> |
|---|
| 365 | | - <button id="save" type="submit" class="btn btn-primary" > |
|---|
| 366 | | - <span i18n class="glyphicon glyphicon-floppy-disk"></span> Save |
|---|
| 367 | | - </button> |
|---|
| 368 | | - </div> |
|---|
| 369 | | - </div> |
|---|
| 370 | | - </form> |
|---|
| 371 | 63 | </div> |
|---|
| 372 | 64 | |
|---|
| 373 | | - <div class="panel panel-default" ng-if="currentPack"> |
|---|
| 374 | | - <div class="panel-heading"> |
|---|
| 375 | | - <span i18n>Licenses for pack: </span>{{currentPack.code}} |
|---|
| 376 | | - <span style="color: lightgreen;" class="badge pull-right" ng-bind="currentPack.lic_available || 0"></span> |
|---|
| 377 | | - <span class="badge pull-right" ng-bind="licenses.length || 0"></span> |
|---|
| 65 | + <div class="form-group"> |
|---|
| 66 | + <label class="col-md-3 control-label" for="num_licenses" i18n>Num. |
|---|
| 67 | + Licenses</label> |
|---|
| 68 | + <div class="col-md-8"> |
|---|
| 69 | + <input type="number" id="num_licenses" name="num_licenses" |
|---|
| 70 | + placeholder="" class="form-control" ng-model="pack.num_licenses" |
|---|
| 71 | + ng-required="mandatory.num_licenses" /> |
|---|
| 72 | + <div class="alert inline-alert alert-warning" |
|---|
| 73 | + ng-show="packForm.num_licenses.$invalid"> |
|---|
| 74 | + <span class="glyphicon glyphicon-warning-sign"></span> <span |
|---|
| 75 | + ng-show="packForm.num_licenses.$error.maxlength" |
|---|
| 76 | + ng-bind="maxlengthErrorMsg('Num. Licenses', maxlength.num_licenses)"></span> |
|---|
| 77 | + <span ng-show="packForm.num_licenses.$error.required" |
|---|
| 78 | + ng-bind="mandatoryFieldErrorMsg('Num. Licenses')"></span> |
|---|
| 79 | + </div> |
|---|
| 378 | 80 | </div> |
|---|
| 379 | | - |
|---|
| 380 | | - |
|---|
| 381 | | - <table class="table table-hover table-condensed" > |
|---|
| 382 | | - <thead> |
|---|
| 383 | | - <tr> |
|---|
| 384 | | - <th i18n >License code</th> |
|---|
| 385 | | - <th i18n >User fullname</th> |
|---|
| 386 | | - <th i18n >Email</th> |
|---|
| 387 | | - <th i18n >Status</th> |
|---|
| 388 | | - <th></th> |
|---|
| 389 | | - </tr> |
|---|
| 390 | | - </thead> |
|---|
| 391 | | - <tbody> |
|---|
| 392 | | - <tr ng-repeat="lic in licenses | filter:searchLicenseText" ng-dblclick="editLicense(lic)" > |
|---|
| 393 | | - <td style="white-space: nowrap;" ng-bind="lic.code"></td> |
|---|
| 394 | | - <td ng-bind="ellipsis(lic.full_name, 20)" title="{{lic.full_name}}" ></td> |
|---|
| 395 | | - <td ng-bind="ellipsis(lic.email, 30)" title="{{lic.email}}" ></td> |
|---|
| 396 | | - <td ng-bind="showStatus(lic.status)"></td> |
|---|
| 397 | | - <td> |
|---|
| 398 | | - <div class="dropdown"> |
|---|
| 399 | | - <a class="dropdown-toggle" data-toggle="dropdown" > |
|---|
| 400 | | - <span class="glyphicon glyphicon-align-justify"></span> <span class="caret"></span> |
|---|
| 401 | | - </a> |
|---|
| 402 | | - <ul class="dropdown-menu"> |
|---|
| 403 | | - <li ng-if="isActionVisible(1, lic)"><a ng-click="downloadLicense(lic)"><span class="glyphicon glyphicon-download"></span> <span i18n>Download</span></a></li> |
|---|
| 404 | | - <li ng-if="isActionVisible(2, lic)"><a ng-click="editLicense(lic)"><span class="glyphicon glyphicon-pencil"></span> <span i18n>Edit</span></a></li> |
|---|
| 405 | | - <li ng-if="isActionVisible(4, lic)"><a ng-click="activateLicense(lic)"><span class="glyphicon glyphicon-check"></span> <span i18n>Activate</span></a></li> |
|---|
| 406 | | - <li ng-if="isActionVisible(8, lic)"><a ng-click="sendEmail(lic)"><span class="glyphicon glyphicon-send"></span> <span i18n>Send email</span></a></li> |
|---|
| 407 | | - <li ng-if="isActionVisible(16, lic)"><a ng-click="deleteLicense(lic)"><span class="glyphicon glyphicon-remove"></span> <span i18n>Remove</span></a></li> |
|---|
| 408 | | - </ul> |
|---|
| 409 | | - </div> |
|---|
| 410 | | - </td> |
|---|
| 411 | | - </tr> |
|---|
| 412 | | - </tbody> |
|---|
| 413 | | - <tfoot> |
|---|
| 414 | | - </tfoot> |
|---|
| 415 | | - </table> |
|---|
| 416 | | - </div> |
|---|
| 417 | | - |
|---|
| 81 | + </div> |
|---|
| 82 | + |
|---|
| 83 | + <div class="form-group"> |
|---|
| 84 | + <label class="col-md-3 control-label" for="license_type_id" i18n>License |
|---|
| 85 | + type</label> |
|---|
| 86 | + <div class="col-md-8"> |
|---|
| 87 | + <select class="form-control" |
|---|
| 88 | + ng-required="mandatory.license_type_id" |
|---|
| 89 | + ng-model="pack.license_type_id" |
|---|
| 90 | + ng-options="o.id as o.label for o in refs.license_type_id"> |
|---|
| 91 | + <option selected="true" ng-if="!mandatory.license_type_id" |
|---|
| 92 | + value=""></option> |
|---|
| 93 | + </select> |
|---|
| 94 | + <div class="alert inline-alert alert-warning" |
|---|
| 95 | + ng-show="packForm.license_type_id.$invalid"> |
|---|
| 96 | + <span class="glyphicon glyphicon-warning-sign"></span> <span |
|---|
| 97 | + ng-show="packForm.license_type_id.$error.required" |
|---|
| 98 | + ng-bind="mandatoryFieldErrorMsg('License type')"></span> |
|---|
| 99 | + </div> |
|---|
| 100 | + </div> |
|---|
| 101 | + </div> |
|---|
| 102 | + |
|---|
| 103 | + <div class="form-group"> |
|---|
| 104 | + <label class="col-md-3 control-label" for="organization_id" i18n>Organization</label> |
|---|
| 105 | + <div class="col-md-8"> |
|---|
| 106 | + <select class="form-control" ng-required="field.mandatory" |
|---|
| 107 | + ng-model="pack.organization_id" |
|---|
| 108 | + ng-options="o.id as o.label for o in refs.organization_id"> |
|---|
| 109 | + <option selected="true" ng-if="!mandatory.organization_id" |
|---|
| 110 | + value=""></option> |
|---|
| 111 | + </select> |
|---|
| 112 | + <div class="alert inline-alert alert-warning" |
|---|
| 113 | + ng-show="packForm.organization_id.$invalid"> |
|---|
| 114 | + <span class="glyphicon glyphicon-warning-sign"></span> <span |
|---|
| 115 | + ng-show="packForm.organization_id.$error.required" |
|---|
| 116 | + ng-bind="mandatoryFieldErrorMsg('Organization')"></span> |
|---|
| 117 | + </div> |
|---|
| 118 | + </div> |
|---|
| 119 | + </div> |
|---|
| 120 | + <div class="form-group"> |
|---|
| 121 | + <label class="col-md-3 control-label" for="license_preactivation" |
|---|
| 122 | + i18n>License preactivation</label> |
|---|
| 123 | + <div class="col-md-8"> |
|---|
| 124 | + <input type="checkbox" class="form-control" |
|---|
| 125 | + ng-model="pack.license_preactivation" /> |
|---|
| 126 | + </div> |
|---|
| 127 | + </div> |
|---|
| 128 | + |
|---|
| 129 | + |
|---|
| 130 | + <div class="form-group"> |
|---|
| 131 | + <label class="col-md-3 control-label" for="comments" i18n>Comments</label> |
|---|
| 132 | + <div class="col-md-8"> |
|---|
| 133 | + <textarea type="string" id="comments" name="comments" |
|---|
| 134 | + placeholder="" class="form-control" ng-model="pack.comments" |
|---|
| 135 | + rows="2" ng-required="mandatory.comments" |
|---|
| 136 | + ng-maxlength="{{maxlength.comments}}"></textarea> |
|---|
| 137 | + <div class="alert inline-alert alert-warning" |
|---|
| 138 | + ng-show="packForm.comments.$invalid"> |
|---|
| 139 | + <span class="glyphicon glyphicon-warning-sign"></span> <span |
|---|
| 140 | + ng-show="packForm.comments.$error.maxlength" |
|---|
| 141 | + ng-bind="maxlengthErrorMsg('Comments', maxlength.comments)"></span> |
|---|
| 142 | + <span ng-show="packForm.comments.$error.required" |
|---|
| 143 | + ng-bind="mandatoryFieldErrorMsg('comments')"></span> |
|---|
| 144 | + </div> |
|---|
| 145 | + </div> |
|---|
| 146 | + </div> |
|---|
| 147 | + |
|---|
| 148 | + <div class="form-group" ng-if="!isNew"> |
|---|
| 149 | + <label class="col-md-3 control-label">Created by</label> |
|---|
| 150 | + <div class="col-md-8"> |
|---|
| 151 | + <p class="form-control-static" ng-bind="pack.created_by_name"></p> |
|---|
| 152 | + </div> |
|---|
| 153 | + </div> |
|---|
| 154 | + |
|---|
| 155 | + <div class="form-group" ng-if="!isNew"> |
|---|
| 156 | + <label class="col-md-3 control-label">Creation date</label> |
|---|
| 157 | + <div class="col-md-8"> |
|---|
| 158 | + <p class="form-control-static" |
|---|
| 159 | + ng-bind="pack.creationTimestamp | date:'medium'"></p> |
|---|
| 160 | + </div> |
|---|
| 161 | + </div> |
|---|
| 162 | + |
|---|
| 163 | + <div class="form-group"> |
|---|
| 164 | + <div class="col-md-offset-3 col-md-10" id="saveContainer"> |
|---|
| 165 | + <button id="save" type="submit" class="btn btn-primary"> |
|---|
| 166 | + <span i18n class="glyphicon glyphicon-floppy-disk"></span> Save |
|---|
| 167 | + </button> |
|---|
| 168 | + </div> |
|---|
| 169 | + </div> |
|---|
| 170 | + </form> |
|---|
| 418 | 171 | </div> |
|---|
| 172 | + |
|---|
| 173 | + |
|---|
| 174 | + <div class="panel panel-default"> |
|---|
| 175 | + <div class="panel-heading"> |
|---|
| 176 | + Packs <span class="badge pull-right" ng-bind="packs.length || 0"></span> |
|---|
| 177 | + </div> |
|---|
| 178 | + |
|---|
| 179 | + <table class="table table-hover table-condensed"> |
|---|
| 180 | + <thead> |
|---|
| 181 | + <tr> |
|---|
| 182 | + <th i18n>Code</th> |
|---|
| 183 | + <th i18n>Organization</th> |
|---|
| 184 | + <th i18n>Application</th> |
|---|
| 185 | + <th i18n>Licenses</th> |
|---|
| 186 | + <th></th> |
|---|
| 187 | + </tr> |
|---|
| 188 | + </thead> |
|---|
| 189 | + <tbody> |
|---|
| 190 | + <tr ng-repeat="p in packs | filter:searchText" |
|---|
| 191 | + ng-dblclick="editPack(p)" |
|---|
| 192 | + ng-class="{success: currentPack.id === p.id}" |
|---|
| 193 | + ng-click="selectPack(p)"> |
|---|
| 194 | + <td style="white-space: nowrap;" ng-bind="p.code"></td> |
|---|
| 195 | + <td ng-bind="ellipsis(p.organization_name, 20)" |
|---|
| 196 | + title="{{pack.organization_name}}"></td> |
|---|
| 197 | + <td ng-bind="p.application_name"></td> |
|---|
| 198 | + <td |
|---|
| 199 | + title="Total: {{p.num_licenses}}, available: {{p.num_available}}">{{p.num_licenses}} |
|---|
| 200 | + ({{p.num_available}})</td> |
|---|
| 201 | + <td><span ng-click="editPack(p)" |
|---|
| 202 | + class="glyphicon glyphicon-pencil"></span> <span |
|---|
| 203 | + ng-click="deletePack(p)" class="glyphicon glyphicon-remove"></span> |
|---|
| 204 | + </td> |
|---|
| 205 | + </tr> |
|---|
| 206 | + </tbody> |
|---|
| 207 | + <tfoot> |
|---|
| 208 | + </tfoot> |
|---|
| 209 | + </table> |
|---|
| 210 | + </div> |
|---|
| 211 | + |
|---|
| 419 | 212 | </div> |
|---|
| 213 | + {{license | json}} |
|---|
| 214 | + <div id="licenses_section" class="col-md-6" |
|---|
| 215 | + ng-controller="LicensesCtrl"> |
|---|
| 216 | + <nav class="navbar navbar-default navbar-static-top" |
|---|
| 217 | + ng-disabled="!currentPack"> |
|---|
| 218 | + <div class="container-fluid"> |
|---|
| 219 | + <!-- Brand and toggle get grouped for better mobile display --> |
|---|
| 220 | + <div class="navbar-header success"> |
|---|
| 221 | + <a class="navbar-brand" i18n>Licenses</a> |
|---|
| 222 | + </div> |
|---|
| 223 | + |
|---|
| 224 | + <!-- Collect the nav links, forms, and other content for toggling --> |
|---|
| 225 | + <div class="collapse navbar-collapse" |
|---|
| 226 | + id="bs-example-navbar-collapse-1"> |
|---|
| 227 | + <ul class="nav navbar-nav"> |
|---|
| 228 | + <li><a i18n ng-click="newLicense()"><span |
|---|
| 229 | + class="glyphicon glyphicon-plus"></span> New</a></li> |
|---|
| 230 | + <li><a i18n ng-click="cancel()"> <span |
|---|
| 231 | + class="glyphicon glyphicon-ban-circle"></span> Cancel |
|---|
| 232 | + </a></li> |
|---|
| 233 | + </ul> |
|---|
| 234 | + <div class="navbar-form navbar-right form-group"> |
|---|
| 235 | + <span class="input-group input-group-sm"> |
|---|
| 236 | + <div class="input-group-addon" style="width: 28px;" > |
|---|
| 237 | + <span class=" glyphicon glyphicon-search"></span> |
|---|
| 238 | + </div> |
|---|
| 239 | + <input type="text" class="form-control" placeholder="Search" ng-model="$searchLicensesText"> |
|---|
| 240 | + <div class="input-group-addon" style="width: 20px;" > |
|---|
| 241 | + <span class=" glyphicon glyphicon-remove" ng-click="$searchLicensesText = '';"></span> |
|---|
| 242 | + </div> |
|---|
| 243 | + </span> |
|---|
| 244 | + </div> |
|---|
| 245 | + </div> |
|---|
| 246 | + </div> |
|---|
| 247 | + </nav> |
|---|
| 248 | + |
|---|
| 249 | + <div ng-if="!currentPack" class="well well-lg"> |
|---|
| 250 | + <h4 i18n>No pack selected</h4> |
|---|
| 251 | + <p i18n>Please, select a pack to manage its licenses</p> |
|---|
| 252 | + </div> |
|---|
| 253 | + |
|---|
| 254 | + <div ng-if="currentPack" |
|---|
| 255 | + class="panel panel-default animate-show ng-hide" ng-show="showForm"> |
|---|
| 256 | + <form role="form" class="form-horizontal " name="licenseForm" |
|---|
| 257 | + id="licenseForm" ng-submit="save()"> |
|---|
| 258 | + <div class="form-group" ng-if="!isNew"> |
|---|
| 259 | + <label class="col-md-3 control-label">ID</label> |
|---|
| 260 | + <div class="col-md-8"> |
|---|
| 261 | + <p class="form-control-static" ng-bind="license.id"></p> |
|---|
| 262 | + </div> |
|---|
| 263 | + </div> |
|---|
| 264 | + <div class="form-group"> |
|---|
| 265 | + <label class="col-md-3 control-label" for="pack_id" i18n>Pack</label> |
|---|
| 266 | + <div class="col-md-8"> |
|---|
| 267 | + <p class="form-control-static" ng-bind="currentPack.code"></p> |
|---|
| 268 | + <input type="hidden" id="pack_id" name="pack_id" |
|---|
| 269 | + ng-model="license.pack_id" /> |
|---|
| 270 | + </div> |
|---|
| 271 | + </div> |
|---|
| 272 | + <div class="form-group"> |
|---|
| 273 | + <label class="col-md-3 control-label" for="code" i18n>Code</label> |
|---|
| 274 | + <div class="col-md-8"> |
|---|
| 275 | + <input type="string" id="code" name="code" placeholder="" |
|---|
| 276 | + class="form-control" ng-model="license.code" |
|---|
| 277 | + ng-required="mandatory.code" ng-maxlength="{{maxlength.code}}" /> |
|---|
| 278 | + <div class="alert inline-alert alert-warning" |
|---|
| 279 | + ng-show="licenseForm.code.$invalid"> |
|---|
| 280 | + <span class="glyphicon glyphicon-warning-sign"></span> <span |
|---|
| 281 | + ng-show="licenseForm.code.$error.maxlength" |
|---|
| 282 | + ng-bind="maxlengthErrorMsg('Code', maxlength.code)"></span> <span |
|---|
| 283 | + ng-show="licenseForm.code.$error.required" |
|---|
| 284 | + ng-bind="mandatoryFieldErrorMsg('Code')"></span> |
|---|
| 285 | + </div> |
|---|
| 286 | + </div> |
|---|
| 287 | + </div> |
|---|
| 288 | + <div class="form-group" ng-if="!isNew"> |
|---|
| 289 | + <label class="col-md-3 control-label" i18n>Status</label> |
|---|
| 290 | + <div class="col-md-8"> |
|---|
| 291 | + <p class="form-control-static" ng-bind="showStatusLong(license)"></p> |
|---|
| 292 | + </div> |
|---|
| 293 | + </div> |
|---|
| 294 | + |
|---|
| 295 | + <div class="form-group"> |
|---|
| 296 | + <label class="col-md-3 control-label" for="full_name" i18n>User |
|---|
| 297 | + full name</label> |
|---|
| 298 | + <div class="col-md-8"> |
|---|
| 299 | + <input type="string" id="full_name" name="full_name" |
|---|
| 300 | + placeholder="" class="form-control" ng-model="license.full_name" |
|---|
| 301 | + ng-required="mandatory.full_name" /> |
|---|
| 302 | + <div class="alert inline-alert alert-warning" |
|---|
| 303 | + ng-show="licenseForm.full_name.$invalid"> |
|---|
| 304 | + <span class="glyphicon glyphicon-warning-sign"></span> <span |
|---|
| 305 | + ng-show="licenseForm.full_name.$error.maxlength" |
|---|
| 306 | + ng-bind="maxlengthErrorMsg('User full name', maxlength.full_name)"></span> |
|---|
| 307 | + <span ng-show="licenseForm.full_name.$error.required" |
|---|
| 308 | + ng-bind="mandatoryFieldErrorMsg('User full name')"></span> |
|---|
| 309 | + </div> |
|---|
| 310 | + </div> |
|---|
| 311 | + </div> |
|---|
| 312 | + |
|---|
| 313 | + <div class="form-group"> |
|---|
| 314 | + <label class="col-md-3 control-label" for="email" i18n>User |
|---|
| 315 | + email</label> |
|---|
| 316 | + <div class="col-md-8"> |
|---|
| 317 | + <input type="email" id="email" name="email" placeholder="" |
|---|
| 318 | + class="form-control" ng-model="license.email" |
|---|
| 319 | + ng-required="mandatory.email" /> |
|---|
| 320 | + <div class="alert inline-alert alert-warning" |
|---|
| 321 | + ng-show="licenseForm.email.$invalid"> |
|---|
| 322 | + <span class="glyphicon glyphicon-warning-sign"></span> <span |
|---|
| 323 | + ng-show="licenseForm.email.$error.email" |
|---|
| 324 | + ng-bind="'Please, write a valid email address'"></span> <span |
|---|
| 325 | + ng-show="licenseForm.email.$error.maxlength" |
|---|
| 326 | + ng-bind="maxlengthErrorMsg('User email', maxlength.email)"></span> |
|---|
| 327 | + <span ng-show="licenseForm.email.$error.required" |
|---|
| 328 | + ng-bind="mandatoryFieldErrorMsg('User email')"></span> |
|---|
| 329 | + </div> |
|---|
| 330 | + </div> |
|---|
| 331 | + </div> |
|---|
| 332 | + <div class="form-group" ng-if="isNew || !license.request_data"> |
|---|
| 333 | + <label class="col-md-3 control-label" for="request_data" i18n>Request |
|---|
| 334 | + data</label> |
|---|
| 335 | + <div class="col-md-7"> |
|---|
| 336 | + <textarea id="request_data" name="request_data" placeholder="" |
|---|
| 337 | + class="form-control" ng-model="license.request_data" rows="2" |
|---|
| 338 | + ng-required="mandatory.request_data" |
|---|
| 339 | + ng-maxlength="{{maxlength.request_data}}"></textarea> |
|---|
| 340 | + <div class="alert inline-alert alert-warning" |
|---|
| 341 | + ng-show="licenseForm.request_data.$invalid"> |
|---|
| 342 | + <span class="glyphicon glyphicon-warning-sign"></span> <span |
|---|
| 343 | + ng-show="licenseForm.request_data.$error.maxlength" |
|---|
| 344 | + ng-bind="maxlengthErrorMsg('Request data', maxlength.request_data)"></span> |
|---|
| 345 | + <span ng-show="licenseForm.request_data.$error.required" |
|---|
| 346 | + ng-bind="mandatoryFieldErrorMsg('Request data')"></span> |
|---|
| 347 | + </div> |
|---|
| 348 | + </div> |
|---|
| 349 | + <span class="btn btn-file btn-default btn-xs"> <span |
|---|
| 350 | + class="glyphicon glyphicon-folder-open"></span> <input |
|---|
| 351 | + file-loader="license.request_data" type="file"> |
|---|
| 352 | + </span> |
|---|
| 353 | + </div> |
|---|
| 354 | + |
|---|
| 355 | + <div class="form-group"> |
|---|
| 356 | + <label class="col-md-3 control-label" for="comments" i18n>Comments</label> |
|---|
| 357 | + <div class="col-md-8"> |
|---|
| 358 | + <textarea type="string" id="comments" name="comments" |
|---|
| 359 | + placeholder="" class="form-control" ng-model="license.comments" |
|---|
| 360 | + rows="2" ng-required="mandatory.comments" |
|---|
| 361 | + ng-maxlength="{{maxlength.comments}}"></textarea> |
|---|
| 362 | + |
|---|
| 363 | + <div class="alert inline-alert alert-warning" |
|---|
| 364 | + ng-show="licenseForm.comments.$invalid"> |
|---|
| 365 | + <span class="glyphicon glyphicon-warning-sign"></span> <span |
|---|
| 366 | + ng-show="licenseForm.comments.$error.maxlength" |
|---|
| 367 | + ng-bind="maxlengthErrorMsg('Comments', maxlength.comments)"></span> |
|---|
| 368 | + <span ng-show="licenseForm.comments.$error.required" |
|---|
| 369 | + ng-bind="mandatoryFieldErrorMsg('comments')"></span> |
|---|
| 370 | + </div> |
|---|
| 371 | + </div> |
|---|
| 372 | + </div> |
|---|
| 373 | + |
|---|
| 374 | + <div class="form-group" ng-if="!isNew && license.request_data"> |
|---|
| 375 | + <label class="col-md-3 control-label" i18n>Request data</label> |
|---|
| 376 | + <div class="col-md-8"> |
|---|
| 377 | + <pre class="form-control-static" |
|---|
| 378 | + ng-bind="license.request_data | json"></pre> |
|---|
| 379 | + </div> |
|---|
| 380 | + </div> |
|---|
| 381 | + |
|---|
| 382 | + <div class="form-group" ng-if="!isNew && license.license_data"> |
|---|
| 383 | + <label class="col-md-3 control-label" i18n>License file</label> |
|---|
| 384 | + <div class="col-md-8"> |
|---|
| 385 | + <p class="form-control-static" ng-bind="license.license_data"></p> |
|---|
| 386 | + <button id="downloadLicense" class="btn btn-xs btn-link" |
|---|
| 387 | + ng-click="downloadLicense(license)"> |
|---|
| 388 | + <span i18n class="glyphicon glyphicon-download"></span> |
|---|
| 389 | + </button> |
|---|
| 390 | + </div> |
|---|
| 391 | + </div> |
|---|
| 392 | + |
|---|
| 393 | + <div class="form-group" ng-if="!isNew"> |
|---|
| 394 | + <label class="col-md-3 control-label" i18n>Created by</label> |
|---|
| 395 | + <div class="col-md-8"> |
|---|
| 396 | + <p class="form-control-static" ng-bind="license.created_by_name"></p> |
|---|
| 397 | + </div> |
|---|
| 398 | + </div> |
|---|
| 399 | + |
|---|
| 400 | + <div class="form-group" ng-if="!isNew && license.canceled_by_name"> |
|---|
| 401 | + <label class="col-md-3 control-label">Canceled by</label> |
|---|
| 402 | + <div class="col-md-8"> |
|---|
| 403 | + <p class="form-control-static" ng-bind="license.canceled_by_name"></p> |
|---|
| 404 | + </div> |
|---|
| 405 | + </div> |
|---|
| 406 | + |
|---|
| 407 | + <div class="form-group" ng-if="!isNew"> |
|---|
| 408 | + <label class="col-md-3 control-label" i18n>Creation date</label> |
|---|
| 409 | + <div class="col-md-8"> |
|---|
| 410 | + <p class="form-control-static" |
|---|
| 411 | + ng-bind="license.creationTimestamp | date:'medium'"></p> |
|---|
| 412 | + </div> |
|---|
| 413 | + </div> |
|---|
| 414 | + |
|---|
| 415 | + <div class="form-group" ng-if="!isNew"> |
|---|
| 416 | + <label class="col-md-3 control-label" i18n>Modification |
|---|
| 417 | + date</label> |
|---|
| 418 | + <div class="col-md-8"> |
|---|
| 419 | + <p class="form-control-static" |
|---|
| 420 | + ng-bind="license.modificationTimestamp | date:'medium'"></p> |
|---|
| 421 | + </div> |
|---|
| 422 | + </div> |
|---|
| 423 | + |
|---|
| 424 | + <div class="form-group" |
|---|
| 425 | + ng-if="!isNew && license.activationTimestamp"> |
|---|
| 426 | + <label class="col-md-3 control-label" i18n>Activation date</label> |
|---|
| 427 | + <div class="col-md-8"> |
|---|
| 428 | + <p class="form-control-static" |
|---|
| 429 | + ng-bind="license.activationTimestamp | date:'medium'"></p> |
|---|
| 430 | + </div> |
|---|
| 431 | + </div> |
|---|
| 432 | + |
|---|
| 433 | + <div class="form-group" ng-if="!isNew && license.sendTimestamp"> |
|---|
| 434 | + <label class="col-md-3 control-label" i18n>Send date</label> |
|---|
| 435 | + <div class="col-md-8"> |
|---|
| 436 | + <p class="form-control-static" |
|---|
| 437 | + ng-bind="license.sendTimestamp | date:'medium'"></p> |
|---|
| 438 | + </div> |
|---|
| 439 | + </div> |
|---|
| 440 | + |
|---|
| 441 | + <div class="form-group" |
|---|
| 442 | + ng-if="!isNew && license.cancelationTimestamp"> |
|---|
| 443 | + <label class="col-md-3 control-label" i18n>Cancelation date</label> |
|---|
| 444 | + <div class="col-md-8"> |
|---|
| 445 | + <p class="form-control-static" |
|---|
| 446 | + ng-bind="license.cancelationTimestamp | date:'medium'"></p> |
|---|
| 447 | + </div> |
|---|
| 448 | + </div> |
|---|
| 449 | + |
|---|
| 450 | + <div class="form-group" |
|---|
| 451 | + ng-if="!isNew && license.lastAccessTimestamp"> |
|---|
| 452 | + <label class="col-md-3 control-label" i18n>Last access date</label> |
|---|
| 453 | + <div class="col-md-8"> |
|---|
| 454 | + <p class="form-control-static" |
|---|
| 455 | + ng-bind="license.lastAccessTimestamp | date:'medium'"></p> |
|---|
| 456 | + </div> |
|---|
| 457 | + </div> |
|---|
| 458 | + |
|---|
| 459 | + <div class="form-group"> |
|---|
| 460 | + <div class="col-md-offset-3 col-md-9" id="saveContainer"> |
|---|
| 461 | + <button id="save" type="submit" class="btn btn-primary"> |
|---|
| 462 | + <span i18n class="glyphicon glyphicon-floppy-disk"></span> Save |
|---|
| 463 | + </button> |
|---|
| 464 | + <button id="activate" class="btn btn-success" |
|---|
| 465 | + ng-click="activateLicense(license)" |
|---|
| 466 | + ng-if="isActionVisible('activate', license)"> |
|---|
| 467 | + <span i18n class="glyphicon glyphicon-check"></span> Activate |
|---|
| 468 | + </button> |
|---|
| 469 | + <button id="send" class="btn btn-info" |
|---|
| 470 | + ng-click="sendLicense(license)" |
|---|
| 471 | + ng-if="isActionVisible('send', license)"> |
|---|
| 472 | + <span i18n class="glyphicon glyphicon-send"></span> Send |
|---|
| 473 | + </button> |
|---|
| 474 | + <button id="cancel" class="btn btn-warning" |
|---|
| 475 | + ng-click="cancelLicense(license)" |
|---|
| 476 | + ng-if="isActionVisible('cancel', license)"> |
|---|
| 477 | + <span i18n class="glyphicon glyphicon-ban-circle"></span> Cancel |
|---|
| 478 | + </button> |
|---|
| 479 | + <button id="remove" class="btn btn-danger" |
|---|
| 480 | + ng-click="removeLicense(license)" |
|---|
| 481 | + ng-if="isActionVisible('delete', license)"> |
|---|
| 482 | + <span i18n class="glyphicon glyphicon-trash"></span> Delete |
|---|
| 483 | + </button> |
|---|
| 484 | + </div> |
|---|
| 485 | + </div> |
|---|
| 486 | + </form> |
|---|
| 487 | + </div> |
|---|
| 488 | + |
|---|
| 489 | + <div class="panel panel-default" ng-if="currentPack"> |
|---|
| 490 | + <div class="panel-heading"> |
|---|
| 491 | + <span i18n>Licenses for pack: </span>{{currentPack.code}} <span |
|---|
| 492 | + style="color: lightgreen;" class="badge pull-right" |
|---|
| 493 | + ng-bind="currentPack.lic_available || 0"></span> <span |
|---|
| 494 | + class="badge pull-right" ng-bind="licenses.length || 0"></span> |
|---|
| 495 | + </div> |
|---|
| 496 | + |
|---|
| 497 | + |
|---|
| 498 | + <table class="table table-hover table-condensed"> |
|---|
| 499 | + <thead> |
|---|
| 500 | + <tr> |
|---|
| 501 | + <th i18n>License code</th> |
|---|
| 502 | + <th i18n>User fullname</th> |
|---|
| 503 | + <th i18n>Email</th> |
|---|
| 504 | + <th i18n>Status</th> |
|---|
| 505 | + <th></th> |
|---|
| 506 | + </tr> |
|---|
| 507 | + </thead> |
|---|
| 508 | + <tbody> |
|---|
| 509 | + <tr ng-repeat="lic in licenses | filter:searchLicenseText" |
|---|
| 510 | + ng-dblclick="editLicense(lic)"> |
|---|
| 511 | + <td style="white-space: nowrap;" ng-bind="lic.code"></td> |
|---|
| 512 | + <td ng-bind="ellipsis(lic.full_name, 20)" |
|---|
| 513 | + title="{{lic.full_name}}"></td> |
|---|
| 514 | + <td ng-bind="ellipsis(lic.email, 30)" title="{{lic.email}}"></td> |
|---|
| 515 | + <td ng-bind="showStatus(lic.status)"></td> |
|---|
| 516 | + <td> |
|---|
| 517 | + <div class="dropdown"> |
|---|
| 518 | + <a class="dropdown-toggle" data-toggle="dropdown"> <span |
|---|
| 519 | + class="glyphicon glyphicon-align-justify"></span> <span |
|---|
| 520 | + class="caret"></span> |
|---|
| 521 | + </a> |
|---|
| 522 | + <ul class="dropdown-menu"> |
|---|
| 523 | + <li ng-if="isActionVisible('download', lic)"><a |
|---|
| 524 | + ng-click="downloadLicense(lic)"><span |
|---|
| 525 | + class="glyphicon glyphicon-download"></span> <span i18n>Download</span></a></li> |
|---|
| 526 | + <li ng-if="isActionVisible('edit', lic)"><a |
|---|
| 527 | + ng-click="editLicense(lic)"><span |
|---|
| 528 | + class="glyphicon glyphicon-pencil"></span> <span i18n>Edit</span></a></li> |
|---|
| 529 | + <li ng-if="isActionVisible('activate', lic)"><a |
|---|
| 530 | + ng-click="activateLicense(lic)"><span |
|---|
| 531 | + class="glyphicon glyphicon-check"></span> <span i18n>Activate</span></a></li> |
|---|
| 532 | + <li ng-if="isActionVisible('send', lic)"><a |
|---|
| 533 | + ng-click="sendEmail(lic)"><span |
|---|
| 534 | + class="glyphicon glyphicon-send"></span> <span i18n>Send |
|---|
| 535 | + email</span></a></li> |
|---|
| 536 | + <li ng-if="isActionVisible('cancel', lic)"><a |
|---|
| 537 | + ng-click="deleteLicense(lic)"><span |
|---|
| 538 | + class="glyphicon glyphicon-ban-circle"></span> <span i18n>Cancel</span></a></li> |
|---|
| 539 | + <li ng-if="isActionVisible('delete', lic)"><a |
|---|
| 540 | + ng-click="deleteLicense(lic)"><span |
|---|
| 541 | + class="glyphicon glyphicon-trash"></span> <span i18n>Delete</span></a></li> |
|---|
| 542 | + </ul> |
|---|
| 543 | + </div> |
|---|
| 544 | + </td> |
|---|
| 545 | + </tr> |
|---|
| 546 | + </tbody> |
|---|
| 547 | + <tfoot> |
|---|
| 548 | + </tfoot> |
|---|
| 549 | + </table> |
|---|
| 550 | + </div> |
|---|
| 551 | + |
|---|
| 552 | + </div> |
|---|
| 553 | +</div> |
|---|
| 420 | 554 | |
|---|