Skip to content

Commit

Permalink
Added some missing styles from the course listing, so that the
Browse files Browse the repository at this point in the history
course and category names can be tweaked.
  • Loading branch information
moodler committed Aug 29, 2003
1 parent 39ced83 commit d5f26b0
Show file tree
Hide file tree
Showing 13 changed files with 117 additions and 4 deletions.
10 changes: 6 additions & 4 deletions course/lib.php
Expand Up @@ -950,26 +950,27 @@ function print_category_info($category, $depth) {
$pixpath = "$CFG->wwwroot/theme/$CFG->theme/pix";
}

$catlinkcss = $category->visible ? "" : " class=\"dimmed\" ";

echo "<tr>";
echo "<td valign=\"top\">";
for ($i=0; $i<$depth;$i++) {
echo "<ul style=\"margin-bottom:0;margin-top:0\">";
}

$catimage = "";
$catlinkcss = $category->visible ? "" : " class=\"dimmed\" ";

if ($CFG->frontpage == FRONTPAGECOURSELIST) {
$catimage = "<img src=\"$pixpath/i/course.gif\" width=16 height=16 border=0>";
}
echo "<font size=+1>$catimage <a $catlinkcss ".
"href=\"$CFG->wwwroot/course/category.php?id=$category->id\">$category->name</a></font>";
echo "<font size=+1>$catimage <span class=\"categoryname\"><a $catlinkcss ".
"href=\"$CFG->wwwroot/course/category.php?id=$category->id\">$category->name</a></span></font>";

if ($CFG->frontpage == FRONTPAGECOURSELIST) {
if ($courses = get_courses($category->id)) {
foreach ($courses as $course) {
echo "<ul style=\"margin-bottom:0;margin-top:0\">";
$linkcss = $course->visible ? "" : " class=\"dimmed\" ";
echo "<span class=\"coursename\">";
echo "<a $linkcss href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->fullname</a>";
echo "&nbsp;&nbsp;";
unset($courses[$key]);
Expand All @@ -981,6 +982,7 @@ function print_category_info($category, $depth) {
echo "<a title=\"$strrequireskey\" href=\"$CFG->wwwroot/course/view.php?id=$course->id\">";
echo "<img alt=\"\" height=16 width=16 border=0 src=\"$pixpath/i/key.gif\"></a>";
}
echo "</span>";
echo "</ul>";
}
}
Expand Down
12 changes: 12 additions & 0 deletions theme/UPGRADE.txt
Expand Up @@ -89,3 +89,15 @@ ALL pix files can now be changed from within a theme,
see cordoroyblue for an example: config.php and the
pix subdirectory.



================================
Changes to 1.1 since 1.0.9
--------------------------------

/* Styles for the courses/categories on the course listing */

.categorybox {}
.categoryname {}
.coursename {}

9 changes: 9 additions & 0 deletions theme/brightretro/styles.php
Expand Up @@ -284,3 +284,12 @@

.headerhomemenu {
}

.categorybox {
}

.categoryname {
}

.coursename {
}
9 changes: 9 additions & 0 deletions theme/cordoroyblue/styles.php
Expand Up @@ -377,3 +377,12 @@

.headerhomemenu {
}

.categorybox {
}

.categoryname {
}

.coursename {
}
9 changes: 9 additions & 0 deletions theme/garden/styles.php
Expand Up @@ -298,3 +298,12 @@

.headerhomemenu {
}

.categorybox {
}

.categoryname {
}

.coursename {
}
9 changes: 9 additions & 0 deletions theme/oceanblue/styles.php
Expand Up @@ -282,3 +282,12 @@

.headerhomemenu {
}

.categorybox {
}

.categoryname {
}

.coursename {
}
9 changes: 9 additions & 0 deletions theme/poweraid/styles.php
Expand Up @@ -242,3 +242,12 @@

.headerhomemenu {
}

.categorybox {
}

.categoryname {
}

.coursename {
}
9 changes: 9 additions & 0 deletions theme/standard/styles.php
Expand Up @@ -282,3 +282,12 @@

.headerhomemenu {
}

.categorybox {
}

.categoryname {
}

.coursename {
}
9 changes: 9 additions & 0 deletions theme/standardblue/styles.php
Expand Up @@ -282,3 +282,12 @@

.headerhomemenu {
}

.categorybox {
}

.categoryname {
}

.coursename {
}
9 changes: 9 additions & 0 deletions theme/standardgreen/styles.php
Expand Up @@ -282,3 +282,12 @@

.headerhomemenu {
}

.categorybox {
}

.categoryname {
}

.coursename {
}
9 changes: 9 additions & 0 deletions theme/standardlogo/styles.php
Expand Up @@ -282,3 +282,12 @@

.headerhomemenu {
}

.categorybox {
}

.categoryname {
}

.coursename {
}
9 changes: 9 additions & 0 deletions theme/standardred/styles.php
Expand Up @@ -282,3 +282,12 @@

.headerhomemenu {
}

.categorybox {
}

.categoryname {
}

.coursename {
}
9 changes: 9 additions & 0 deletions theme/standardwhite/styles.php
Expand Up @@ -282,3 +282,12 @@

.headerhomemenu {
}

.categorybox {
}

.categoryname {
}

.coursename {
}

0 comments on commit d5f26b0

Please sign in to comment.