Commit e9d202ca authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Bug 1478361: allowing the tab menus to look the same"

parents de4e9ec3 3474b314
......@@ -14,6 +14,7 @@ define('INTERNAL', true);
define('MENUITEM', 'content/profile');
define('SECTION_PLUGINTYPE', 'artefact');
define('SECTION_PLUGINNAME', 'internal');
define('SECTION_PAGE', 'social');
define('INTERNAL_SUBPAGE', 'social');
require_once(dirname(dirname(dirname(__FILE__))) . '/init.php');
......@@ -124,7 +125,7 @@ else {
'type' => 'submitcancel',
'class' => 'btn-success',
'value' => array(get_string('save'), get_string('cancel')),
'goto' => get_config('wwwroot') . '/artefact/internal/index.php?fs=social',
'goto' => get_config('wwwroot') . 'artefact/internal/index.php?fs=social',
),
)
);
......@@ -140,7 +141,7 @@ else {
$smarty = smarty();
$smarty->assign('PAGEHEADING', TITLE);
$smarty->assign('SUBPAGENAV', PluginArtefactInternal::submenu_items());
$smarty->assign('navtabs', PluginArtefactInternal::submenu_items());
$smarty->assign('subheading', $subheading);
$smarty->assign('form', $form);
$smarty->assign('message', $message);
......@@ -153,7 +154,7 @@ function deleteprofileform_submit(Pieform $form, $values) {
$todelete->delete();
$SESSION->add_ok_msg(get_string('profiledeletedsuccessfully', 'artefact.internal'));
redirect('/artefact/internal/index.php?fs=social');
redirect(get_config('wwwroot') . 'artefact/internal/index.php?fs=social');
}
function editprofileform_validate(Pieform $form, $values) {
......@@ -209,5 +210,5 @@ function editprofileform_submit(Pieform $form, $values) {
$toedit->commit();
$SESSION->add_ok_msg(get_string('profilesavedsuccessfully', 'artefact.internal'));
redirect('/artefact/internal/index.php?fs=social');
redirect(get_config('wwwroot') . 'artefact/internal/index.php?fs=social');
}
{include file="header.tpl"}
<ul class="nav nav-tabs">
{foreach from=$navtabs item=item}
<li class="{if $item.class}{$item.class} {/if}{if $item.selected} active{/if}" role="presentation">
<a href="{$WWWROOT}{$item.url}#profileform_{$item.page}_container">
{$item.title}
<span class="accessible-hidden sr-only">({str tag=tab}{if $item.selected} {str tag=selected}{/if})</span>
</a>
</li>
{/foreach}
</ul>
<div class="pbxl"></div>
{if $message}
<div class="deletemessage">
<h2>{$subheading}</h2>
......
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