Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
UNL_GraduateBulletin
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ryan Dee
UNL_GraduateBulletin
Commits
02547dcb
Commit
02547dcb
authored
12 years ago
by
Brett Bieber
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of github.unl.edu:iim/UNL_GraduateBulletin
parents
dc9e9a48
6abd3aac
Branches
master
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
www/templates/Course.tpl.php
+167
-0
167 additions, 0 deletions
www/templates/Course.tpl.php
with
167 additions
and
0 deletions
www/templates/Course.tpl.php
0 → 100644
+
167
−
0
View file @
02547dcb
<?php
$url
=
$controller
->
getURL
();
/* example code for isArchvied and getNewestURL();
if(UNL_UndergraduateBulletin_Controller::isArchived()){
echo "This version may be out of date. ".UNL_UndergraduateBulletin_Controller::getNewestURL();
}
*/
$class
=
'course'
;
if
(
isset
(
$parent
->
context
->
subjectArea
))
{
$subject
=
$parent
->
context
->
subjectArea
;
}
elseif
(
isset
(
$parent
->
context
->
subject
))
{
$subject
=
$parent
->
context
->
subject
;
}
else
{
$subject
=
$context
->
getHomeListing
()
->
subjectArea
;
}
$listings
=
array
();
$crosslistings
=
array
();
$groups
=
array
();
foreach
(
$context
->
codes
as
$listing
)
{
if
((
string
)
$listing
->
subjectArea
==
(
string
)
$subject
)
{
if
(
!
isset
(
$permalink
))
{
$permalink
=
$url
.
'courses/'
.
$subject
.
'/'
.
$listing
->
courseNumber
;
}
$listings
[]
=
$listing
->
courseNumber
;
if
(
$listing
->
hasGroups
())
{
foreach
(
$listing
->
groups
as
$group
)
{
$groups
[]
=
(
string
)
$group
;
$class
.
=
' grp_'
.
md5
(
$group
);
}
}
}
else
{
if
(
!
isset
(
$crosslistings
[(
string
)
$listing
->
subjectArea
]))
{
$crosslistings
[(
string
)
$listing
->
subjectArea
]
=
array
();
}
$crosslistings
[(
string
)
$listing
->
subjectArea
][]
=
$listing
->
courseNumber
;
}
}
$groups
=
implode
(
', '
,
array_unique
(
$groups
));
$cltext
=
''
;
foreach
(
$crosslistings
as
$cl_subject
=>
$cl_numbers
)
{
$cltext
.
=
', '
.
$cl_subject
.
' '
.
implode
(
'/'
,
$cl_numbers
);
}
$number_class
=
'l'
.
count
(
$listings
);
sort
(
$listings
);
$listings
=
implode
(
'/'
,
$listings
);
if
(
!
empty
(
$cltext
))
{
$crosslistings
=
'<span class="crosslisting">'
.
trim
(
$cltext
,
', '
)
.
'</span>'
;
}
$format
=
''
;
foreach
(
$context
->
activities
as
$type
=>
$activity
)
{
$class
.
=
' '
.
$type
;
$format
.
=
UNL_Services_CourseApproval_Course_Activities
::
getFullDescription
(
$type
);
if
(
isset
(
$activity
->
hours
))
{
$format
.
=
' '
.
$activity
->
hours
;
}
$format
.
=
', '
;
}
$format
=
trim
(
$format
,
', '
);
if
(
!
empty
(
$context
->
aceOutcomes
))
{
$class
.
=
' ace'
;
foreach
(
$context
->
aceOutcomes
as
$outcome
)
{
$class
.
=
' ace_'
.
$outcome
;
}
}
if
(
isset
(
$parent
->
parent
->
context
->
options
)
&&
$parent
->
parent
->
context
->
options
[
'view'
]
==
'course'
)
{
UNL_UndergraduateBulletin_Controller
::
setReplacementData
(
'head'
,
'
<link rel="alternate" type="text/xml" href="'
.
$permalink
.
'?format=xml" />
<link rel="alternate" type="text/javascript" href="'
.
$permalink
.
'?format=json" />
<link rel="alternate" type="text/html" href="'
.
$permalink
.
'?format=partial" />'
);
UNL_UndergraduateBulletin_Controller
::
setReplacementData
(
'doctitle'
,
$subject
.
' '
.
$listings
.
': '
.
$context
->
title
.
' | Undergraduate Bulletin | University of Nebraska-Lincoln'
);
UNL_UndergraduateBulletin_Controller
::
setReplacementData
(
'breadcrumbs'
,
'
<ul>
<li><a href="http://www.unl.edu/">UNL</a></li>
<li><a href="'
.
$url
.
'">Undergraduate Bulletin</a></li>
<li>'
.
$subject
.
' '
.
$listings
.
': '
.
$context
->
title
.
'</li>
</ul>
'
);
echo
'<dl>'
;
}
echo
"
<dt class='
$class
'>
<div class='courseID'>
<span class='subjectCode'>"
.
$subject
.
"</span>
<span class='number
$number_class
'>
$listings
</span>
</div>
<span class='title'>"
.
$context
->
title
.
" <a href='"
.
$permalink
.
"' title='A permalink to "
.
$context
->
title
.
"'>LINK</a></span>"
;
if
(
!
empty
(
$crosslistings
))
{
echo
'<span class="crosslistings">Crosslisted as '
.
$crosslistings
.
'</span>'
;
}
echo
"</dt>
<dd class='
$class
'>"
;
echo
'<div class="zentable cool details">'
;
echo
'<table class="zentable cool details">'
;
echo
$savvy
->
render
(
$context
,
'Course/Credits.tpl.php'
);
if
(
!
empty
(
$format
))
{
echo
'<tr class="format">
<td class="label">Course Format:</td>
<td class="value">'
.
$format
.
'</td>
</tr>'
;
}
if
(
count
(
$context
->
campuses
)
&&
(
count
(
$context
->
campuses
)
>
1
||
$context
->
campuses
[
0
]
!=
'UNL'
))
{
$campuses
=
''
;
foreach
(
$context
->
campuses
as
$campus
)
{
$campuses
.
=
$campus
.
','
;
}
$campuses
=
trim
(
$campuses
,
','
);
echo
'<tr class="campus">
<td class="label">Campus:</td>
<td class="value">'
.
$campus
.
'</td>
</tr>'
;
}
$methods
=
''
;
foreach
(
$context
->
deliveryMethods
as
$method
)
{
$methods
.
=
$method
.
', '
;
}
$methods
=
trim
(
$methods
,
', '
);
echo
'<tr class="deliveryMethods">
<td class="label">Course Delivery:</td>
<td class="value">'
.
$methods
.
'</td>
</tr>'
;
$ace
=
''
;
if
(
!
empty
(
$context
->
aceOutcomes
))
{
$ace
=
''
;
foreach
(
$context
->
aceOutcomes
as
$outcome
)
{
$ace
.
=
'<abbr title="'
.
UNL_UndergraduateBulletin_ACE
::
$descriptions
[
$outcome
]
.
'">'
.
$outcome
.
'</abbr>, '
;
}
$ace
=
trim
(
$ace
,
', '
);
echo
'<tr class="aceOutcomes">
<td class="label">ACE Outcomes:</td>
<td class="value">'
.
$ace
.
'</td>
</tr>'
;
}
if
(
!
empty
(
$groups
))
{
echo
'<tr class="groups">
<td class="label">Groups:</td>
<td class="value">'
.
$groups
.
'</td>
</tr>'
;
}
echo
'</table>'
.
PHP_EOL
;
?>
<?php
echo
'</div>'
;
if
(
!
empty
(
$context
->
prerequisite
))
{
echo
"<div class='prereqs'>Prereqs: "
.
UNL_UndergraduateBulletin_EPUB_Utilities
::
addCourseLinks
(
$context
->
getRaw
(
'prerequisite'
),
$controller
->
getURL
())
.
"</div>
\n
"
;
}
if
(
!
empty
(
$context
->
notes
))
{
echo
"<div class='notes'>"
.
UNL_UndergraduateBulletin_EPUB_Utilities
::
addCourseLinks
(
$context
->
getRaw
(
'notes'
),
$controller
->
getURL
())
.
"</div>
\n
"
;
}
if
(
!
empty
(
$context
->
description
))
{
echo
"<div class='description'>"
.
UNL_UndergraduateBulletin_EPUB_Utilities
::
addCourseLinks
(
$context
->
getRaw
(
'description'
),
$controller
->
getURL
())
.
"</div>
\n
"
;
}
echo
"</dd>"
;
if
(
isset
(
$parent
->
parent
->
context
->
options
)
&&
$parent
->
parent
->
context
->
options
[
'view'
]
==
'course'
)
{
echo
'</dl>'
;
}
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