-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpublication-item.html
70 lines (55 loc) · 2.01 KB
/
publication-item.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<link rel="import" href="nextprot-elements-shared-styles.html">
<link rel="import" href="publication.html">
<link rel="import" href="entry-view-reference.html">
<link rel="import" href="entry-publication-direct-links.html">
<!--
`publication-item`
Publication item demo
##### Example of full publication
<publication-item></publication-item>
##### Example of summary
<publication-item summary></publication-item>
##### Example of only show abstract
<publication-item show-abstract></publication-item>
@demo demo/publication-item-demo.html
-->
<dom-module id="publication-item">
<template>
<style include="nextprot-elements-shared-styles">
:host {
display: block;
border-bottom: var(--publication-item-border-bottom);
margin-bottom: var(--publication-item-padding-bottom);
padding-bottom: var(--publication-item-margin-bottom);
}
</style>
<template is="dom-if" if="[[data]]">
<!-- view={"standard", "detailed", "summary"} -->
<np-publication publication="[[data.publication]]" view="[[_toView(summary)]]"></np-publication>
<!-- Cited For -->
<entry-view-reference refs="[[data.citedInViews]]"></entry-view-reference>
<!-- Direct links -->
<entry-publication-direct-links dlinks="[[data.directLinks]]"></entry-publication-direct-links>
</template>
</template>
<script>
Polymer({
is: 'publication-item',
properties: {
data: {
type: Object
},
summary: {
type: Boolean,
value: false
}
},
_toView: function (summary) {
return (summary) ? "summary" : "detailed";
},
_isUniprotKB: function (database) {
return database === "UniProtKB";
}
});
</script>
</dom-module>