Commit 94ed0809 by dileep bhimineni Committed by Vishal Kadam

changes for my tracking purpose

parent 208b2bf1
...@@ -89,3 +89,22 @@ footer.navbar-bottom img { ...@@ -89,3 +89,22 @@ footer.navbar-bottom img {
padding-left: 5px; padding-left: 5px;
margin-top: -21px; margin-top: -21px;
} }
.searchresults {
border: 1px solid #ddd;
padding: 10px;
}
.mt10px {
margin-top: 10px;
}
.searchresults:first-child {
border-top-right-radius: 4px;
border-top-left-radius: 4px;
}
.searchresults:last-child {
margin-bottom: 0;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
...@@ -45,6 +45,16 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio ...@@ -45,6 +45,16 @@ angular.module('dgc.search').controller('SearchController', ['$scope', '$locatio
return $scope.types.indexOf(this.results.dataType.typeName && this.results.dataType.typeName.toLowerCase()) > -1; return $scope.types.indexOf(this.results.dataType.typeName && this.results.dataType.typeName.toLowerCase()) > -1;
}; };
$scope.filterSearchResults = function(items) {
var res = {};
angular.forEach(items, function(value, key) {
if(!(typeof value == 'object'))
res[key] = value + ',';
});
return res;
}
$scope.query=$stateParams.query; $scope.query=$stateParams.query;
if ($scope.query) { if ($scope.query) {
$scope.search($scope.query); $scope.search($scope.query);
......
...@@ -18,8 +18,13 @@ ...@@ -18,8 +18,13 @@
<h4>{{resultCount}} results matching your search query "{{query}}" were found</h4> <h4>{{resultCount}} results matching your search query "{{query}}" were found</h4>
<ul class="list-unstyled"> <ul class="list-unstyled">
<li ng-repeat="result in results.rows"> <li ng-repeat="result in results.rows" class="searchresults">
<div data-ng-if="typeAvailable()" data-ng-include="'/modules/search/views/types/'+results.dataType.typeName.toLowerCase()+'.html'"></div> <div data-ng-if="typeAvailable()">
<h4><a data-ui-sref="details({id:result['$id$'].id})">{{result.name}}</a></h4>
<p>{{result.description}}</p>
<span ng-repeat="(key, value) in filterSearchResults(result)" ><span ng-show="$index < 4"><b>{{key}}: </b>{{value}}</span></span><a data-ui-sref="details({id:result.guid})">..show more</a>
<h5>Tags : <a ng-repeat="(key, value) in result['$traits$']" data-ui-sref="search.results({query: key})">{{key}}</a> </h5>
</div>
<div data-ng-if="!typeAvailable()" data-ng-include="'/modules/search/views/types/guid.html'"></div> <div data-ng-if="!typeAvailable()" data-ng-include="'/modules/search/views/types/guid.html'"></div>
</li> </li>
</ul> </ul>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment