Commit 7a32362d authored by Kristina Hoeppner's avatar Kristina Hoeppner Committed by Robert Lyon
Browse files

Rename "Edit site pages" to "General pages" (Bug #1282219)



This renaming is to avoid confusion to other site
pages that can be built like portfolio pages and are
very different from these here where only a little
bit of text can be changed.

I also took the opportunity to get rid of the "Edit"
as no other menu item has a verb included.

Change-Id: Iafb5d9ca09d5bc5c3c483b0caeb28b77e88e6c72
Signed-off-by: Kristina Hoeppner's avatarKristina D.C. Hoeppner <kristina@catalyst.net.nz>
parent 679b5911
......@@ -18,7 +18,7 @@ define('SECTION_PAGE', 'sitepages');
require(dirname(dirname(dirname(__FILE__))).'/init.php');
require_once('pieforms/pieform.php');
define('TITLE', get_string('editsitepages', 'admin'));
define('TITLE', get_string('generalpages', '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', 'sitepages');
define('SECTION_PAGE', 'institutiongeneralpages');
require(dirname(dirname(dirname(__FILE__))) . '/init.php');
define('TITLE', get_string('editinstitutionsitepages', 'admin'));
define('TITLE', get_string('generalinstitutionpages', '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('noinstitutionsitepagesadmin', 'admin', get_config('wwwroot') . 'admin/site/pages.php') : false));
$smarty->assign('noinstitutions', get_string('noinstitutionsitepages', 'admin'));
$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('PAGEHEADING', TITLE);
$smarty->display('admin/site/pages.tpl');
exit;
......@@ -80,7 +80,7 @@ $form = pieform(array(
'pageusedefault' => array(
'type' => 'checkbox',
'title' => get_string('usedefault', 'admin'),
'description' => get_string('usedefaultdescription', 'admin'),
'description' => get_string('usedefaultdescription1', 'admin'),
'defaultvalue' => (get_config_institution($institutionselector['defaultvalue'], 'sitepages_' . DEFAULTPAGE) == 'mahara' ? 1 : 0),
),
'pagetext' => array(
......@@ -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('pageinstitutionbad', 'admin', $values['pageinstitution']));
$form->set_error(null, get_string('generalpageinstitutionbad', '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('noinstitutionsitepagesadmin', 'admin', get_config('wwwroot') . 'admin/site/pages.php') : false));
$smarty->assign('noinstitutionsadmin', (($USER->admin) ? get_string('noinstitutiongeneralpagesadmin', 'admin', get_config('wwwroot') . 'admin/site/pages.php') : false));
$smarty->assign('pageeditform', $form);
$smarty->assign('PAGEHEADING', TITLE);
$smarty->display('admin/site/pages.tpl');
......@@ -807,7 +807,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 site pages to begin with
// We also need to set the institution to be using default general pages to begin with
// so that using custom institution pages is an opt-in situation
$pages = site_content_pages();
$now = db_format_timestamp(time());
......@@ -816,7 +816,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('sitepageconfiginstitution', 'install'));
$page->content = get_string($page->name . 'defaultcontent', 'install', get_string('generalpageconfiginstitution', 'install'));
$page->institution = $newinstitution->name;
insert_record('site_content', $page);
......
......@@ -71,13 +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['editsitepages'] = 'Edit site pages';
$string['editinstitutionsitepages'] = 'Edit institution site pages';
$string['pageinstitutionbad'] = "You can't access and/or edit site pages for Institution '%s'";
$string['institutionsitepages'] = 'Institution site pages';
$string['generalpages'] = 'General pages';
$string['generalinstitutionpages'] = 'General institution pages';
$string['generalpageinstitutionbad'] = "You can't access and/or edit general pages for institution '%s'";
$string['usedefault'] = 'Use site default';
$string['usedefaultdescription'] = 'Use the site\'s default \'site pages\' text for this particular page type instead.';
$string['editsitepagesdescription'] = 'Edit the content of various pages around the site';
$string['usedefaultdescription1'] = 'Use the site\'s default text for this particular page type instead.';
$string['generalpagesdescription'] = 'Edit the content of various general pages';
$string['menus'] = 'Menus';
$string['menusdescription'] = 'Manage the links and files within the "Links and resources" and footer menus';
$string['sitefiles'] = 'Site files';
......@@ -416,7 +415,7 @@ $string['sitefilesaccessdescription'] = 'If checked, logged-in users will have a
// Site content
$string['about'] = 'About';
$string['discardpageedits'] = 'Discard your changes to this page?';
$string['editsitepagespagedescription'] = 'Here you can edit the content of some pages around the site, such as the homepage (for logged-in and logged-out users separately) and the pages linked to in the footer.';
$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['home'] = 'Home (Dashboard)';
$string['loadsitecontentfailed'] = 'Failed to load site page content';
$string['loggedouthome'] = 'Logged-out home';
......@@ -921,8 +920,8 @@ $string['Admins'] = 'Administrators';
$string['noinstitutions'] = 'No institutions';
$string['noinstitutionsdescription'] = 'If you would like to associate users with an institution, you should create the institution first.';
$string['noinstitutionsstatsdescription'] = 'Institution statistics are not available because there are no institutions available to your user.';
$string['noinstitutionsitepages'] = 'You do not have permission to edit any institution site pages or no institutions have been created yet.';
$string['noinstitutionsitepagesadmin'] = 'If you are a site admin please edit the default site pages in <a href="%s">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['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>Institution site pages</h3>
<p>The site pages that users see if they are logged in (or logged out users whose browser retains the Mahara institution cookie from a previous login). If <strong>Site default</strong> is selected they will see the site's default site pages.</p>
<p>You may choose any institution's site pages, but will only be able to edit the institution site pages for the institution(s) that you are admin of.</p>
<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>Site 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 and the Upload copyright statement) from the default text, select the page you wish to modify and edit it using the HTML editor. Ensure you save your changes before loading another editable page or exiting the site pages area.</p>
<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>
......@@ -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['sitepageconfigdefault'] = '"Edit site pages" in "Configure site" in "Site administration"';
$string['sitepageconfiginstitution'] = '"Edit site pages" in "Institutions" in "Site administration"';
$string['generalpageconfigdefault'] = '"General pages" in "Configure site" in "Administration"';
$string['generalpageconfiginstitution'] = '"General pages" in "Institutions" in "Administration"';
......@@ -3032,8 +3032,8 @@ function xmldb_core_upgrade($oldversion=0) {
$key->setAttributes(XMLDB_KEY_FOREIGN, array('institution'), 'institution', array('name'));
add_key($table, $key);
// now add the default site pages for each existing institution with the values of
// the 'mahara' institution. These can them be altered via Admin -> Institution -> Edit site pages
// now add the default general pages for each existing institution with the values of
// the 'mahara' institution. These can them be altered via Administration -> Institutions -> General pages
$sitecontentarray = array();
$sitecontents = get_records_array('site_content', 'institution', 'mahara');
foreach ($sitecontents as $sitecontent) {
......
......@@ -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('sitepageconfigdefault', 'install'));
$page->content = get_string($page->name . 'defaultcontent', 'install', get_string('generalpageconfigdefault', 'install'));
$page->institution = 'mahara';
insert_record('site_content', $page);
}
......
......@@ -1900,7 +1900,7 @@ function admin_nav() {
'configsite/sitepages' => array(
'path' => 'configsite/sitepages',
'url' => 'admin/site/pages.php',
'title' => get_string('editsitepages', 'admin'),
'title' => get_string('generalpages', 'admin'),
'weight' => 20
),
'configsite/sitemenu' => array(
......@@ -2041,7 +2041,7 @@ function admin_nav() {
'manageinstitutions/sitepages' => array(
'path' => 'manageinstitutions/sitepages',
'url' => 'admin/users/institutionpages.php',
'title' => get_string('editsitepages', 'admin'),
'title' => get_string('generalpages', 'admin'),
'weight' => 15
),
'manageinstitutions/institutionusers' => array(
......@@ -2230,7 +2230,7 @@ function institutional_admin_nav() {
'manageinstitutions/sitepages' => array(
'path' => 'manageinstitutions/sitepages',
'url' => 'admin/users/institutionpages.php',
'title' => get_string('editsitepages', 'admin'),
'title' => get_string('generalpages', 'admin'),
'weight' => 15
),
'manageinstitutions/institutionusers' => array(
......
......@@ -200,7 +200,7 @@ form#register table table {
#siteoptions_submit_container td {
padding-top: 10px;
}
/* Configure site > Edit site pages */
/* Configure site > Edit general pages */
/* Configure site > Menus */
#menuitemlist {
......@@ -821,4 +821,4 @@ table.iframesources td {
table.iframesources td img {
vertical-align: middle;
}
/* Extensions > Clean URLs */
\ No newline at end of file
/* Extensions > Clean URLs */
......@@ -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=editsitepages section=admin}</a></strong> - {str tag=editsitepagesdescription 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/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,8 +3,8 @@
{if $noinstitutions}
<p>{$noinstitutions}</p>
{else}
<p>{str tag=editsitepagespagedescription section=admin}</p>
<p>{str tag=generalpagespagedescription section=admin}</p>
{/if}
{$pageeditform|safe}
{$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