Commit d4c63e88 authored by Aaron Wells's avatar Aaron Wells Committed by Robert Lyon
Browse files

Renaming general pages to static pages

Bug1282219: See the lengthy discussion on the bug tracker. No perfect name
for these items has arisen yet, but I think "static pages" is the best
so far because:

1. It means they're obviously not the same type of thing as the Pages in your
portfolio, because those are dynamic.

2. It's more self-evident. If I were brand new to Mahara and were
trying to figure out how to change the "Privacy Policy" page, "Static pages"
is probably what I would think to click on.

Change-Id: I7dd4e3fe6e86fd35dce973afb78b3e56049aab69
parent 0cdbf8b5
......@@ -18,7 +18,7 @@ define('SECTION_PAGE', 'sitepages');
require(dirname(dirname(dirname(__FILE__))).'/init.php');
require_once('pieforms/pieform.php');
define('TITLE', get_string('generalpages', 'admin'));
define('TITLE', get_string('staticpages', 'admin'));
define('DEFAULTPAGE', 'home');
$sitepages = array();
......
......@@ -14,10 +14,10 @@ define('INSTITUTIONALADMIN', 1);
define('MENUITEM', 'manageinstitutions/sitepages');
define('SECTION_PLUGINTYPE', 'core');
define('SECTION_PLUGINNAME', 'admin');
define('SECTION_PAGE', 'institutiongeneralpages');
define('SECTION_PAGE', 'institutionstaticpages');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('generalinstitutionpages', 'admin'));
define('TITLE', get_string('institutionstaticpages', 'admin'));
require_once('pieforms/pieform.php');
require_once('license.php');
define('DEFAULTPAGE', 'home');
......@@ -48,8 +48,8 @@ else if (!empty($institutionselector['options']) && sizeof($institutionselector[
else if (empty($institutionselector['options'])) {
// Only the 'no institution' institution exists so we need to display this fact
$smarty = smarty(array(), array(), array());
$smarty->assign('noinstitutionsadmin', (($USER->admin) ? get_string('noinstitutiongeneralpagesadmin', 'admin', get_config('wwwroot') . 'admin/site/pages.php') : false));
$smarty->assign('noinstitutions', get_string('noinstitutiongeneralpages', 'admin'));
$smarty->assign('noinstitutionsadmin', (($USER->admin) ? get_string('noinstitutionstaticpagesadmin', 'admin', get_config('wwwroot') . 'admin/site/pages.php') : false));
$smarty->assign('noinstitutions', get_string('noinstitutionstaticpages', 'admin'));
$smarty->assign('PAGEHEADING', TITLE);
$smarty->display('admin/site/pages.tpl');
exit;
......@@ -105,7 +105,7 @@ $form = pieform(array(
function editsitepage_validate(Pieform $form, $values) {
$allowedinstitutions = get_institution_selector(false);
if (array_search($values['pageinstitution'], array_flip($allowedinstitutions['options'])) === false) {
$form->set_error(null, get_string('generalpageinstitutionbad', 'admin', $values['pageinstitution']));
$form->set_error(null, get_string('staticpageinstitutionbad', 'admin', $values['pageinstitution']));
}
}
......@@ -150,7 +150,7 @@ function editsitepage_submit(Pieform $form, $values) {
}
$smarty = smarty(array('adminsitepages'), array(), array('admin' => array('discardpageedits')));
$smarty->assign('noinstitutionsadmin', (($USER->admin) ? get_string('noinstitutiongeneralpagesadmin', 'admin', get_config('wwwroot') . 'admin/site/pages.php') : false));
$smarty->assign('noinstitutionsadmin', (($USER->admin) ? get_string('noinstitutionstaticpagesadmin', 'admin', get_config('wwwroot') . 'admin/site/pages.php') : false));
$smarty->assign('pageeditform', $form);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->display('admin/site/pages.tpl');
......@@ -808,7 +808,7 @@ function institution_submit(Pieform $form, $values) {
insert_record('auth_instance', $authinstance);
}
// We need to add the default lines to the site_content table for this institution
// We also need to set the institution to be using default general pages to begin with
// We also need to set the institution to be using default static pages to begin with
// so that using custom institution pages is an opt-in situation
$pages = site_content_pages();
$now = db_format_timestamp(time());
......@@ -817,7 +817,7 @@ function institution_submit(Pieform $form, $values) {
$page->name = $name;
$page->ctime = $now;
$page->mtime = $now;
$page->content = get_string($page->name . 'defaultcontent', 'install', get_string('generalpageconfiginstitution', 'install'));
$page->content = get_string($page->name . 'defaultcontent', 'install', get_string('staticpageconfiginstitution', 'install'));
$page->institution = $newinstitution->name;
insert_record('site_content', $page);
......
......@@ -71,12 +71,12 @@ $string['manageinstitutions'] = 'Manage institutions';
// Admin homepage strings
$string['siteoptions'] = 'Site options';
$string['siteoptionsdescription'] = 'Configure basic site options such as the name, language and theme';
$string['generalpages'] = 'General pages';
$string['generalinstitutionpages'] = 'General institution pages';
$string['generalpageinstitutionbad'] = "You can't access and/or edit general pages for institution '%s'";
$string['staticpages'] = 'Static pages';
$string['institutionstaticpages'] = 'Institution static pages';
$string['staticpageinstitutionbad'] = "You can't access and/or edit static pages for institution '%s'";
$string['usedefault'] = 'Use site default';
$string['usedefaultdescription1'] = 'Use the site\'s default text for this particular page type instead.';
$string['generalpagesdescription'] = 'Edit the content of various general pages';
$string['staticpagesdescription'] = 'Edit the content of static pages in Mahara (Home, Terms and Conditions, etc)';
$string['menus'] = 'Menus';
$string['menusdescription'] = 'Manage the links and files within the "Links and resources" and footer menus';
$string['sitefiles'] = 'Site files';
......@@ -430,7 +430,7 @@ $string['watchlistdelaytitle'] = 'Watchlist notification delay';
// Site content
$string['about'] = 'About';
$string['discardpageedits'] = 'Discard your changes to this page?';
$string['generalpagespagedescription'] = 'Here you can edit the content of some general pages, such as the dashboard for logged-in users and the homepage for logged-out users as well as the pages linked to in the footer.';
$string['staticpagespagedescription'] = 'Here you can edit the content of some of Mahara\'s built-in pages, such as the dashboard for logged-in users and the homepage for logged-out users as well as the pages linked to in the footer.';
$string['home'] = 'Home (Dashboard)';
$string['loadsitecontentfailed'] = 'Failed to load site page content';
$string['loggedouthome'] = 'Logged-out home';
......@@ -946,8 +946,8 @@ $string['noinstitutions'] = 'No institutions';
$string['noinstitutionsdescription'] = 'If you would like to associate users with an institution, you should create the institution first.';
$string['noinstitutionsstats'] = 'Unable to view institution statistics';
$string['noinstitutionsstatsdescription1'] = 'Staff statistics access needs to be turned on for the site to allow staff to view their institution statistics. A site administrator can turn this setting on in "User settings" under <a href="%sadmin/site/options.php">Configure site</a>.';
$string['noinstitutiongeneralpages'] = 'You do not have permission to edit any institution general pages or no institutions have been created yet.';
$string['noinstitutiongeneralpagesadmin'] = 'If you are a site administrator, please edit the default general pages in <a href="%s">Configure site</a>.';
$string['noinstitutionstaticpages'] = 'You do not have permission to edit any institution static pages or no institutions have been created yet.';
$string['noinstitutionstaticpagesadmin'] = 'If you are a site administrator, please edit the default static pages in <a href="%s">Configure site</a>.';
$string['Lockedfields'] = 'Locked fields';
$string['disabledlockedfieldhelp'] = 'Note: Disabled checkboxes are for profile fields which are locked in the institution settings for "%s". These profile fields are locked at the site level and cannot be unlocked here.';
......
<!-- @license http://www.gnu.org/copyleft/gpl.html GNU GPL version 3 or later -->
<!-- @copyright For copyright information on Mahara, please see the README file distributed with this software. -->
<h3>General institution pages</h3>
<p>The general pages that users see when they are logged in (or logged-out users whose browser retains the institution cookie from a previous login). If <strong>Site default</strong> is selected, they will see the site's default general pages.</p>
<!-- @license http://www.gnu.org/copyleft/gpl.html GNU GPL version 3 or later -->
<!-- @copyright For copyright information on Mahara, please see the README file distributed with this software. -->
<h3>Institution static pages</h3>
<p>Some built-in pages of your site may be edited dynamically by a site or institution administrator.
If you wish to customise the content of a built-in page (About, Home, Logged-out home, Privacy statement, Terms and conditions
from the default text, select the page you wish to modify and edit it using the editor. Ensure you save your changes before
loading another page or exiting the static pages area.</p>
<p>Changes you make here will be reflected in the page content viewed by members of your institution. They will not
be shown to members of other institutions.</p>
<p>If you tick "Use site default" for a specific page, then your institution members will see the site default version
of that page rather than your institution's custom version.</p>
<!-- @license http://www.gnu.org/copyleft/gpl.html GNU GPL version 3 or later -->
<!-- @copyright For copyright information on Mahara, please see the README file distributed with this software. -->
<h3>General pages</h3>
<p>The core pages of your site may be edited dynamically by a site administrator. If you wish to customise the content of a core page (About, Home, Logged-out home, Privacy statement, Terms and conditions) from the default text, select the page you wish to modify and edit it using the editor. Ensure you save your changes before loading another page or exiting the general pages area.</p>
<h3>Static pages</h3>
<p>Some built-in pages of your site may be edited dynamically by a site administrator.
If you wish to customise the content of a built-in page (About, Home, Logged-out home, Privacy statement, Terms and conditions)
from the default text, select the page you wish to modify and edit it using the editor. Ensure you save your changes before
loading another page or exiting the static pages area.</p>
<p>For institution members, the contents of these pages may be overridden by institution administrators using the
institution static pages feature.</p>
......@@ -37,7 +37,7 @@ $string['loggedouthomedefaultcontent'] = '<h1>Welcome</h1>
<p><i>You can edit this text via %s</i></p>';
$string['privacydefaultcontent'] = '<h1>Privacy statement</h1>
<h2>Introduction</h2>
<p>[<i>This is a default privacy statement for your legal department to edit</i>].</p>
......@@ -129,5 +129,5 @@ $string['licenseshortnamebync'] = 'CC-BY-NC-4.0';
$string['licenseshortnamebyncnd'] = 'CC-BY-NC-ND-4.0';
$string['licenseshortnamegfdl'] = 'GFDL-1.3';
$string['generalpageconfigdefault'] = '"General pages" in "Configure site" in "Administration"';
$string['generalpageconfiginstitution'] = '"General pages" in "Institutions" in "Administration"';
$string['staticpageconfigdefault'] = '"Static pages" in "Configure site" in "Administration"';
$string['staticpageconfiginstitution'] = '"Static pages" in "Institutions" in "Administration"';
......@@ -675,7 +675,7 @@ function core_install_lastcoredata_defaults() {
$page->name = $name;
$page->ctime = $now;
$page->mtime = $now;
$page->content = get_string($page->name . 'defaultcontent', 'install', get_string('generalpageconfigdefault', 'install'));
$page->content = get_string($page->name . 'defaultcontent', 'install', get_string('staticpageconfigdefault', 'install'));
$page->institution = 'mahara';
insert_record('site_content', $page);
}
......
......@@ -1929,7 +1929,7 @@ function admin_nav() {
'configsite/sitepages' => array(
'path' => 'configsite/sitepages',
'url' => 'admin/site/pages.php',
'title' => get_string('generalpages', 'admin'),
'title' => get_string('staticpages', 'admin'),
'weight' => 20
),
'configsite/sitemenu' => array(
......@@ -2070,7 +2070,7 @@ function admin_nav() {
'manageinstitutions/sitepages' => array(
'path' => 'manageinstitutions/sitepages',
'url' => 'admin/users/institutionpages.php',
'title' => get_string('generalpages', 'admin'),
'title' => get_string('staticpages', 'admin'),
'weight' => 15
),
'manageinstitutions/institutionusers' => array(
......@@ -2265,7 +2265,7 @@ function institutional_admin_nav() {
'manageinstitutions/sitepages' => array(
'path' => 'manageinstitutions/sitepages',
'url' => 'admin/users/institutionpages.php',
'title' => get_string('generalpages', 'admin'),
'title' => get_string('staticpages', 'admin'),
'weight' => 15
),
'manageinstitutions/institutionusers' => array(
......
......@@ -200,7 +200,7 @@ form#register table table {
#siteoptions_submit_container td {
padding-top: 10px;
}
/* Configure site > Edit general pages */
/* Configure site > Edit static pages */
/* Configure site > Menus */
#menuitemlist {
......
......@@ -77,7 +77,7 @@
<h3>{str tag=configsite section=admin}</h3>
<ul>
<li><strong><a href="{$WWWROOT}admin/site/options.php">{str tag=siteoptions section=admin}</a></strong> - {str tag=siteoptionsdescription section=admin}</li>
<li><strong><a href="{$WWWROOT}admin/site/pages.php">{str tag=generalpages section=admin}</a></strong> - {str tag=generalpagesdescription section=admin}</li>
<li><strong><a href="{$WWWROOT}admin/site/pages.php">{str tag=staticpages section=admin}</a></strong> - {str tag=staticpagesdescription section=admin}</li>
<li><strong><a href="{$WWWROOT}admin/site/licenses.php">{str tag=sitelicenses section=admin}</a></strong> - {str tag=sitelicensesdescription section=admin}</li>
<li><strong><a href="{$WWWROOT}admin/site/menu.php">{str tag=menus section=admin}</a></strong> - {str tag=menusdescription section=admin}</li>
<li><strong><a href="{$WWWROOT}admin/site/networking.php">{str tag=networking section=admin}</a></strong> - {str tag=networkingdescription section=admin}</li>
......
......@@ -3,7 +3,7 @@
{if $noinstitutions}
<p>{$noinstitutions}</p>
{else}
<p>{str tag=generalpagespagedescription section=admin}</p>
<p>{str tag=staticpagespagedescription section=admin}</p>
{/if}
{$pageeditform|safe}
{include file="footer.tpl"}
......
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