-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
data_collection: initial view for HEPData content
* ADD Added data results view. * ADD Added data facets view. * ADD Added data count view. Signed-off-by: Eamonn Maguire
- Loading branch information
Showing
3 changed files
with
132 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<div ng-show="vm.invenioSearchResults.total != undefined"> | ||
<div class="invenio-search-results"> | ||
<ng-pluralize | ||
count="vm.invenioSearchResults.total" | ||
when="{'0': 'No results.', | ||
'one': 'Found 1 result.', | ||
'other': 'Found {} results.'}"> | ||
</ng-pluralize> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<ul class="pagination pagination-sm" ng-if="vm.invenioSearchResults.hits.total"> | ||
<li ng-show="showGoToFirstLast" ng-class="paginationHelper.getFirstClass()"> | ||
<a href="#" ng-click="paginationHelper.changePage(1)" aria-label="First"> | ||
<span aria-hidden="true"><<<span> | ||
</a> | ||
</li> | ||
<li ng-class="paginationHelper.getPrevClass()"> | ||
<a href="#" ng-click="paginationHelper.changePage(paginationHelper.previous())" aria-label="Previous"> | ||
<span aria-hidden="true"><</span> | ||
</a> | ||
</li> | ||
<li ng-class="paginationHelper.getPageClass(page.value)" ng-repeat="page in paginatePages"> | ||
<a href="#" ng-click="paginationHelper.changePage(page.value)" alt="{{ page.title }}">{{ page.value }}</a> | ||
</li> | ||
<li ng-class="paginationHelper.getNextClass()"> | ||
<a href="#" ng-click="paginationHelper.changePage(paginationHelper.next())" aria-label="Next"> | ||
<span aria-hidden="true">></span> | ||
</a> | ||
</li> | ||
<li ng-show="showGoToFirstLast" ng-class="paginationHelper.getLastClass()"> | ||
<a href="#" ng-click="paginationHelper.changePage(paginationHelper.total())" aria-label="Last"> | ||
<span aria-hidden="true">>></span> | ||
</a> | ||
</li> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
<div class="row" | ||
ng-repeat="record in vm.invenioSearchResults.results track by record.recid"> | ||
<div class="col-md-12" id="publication-{{record.recid }}"> | ||
<div id="panel-default-brief" class="data panel panel-default"> | ||
<div class="panel-body"> | ||
<div class="row-fluid"> | ||
<div class="col-md-12"> | ||
|
||
<h4 class="custom-h"> | ||
<a class="title" target="_new" | ||
ng-href="https://www.hepdata.net/record/ins{{ record.inspire_id }}"> | ||
{{ record.title }} | ||
</a> | ||
</h4> | ||
|
||
<p class="truncated-record-abstract" | ||
ng-if="record.metadata.place"> | ||
<i class="fa fa-map-marker"></i> {{ record.abstract }} | ||
</p> | ||
|
||
<div> | ||
<span ng-repeat="author in record.authors"> | ||
{{ author }} | ||
</span> | ||
</div> | ||
|
||
<span class="font-bolder" ng-if="record.journal_info == 'No Journal Information' | ||
&& 'thesis' == record.type"> | ||
PhD Thesis, <span | ||
ng-if="'institution' in record.dissertation"> | ||
{{ record.dissertation.institution }}</span>, {{ record.year }}</span> | ||
|
||
<span class="journal-info" | ||
ng-if="record.journal_info == 'No Journal Information' && 'conferencepaper' == record.type"> | ||
Conference Paper, {{ record.year }}</span> | ||
|
||
<span class="journal-info" | ||
ng-if="record.journal_info !== 'No Journal Information'"> | ||
{{ record.journal_info }}, {{ record.year }}</span> | ||
|
||
<p class="truncated-record-abstract"> | ||
{{ record.abstract }} | ||
</p> | ||
|
||
<div class="data-table-content"> | ||
<i class="fa fa-table"></i> | ||
<span class="font-bolder">{{ record.total_tables }}</span> | ||
data tables match your query | ||
</div> | ||
|
||
<div ng-repeat="datatable in record.data track by $index" class="data-brief" ng-class="{hidden: $index > 2}"> | ||
|
||
<div class="pull-left" | ||
style="width: 10%; min-width: 60px"> | ||
<a href="http://www.hepdata.net/record/{{ datatable.recid }}"> | ||
{{ datatable.title }} | ||
</a> | ||
</div> | ||
<div class="pull-left" | ||
style="width: 90%"> | ||
<p class="truncated-record-abstract" | ||
ng-if="datatable.abstract != '.'"> | ||
{{ datatable.abstract }} | ||
</p> | ||
</div> | ||
<div class="clearfix"></div> | ||
</div> | ||
|
||
<div class="clearfix"></div> | ||
|
||
<a ng-if="record.data.length > 3" | ||
class="data-more" | ||
ng-click="show_more_datatables(record.recid,3)"> | ||
More… | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
|
||
<script type="text/javascript"> | ||
function show_more_datatables(publication, show_number) { | ||
console.log(publication); | ||
console.log(show_number); | ||
var tables = $("#publication-" + publication | ||
+ " .data-brief:not(:visible)"); | ||
|
||
tables.slice(0, show_number).removeClass("hidden"); | ||
|
||
if (tables.size() <= show_number) { | ||
$("#publication-" + publication + " .data-more").hide(); | ||
} | ||
} | ||
</script> |