diff --git a/data/routes.php b/data/routes.php index 87e4d09a4dbd1ae3ea50d26ef5de9ab16b28933d..e25686bf117c8370e48b91714b86d6de5f163549 100644 --- a/data/routes.php +++ b/data/routes.php @@ -13,6 +13,6 @@ $courseNumber = '(?P<courseNumber>[\d]?[\d]{2,3}[A-Za-z]?)'; // Course number, e $routes['/^'.$base.'\/$/'] = 'UNL\Catalog\SubjectAreas'; $routes['/^'.$base.'\/'.$subjectArea.$format.'$/'] = 'UNL\Catalog\SubjectArea'; -$routes['/^'.$base.'\/'.$subjectArea.'\/'.$courseNumber.$format.'$/'] = 'UNL\Catalog\Course'; +$routes['/^'.$base.'\/'.$subjectArea.'\/'.$courseNumber.$format.'$/'] = 'UNL\Catalog\Listing'; return $routes; \ No newline at end of file diff --git a/src/UNL/Catalog/Listing.php b/src/UNL/Catalog/Listing.php new file mode 100644 index 0000000000000000000000000000000000000000..82386c23b644d95fb3759f74fc8c3819bbac0260 --- /dev/null +++ b/src/UNL/Catalog/Listing.php @@ -0,0 +1,17 @@ +<?php +namespace UNL\Catalog; + +class Listing +{ + protected $internal; + + function __construct($options = array()) + { + $this->internal = new \UNL_Services_CourseApproval_Listing($options['subjectArea'], $options['courseNumber']); + } + + function __get($var) + { + return $this->internal->$var; + } +} \ No newline at end of file diff --git a/www/templates/html/UNL/Catalog/Listing.tpl.php b/www/templates/html/UNL/Catalog/Listing.tpl.php new file mode 100644 index 0000000000000000000000000000000000000000..5dae6f1d9837e9034c5508685ced60f258004090 --- /dev/null +++ b/www/templates/html/UNL/Catalog/Listing.tpl.php @@ -0,0 +1,4 @@ +<?php + $context->subject = $context->subjectArea; + echo $savvy->render($context->course); +?>