Commit ad8e1a4a authored by Richard Mansfield's avatar Richard Mansfield
Browse files
parents da42551f ac4db857
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
define('INTERNAL', 1); define('INTERNAL', 1);
define('PUBLIC', 1); define('PUBLIC', 1);
require('init.php'); require('init.php');
define('TITLE', get_string('about'));
$smarty = smarty(); $smarty = smarty();
$smarty->assign('page_content', get_site_page_content('about')); $smarty->assign('page_content', get_site_page_content('about'));
......
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
define('INTERNAL', 1); define('INTERNAL', 1);
define('PUBLIC', 1); define('PUBLIC', 1);
require('init.php'); require('init.php');
require_once('pieforms/pieform.php'); require_once('pieforms/pieform.php');
define('TITLE', get_string('contactus'));
if ($USER->is_logged_in()) { if ($USER->is_logged_in()) {
$userid = $USER->get('id'); $userid = $USER->get('id');
......
...@@ -28,6 +28,7 @@ define('INTERNAL', 1); ...@@ -28,6 +28,7 @@ define('INTERNAL', 1);
define('PUBLIC', 1); define('PUBLIC', 1);
require('init.php'); require('init.php');
require_once('pieforms/pieform.php'); require_once('pieforms/pieform.php');
define('TITLE', get_string('forgotpassword'));
if (!session_id()) { if (!session_id()) {
session_start(); session_start();
......
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
define('INTERNAL', 1); define('INTERNAL', 1);
define('PUBLIC', 1); define('PUBLIC', 1);
define('MENUITEM', 'home'); define('MENUITEM', 'home');
require('init.php'); require('init.php');
define('TITLE', get_string('home'));
// Check for whether the user is logged in, before processing the page. After // Check for whether the user is logged in, before processing the page. After
// this, we can guarantee whether the user is logged in or not for this page. // this, we can guarantee whether the user is logged in or not for this page.
......
...@@ -54,6 +54,12 @@ function TableRenderer(target, source, columns, options) { ...@@ -54,6 +54,12 @@ function TableRenderer(target, source, columns, options) {
} }
if(!self.pager || self.pager.options.lastPage != Math.floor( (count-1) / limit ) + 1 ) { if(!self.pager || self.pager.options.lastPage != Math.floor( (count-1) / limit ) + 1 ) {
if (self.pager) { if (self.pager) {
if (self.headRow) {
removeElement(self.headRow);
}
if (self.footRow) {
removeElement(self.footRow);
}
self.pager.removeAllInstances(); self.pager.removeAllInstances();
} }
self.pager = new Pager(count, limit, { self.pager = new Pager(count, limit, {
...@@ -65,16 +71,22 @@ function TableRenderer(target, source, columns, options) { ...@@ -65,16 +71,22 @@ function TableRenderer(target, source, columns, options) {
'firstPageString': get_string('firstpage') 'firstPageString': get_string('firstpage')
}); });
var headRow = TR(null, TD({'colspan': self.linkspan }, self.pager.newDisplayInstance())); if (self.pager.options.lastPage == 1) {
var footRow = TR(null, TD({'colspan': self.linkspan }, self.pager.newDisplayInstance())); self.headRow = null;
self.footRow = null;
return;
}
self.headRow = TR(null, TD({'colspan': self.linkspan }, self.pager.newDisplayInstance()));
self.footRow = TR(null, TD({'colspan': self.linkspan }, self.pager.newDisplayInstance()));
if ( self.thead.firstChild ) { if ( self.thead.firstChild ) {
insertSiblingNodesBefore(self.thead.firstChild, headRow); insertSiblingNodesBefore(self.thead.firstChild, self.headRow);
} }
else { else {
appendChildNodes(self.thead, headRow); appendChildNodes(self.thead, self.headRow);
} }
appendChildNodes(self.tfoot, footRow); appendChildNodes(self.tfoot, self.footRow);
} }
} }
......
...@@ -180,6 +180,13 @@ EOF; ...@@ -180,6 +180,13 @@ EOF;
$smarty->assign('THEMEURL', get_config('themeurl')); $smarty->assign('THEMEURL', get_config('themeurl'));
$smarty->assign('WWWROOT', $wwwroot); $smarty->assign('WWWROOT', $wwwroot);
if (defined('TITLE')) {
$smarty->assign('PAGETITLE', TITLE . ' - ' . get_config('sitename'));
}
else {
$smarty->assign('PAGETITLE', get_config('sitename'));
}
$sitename = get_config('sitename'); $sitename = get_config('sitename');
$smarty->assign('title', $sitename); $smarty->assign('title', $sitename);
......
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
define('INTERNAL', 1); define('INTERNAL', 1);
define('PUBLIC', 1); define('PUBLIC', 1);
require('init.php'); require('init.php');
define('TITLE', get_string('privacystatement'));
$smarty = smarty(); $smarty = smarty();
$smarty->assign('page_content', get_site_page_content('privacy')); $smarty->assign('page_content', get_site_page_content('privacy'));
......
...@@ -28,6 +28,7 @@ define('INTERNAL', 1); ...@@ -28,6 +28,7 @@ define('INTERNAL', 1);
define('PUBLIC', 1); define('PUBLIC', 1);
define('MENUITEM', 'home'); define('MENUITEM', 'home');
require('init.php'); require('init.php');
define('TITLE', get_string('register'));
/* /*
* This page handles three different tasks: * This page handles three different tasks:
......
...@@ -26,8 +26,8 @@ ...@@ -26,8 +26,8 @@
define('INTERNAL', 1); define('INTERNAL', 1);
define('PUBLIC', 1); define('PUBLIC', 1);
require('init.php'); require('init.php');
define('TITLE', get_string('termsandconditions'));
$smarty = smarty(); $smarty = smarty();
$smarty->assign('page_content', get_site_page_content('termsandconditions')); $smarty->assign('page_content', get_site_page_content('termsandconditions'));
......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html> <html>
<head> <head>
<title>{$title|default:"Mahara"|escape}</title> <title>{$PAGETITLE|escape}</title>
<script type="text/javascript"> <script type="text/javascript">
var config = {literal}{{/literal} var config = {literal}{{/literal}
'themeurl': '{$THEMEURL}', 'themeurl': '{$THEMEURL}',
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
define('INTERNAL', 1); define('INTERNAL', 1);
define('PUBLIC', 1); define('PUBLIC', 1);
require('init.php'); require('init.php');
require_once('file.php'); require_once('file.php');
......
...@@ -157,7 +157,10 @@ sub process { ...@@ -157,7 +157,10 @@ sub process {
print "($author) ", $directory, $filename, " has call to get_string that doesn't exist: get_string('$tag', '$section')\n"; print "($author) ", $directory, $filename, " has call to get_string that doesn't exist: get_string('$tag', '$section')\n";
} }
} }
}
print "\n"; # check for page titles
if ( $file_data =~ m{define.*\(.*INTERNAL.*1.*\)} and $file_data !~ m{define.*\(.*JSON.*1.*\)} and $file_data !~ m{define.*\(.*TITLE.*\)} ) {
print "($author) ", $directory, $filename, " is missing page title [ define('TITLE', get_string(...)); ]\n";
}
}
Supports Markdown
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