From 8bcec3a17d769865fedff8fb76e702a6050b93f5 Mon Sep 17 00:00:00 2001 From: Tim Steiner <tsteiner2@unl.edu> Date: Fri, 18 Jan 2008 20:53:31 +0000 Subject: [PATCH] Show 800 level grad tie-ins on home screen listing --- application/views/home.xhtml | 89 +++++++++++++++++++++++++++--------- 1 file changed, 67 insertions(+), 22 deletions(-) diff --git a/application/views/home.xhtml b/application/views/home.xhtml index cd85b13e..83bd648d 100755 --- a/application/views/home.xhtml +++ b/application/views/home.xhtml @@ -48,9 +48,20 @@ ?> <tr <?php echo (++$row % 2 ? 'class="odd"' : ''); ?>> <!-- td><input type="checkbox" /></td --> - <td><?php echo $originalCourse->subject . ' ' + <td> + <?php echo $originalCourse->subject . ' ' . $originalCourse->courseNumber - . $originalCourse->courseLetter; ?></td> + . $originalCourse->courseLetter; + foreach($originalCourse->crosslistings as $crosslisting) { + if($crosslisting->type == 'home listing') { + continue; + } + if($crosslisting->subject == $course->subject) { + echo '/' . $crosslisting->courseNumber . $crosslisting->courseLetter; + } + } + ?> + </td> <td><?php echo $originalCourse->getHomeCollege()->name; ?></td> <td><?php echo $request->type->name; ?></td> <td> @@ -103,9 +114,20 @@ ?> <tr <?php echo (++$row % 2 ? 'class="odd"' : ''); ?>> <!-- td><input type="checkbox" /></td --> - <td><?php echo $originalCourse->subject . ' ' + <td> + <?php echo $originalCourse->subject . ' ' . $originalCourse->courseNumber - . $originalCourse->courseLetter; ?></td> + . $originalCourse->courseLetter; + foreach($originalCourse->crosslistings as $crosslisting) { + if($crosslisting->type == 'home listing') { + continue; + } + if($crosslisting->subject == $course->subject) { + echo '/' . $crosslisting->courseNumber . $crosslisting->courseLetter; + } + } + ?> + </td> <td><?php echo $originalCourse->getHomeCollege()->name; ?></td> <td><?php echo $request->type->name; ?></td> <td><?php echo $request->getCurrentApprovalBody()->name; ?></td> @@ -163,12 +185,12 @@ <table class="course_list"> <tr> <!-- th id="check"> </th --> - <th id="course"><a href="/Home/SortBy/Course">Course</a></th> - <th id="college"><a href="/Home/SortBy/College">College</a></th> - <th id="type"><a href="/Home/SortBy/Type">Type</a></th> - <th id="pending_action">Pending Action</th> - <th id="status">Status</th> - <th id="view_edit">View/Edit</th> + <th class="course"><a href="/Home/SortBy/Course">Course</a></th> + <th class="college"><a href="/Home/SortBy/College">College</a></th> + <th class="type"><a href="/Home/SortBy/Type">Type</a></th> + <th class="pending_action">Pending Action</th> + <th class="status">Status</th> + <th class="view_edit">View/Edit</th> </tr> <?php $row = 0; @@ -181,12 +203,23 @@ ?> <tr <?php echo (++$row % 2 ? 'class="odd"' : ''); ?>> <!-- td><input type="checkbox" /></td --> - <td><?php echo $originalCourse->subject . ' ' + <td> + <?php echo $originalCourse->subject . ' ' . $originalCourse->courseNumber - . $originalCourse->courseLetter; ?></td> + . $originalCourse->courseLetter; + foreach($originalCourse->crosslistings as $crosslisting) { + if($crosslisting->type == 'home listing') { + continue; + } + if($crosslisting->subject == $course->subject) { + echo '/' . $crosslisting->courseNumber . $crosslisting->courseLetter; + } + } + ?> + </td> <td><?php echo $originalCourse->getHomeCollege()->name; ?></td> <td><?php echo $request->type->name; ?></td> - <td><?php echo $request->getCurrentAction()->name; ?></td> + <td><?php echo htmlentities($request->getCurrentAction()->name, null, 'UTF-8'); ?></td> <td> <?php if ($request->getCurrentAction()) { @@ -197,7 +230,8 @@ + $request->getCurrentAction()->getResultStatusStrings($request, $this->user)); // } - ?> </td> + ?> + </td> <td> <?php $lastViewTime = RequestViewTimes::getInstance()->getViewTimeForUserAndRequest($this->user, $request); @@ -240,12 +274,12 @@ <table class="course_list"> <tr> <!-- th id="check"> </th --> - <th id="course">Course</th> - <th id="college">College</th> - <th id="type">Type</th> - <th id="approval_body">Approval Body</th> - <th id="status">Status</th> - <th id="view_edit">View/Edit</th> + <th class="course">Course</th> + <th class="college">College</th> + <th class="type">Type</th> + <th class="approval_body">Approval Body</th> + <th class="status">Status</th> + <th class="view_edit">View/Edit</th> </tr> <?php $row = 0; @@ -258,9 +292,20 @@ ?> <tr <?php echo (++$row % 2 ? 'class="odd"' : ''); ?>> <!-- td><input type="checkbox" /></td --> - <td><?php echo $originalCourse->subject . ' ' + <td> + <?php echo $originalCourse->subject . ' ' . $originalCourse->courseNumber - . $originalCourse->courseLetter; ?></td> + . $originalCourse->courseLetter; + foreach($originalCourse->crosslistings as $crosslisting) { + if($crosslisting->type == 'home listing') { + continue; + } + if($crosslisting->subject == $course->subject) { + echo '/' . $crosslisting->courseNumber . $crosslisting->courseLetter; + } + } + ?> + </td> <td><?php echo $originalCourse->getHomeCollege()->name; ?></td> <td><?php echo $request->type->name; ?></td> <td><?php echo $request->getCurrentApprovalBody()->name; ?></td> -- GitLab