Commit 52504f00 authored by Clare Lenihan's avatar Clare Lenihan Committed by Clare Lenihan
Browse files

changing the titles of view/edit and view/access

parent f7d966c0
......@@ -36,14 +36,20 @@ require_once('pieforms/pieform/elements/calendar.php');
require_once(get_config('docroot') . 'lib/view.php');
$view = new View(param_integer('id'));
define('TITLE', get_string('editaccessforview', 'view', $view->get('title')));
$new = param_boolean('new');
if ($new) {
define('TITLE', get_string('createviewstepthree', 'view'));
}
else {
define('TITLE', get_string('editaccessforview', 'view', $view->get('title')));
}
$smarty = smarty(array('tablerenderer'), pieform_element_calendar_get_headdata(pieform_element_calendar_configure(array())), array('mahara' => array('From', 'To')));
$artefacts = $view->get_artefact_metadata();
if (empty($artefacts)) {
$confirmmessage = get_string('reallyaddaccesstoemptyview');
$confirmmessage = get_string('reallyaddaccesstoemptyview', 'view');
$js = <<<EOF
addLoadEvent(function() {
connect('editaccess_submit', 'onclick', function () {
......
......@@ -38,7 +38,6 @@ $id = param_integer('id', 0); // if 0, we're creating a new view
$new = param_boolean('new');
if (empty($id)) {
define('TITLE', get_string('createview', 'view'));
$new = true;
}
else {
......@@ -46,7 +45,13 @@ else {
if ($view->get('owner') != $USER->get('id')) {
throw new AccessDeniedException(get_string('canteditdontown', 'view'));
}
define('TITLE', get_string('editview', 'view', $view->get('title')));
}
if ($new || empty($id)) {
define('TITLE', get_string('createviewstepone', 'view'));
}
else {
define('TITLE', get_string('editviewdetails', 'view', $view->get('title')));
}
$heading = TITLE; // for the smarty template
......
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