Skip to content
Snippets Groups Projects
Commit d0188514 authored by Angie Byron's avatar Angie Byron
Browse files

Issue #1008580 by sun, xjm, Jeff Burnz, tim.plunkett: Fixed image references in forum.css.

parent 05f77ccc
No related branches found
No related tags found
No related merge requests found
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
* FALSE if the forum can contain only topics. * FALSE if the forum can contain only topics.
* - $forum->depth: How deep the forum is in the current hierarchy. * - $forum->depth: How deep the forum is in the current hierarchy.
* - $forum->zebra: 'even' or 'odd' string used for row class. * - $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->name: The name of the forum.
* - $forum->link: The URL to link to this forum. * - $forum->link: The URL to link to this forum.
* - $forum->description: The description of this forum. * - $forum->description: The description of this forum.
...@@ -48,6 +50,9 @@ ...@@ -48,6 +50,9 @@
* left-margin for indenting. * left-margin for indenting.
*/ ?> */ ?>
<?php print str_repeat('<div class="indent">', $forum->depth); ?> <?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> <div class="name"><a href="<?php print $forum->link; ?>"><?php print $forum->name; ?></a></div>
<?php if ($forum->description): ?> <?php if ($forum->description): ?>
<div class="description"><?php print $forum->description; ?></div> <div class="description"><?php print $forum->description; ?></div>
......
#forum tr td.forum { #forum td.forum .icon {
padding-left: 0.5em; float: right;
padding-right: 25px; margin: 0 0 0 9px;
background-position: 98% 2px;
} }
.forum-topic-navigation { .forum-topic-navigation {
padding: 1em 3em 0 0; padding: 1em 3em 0 0;
......
...@@ -11,15 +11,19 @@ ...@@ -11,15 +11,19 @@
#forum td.pager { #forum td.pager {
white-space: nowrap; white-space: nowrap;
} }
#forum tr td.forum {
padding-left: 25px; /* LTR */ #forum td.forum .icon {
background-position: 2px 2px; /* LTR */ background-image: url(../../misc/forum-icons.png);
background-image: url(../../misc/forum-default.png);
background-repeat: no-repeat; background-repeat: no-repeat;
float: left; /* LTR */
height: 24px;
margin: 0 9px 0 0; /* LTR */
width: 24px;
} }
#forum tr.new-topics td.forum { #forum td.forum .forum-status-new {
background-image: url(../../misc/forum-new.png); background-position: -24px 0;
} }
#forum div.indent { #forum div.indent {
margin-left: 20px; margin-left: 20px;
} }
......
...@@ -1064,11 +1064,15 @@ function template_preprocess_forum_list(&$variables) { ...@@ -1064,11 +1064,15 @@ function template_preprocess_forum_list(&$variables) {
$variables['forums'][$id]->new_url = ''; $variables['forums'][$id]->new_url = '';
$variables['forums'][$id]->new_topics = 0; $variables['forums'][$id]->new_topics = 0;
$variables['forums'][$id]->old_topics = $forum->num_topics; $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) { if ($user->uid) {
$variables['forums'][$id]->new_topics = _forum_topics_unread($forum->tid, $user->uid); $variables['forums'][$id]->new_topics = _forum_topics_unread($forum->tid, $user->uid);
if ($variables['forums'][$id]->new_topics) { 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_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]->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; $variables['forums'][$id]->old_topics = $forum->num_topics - $variables['forums'][$id]->new_topics;
} }
......
...@@ -1435,9 +1435,6 @@ div.password-suggestions { ...@@ -1435,9 +1435,6 @@ div.password-suggestions {
div.vertical-tabs .vertical-tabs-panes fieldset.vertical-tabs-pane { div.vertical-tabs .vertical-tabs-panes fieldset.vertical-tabs-pane {
padding: 1em; padding: 1em;
} }
#forum tr td.forum {
padding-left: 35px;
}
#forum .name { #forum .name {
font-size: 1.083em; font-size: 1.083em;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment