Commit 497ad16c authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Revert to old style group tabs, but still created by smarty function when GROUP constant is defined

parent abb1e93d
......@@ -31,6 +31,7 @@ define('TITLE', get_string('about'));
$smarty = smarty();
$smarty->assign('page_content', get_site_page_content('about'));
$smarty->assign('heading', null);
$smarty->assign('searchform', searchform());
$smarty->display('sitepage.tpl');
......
......@@ -9,7 +9,6 @@
{include file="sidebar.tpl"}
{include file="columnleftstart.tpl"}
<h2>{$pagetitle}</h2>
{$textinputform}
<div id='uploader'></div>
<div id='browsebuttonstuff'>
......
......@@ -9,7 +9,6 @@
{include file="sidebar.tpl"}
{include file="columnleftstart.tpl"}
<h2>{str section="artefact.blog" tag="newblog"}</h2>
{$newblogform}
{include file="columnleftend.tpl"}
......
......@@ -2,8 +2,6 @@
{include file="sidebar.tpl"}
{include file="columnleftstart.tpl"}
<h2>{str section="artefact.blog" tag="blogsettings"}</h2>
{$editform}
{include file="columnleftend.tpl"}
......
......@@ -54,7 +54,7 @@ uploader.setgroup({$group->id});
GROUPJS;
$smarty = smarty(array('tablerenderer', 'artefact/file/js/file.js'));
$smarty->assign('heading', $group->name . ' - ' . get_string('Files', 'artefact.file'));
$smarty->assign('heading', $group->name);
$smarty->assign('INLINEJAVASCRIPT', $javascript);
$smarty->display('artefact:file:index.tpl');
......
......@@ -57,7 +57,7 @@ class PluginArtefactFile extends PluginArtefact {
public static function group_tabs($groupid) {
return array(
array(
'files' => array(
'path' => 'groups/files',
'url' => 'artefact/file/groupfiles.php?group='.$groupid,
'title' => get_string('Files', 'artefact.file'),
......
......@@ -2,10 +2,7 @@
{include file="sidebar.tpl"}
{include file="columnleftstart.tpl"}
{if $GROUP}
<h2>{$heading}</h2>
{elseif $institution}
<h2>{$heading}</h2>
{if $institution}
{$institutionselector}
{/if}
{str tag='fileinstructions' section='artefact.file'}
......
......@@ -101,6 +101,7 @@ function changerole_submit(Pieform $form, $values) {
define('TITLE', $group->name . ' - ' . get_string('changerole', 'group'));
$smarty = smarty();
$smarty->assign('heading', $group->name);
$smarty->assign('subtitle', get_string('changeroleofuseringroup', 'group', display_name($user), $group->name));
$smarty->assign('changeform', $changeform);
......
......@@ -51,6 +51,7 @@ $limit = param_integer('limit', 10);
list($html, $pagination, $count, $offset, $membershiptype) = group_get_membersearch_data($group->id, $query, $offset, $limit, $membershiptype);
$smarty = smarty(array('groupmembersearch'));
$smarty->assign('heading', $group->name);
$smarty->assign('query', $query);
$smarty->assign('results', $html);
$smarty->assign('pagination', $pagination['html']);
......
......@@ -46,6 +46,7 @@ else {
$smarty = smarty();
$smarty->assign('page_content', get_site_page_content($pagename));
$smarty->assign('heading', null);
$smarty->display('index.tpl');
?>
......@@ -68,7 +68,8 @@ $form = pieform(array(
$smarty = smarty(array('tablerenderer'));
$smarty->assign('form', $form);
$smarty->assign('heading', TITLE);
$smarty->assign('heading', $group->name);
$smarty->assign('subheading', TITLE);
$smarty->assign('message', get_string('deleteinteractionsure', 'group'));
$smarty->display('interaction/delete.tpl');
......
......@@ -82,7 +82,8 @@ $form = pieform(array(
$smarty = smarty(array('tablerenderer'));
$smarty->assign('form', $form);
$smarty->assign('heading', TITLE);
$smarty->assign('heading', $group->name);
$smarty->assign('subheading', TITLE);
$smarty->display('interaction/edit.tpl');
?>
......@@ -76,14 +76,6 @@ define('TITLE', $post->topicsubject . ' - ' . get_string('deletepost', 'interact
$post->ctime = relative_date(get_string('strftimerecentfullrelative', 'interaction.forum'), get_string('strftimerecentfull'), $post->ctime);
$breadcrumbs = array(
array(
get_config('wwwroot') . 'group/view.php?id=' . $post->group,
$post->groupname,
),
array(
get_config('wwwroot') . 'interaction/forum/index.php?group=' . $post->group,
get_string('nameplural', 'interaction.forum')
),
array(
get_config('wwwroot') . 'interaction/forum/view.php?id=' . $post->forum,
$post->forumtitle
......@@ -139,7 +131,8 @@ function deletepost_submit(Pieform $form, $values) {
$smarty = smarty();
$smarty->assign('breadcrumbs', $breadcrumbs);
$smarty->assign('heading', TITLE);
$smarty->assign('heading', $post->groupname);
$smarty->assign('subheading', TITLE);
$smarty->assign('post', $post);
$smarty->assign('deleteform', $form);
$smarty->assign('groupadmins', group_get_admin_ids($post->group));
......
......@@ -129,9 +129,9 @@ function deletetopic_submit(Pieform $form, $values) {
}
$smarty = smarty();
$smarty->assign('breadcrumbs', $breadcrumbs);
$smarty->assign('forum', $topic->title);
$smarty->assign('heading', TITLE);
$smarty->assign('heading', $topic->groupname);
$smarty->assign('subheading', TITLE);
$smarty->assign('topic', $topic);
$smarty->assign('groupadmins', group_get_admin_ids($topic->group));
$smarty->assign('deleteform', $form);
......
......@@ -81,14 +81,6 @@ if (!$parent) {
define('GROUP', $parent->group);
$breadcrumbs = array(
array(
get_config('wwwroot') . 'group/view.php?id=' . $parent->group,
$parent->groupname
),
array(
get_config('wwwroot') . 'interaction/forum/index.php?group=' . $parent->group,
get_string('nameplural', 'interaction.forum')
),
array(
get_config('wwwroot') . 'interaction/forum/view.php?id=' . $parent->forum,
$parent->forumtitle
......@@ -243,7 +235,8 @@ function addpost_submit(Pieform $form, $values) {
$smarty = smarty();
$smarty->assign('breadcrumbs', $breadcrumbs);
$smarty->assign('heading', TITLE);
$smarty->assign('heading', $parent->groupname);
$smarty->assign('subheading', TITLE);
$smarty->assign('editform', $editform);
$smarty->assign('parent', $parent);
$smarty->assign('groupadmins', group_get_admin_ids($parent->group));
......
......@@ -77,35 +77,12 @@ if (!$membership) {
throw new AccessDeniedException(get_string('cantaddtopic', 'interaction.forum'));
}
$breadcrumbs = array(
array(
get_config('wwwroot') . 'group/view.php?id=' . $forum->groupid,
$forum->groupname
),
array(
get_config('wwwroot') . 'interaction/forum/index.php?group=' . $forum->groupid,
get_string('nameplural', 'interaction.forum')
),
array(
get_config('wwwroot') . 'interaction/forum/view.php?id=' . $forumid,
$forum->title
)
);
if (!isset($topicid)) { // new topic
define('TITLE', $forum->title . ' - ' . get_string('addtopic','interaction.forum'));
$breadcrumbs[] = array(
get_config('wwwroot') . 'interaction/forum/edittopic.php?forum=' . $forumid,
get_string('addtopic', 'interaction.forum')
);
}
else { // edit topic
define('TITLE', $forum->title . ' - ' . get_string('edittopic','interaction.forum'));
$breadcrumbs[] = array(
get_config('wwwroot') . 'interaction/forum/edittopic.php?id=' . $topicid,
get_string('edittopic', 'interaction.forum')
);
// no record for edits to own posts with 30 minutes
if (user_can_edit_post($topic->poster, $topic->ctime)) {
......@@ -255,8 +232,8 @@ function edittopic_submit(Pieform $form, $values) {
}
$smarty = smarty();
$smarty->assign('breadcrumbs', $breadcrumbs);
$smarty->assign('heading', TITLE);
$smarty->assign('heading', $forum->groupname);
$smarty->assign('subheading', TITLE);
$smarty->assign('editform', $editform);
$smarty->display('interaction:forum:edittopic.tpl');
......
......@@ -129,9 +129,8 @@ if ($forums) {
}
$smarty = smarty();
$smarty->assign('breadcrumbs', $breadcrumbs);
$smarty->assign('groupid', $groupid);
$smarty->assign('heading', TITLE);
$smarty->assign('heading', $group->name);
$smarty->assign('admin', $membership == 'admin');
$smarty->assign('groupadmins', group_get_admin_ids($groupid));
$smarty->assign('forums', $forums);
......
......@@ -3,7 +3,7 @@
{include file="columnleftstart.tpl"}
<h2>{$heading|escape}</h2>
<h2>{$subheading|escape}</h2>
{include file="interaction:forum:breadcrumbs.tpl" breadcrumbs=$breadcrumbs}
......
......@@ -3,7 +3,7 @@
{include file="columnleftstart.tpl"}
<h2>{$heading|escape}</h2>
<h2>{$subheading|escape}</h2>
{include file="interaction:forum:breadcrumbs.tpl" breadcrumbs=$breadcrumbs}
......
......@@ -3,7 +3,7 @@
{include file="columnleftstart.tpl"}
<h2>{$heading|escape}</h2>
<h2>{$subheading|escape}</h2>
{include file="interaction:forum:breadcrumbs.tpl" breadcrumbs=$breadcrumbs}
{$editform}
......
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