summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java
diff options
context:
space:
mode:
authorStephan Schwaer2015-09-30 14:34:18 +0200
committerStephan Schwaer2015-09-30 14:34:18 +0200
commit2cc5eedf0896c3c2b4d246f9d95a9ac26af892c0 (patch)
treeecec56360fa02350afe75ae105b338fbb53ec505 /dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java
parent[server] Fix transfer timeout detection and active counting (diff)
downloadtutor-module-2cc5eedf0896c3c2b4d246f9d95a9ac26af892c0.tar.gz
tutor-module-2cc5eedf0896c3c2b4d246f9d95a9ac26af892c0.tar.xz
tutor-module-2cc5eedf0896c3c2b4d246f9d95a9ac26af892c0.zip
[client] Added linkedLectureCound in imageDetailsWindow.
Diffstat (limited to 'dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java
index 0fac31ac..af49cecf 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImageDetailsWindow.java
@@ -49,6 +49,7 @@ import org.openslx.dozmod.thrift.Session;
import org.openslx.dozmod.thrift.ThriftActions;
import org.openslx.dozmod.thrift.ThriftActions.DeleteCallback;
import org.openslx.dozmod.thrift.ThriftActions.ImageMetaCallback;
+import org.openslx.dozmod.thrift.cache.LectureCache;
import org.openslx.dozmod.thrift.cache.MetaDataCache;
import org.openslx.dozmod.thrift.cache.UserCache;
import org.openslx.dozmod.util.FormatHelper;
@@ -526,6 +527,14 @@ public class ImageDetailsWindow extends ImageDetailsWindowLayout implements UiFe
}
txtTags.setText(tagsString);
+ // Count the number of linked lectures to the image
+ int lectureCount = 0;
+ for (LectureSummary lecture : LectureCache.get(false)) {
+ if (lecture.imageBaseId.equals(image.imageBaseId))
+ lectureCount++;
+ }
+ linkedLectureCount.setText(Integer.toString(lectureCount));
+
// set the versions of the image to the table
versionTable.setData(image.getVersions(), true);
// make fields editable is allowed