Project

General

Profile

« Previous | Next » 

Revision 57147

fixed problem on missing item

View differences:

modules/dli-service-portal/branches/3.0/static/partials/detail.html
29 29

  
30 30
</section>
31 31

  
32

  
32 33
<section ng-show="item">
33 34

  
34 35

  
36
    <div ng-show='nf'>
37
        <div class="row">
38
            <div class="col-lg-7 col-lg-offset-1">
39
                    <div class="row" style="margin-bottom: 5px">
40
                        <div class="col-lg-12">
41
                            <h4>Error: Item not found </h4>
42
                        </div>
43
                    </div>
44
            </div>
45
        </div>
46
    </div>
47

  
48
    <div ng-hide='nf'>
35 49
    <div>
36 50
        <div class="row">
37 51

  
......
239 253
            </div>
240 254
        </div>
241 255
    </div>
256
    </div>
242 257
</section>
243 258
<script>
244 259
        $("#share").jsSocials({
modules/dli-service-portal/branches/3.0/static/angular/queryController.js
13 13

  
14 14
    queryService.getItem($scope.identifier).success(function (data) {
15 15
        if ('result' in data) {
16
            if ('hits' in data.result) {
16
            if ('hits' in data.result && data.result['hits'] != null && data.result['hits'].length >0  ) {
17 17

  
18 18
                var summary = data.result.hits[0];
19 19
                var relations = data.result.hits[1];
......
30 30
                        $(this).tab('show')
31 31
                        });
32 32
            }
33
            else {
34
                $scope.item = {};
35
                $scope.nf =true                       
36
            }
33 37
        }
34 38
    }).error(function (data) {
35 39
        $scope.hideSpinner();
modules/dli-service-portal/branches/3.0/eu/dnetlib/es_connector.py
326 326
        except Exception as e:
327 327
            log.error("Error on getting item ")
328 328
            log.error(e)
329
            log.error("on line %i" % sys.exc_traceback.tb_lineno)
329
            #log.error("on line %i" % sys.exc_info)
330 330
            return DLIESResponse()

Also available in: Unified diff