Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Curriculum-Request
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tim Steiner
Curriculum-Request
Commits
26df12f8
Commit
26df12f8
authored
17 years ago
by
Tim Steiner
Browse files
Options
Downloads
Patches
Plain Diff
Display original course id for requests on home page.
parent
f7bae675
No related branches found
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
application/models/rows/CourseGeneration.php
+4
-1
4 additions, 1 deletion
application/models/rows/CourseGeneration.php
application/views/home.xhtml
+23
-37
23 additions, 37 deletions
application/views/home.xhtml
with
27 additions
and
38 deletions
application/models/rows/CourseGeneration.php
+
4
−
1
View file @
26df12f8
...
...
@@ -139,13 +139,16 @@ class CourseGeneration extends Asset
return
$this
->
assetId
;
}
public
function
getParentGeneration
()
public
function
getParentGeneration
(
$official
=
false
)
{
if
(
!
$this
->
parent
)
{
return
null
;
}
$parentGeneration
=
CourseGenerations
::
getInstance
()
->
findOne
(
$this
->
parent
);
while
(
$offical
&&
$parentGeneration
&&
$parentGeneration
->
type
!=
'official'
)
{
$parentGeneration
=
CourseGenerations
::
getInstance
()
->
findOne
(
$parentGeneration
->
parent
);
}
return
$parentGeneration
;
}
...
...
This diff is collapsed.
Click to expand it.
application/views/home.xhtml
+
23
−
37
View file @
26df12f8
<script
type=
"text/javascript"
>
<!--
function
MM_preloadImages
()
{
//v3.0
var
d
=
document
;
if
(
d
.
images
){
if
(
!
d
.
MM_p
)
d
.
MM_p
=
new
Array
();
var
i
,
j
=
d
.
MM_p
.
length
,
a
=
MM_preloadImages
.
arguments
;
for
(
i
=
0
;
i
<
a
.
length
;
i
++
)
if
(
a
[
i
].
indexOf
(
"
#
"
)
!=
0
){
d
.
MM_p
[
j
]
=
new
Image
;
d
.
MM_p
[
j
++
].
src
=
a
[
i
];}}
}
function
MM_swapImgRestore
()
{
//v3.0
var
i
,
x
,
a
=
document
.
MM_sr
;
for
(
i
=
0
;
a
&&
i
<
a
.
length
&&
(
x
=
a
[
i
])
&&
x
.
oSrc
;
i
++
)
x
.
src
=
x
.
oSrc
;
}
function
MM_findObj
(
n
,
d
)
{
//v4.01
var
p
,
i
,
x
;
if
(
!
d
)
d
=
document
;
if
((
p
=
n
.
indexOf
(
"
?
"
))
>
0
&&
parent
.
frames
.
length
)
{
d
=
parent
.
frames
[
n
.
substring
(
p
+
1
)].
document
;
n
=
n
.
substring
(
0
,
p
);}
if
(
!
(
x
=
d
[
n
])
&&
d
.
all
)
x
=
d
.
all
[
n
];
for
(
i
=
0
;
!
x
&&
i
<
d
.
forms
.
length
;
i
++
)
x
=
d
.
forms
[
i
][
n
];
for
(
i
=
0
;
!
x
&&
d
.
layers
&&
i
<
d
.
layers
.
length
;
i
++
)
x
=
MM_findObj
(
n
,
d
.
layers
[
i
].
document
);
if
(
!
x
&&
d
.
getElementById
)
x
=
d
.
getElementById
(
n
);
return
x
;
}
function
MM_swapImage
()
{
//v3.0
var
i
,
j
=
0
,
x
,
a
=
MM_swapImage
.
arguments
;
document
.
MM_sr
=
new
Array
;
for
(
i
=
0
;
i
<
(
a
.
length
-
2
);
i
+=
3
)
if
((
x
=
MM_findObj
(
a
[
i
]))
!=
null
){
document
.
MM_sr
[
j
++
]
=
x
;
if
(
!
x
.
oSrc
)
x
.
oSrc
=
x
.
src
;
x
.
src
=
a
[
i
+
2
];}
}
//-->
</script>
<div
id=
"announcements"
class=
"titled_box"
>
<div
class=
"box_shadow_2"
>
<div
class=
"tr"
></div>
...
...
@@ -38,7 +11,8 @@ function MM_swapImage() { //v3.0
<div
class=
"bl"
></div>
</div>
<div
class=
"content"
>
Welcome to Curriculum Action Request. Items in your activity basket indicate.....
</div>
Welcome to Curriculum Action Request. Items in your activity basket indicate.....
</div>
</div>
<?php if(count($this->savedRequests) > 0) { ?>
...
...
@@ -67,12 +41,16 @@ function MM_swapImage() { //v3.0
$row = 0;
foreach($this->savedRequests as $savedId => $request) {
$course = $this->savedCourses[$savedId];
$originalCourse = $course->getParentGeneration(true);
if (!$originalCourse) {
$originalCourse = $course;
}
?>
<tr
<?
php
echo
(++$
row
%
2
?
'
class=
"odd"
'
:
'');
?
>
>
<td><input
type=
"checkbox"
/></td>
<td>
<?php echo $
c
ourse->subject . ' '
. $
c
ourse->courseNumber
. $
c
ourse->courseLetter; ?>
</td>
<td>
<?php echo $
originalC
ourse->subject . ' '
. $
originalC
ourse->courseNumber
. $
originalC
ourse->courseLetter; ?>
</td>
<td>
NONC
</td>
<td>
<?php echo $request->type->name; ?>
</td>
<td>
...
...
@@ -117,12 +95,16 @@ function MM_swapImage() { //v3.0
$row = 0;
foreach($this->myRequests as $request) {
$course = $request->getCourseGeneration();
$originalCourse = $course->getParentGeneration(true);
if (!$originalCourse) {
$originalCourse = $course;
}
?>
<tr
<?
php
echo
(++$
row
%
2
?
'
class=
"odd"
'
:
'');
?
>
>
<td><input
type=
"checkbox"
/></td>
<td>
<?php echo $
request->getCourseGeneration()
->subject . ' '
. $
request->getCourseGeneration()
->courseNumber
. $
request->getCourseGeneration()
->courseLetter; ?>
</td>
<td>
<?php echo $
originalCourse
->subject . ' '
. $
originalCourse
->courseNumber
. $
originalCourse
->courseLetter; ?>
</td>
<td>
<?php echo get_class($course->subject); ?>
</td>
<td>
<?php echo $request->type->name; ?>
</td>
<td>
<?php echo $request->getCurrentApprovalBody()->name; ?>
</td>
...
...
@@ -189,12 +171,16 @@ function MM_swapImage() { //v3.0
$row = 0;
foreach($role->getRequests() as $request) {
$course = $request->getCourseGeneration();
$originalCourse = $course->getParentGeneration(true);
if (!$originalCourse) {
$originalCourse = $course;
}
?>
<tr
<?
php
echo
(++$
row
%
2
?
'
class=
"odd"
'
:
'');
?
>
>
<td><input
type=
"checkbox"
/></td>
<td>
<?php echo $
request->getCourseGeneration()
->subject . ' '
. $
request->getCourseGeneration()
->courseNumber
. $
request->getCourseGeneration()
->courseLetter; ?>
</td>
<td>
<?php echo $
originalCourse
->subject . ' '
. $
originalCourse
->courseNumber
. $
originalCourse
->courseLetter; ?>
</td>
<td>
NONC
</td>
<td>
<?php echo $request->type->name; ?>
</td>
<td>
<?php echo $request->getCurrentAction()->name; ?>
</td>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment