Skip to content

Commit

Permalink
Сделал вывод версии в результаты поиска
Browse files Browse the repository at this point in the history
  • Loading branch information
kostyaeremin committed Nov 14, 2017
1 parent cd04b66 commit 2265dd0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
8 changes: 8 additions & 0 deletions CSP/csp/docsearch/js/app/app-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,14 @@ searchApp
}
}

$scope.getVersion = function () {
$http.get(baseUrl + 'GetVersion')
.then(function(response) {
$scope.version = response.data.version;
});
}
console.log($scope.version);

$scope.handleClick = function (item) {

$scope.currrentSearchItem = item;
Expand Down
8 changes: 7 additions & 1 deletion CSP/csp/docsearch/js/app/templates/DocResults.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,14 @@
<span class="glyphicon glyphicon-wrench"></span>
<span class="hidden-sm hidden-xs"> Advanced Search</span>
</a>

<div class="text-right"> <!-- Version -->
<p ng-model="version" ng-init="getVersion()">Version {{version}}</p>
</div>
</div>
</form>


</header>

<div ng-show = "preloadToggle"> <!-- Preloader animation-->
Expand Down Expand Up @@ -139,7 +145,7 @@
<br>
<button class="btn" ng-class="!result.show_all ? 'btn-success' : 'btn-default'" ng-click = "result.show_all = !result.show_all;" ng-hide = "result.textInfo.length <= 5"><span ng-hide="result.show_all">Show other results</span><span ng-show="result.show_all">Expand page results</span></button>
</li>
</ul>
</ul>

<div class="pagination-wrap text-center"> <!-- Pagination -->
<ul class="pagination Cursor">
Expand Down
4 changes: 2 additions & 2 deletions src/cls/iKnowDoc/Search/SearchPages.cls
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,11 @@ ClassMethod FormQuery(obj) As %Status
ClassMethod GetVersion() As %Status
{
try {
set SystemVersion = $system.Version.Format(4)
set SystemVersion = $system.Version.Format(5)
set ResultJSON = { "version": (SystemVersion) }
write ResultJSON.%ToJSON()
} catch ex {
set ResultJSON = { "entities": "Error" }
set ResultJSON = { "entities": "" }
write ResultJSON.%ToJSON()
}
quit $$$OK
Expand Down

0 comments on commit 2265dd0

Please sign in to comment.