Commit 3d5dd018 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Remove clutter & style buttons on forum pages

parent 45176f04
......@@ -3,7 +3,7 @@
<h2>{str tag="nameplural" section=interaction.forum}</h2>
{if $admin}
<div class="rbuttons pagetabs">
<a href="{$WWWROOT}interaction/edit.php?group={$groupid|escape}&amp;plugin=forum" id="btn-newforum">{str tag="newforum" section=interaction.forum}</a>
<a href="{$WWWROOT}interaction/edit.php?group={$groupid|escape}&amp;plugin=forum" class="btn-add s">{str tag="newforum" section=interaction.forum}</a>
</div>
{/if}
<div>
......@@ -39,8 +39,8 @@
<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">{str tag=edit}</a>
<a href="{$WWWROOT}interaction/delete.php?id={$forum->id|escape}&amp;returnto=index" id="btn-delete">{str tag=delete}</a>
<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" id="btn-delete" class="btn-del">{str tag=delete}</a>
</td>
{/if}
{if $forum->subscribe}<td class="nowrap s">{$forum->subscribe}</td>{/if}
......
......@@ -134,17 +134,3 @@
}
#btn-newforum {
background: url(../images/icon-newforum.gif) no-repeat left 3px;
padding-left: 1.5em;
border: none;
font-weight: bold;
font-size: 1em;
}
#btn-newtopic {
background: url(../images/icon-newtopic.gif) no-repeat left 3px;
padding-left: 1.5em;
border: none;
font-weight: bold;
font-size: 1em;
}
......@@ -4,9 +4,9 @@
{if $membership}
<div class="rbuttons pagetabs">
{if $topic->canedit}
<a href="{$WWWROOT}interaction/forum/edittopic.php?id={$topic->id|escape}" id="btn-edittopic">{str tag=edittopic section=interaction.forum}</a>
<a href="{$WWWROOT}interaction/forum/edittopic.php?id={$topic->id|escape}" id="btn-edittopic" class="btn-edit s">{str tag=edittopic section=interaction.forum}</a>
{if $moderator}
<a href="{$WWWROOT}interaction/forum/deletetopic.php?id={$topic->id|escape}" id="btn-deletetopic" class="delete">{str tag=deletetopic section=interaction.forum}</a>
<a href="{$WWWROOT}interaction/forum/deletetopic.php?id={$topic->id|escape}" id="btn-deletetopic" class="delete btn-del s">{str tag=deletetopic section=interaction.forum}</a>
{/if}
{/if}
{if !$topic->forumsubscribed}
......
......@@ -42,8 +42,8 @@
</td>
{if $moderator}
<td class="s">
<a href="{$WWWROOT}interaction/forum/edittopic.php?id={$topic->id|escape}&amp;returnto=view" id="btn-edit">{str tag="edit"}</a>
<br><a href="{$WWWROOT}interaction/forum/deletetopic.php?id={$topic->id|escape}&amp;returnto=view" id="btn-delete">{str tag="delete"}</a></td>
<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}
......@@ -3,8 +3,8 @@
<h2>{$subheading|escape}</h2>
<div class="rbuttons pagetabs">
{if $admin}
<a href="{$WWWROOT}interaction/edit.php?id={$forum->id|escape}" id="btn-editforum">{str tag="edittitle" section="interaction.forum"}</a>
<a href="{$WWWROOT}interaction/delete.php?id={$forum->id|escape}" id="btn-deleteforum">{str tag="deleteforum" section="interaction.forum"}</a>
<a href="{$WWWROOT}interaction/edit.php?id={$forum->id|escape}" class="btn-edit s" id="btn-editforum">{str tag="edittitle" section="interaction.forum"}</a>
<a href="{$WWWROOT}interaction/delete.php?id={$forum->id|escape}" class="btn-del s" id="btn-deleteforum">{str tag="deleteforum" section="interaction.forum"}</a>
{/if}
{$forum->subscribe}
</div>
......@@ -13,7 +13,7 @@
<h3>{str tag=Topics section="interaction.forum"}</h3>
{if $membership}
<div class="rbuttons">
<a href="{$WWWROOT}interaction/forum/edittopic.php?forum={$forum->id|escape}" id="btn-newtopic">{str tag="newtopic" section="interaction.forum}</a>
<a href="{$WWWROOT}interaction/forum/edittopic.php?forum={$forum->id|escape}" class="btn-add s">{str tag="newtopic" section="interaction.forum}</a>
</div>
{/if}
<label>{str tag="groupadminlist" section="interaction.forum"}</label>
......@@ -32,28 +32,6 @@
</div>
{if $stickytopics || $regulartopics}
<form action="" method="post">
{if $membership && (!$forum->subscribed || $moderator)}
<div class="forumselectwrap"><select name="type1">
<option value="default" selected="selected">{str tag="chooseanaction" section="interaction.forum"}</option>
{if !$forum->subscribed}
<option value="subscribe">{str tag="Subscribe" section="interaction.forum"}</option>
<option value="unsubscribe">{str tag="Unsubscribe" section="interaction.forum"}</option>
{/if}
{if $moderator}
<option value="sticky">{str tag="Sticky" section="interaction.forum"}</option>
<option value="unsticky">{str tag="Unsticky" section="interaction.forum"}</option>
<option value="closed">{str tag="Close" section="interaction.forum"}</option>
<option value="open">{str tag="Open" section="interaction.forum"}</option>
{/if}
</select>
<input type="submit" name="updatetopics1" value="{str tag="updateselectedtopics" section="interaction.forum"}" class="submit">
{if $moderator}
{contextualhelp plugintype='interaction' pluginname='forum' section='updatemod'}
{else}
{contextualhelp plugintype='interaction' pluginname='forum' section='update'}
{/if}
</div>
{/if}
<table id="forumtopicstable" class="fullwidth">
<tr>
<th></th>
......@@ -76,7 +54,7 @@
<div class="fr">{$pagination}</div>
{/if}
{if $membership && (!$forum->subscribed || $moderator)}
<div class="forumselectwrap fl"><select name="type2">
<div class="forumselectwrap fl"><select name="type">
<option value="default" selected="selected">{str tag="chooseanaction" section="interaction.forum"}</option>
{if !$forum->subscribed}
<option value="subscribe">{str tag="Subscribe" section="interaction.forum"}</option>
......@@ -89,7 +67,7 @@
<option value="open">{str tag="Open" section="interaction.forum"}</option>
{/if}
</select>
<input type="submit" name="updatetopics2" value="{str tag="updateselectedtopics" section="interaction.forum"}" class="submit">
<input type="submit" name="updatetopics" value="{str tag="updateselectedtopics" section="interaction.forum"}" class="submit">
{if $moderator}
{contextualhelp plugintype='interaction' pluginname='forum' section='updatemod'}
{else}
......
......@@ -81,6 +81,7 @@ if ($membership && !$topic->forumsubscribed) {
'elements' => array(
'submit' => array(
'type' => 'submit',
'class' => 'btn-subscribe',
'value' => $topic->topicsubscribed ? get_string('unsubscribefromtopic', 'interaction.forum') : get_string('subscribetotopic', 'interaction.forum'),
'help' => true
),
......
......@@ -85,11 +85,8 @@ $moderators = get_column_sql(
if ($membership && isset($_POST['checked'])) {
$checked = array_keys($_POST['checked']);
// get type based on which button was pressed
if (isset($_POST['updatetopics1'])) {
$type = $_POST['type1'];
}
else if (isset($_POST['updatetopics2'])) {
$type = $_POST['type2'];
if (isset($_POST['updatetopics'])) {
$type = $_POST['type'];
}
// check that user is only messing with topics from this forum
$alltopics = get_column('interaction_forum_topic', 'id', 'forum', $forumid, 'deleted', 0);
......
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