Commit 104575a7 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Combine some columns on forum and topic listings

parent 728a50e1
......@@ -72,7 +72,7 @@ class PluginInteractionForum extends PluginInteraction {
'fieldset' => array(
'type' => 'fieldset',
'collapsible' => true,
'collapsed' => false,
'collapsed' => true,
'legend' => get_string('settings'),
'elements' => array(
'autosubscribe' => array(
......
......@@ -16,40 +16,37 @@
{/foreach}
</div>
{if $forums}
<table id="forumslist" class="fullwidth">
<table id="forumslist" class="fullwidth nohead">
<tr>
<th>{str tag="forumname" section="interaction.forum"}</th>
<th>{str tag="description"}</th>
<th>{str tag=Moderators section=interaction.forum}</th>
<th>{str tag="Topics" section="interaction.forum"}</th>
{if $admin}<th></th>{/if}
{if $forum->subscribe}{/if}<th></th>
<th>{str tag="name" section="interaction.forum"}</th>
<th class="center">{str tag="Topics" section="interaction.forum"}</th>
<th></th>
</tr>
{foreach from=$forums item=forum}
<tr class="r{cycle values=0,1}">
<td class="nowrap"><strong><a href="{$WWWROOT}interaction/forum/view.php?id={$forum->id|escape}">{$forum->title|escape}</a></strong>
</td>
<td>
{$forum->description}
</td>
<td>
{if $forum->moderators}
{foreach from=$forum->moderators item=mod}
<div class="s">
<a href="{$WWWROOT}user/view.php?id={$mod}"><img src="{$WWWROOT}thumb.php?type=profileicon&amp;maxsize=20&amp;id={$mod}" alt=""></a>
<a href="{$WWWROOT}user/view.php?id={$mod}" class="moderator forumuser">{$mod|display_name|escape}</a>
{if $admin}
<div class="fr btn-spacer s">
<a href="{$WWWROOT}interaction/edit.php?id={$forum->id|escape}&amp;returnto=index" id="btn-edit" class="btn-edit">{str tag=edit}</a>
<a href="{$WWWROOT}interaction/delete.php?id={$forum->id|escape}&amp;returnto=index" class="btn-del">{str tag=delete}</a>
</div>
{/if}
<div class="nowrap">
<strong><a href="{$WWWROOT}interaction/forum/view.php?id={$forum->id|escape}">{$forum->title|escape}</a></strong>
</div>
<div class="s">{$forum->description|str_shorten_html:1000:true}</div>
{if $forum->moderators}
<div class="s inlinelist">
<span>{str tag="Moderators" section="interaction.forum"}:</span>
{foreach from=$forum->moderators item=mod}
<a href="{$WWWROOT}user/view.php?id={$mod}"><img src="{$WWWROOT}thumb.php?type=profileicon&amp;maxsize=20&amp;id={$mod}" alt=""></a>
<a href="{$WWWROOT}user/view.php?id={$mod}" class="moderator">{$mod|display_name:null:true|escape}</a>
{/foreach}
</div>
{/foreach}
{/if}
</td>
<td align="center">{$forum->topiccount}</td>
{if $admin}
<td class="nowrap btn-spacer s">
<a href="{$WWWROOT}interaction/edit.php?id={$forum->id|escape}&amp;returnto=index" id="btn-edit" class="btn-edit">{str tag=edit}</a>
<a href="{$WWWROOT}interaction/delete.php?id={$forum->id|escape}&amp;returnto=index" class="btn-del">{str tag=delete}</a>
{/if}
</td>
{/if}
{if $forum->subscribe}<td class="nowrap s">{$forum->subscribe}</td>{/if}
<td class="center">{$forum->topiccount}</td>
<td class="nowrap s">{if $forum->subscribe}{$forum->subscribe}{/if}</td>
</tr>
{/foreach}
</table>
......
......@@ -8,30 +8,31 @@
{if $topic->closed}<img src="{$closedicon|escape}" alt="{str tag="Closed" section="interaction.forum"}">{/if}
{if $topic->subscribed}<img src="{$subscribedicon|escape}" alt="{str tag="Subscribed" section="interaction.forum"}">{/if}
</td>
<td class="narrow">
{if $membership && (!$forum->subscribed || $moderator)}
<td>
<input type="checkbox" name="checked[{$topic->id|escape}]" class="topic-checkbox">
</td>
<input type="checkbox" name="checked[{$topic->id|escape}]" class="topic-checkbox">
{/if}
</td>
<td>
<a href="{$WWWROOT}interaction/forum/topic.php?id={$topic->id|escape}">{$topic->subject|escape}</a>
<div class="s">{$topic->body}</div>
{if $moderator}
<div class="s fr">
<a href="{$WWWROOT}interaction/forum/edittopic.php?id={$topic->id|escape}&amp;returnto=view" class="btn-edit">{str tag="edit"}</a>
<a href="{$WWWROOT}interaction/forum/deletetopic.php?id={$topic->id|escape}&amp;returnto=view" class="btn-del">{str tag="delete"}</a>
</div>
{/if}
<div><a href="{$WWWROOT}interaction/forum/topic.php?id={$topic->id|escape}">{$topic->subject|escape}</a></div>
<div class="s">{$topic->body}</div>
</td>
<td class="s">
<a href="{$WWWROOT}user/view.php?id={$topic->poster}"><img src="{$WWWROOT}thumb.php?type=profileicon&amp;maxsize=20&amp;id={$topic->poster}" alt=""></a>
<a href="{$WWWROOT}user/view.php?id={$topic->poster}" class="forumuser{if in_array($topic->poster, $groupadmins)} groupadmin{elseif $topic->moderator} moderator{/if}">{$topic->poster|display_name|escape}</a>
<a href="{$WWWROOT}user/view.php?id={$topic->poster}" class="forumuser{if in_array($topic->poster, $groupadmins)} groupadmin{elseif $topic->moderator} moderator{/if}">{$topic->poster|display_name:null:true|escape}</a>
</td>
<td class="postscount">{$topic->postcount|escape}</td>
<td class="center">{$topic->postcount|escape}</td>
<td class="s">
{if !$topic->lastpostdeleted}
<a href="{$WWWROOT}interaction/forum/topic.php?id={$topic->id}#post{$topic->lastpost}">{$topic->lastposttime}</a> {str tag=by section=view}
<a href="{$WWWROOT}user/view.php?id={$topic->lastposter}" {if in_array($topic->lastposter, $groupadmins)} class="groupadmin"{elseif $topic->lastpostermoderator} class="moderator"{/if}>{$topic->lastposter|display_name|escape}</a>
<a href="{$WWWROOT}user/view.php?id={$topic->lastposter}" {if in_array($topic->lastposter, $groupadmins)} class="groupadmin"{elseif $topic->lastpostermoderator} class="moderator"{/if}>{$topic->lastposter|display_name:null:true|escape}</a>
{/if}
</td>
{if $moderator}
<td class="s">
<a href="{$WWWROOT}interaction/forum/edittopic.php?id={$topic->id|escape}&amp;returnto=view" class="btn-edit">{str tag="edit"}</a>
<br><a href="{$WWWROOT}interaction/forum/deletetopic.php?id={$topic->id|escape}&amp;returnto=view" class="btn-del">{str tag="delete"}</a></td>
{/if}
</tr>
{/foreach}
......@@ -18,10 +18,10 @@
{/if}
{if $stickytopics || $regulartopics}
<form action="" method="post">
<table id="forumtopicstable" class="fullwidth">
<table id="forumtopicstable" class="fullwidth nohead">
<tr>
<th></th>
{if $membership && (!$forum->subscribed || $moderator)}<th></th>{/if}
<th></th>
<th>{str tag="Topic" section="interaction.forum"}</th>
<th>{str tag="Poster" section="interaction.forum"}</th>
<th class="postscount">{str tag="Posts" section="interaction.forum"}</th>
......@@ -31,7 +31,6 @@
{if $stickytopics}
{include file="interaction:forum:topics.tpl" topics=$stickytopics moderator=$moderator forum=$forum sticky=true}
{/if}
{if $stickytopics && $regulartopics}<tr><td></td></tr>{/if}
{if $regulartopics}
{include file="interaction:forum:topics.tpl" topics=$regulartopics moderator=$moderator forum=$forum sticky=false}
{/if}
......
......@@ -506,47 +506,48 @@ div.sideblock {
}
/* Login */
.maincontent #loginform_container th {
.main-column #loginform_container th {
padding: .5em .25em;
}
.maincontent #loginform_container td {
.main-column #loginform_container td {
padding: .25em;
}
/* Tables */
.maincontent td {
.main-column td {
margin: 0;
}
.maincontent thead th {
.main-column thead th {
color: #677a8a;
border-bottom: 1px solid #95a8b7;
vertical-align: top;
}
.maincontent tbody th {
.main-column tbody th {
color: #677a8a;
text-align: right;
border-bottom: none;
}
/******* TH in tbody that should appear like it's in thead with a line under and left aligned *******/
table.nohead th,
#menuitemlist table th,
#postlist th,
#forumslist th,
#forumtopicstable th {
#postlist th {
border-bottom: 1px solid #95a8b7;
text-align: left;
}
.maincontent tfoot td {
table.nohead th.center {
text-align: center;
}
.main-column tfoot td {
border-top: 1px solid #95a8b7;
}
/********* Tables that require a bottom border to enclose elements *********/
table.nohead,
#filelist,
#filebrowser,
#attachedfiles,
#bloglist,
.templateresults,
#feedbacktable,
#forumslist,
#forumtopicstable,
#notificationstable,
#suspendedlist {
border-bottom: 1px solid #95a8b7;
......
......@@ -119,6 +119,9 @@ td {
padding: .25em .5em;
vertical-align: top;
}
td.narrow {
padding: 0;
}
.r0 {
background-color: #f1f1f1;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment