1
|
package eu.dnetlib.client.fundingrequest.stepinfo;
|
2
|
|
3
|
import com.google.gwt.user.client.ui.HTML;
|
4
|
import com.google.gwt.user.client.ui.IsWidget;
|
5
|
import com.google.gwt.user.client.ui.Widget;
|
6
|
import eu.dnetlib.goldoa.domain.Publication;
|
7
|
import eu.dnetlib.goldoa.domain.PublicationType;
|
8
|
|
9
|
/**
|
10
|
* Created by stefania on 11/17/15.
|
11
|
*/
|
12
|
public class PublicationTypeInlineInfo implements IsWidget {
|
13
|
|
14
|
private HTML publicationTypeInlineInfo = new HTML();
|
15
|
private String publicationTypeInfoContents = "";
|
16
|
|
17
|
public PublicationTypeInlineInfo(Publication publication) {
|
18
|
|
19
|
publicationTypeInfoContents = "<div class=\"displayInlineInfo\">";
|
20
|
|
21
|
publicationTypeInfoContents += "<dl><dt class=\"chronologySubTitle\">PUBLICATION TYPE</dt></dl>";
|
22
|
|
23
|
if(publication.getType().equals(PublicationType.ARTICLE))
|
24
|
publicationTypeInfoContents += "<dd>Type: Article</dd>";
|
25
|
else if(publication.getType().equals(PublicationType.MONOGRAPH))
|
26
|
publicationTypeInfoContents += "<dd>Type: Book</dd>";
|
27
|
else if(publication.getType().equals(PublicationType.CONFERENCE_PROCS))
|
28
|
publicationTypeInfoContents += "<dd>Type: Conference Procs</dd>";
|
29
|
else
|
30
|
publicationTypeInfoContents += "<dd>Type: Book chapter</dd>";
|
31
|
|
32
|
publicationTypeInfoContents += "</div>";
|
33
|
publicationTypeInlineInfo.setHTML(publicationTypeInfoContents);
|
34
|
}
|
35
|
|
36
|
@Override
|
37
|
public Widget asWidget() {
|
38
|
return publicationTypeInlineInfo;
|
39
|
}
|
40
|
|
41
|
public void addStyleName(String styleName) {
|
42
|
publicationTypeInlineInfo.addStyleName(styleName);
|
43
|
}
|
44
|
}
|