4{
7 $renderer =
$DIC->ui()->renderer();
8
9 $actions =
$factory->dropdown()->standard(array(
10 $factory->button()->shy(
"ILIAS",
"https://www.ilias.de"),
11 $factory->button()->shy(
"GitHub",
"https://www.github.com")
12 ));
13
14 $list_item1 =
$factory->item()->standard(
"Item Title")
15 ->withActions($actions)
16 ->withProperties(array(
17 "Origin" => "Course Title 1",
18 "Last Update" => "24.11.2011",
19 "Location" => "Room 123, Main Street 44, 3012 Bern"))
20 ->withDescription("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.");
21
22 $list_item2 =
$factory->item()->standard(
"Item 2 Title")
23 ->withActions($actions)
24 ->withDescription("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.");
25
26 $list_item3 =
$factory->item()->standard(
"Item 3 Title")
27 ->withActions($actions)
28 ->withDescription("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.");
29
30 $items = array(
31 $factory->item()->group(
"Listing Subtitle 1", array(
32 $list_item1,
33 $list_item2
34 )),
35 $factory->item()->group(
"Listing Subtitle 2", array(
36 $list_item3
37 )));
38
39 $sort_options = array(
40 'internal_rating' => 'Best',
41 'date_desc' => 'Most Recent',
42 'date_asc' => 'Oldest',
43 );
44 $sortation =
$factory->viewControl()->sortation($sort_options);
45
46 $url =
$DIC->http()->request()->getRequestTarget();
47
48 $parameter_name = 'page';
49 $current_page = (int) (array_key_exists($parameter_name,
$_GET) ?
$_GET[$parameter_name] : 0);
50
51 $pagination =
$factory->viewControl()->pagination()
52 ->withTargetURL(
$url, $parameter_name)
53 ->withTotalEntries(98)
54 ->withPageSize(10)
55 ->withCurrentPage($current_page);
56
57 $panel =
$factory->panel()->secondary()->listing(
"Listing panel Title", $items)->withViewControls(array($pagination,$sortation))->withActions($actions);
58
59 return $renderer->render(
$panel);
60}
if(isset($_FILES['img_file']) &&is_array($_FILES['img_file'])) $panel