Skip to content
Snippets Groups Projects
Commit 2ace4600 authored by gnaegi's avatar gnaegi
Browse files

OO-1068 add external ref to details and course listing

parent 71f1011f
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,8 @@ public interface RepositoryEntryMyView extends OLATResourceable {
public Long getKey();
public String getExternalRef();
public String getDisplayname();
public String getDescription();
......
......@@ -43,6 +43,7 @@ public class RepositoryEntryMyCourseImpl implements RepositoryEntryMyView, Creat
private Long key;
private Date creationDate;
private Date lastModified;
private String externalRef;
private String displayname;
private String description;
private String authors;
......@@ -73,6 +74,7 @@ public class RepositoryEntryMyCourseImpl implements RepositoryEntryMyView, Creat
public RepositoryEntryMyCourseImpl(RepositoryEntry re,
boolean marked, long offersAvailable, Integer myRating) {
key = re.getKey();
externalRef = re.getExternalRef();
creationDate = re.getCreationDate();
lastModified = re.getLastModified();
displayname = re.getDisplayname();
......@@ -122,6 +124,15 @@ public class RepositoryEntryMyCourseImpl implements RepositoryEntryMyView, Creat
public void setKey(Long key) {
this.key = key;
}
@Override
public String getExternalRef() {
return externalRef;
}
public void setExternalRef(String externalRef) {
this.externalRef = externalRef;
}
@Override
public Date getCreationDate() {
......
......@@ -45,6 +45,7 @@ public class RepositoryEntryRow implements RepositoryEntryRef {
private boolean selected;
private Long key;
private String externalRef;
private String name;
private String authors;
private String thumbnailRelPath;
......@@ -87,6 +88,7 @@ public class RepositoryEntryRow implements RepositoryEntryRef {
public RepositoryEntryRow(RepositoryEntryMyView entry) {
setKey(entry.getKey());
setExternalRef(entry.getExternalRef());
setDisplayName(entry.getDisplayname());
setShortenedDescription(entry.getDescription());
setOLATResourceable(OresHelper.clone(entry.getOlatResource()));
......@@ -143,6 +145,15 @@ public class RepositoryEntryRow implements RepositoryEntryRef {
this.key = key;
}
public String getExternalRef() {
return externalRef;
}
public void setExternalRef(String externalRef) {
this.externalRef = externalRef;
}
public String getDisplayName() {
return name;
}
......
......@@ -3,6 +3,9 @@
<h1>
<i class="o_icon $cssClass o_icon-lg"></i>
$r.escapeHtml($v.displayname)
#if($v.getExternalRef())
<small>$v.getExternalRef()</small>
#end
</h1>
#if($r.available("thumbnail"))
<div class="o_media">
......
......@@ -10,7 +10,11 @@
<div class="o_go_xs visible-xs">
<i class=" o_icon o_icon_start o_icon-lg"></i>
</div>
<h4 class="o_title">$r.render($row.getSelectLinkName())</h4>
<h4 class="o_title">$r.render($row.getSelectLinkName())
#if ($row.getExternalRef())
<small>$row.getExternalRef()</small>
#end
</h4>
#if($row.authors)
<div class="o_author"><span class="text-muted">$r.translate("course.made.by")</span> $row.authors</div>
#end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment