From b646c9d850b0bfd01c93e2660d637bfaebcd36a5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20Gn=C3=A4gi?= <gnaegi@frentix.com>
Date: Fri, 31 Jan 2020 16:05:03 +0100
Subject: [PATCH] OO-4511 Add title to my bookings page

---
 .../accesscontrol/ui/OrdersController.java      | 17 ++++++++++++++++-
 .../accesscontrol/ui/_content/orders.html       |  6 +++---
 2 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/src/main/java/org/olat/resource/accesscontrol/ui/OrdersController.java b/src/main/java/org/olat/resource/accesscontrol/ui/OrdersController.java
index a17381f5fc8..48ffe84ea93 100644
--- a/src/main/java/org/olat/resource/accesscontrol/ui/OrdersController.java
+++ b/src/main/java/org/olat/resource/accesscontrol/ui/OrdersController.java
@@ -86,12 +86,27 @@ public class OrdersController extends FormBasicController implements Activateabl
 	@Autowired
 	private AccessControlModule acModule;
 
+	/**
+	 * Constructor that shows table with title and description for identity of user
+	 * session.
+	 * 
+	 * @param ureq
+	 * @param wControl
+	 */
 	public OrdersController(UserRequest ureq, WindowControl wControl) {
-		super(ureq, wControl, LAYOUT_BAREBONE);
+		super(ureq, wControl, "orders");
 		this.identity = getIdentity();
 		initForm(ureq);
 	}
 
+	/**
+	 * Constructor that shows table without title and description for the given
+	 * identity, e.g. for an admin interface. 
+	 * 
+	 * @param ureq
+	 * @param wControl
+	 * @param identity
+	 */
 	public OrdersController(UserRequest ureq, WindowControl wControl, Identity identity) {
 		super(ureq, wControl, LAYOUT_BAREBONE);
 		this.identity = identity;
diff --git a/src/main/java/org/olat/resource/accesscontrol/ui/_content/orders.html b/src/main/java/org/olat/resource/accesscontrol/ui/_content/orders.html
index f77d933b39a..0b3a3187fc7 100644
--- a/src/main/java/org/olat/resource/accesscontrol/ui/_content/orders.html
+++ b/src/main/java/org/olat/resource/accesscontrol/ui/_content/orders.html
@@ -1,8 +1,8 @@
 <div class="o_sel_order_list">
-	<h4><i class="o_icon o_icon_booking"> </i> $title</h4>
+	<h2><i class="o_icon o_icon-fw o_icon_booking"> </i> $title</h2>
+	#set ($notEmpty = $r.isNotZero($r.getComponent("orderList").getFlexiTableElement().getRowCount()))
+	#if ($notEmpty)
 	<div class="o_info">$description</div>
-	#if($r.available("searchForm"))
-		$r.render("searchForm")
 	#end
 	$r.render("orderList")
 </div>
\ No newline at end of file
-- 
GitLab