1
|
package eu.dnetlib.client.fundingrequest.stepinfo;
|
2
|
|
3
|
import com.google.gwt.i18n.client.DateTimeFormat;
|
4
|
import com.google.gwt.user.client.ui.HTML;
|
5
|
import com.google.gwt.user.client.ui.IsWidget;
|
6
|
import com.google.gwt.user.client.ui.Widget;
|
7
|
import eu.dnetlib.goldoa.domain.Project;
|
8
|
|
9
|
/**
|
10
|
* Created by stefania on 3/27/15.
|
11
|
*/
|
12
|
public class ProjectSummaryInfo implements IsWidget {
|
13
|
|
14
|
private HTML projectInfo = new HTML();
|
15
|
private String projectInfoContents = "";
|
16
|
|
17
|
private DateTimeFormat dtf = DateTimeFormat.getFormat("yyyy/MM/dd");
|
18
|
|
19
|
public ProjectSummaryInfo(Project project) {
|
20
|
|
21
|
projectInfoContents = "<div>";
|
22
|
|
23
|
projectInfoContents += "<dl><dt class=\"chronologySubTitle\">PROJECT</dt></dl>";
|
24
|
|
25
|
if(project.getAcronym()!=null)
|
26
|
projectInfoContents += "<dl><dt>Acronym</dt><dd>" + project.getAcronym() + "</dd></dl>";
|
27
|
|
28
|
if (project.getTitle() != null)
|
29
|
projectInfoContents += "<dl><dt>Title</dt><dd>" + project.getTitle() + "</dd></dl>";
|
30
|
|
31
|
if (project.getScientificArea() != null)
|
32
|
projectInfoContents += "<dl><dt>Scientific area</dt><dd>" + project.getScientificArea() + "</dd></dl>";
|
33
|
|
34
|
if (project.getCall() != null)
|
35
|
projectInfoContents += "<dl><dt>Call</dt><dd>" + project.getCall() + "</dd></dl>";
|
36
|
|
37
|
if (project.getGrant() != null)
|
38
|
projectInfoContents += "<dl><dt>Contract (GA) number</dt><dd>" + project.getGrant() + "</dd></dl>";
|
39
|
|
40
|
if (project.getUrl() != null)
|
41
|
projectInfoContents += "<dl><dt>More info</dt><dd>" + project.getUrl() + "</dd></dl>";
|
42
|
|
43
|
projectInfoContents += "</div>";
|
44
|
projectInfo.setHTML(projectInfoContents);
|
45
|
}
|
46
|
|
47
|
@Override
|
48
|
public Widget asWidget() {
|
49
|
return projectInfo;
|
50
|
}
|
51
|
|
52
|
public void addStyleName(String styleName) {
|
53
|
projectInfo.addStyleName(styleName);
|
54
|
}
|
55
|
}
|