| .. | .. |
|---|
| 21 | 21 | </a></li> |
|---|
| 22 | 22 | </ul> |
|---|
| 23 | 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;" > |
|---|
| 24 | + <span class="input-group input-group-sm"> |
|---|
| 25 | + <div class="input-group-addon" style="width: 28px;"> |
|---|
| 26 | 26 | <span class=" glyphicon glyphicon-search"></span> |
|---|
| 27 | + </div> <input type="text" class="form-control" placeholder="Search" |
|---|
| 28 | + ng-model="$searchPacksText"> |
|---|
| 29 | + <div class="input-group-addon" style="width: 20px;"> |
|---|
| 30 | + <span class=" glyphicon glyphicon-remove" |
|---|
| 31 | + ng-click="$searchPacksText = '';"></span> |
|---|
| 27 | 32 | </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 | + </span> |
|---|
| 33 | 34 | </div> |
|---|
| 34 | 35 | </div> |
|---|
| 35 | 36 | </div> |
|---|
| .. | .. |
|---|
| 63 | 64 | </div> |
|---|
| 64 | 65 | |
|---|
| 65 | 66 | <div class="form-group"> |
|---|
| 67 | + <label class="col-md-3 control-label" for="code" i18n>Validity (from - to)</label> |
|---|
| 68 | + <div class="col-md-4"> |
|---|
| 69 | + <input type="date" id="init_valid_date" name="init_valid_date" placeholder="" |
|---|
| 70 | + class="form-control" ng-model="pack.init_valid_date" |
|---|
| 71 | + ng-required="mandatory.init_valid_date" /> |
|---|
| 72 | + <div class="alert inline-alert alert-warning" |
|---|
| 73 | + ng-show="packForm.initValidDate.$invalid"> |
|---|
| 74 | + <span class="glyphicon glyphicon-warning-sign"></span> |
|---|
| 75 | + <span ng-show="packForm.init_valid_date.$error.required" |
|---|
| 76 | + ng-bind="mandatoryFieldErrorMsg('Init valid date')"></span> |
|---|
| 77 | + </div> |
|---|
| 78 | + </div> |
|---|
| 79 | + <div class="col-md-4"> |
|---|
| 80 | + <input type="date" id="end_valid_date" name="end_valid_date" placeholder="" |
|---|
| 81 | + class="form-control" ng-model="pack.end_valid_date" |
|---|
| 82 | + ng-required="mandatory.end_valid_date" /> |
|---|
| 83 | + <div class="alert inline-alert alert-warning" |
|---|
| 84 | + ng-show="packForm.initValidDate.$invalid"> |
|---|
| 85 | + <span class="glyphicon glyphicon-warning-sign"></span> |
|---|
| 86 | + <span ng-show="packForm.end_valid_date.$error.required" |
|---|
| 87 | + ng-bind="mandatoryFieldErrorMsg('End valid date')"></span> |
|---|
| 88 | + </div> |
|---|
| 89 | + </div> |
|---|
| 90 | + </div> |
|---|
| 91 | + |
|---|
| 92 | + <div class="form-group"> |
|---|
| 66 | 93 | <label class="col-md-3 control-label" for="num_licenses" i18n>Num. |
|---|
| 67 | 94 | Licenses</label> |
|---|
| 68 | 95 | <div class="col-md-8"> |
|---|
| .. | .. |
|---|
| 80 | 107 | </div> |
|---|
| 81 | 108 | </div> |
|---|
| 82 | 109 | |
|---|
| 110 | + <div class="form-group" ng-if="!isNew"> |
|---|
| 111 | + <label class="col-md-3 control-label" for="status" i18n>Status</label> |
|---|
| 112 | + <div class="col-md-8"> |
|---|
| 113 | + <select class="form-control" id="status" |
|---|
| 114 | + ng-required="mandatory.status" |
|---|
| 115 | + ng-model="pack.status" |
|---|
| 116 | + ng-options="o.id as o.label for o in refs.pack_status"> |
|---|
| 117 | + </select> |
|---|
| 118 | + <div class="alert inline-alert alert-warning" |
|---|
| 119 | + ng-show="packForm.status.$invalid"> |
|---|
| 120 | + <span class="glyphicon glyphicon-warning-sign"></span> <span |
|---|
| 121 | + ng-show="packForm.status.$error.required" |
|---|
| 122 | + ng-bind="mandatoryFieldErrorMsg('Status')"></span> |
|---|
| 123 | + </div> |
|---|
| 124 | + </div> |
|---|
| 125 | + </div> |
|---|
| 126 | + |
|---|
| 83 | 127 | <div class="form-group"> |
|---|
| 84 | 128 | <label class="col-md-3 control-label" for="license_type_id" i18n>License |
|---|
| 85 | 129 | type</label> |
|---|
| 86 | 130 | <div class="col-md-8"> |
|---|
| 87 | | - <select class="form-control" |
|---|
| 131 | + <select class="form-control" id="license_type_id" |
|---|
| 132 | + ng-change="updateMetadata()" |
|---|
| 88 | 133 | ng-required="mandatory.license_type_id" |
|---|
| 89 | 134 | ng-model="pack.license_type_id" |
|---|
| 90 | 135 | ng-options="o.id as o.label for o in refs.license_type_id"> |
|---|
| 91 | | - |
|---|
| 136 | + |
|---|
| 92 | 137 | </select> |
|---|
| 93 | 138 | <div class="alert inline-alert alert-warning" |
|---|
| 94 | 139 | ng-show="packForm.license_type_id.$invalid"> |
|---|
| .. | .. |
|---|
| 143 | 188 | </div> |
|---|
| 144 | 189 | |
|---|
| 145 | 190 | <div class="form-group" ng-if="!isNew"> |
|---|
| 146 | | - <label class="col-md-3 control-label">Created by</label> |
|---|
| 191 | + <label i18n class="col-md-3 control-label">Created by</label> |
|---|
| 147 | 192 | <div class="col-md-8"> |
|---|
| 148 | 193 | <p class="form-control-static" ng-bind="pack.created_by_name"></p> |
|---|
| 149 | 194 | </div> |
|---|
| 150 | 195 | </div> |
|---|
| 151 | 196 | |
|---|
| 152 | 197 | <div class="form-group" ng-if="!isNew"> |
|---|
| 153 | | - <label class="col-md-3 control-label">Creation date</label> |
|---|
| 198 | + <label i18n class="col-md-3 control-label">Creation date</label> |
|---|
| 154 | 199 | <div class="col-md-8"> |
|---|
| 155 | 200 | <p class="form-control-static" |
|---|
| 156 | 201 | ng-bind="pack.creationTimestamp | date:'medium'"></p> |
|---|
| 202 | + </div> |
|---|
| 203 | + </div> |
|---|
| 204 | + |
|---|
| 205 | + <div class="form-group"> |
|---|
| 206 | + <label class="col-md-3 control-label" i18n>Metadata</label> |
|---|
| 207 | + <div class="col-md-8"> |
|---|
| 208 | + <table class="table table-hover table-condensed"> |
|---|
| 209 | + <thead> |
|---|
| 210 | + <tr> |
|---|
| 211 | + <th i18n>Key</th> |
|---|
| 212 | + <th i18n>Value</th> |
|---|
| 213 | + </tr> |
|---|
| 214 | + </thead> |
|---|
| 215 | + <tbody> |
|---|
| 216 | + <tr ng-repeat="row_md in pack.metadata"> |
|---|
| 217 | + <td><input type="text" id="md_key" name="md_key" |
|---|
| 218 | + placeholder="" ng-readonly="true" |
|---|
| 219 | + class="form-control" ng-model="row_md['key']" |
|---|
| 220 | + ng-required="true" /></td> |
|---|
| 221 | + <td><input type="text" id="md_value" name="md_value" ng-readonly="row_md['readonly']" |
|---|
| 222 | + placeholder="" class="form-control" ng-model="row_md['value']" |
|---|
| 223 | + ng-required="row_md['mandatory']" ng-maxlength="150" /></td> |
|---|
| 224 | + </tr> |
|---|
| 225 | + </tbody> |
|---|
| 226 | + </table> |
|---|
| 157 | 227 | </div> |
|---|
| 158 | 228 | </div> |
|---|
| 159 | 229 | |
|---|
| .. | .. |
|---|
| 213 | 283 | <nav class="navbar navbar-default navbar-static-top" |
|---|
| 214 | 284 | ng-disabled="!currentPack"> |
|---|
| 215 | 285 | <div class="container-fluid"> |
|---|
| 216 | | - <!-- Brand and toggle get grouped for better mobile display --> |
|---|
| 217 | | - <div class="navbar-header success"> |
|---|
| 218 | | - <a class="navbar-brand" i18n>Licenses</a> |
|---|
| 219 | | - </div> |
|---|
| 286 | + <!-- Brand and toggle get grouped for better mobile display --> |
|---|
| 287 | + <div class="navbar-header success"> |
|---|
| 288 | + <a class="navbar-brand" i18n>Licenses</a> |
|---|
| 289 | + </div> |
|---|
| 220 | 290 | |
|---|
| 221 | | - <!-- Collect the nav links, forms, and other content for toggling --> |
|---|
| 222 | | - <div class="collapse navbar-collapse" |
|---|
| 223 | | - id="bs-example-navbar-collapse-1"> |
|---|
| 224 | | - <ul class="nav navbar-nav"> |
|---|
| 225 | | - <li><a i18n ng-click="newLicense()"><span |
|---|
| 226 | | - class="glyphicon glyphicon-plus"></span> New</a></li> |
|---|
| 227 | | - <li><a i18n ng-click="cancel()"> <span |
|---|
| 228 | | - class="glyphicon glyphicon-ban-circle"></span> Cancel |
|---|
| 229 | | - </a></li> |
|---|
| 230 | | - </ul> |
|---|
| 231 | | - <div class="navbar-form navbar-right form-group"> |
|---|
| 232 | | - <span class="input-group input-group-sm"> |
|---|
| 233 | | - <div class="input-group-addon" style="width: 28px;" > |
|---|
| 291 | + <!-- Collect the nav links, forms, and other content for toggling --> |
|---|
| 292 | + <div class="collapse navbar-collapse" |
|---|
| 293 | + id="bs-example-navbar-collapse-1"> |
|---|
| 294 | + <ul class="nav navbar-nav"> |
|---|
| 295 | + <li><a i18n ng-click="newLicense()"><span |
|---|
| 296 | + class="glyphicon glyphicon-plus"></span> New</a></li> |
|---|
| 297 | + <li><a i18n ng-click="cancel()"> <span |
|---|
| 298 | + class="glyphicon glyphicon-ban-circle"></span> Cancel |
|---|
| 299 | + </a></li> |
|---|
| 300 | + </ul> |
|---|
| 301 | + <div class="navbar-form navbar-right form-group"> |
|---|
| 302 | + <span class="input-group input-group-sm"> |
|---|
| 303 | + <div class="input-group-addon" style="width: 28px;"> |
|---|
| 234 | 304 | <span class=" glyphicon glyphicon-search"></span> |
|---|
| 305 | + </div> <input type="text" class="form-control" placeholder="Search" |
|---|
| 306 | + ng-model="$searchLicensesText"> |
|---|
| 307 | + <div class="input-group-addon" style="width: 20px;"> |
|---|
| 308 | + <span class=" glyphicon glyphicon-remove" |
|---|
| 309 | + ng-click="$searchLicensesText = '';"></span> |
|---|
| 235 | 310 | </div> |
|---|
| 236 | | - <input type="text" class="form-control" placeholder="Search" ng-model="$searchLicensesText"> |
|---|
| 237 | | - <div class="input-group-addon" style="width: 20px;" > |
|---|
| 238 | | - <span class=" glyphicon glyphicon-remove" ng-click="$searchLicensesText = '';"></span> |
|---|
| 239 | | - </div> |
|---|
| 240 | | - </span> |
|---|
| 311 | + </span> |
|---|
| 241 | 312 | </div> |
|---|
| 242 | | - </div> |
|---|
| 313 | + </div> |
|---|
| 243 | 314 | </div> |
|---|
| 244 | 315 | </nav> |
|---|
| 245 | 316 | |
|---|