From d01885144757e6edd00bf55ef0d011eb517371c9 Mon Sep 17 00:00:00 2001 From: webchick <webchick@24967.no-reply.drupal.org> Date: Tue, 30 Aug 2011 01:38:09 -0700 Subject: [PATCH] Issue #1008580 by sun, xjm, Jeff Burnz, tim.plunkett: Fixed image references in forum.css. --- modules/forum/forum-list.tpl.php | 5 +++++ modules/forum/forum-rtl.css | 7 +++---- modules/forum/forum.css | 16 ++++++++++------ modules/forum/forum.module | 4 ++++ themes/bartik/css/style.css | 3 --- 5 files changed, 22 insertions(+), 13 deletions(-) diff --git a/modules/forum/forum-list.tpl.php b/modules/forum/forum-list.tpl.php index bc0935f88823..257cea947d94 100644 --- a/modules/forum/forum-list.tpl.php +++ b/modules/forum/forum-list.tpl.php @@ -15,6 +15,8 @@ * FALSE if the forum can contain only topics. * - $forum->depth: How deep the forum is in the current hierarchy. * - $forum->zebra: 'even' or 'odd' string used for row class. + * - $forum->icon_class: 'default' or 'new' string used for forum icon class. + * - $forum->icon_title: Text alternative for the forum icon. * - $forum->name: The name of the forum. * - $forum->link: The URL to link to this forum. * - $forum->description: The description of this forum. @@ -48,6 +50,9 @@ * left-margin for indenting. */ ?> <?php print str_repeat('<div class="indent">', $forum->depth); ?> + <div class="icon forum-status-<?php print $forum->icon_class; ?>" title="<?php print $forum->icon_title; ?>"> + <span class="element-invisible"><?php print $forum->icon_title; ?></span> + </div> <div class="name"><a href="<?php print $forum->link; ?>"><?php print $forum->name; ?></a></div> <?php if ($forum->description): ?> <div class="description"><?php print $forum->description; ?></div> diff --git a/modules/forum/forum-rtl.css b/modules/forum/forum-rtl.css index d31c9e7f372e..81dd4d39606a 100644 --- a/modules/forum/forum-rtl.css +++ b/modules/forum/forum-rtl.css @@ -1,8 +1,7 @@ -#forum tr td.forum { - padding-left: 0.5em; - padding-right: 25px; - background-position: 98% 2px; +#forum td.forum .icon { + float: right; + margin: 0 0 0 9px; } .forum-topic-navigation { padding: 1em 3em 0 0; diff --git a/modules/forum/forum.css b/modules/forum/forum.css index 3f3ed98481ce..4a67c8bcdab2 100644 --- a/modules/forum/forum.css +++ b/modules/forum/forum.css @@ -11,15 +11,19 @@ #forum td.pager { white-space: nowrap; } -#forum tr td.forum { - padding-left: 25px; /* LTR */ - background-position: 2px 2px; /* LTR */ - background-image: url(../../misc/forum-default.png); + +#forum td.forum .icon { + background-image: url(../../misc/forum-icons.png); background-repeat: no-repeat; + float: left; /* LTR */ + height: 24px; + margin: 0 9px 0 0; /* LTR */ + width: 24px; } -#forum tr.new-topics td.forum { - background-image: url(../../misc/forum-new.png); +#forum td.forum .forum-status-new { + background-position: -24px 0; } + #forum div.indent { margin-left: 20px; } diff --git a/modules/forum/forum.module b/modules/forum/forum.module index f2ac5acc51ea..5bb43925bc55 100644 --- a/modules/forum/forum.module +++ b/modules/forum/forum.module @@ -1064,11 +1064,15 @@ function template_preprocess_forum_list(&$variables) { $variables['forums'][$id]->new_url = ''; $variables['forums'][$id]->new_topics = 0; $variables['forums'][$id]->old_topics = $forum->num_topics; + $variables['forums'][$id]->icon_class = 'default'; + $variables['forums'][$id]->icon_title = t('No new posts'); if ($user->uid) { $variables['forums'][$id]->new_topics = _forum_topics_unread($forum->tid, $user->uid); if ($variables['forums'][$id]->new_topics) { $variables['forums'][$id]->new_text = format_plural($variables['forums'][$id]->new_topics, '1 new', '@count new'); $variables['forums'][$id]->new_url = url("forum/$forum->tid", array('fragment' => 'new')); + $variables['forums'][$id]->icon_class = 'new'; + $variables['forums'][$id]->icon_title = t('New posts'); } $variables['forums'][$id]->old_topics = $forum->num_topics - $variables['forums'][$id]->new_topics; } diff --git a/themes/bartik/css/style.css b/themes/bartik/css/style.css index 39e78051a1af..9b20ac973d15 100644 --- a/themes/bartik/css/style.css +++ b/themes/bartik/css/style.css @@ -1435,9 +1435,6 @@ div.password-suggestions { div.vertical-tabs .vertical-tabs-panes fieldset.vertical-tabs-pane { padding: 1em; } -#forum tr td.forum { - padding-left: 35px; -} #forum .name { font-size: 1.083em; } -- GitLab