Commit 363f4b8d authored by Clare Lenihan's avatar Clare Lenihan Committed by Clare Lenihan
Browse files

Small changes to topic look

parent c53d198a
......@@ -51,8 +51,9 @@ $string['deletepostsure'] = 'Are you sure you want to do this? It cannot be undo
$string['deletetopic'] = 'Delete topic';
$string['deletetopicvariable'] = 'Delete topic \'%s\'';
$string['deletetopicsure'] = 'Are you sure you want to do this? It cannot be undone.';
$string['edited'] = 'Edited';
$string['editedon'] = '%s on %s';
$string['editpost'] = 'Edit post';
$string['editstothispost'] = 'Edits to this post:';
$string['edittitle'] = 'Edit forum';
$string['edittopic'] = 'Edit topic';
$string['forumsuccessfulsubscribe'] = 'Forum subscribed successfully';
......
......@@ -3,19 +3,21 @@
{else}
<h4>{$post->subject|escape}</h4>
<h5>{$post->poster|display_name|escape}</h5>
<h5>{str tag="posts" section=interaction.forum} {$post->count|escape}</h5>
<h5>{str tag="postsvariable" section=interaction.forum args=$post->count}</h5>
<div><img src="{$WWWROOT}thumb.php?type=profileicon&amp;maxsize=100&amp;id={$post->poster}" alt=""></div>
<p>{$post->body}</p>
{$post->body}
<div>
{if $moderator || !$closed}<a href="{$WWWROOT}interaction/forum/editpost.php?parent={$post->id|escape}">{str tag="reply" section=interaction.forum}</a>{/if}
{if $moderator || (!$closed && $post->editor)} | {/if}
{if $moderator || $post->editor}<a href="{$WWWROOT}interaction/forum/editpost.php?id={$post->id|escape}"> {str tag="edit"}</a>{/if}
{if $moderator}<a href="{$WWWROOT}interaction/forum/deletepost.php?id={$post->id|escape}"> {str tag="delete"}</a>{/if}
{if $moderator} | <a href="{$WWWROOT}interaction/forum/deletepost.php?id={$post->id|escape}"> {str tag="delete"}</a>{/if}
</div>
{if $post->edit}
<p>{str tag="edited" section="interaction.forum}</p>
{str tag="editstothispost" section="interaction.forum}
<ul>
{foreach from=$post->edit item=edit}
<li>
{$edit.editor|display_name|escape}
{$edit.edittime|escape}
{$edit}
</li>
{/foreach}
</ul>
......
......@@ -6,8 +6,10 @@
<h2>{$topic->forumtitle|escape} - {$topic->subject|escape}</h2>
{include file="interaction:forum:breadcrumbs.tpl" breadcrumbs=$breadcrumbs}
{if $moderator}
<div>
<a href="{$WWWROOT}interaction/forum/edittopic.php?id={$topic->id|escape}">{str tag="edit"}</a>
<a href="{$WWWROOT}interaction/forum/deletetopic.php?id={$topic->id|escape}">{str tag="delete"}</a>
| <a href="{$WWWROOT}interaction/forum/deletetopic.php?id={$topic->id|escape}">{str tag="delete"}</a>
</div>
{/if}
{if !$topic->forumsubscribed}{$topic->subscribe}{/if}
<ul>
......
......@@ -84,6 +84,7 @@ require_once('pieforms/pieform.php');
if (!$topic->forumsubscribed) {
$topic->subscribe = pieform(array(
'name' => 'subscribe',
'autofocus' => false,
'elements' => array(
'submit' => array(
'type' => 'submit',
......@@ -118,18 +119,12 @@ $count = count($posts);
for ($i = 0; $i < $count; $i++) {
$postedits = array();
if (!empty($posts[$i]->edit)) {
$postedits[] = array(
'edittime' => $posts[$i]->edit,
'editor' => $posts[$i]->editor
);
$postedits[] = get_string('editedon', 'interaction.forum', display_name($posts[$i]->editor), $posts[$i]->edit);
}
$temp = $i;
while (isset($posts[$i+1]) && $posts[$i+1]->id == $posts[$temp]->id) {
$i++;
$postedits[] = array(
'edittime' => $posts[$i]->edit,
'editor' => $posts[$i]->editor
);
$postedits[] = get_string('editedon', 'interaction.forum', display_name($posts[$i]->editor), $posts[$i]->edit);
unset($posts[$i]);
}
$posts[$temp]->edit = $postedits;
......
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