From 9c0ff646c59e02444d802b437013a419f38f78ec Mon Sep 17 00:00:00 2001
From: fkiefer <none@none>
Date: Tue, 16 May 2017 10:53:45 +0200
Subject: [PATCH] OO-2753 Improve usability of catalog management in course

---
 .../java/org/olat/repository/_i18n/LocalStrings_de.properties | 1 +
 .../java/org/olat/repository/_i18n/LocalStrings_en.properties | 1 +
 .../olat/repository/ui/author/CatalogSettingsController.java  | 4 ++++
 3 files changed, 6 insertions(+)

diff --git a/src/main/java/org/olat/repository/_i18n/LocalStrings_de.properties b/src/main/java/org/olat/repository/_i18n/LocalStrings_de.properties
index 651e5c09cf8..841127f680f 100644
--- a/src/main/java/org/olat/repository/_i18n/LocalStrings_de.properties
+++ b/src/main/java/org/olat/repository/_i18n/LocalStrings_de.properties
@@ -372,6 +372,7 @@ new.test.intro=Neuen Test erstellen.
 new.wiki=Wiki erstellen
 new.wiki.intro=Neues Wiki erstellen
 no.lifecycle=Keine Einschr\u00E4nkung
+no.catalog.entries=Diese Resource wurde noch nicht im Katalog registriert. \r\n\r\n Verwenden Sie den "In Katalog einf\u00FCgen" Button in der Toolbar, um die Resource auf einer bestimmten Katalog-Ebenen hinzuzuf\u00FCgen. Der Katalog erlaubt es dem Benutzer je nach Zugriffskonfiguration nach bestimmten Eintr\u00E4gen zu suchen. Sie k\u00F6nnen die Resource auf mehreren Katalog-Ebenen hinzuf\u00FCgen.
 nomembers=XXX No members
 notification.mail.added.body=*** Das ist eine automatisch generierte Nachricht. Bitte antworten Sie nicht auf diese Nachricht *** \n\nSie wurden von {0} {1} ({2}) in einen Kurs eingeladen\: \n\nKursname\: $coursename\nBeschreibung\: $coursedescription\n\nBei Fragen kontaktieren Sie bitte {0} {1} ({2}).
 notification.mail.added.subject=Kurs $coursename 
diff --git a/src/main/java/org/olat/repository/_i18n/LocalStrings_en.properties b/src/main/java/org/olat/repository/_i18n/LocalStrings_en.properties
index 9c5bfa91b22..001992d5545 100644
--- a/src/main/java/org/olat/repository/_i18n/LocalStrings_en.properties
+++ b/src/main/java/org/olat/repository/_i18n/LocalStrings_en.properties
@@ -369,6 +369,7 @@ new.test.intro=Create new test
 new.wiki=Create wiki
 new.wiki.intro=Create new wiki
 no.lifecycle=No limitation
+no.catalog.entries=This resource has not been added to the catalog yet. \r\n\r\n Use the "Add to catalog" button in the toolbar above to add the resource to a specific level in the catalog. The catalog allows users to browse for available resources depending on th resource access configuration. You can add the resource to multiple catalog levels. 
 nomembers=XXX No members
 notification.mail.added.body=*** This is an automatically generated message. Please do not answer to this message *** \r\n\r\nYou have been added by {0} {1} ({2}) to a course\:\r\n\r\nCourse name\: $coursename\r\nDescription\: $coursedescription\r\n\r\nIf you have questions regarding this action, please contact {0} {1} ({2}).
 notification.mail.added.subject=Course $coursename
diff --git a/src/main/java/org/olat/repository/ui/author/CatalogSettingsController.java b/src/main/java/org/olat/repository/ui/author/CatalogSettingsController.java
index fa051cb5a53..00e6b86b6ad 100644
--- a/src/main/java/org/olat/repository/ui/author/CatalogSettingsController.java
+++ b/src/main/java/org/olat/repository/ui/author/CatalogSettingsController.java
@@ -99,6 +99,10 @@ public class CatalogSettingsController extends FormBasicController {
 		model = new CategoriesListModel(catalogEntries, columnsModel);
 		tableEl = uifactory.addTableElement(getWindowControl(), "table", model, 200, true, getTranslator(), formLayout);
 		tableEl.setCustomizeColumns(false);
+		tableEl.setVisible(true);
+		if (catalogEntries.size() == 0) {
+			tableEl.setEmtpyTableMessageKey("no.catalog.entries");
+		}
 	}
 	
 	@Override
-- 
GitLab