Commit b41e86cb authored by Evan Goldenberg's avatar Evan Goldenberg
Browse files

Merge branch 'master' of git@gitorious.org:mahara/mahara

parents f188a921 a43aa55e
......@@ -238,6 +238,18 @@ $siteoptionform = array(
'defaultvalue' => get_config('tagssideblockmaxtags'),
'rules' => array('integer' => true, 'minvalue' => 0, 'maxvalue' => 1000),
),
'viewmicroheaders' => array(
'type' => 'checkbox',
'title' => get_string('smallviewheaders', 'admin'),
'description' => get_string('smallviewheadersdescription', 'admin'),
'defaultvalue' => get_config('viewmicroheaders'),
),
'userscanchooseviewthemes' => array(
'type' => 'checkbox',
'title' => get_string('userscanchooseviewthemes', 'admin'),
'description' => get_string('userscanchooseviewthemesdescription', 'admin'),
'defaultvalue' => get_config('userscanchooseviewthemes'),
),
)
);
......@@ -262,7 +274,7 @@ function siteoptions_submit(Pieform $form, $values) {
'allowpublicviews', 'allowpublicprofiles', 'creategroups', 'createpublicgroups', 'searchplugin',
'registration_sendweeklyupdates', 'institutionexpirynotification', 'institutionautosuspend',
'captchaonregisterform', 'captchaoncontactform', 'showselfsearchsideblock', 'showtagssideblock',
'tagssideblockmaxtags', 'country'
'tagssideblockmaxtags', 'country', 'viewmicroheaders', 'userscanchooseviewthemes',
);
$oldlanguage = get_config('lang');
$oldtheme = get_config('theme');
......
......@@ -35,7 +35,7 @@ $string['myfiles'] = 'My Files';
$string['mandatory'] = 'Mandatory';
$string['public'] = 'Public';
$string['aboutdescription'] = 'Enter your real first and last name here. If you want to show a different name to people in the system, put that name in as your preferred name.';
$string['aboutdescription'] = 'Enter your real first and last name here. If you want to show a different name to people in the system, put that name in as your display name.';
$string['contactdescription'] = 'All of this information is private, unless you choose to put it in a view.';
$string['messagingdescription'] = 'Like your contact information, this information is private.';
$string['viewmyprofile'] = 'View my profile';
......@@ -52,7 +52,7 @@ $string['lastname'] = 'Last Name';
$string['fullname'] = 'Full Name';
$string['institution'] = 'Institution';
$string['studentid'] = 'Student ID';
$string['preferredname'] = 'Preferred Name';
$string['preferredname'] = 'Display Name';
$string['introduction'] = 'Introduction';
$string['email'] = 'Email Address';
$string['maildisabled'] = ' ';
......
<h3>Preferred Name</h3>
<p>You can choose to use a preferred name. This may be anything you like. It replaces your full name display to everyone but site administrators and staff</p>
<h3>Display Name</h3>
<p>You can choose to use a display name. This may be anything you like. It replaces your full name display to everyone but site administrators and staff</p>
......@@ -58,11 +58,11 @@ class PluginBlocktypeExternalvideo extends SystemBlocktype {
public static function render_instance(BlockInstance $instance, $editing=false) {
$configdata = $instance->get('configdata');
$result = '';
$url = hsc(self::make_video_url($configdata['videoid']));
$width = (!empty($configdata['width'])) ? hsc($configdata['width']) : self::$default_width;
$height = (!empty($configdata['height'])) ? hsc($configdata['height']) : self::$default_height;
if (isset($configdata['videoid'])) {
$url = hsc(self::make_video_url($configdata['videoid']));
$result .= '<div class="mediaplayer-container center"><div class="mediaplayer">';
$result .= '<object width="' . $width . '" height="' . $height . '">';
$result .= '<param name="movie" value="' . $url . '"></param>';
......@@ -89,7 +89,7 @@ class PluginBlocktypeExternalvideo extends SystemBlocktype {
'title' => get_string('videourl','blocktype.externalvideo'),
'description' => get_string('videourldescription2','blocktype.externalvideo') . self::get_html_of_supported_websites(),
'width' => '90%',
'defaultvalue' => $configdata['videoid'],
'defaultvalue' => isset($configdata['videoid']) ? $configdata['videoid'] : null,
'rules' => array(
'required' => true
),
......
......@@ -771,6 +771,9 @@ function ViewManager() {
* Wire up the view theme selector
*/
this.rewriteViewThemeSelector = function() {
if (!self.viewThemeSelect) {
return;
}
var currentTheme = self.viewThemeSelect.selectedIndex;
connect(self.viewThemeSelect, 'onchange', function(e) {
var choice = self.viewThemeSelect.options[self.viewThemeSelect.selectedIndex];
......
......@@ -186,12 +186,16 @@ $string['sitenamedescription'] = 'The site name appears in certain places around
$string['siteoptionspagedescription'] = 'Here you can set some global options that will apply by default throughout the entire site.';
$string['siteoptionsset'] = 'Site options have been updated.';
$string['sitethemedescription'] = 'The default theme for the site';
$string['smallviewheaders'] = 'Small View page headers';
$string['smallviewheadersdescription'] = 'If enabled, a small header and site navigation block will be displayed when viewing or editing Views.';
$string['tagssideblockmaxtags'] = 'Maximum Tags in Cloud';
$string['tagssideblockmaxtagsdescription'] = 'The default number of tags to display in user tag clouds';
$string['trustedsites'] = 'Trusted sites';
$string['updatesiteoptions'] = 'Update site options';
$string['usersallowedmultipleinstitutions'] = 'Users allowed multiple institutions';
$string['usersallowedmultipleinstitutionsdescription'] = 'If checked, users can be members of several institutions at the same time';
$string['userscanchooseviewthemes'] = 'Users can choose View themes';
$string['userscanchooseviewthemesdescription'] = 'If enabled, users will be allowed to select a theme when editing a View. The View will be displayed to other users using the selected theme.';
$string['usersseenewthemeonlogin'] = 'Other users will see the new theme the next time they log in.';
$string['viruschecking'] = 'Virus checking';
$string['viruscheckingdescription'] = 'If checked, virus checking will be enabled for all uploaded files using ClamAV';
......
<h3>Staff Users</h3>
<p>Staff access allows a user to create controlled groups, receive and release submitted views and access a user’s key profile information (full name, student ID, preferred name).</p>
<p>Staff access allows a user to create controlled groups, receive and release submitted views and access a user’s key profile information (full name, student ID, display name).</p>
<p>To assign a user Staff access, select them from the list of Potential Staff and use the right arrow button to move them to the Current Staff list. To remove Staff access from a user, select their name from the Current Staff list and using the left arrow button move them back to the Potential list.</p>
<p> Where there are more than 250 user accounts created on the site you will need to search for a specific user using the search query box. You can also select multiple users at once using Ctrl and Shift select and click.</p>
......@@ -2,7 +2,7 @@
<p>Your Friends area displays a list of those users who have been flagged as your Friend within the site, and any of their Views to which you have been assigned access. </p>
<p>Using the dropdown menu allows you to move between your existing Friends list any Friendship Requests you have pending.</p>
<p>To add someone to your Friends list you will need to view their profile &#8211; either via a View, Community or Search result. Depending on their Friendship Control settings you may be automatically accepted as their Friend or you may need to send a Friendship request. If you do not see an Add to Friends option, the user most likely set their account preferences to not allow new friends to be added to their list.</p>
<p>When sending a Friendship Request you can choose to send with the request, a short message introducing yourself. This is important to include when you have set yourself a Preferred Name.</p>
<p>When sending a Friendship Request you can choose to send with the request, a short message introducing yourself. This is important to include when you have set yourself a Display Name.</p>
<p>When you add someone to your Friends list by accepting their request, you are automatically added to their list. When you remove someone from your Friends list or decline a Friendship Request, you are also removed from their list. If you remove someone from your Friends list they will automatically be notified of this change.</p>
<p>A user can resubmit their Friendship Request to you, even if you have previously rejected it.</p>
<p>When accessing another user&#8217;s View, you will see the following options at the bottom of the View screen.</p>
......
......@@ -76,7 +76,7 @@ $string['privacydefaultcontent'] = '<h1>Privacy Statement</h1>
<p>We will only use your personal information for the purpose for which you provided it to us.</p>
<p>As Mahara users you are able to determine what personal information you make available to others. By default, unless assigned Administrator, Course Creator or Tutor access rights, a user may only view your Preferred Name. This includes listings within a Notification report or Visitor Log.</p>
<p>As Mahara users you are able to determine what personal information you make available to others. By default, unless assigned Administrator, Course Creator or Tutor access rights, a user may only view your Display Name. This includes listings within a Notification report or Visitor Log.</p>
<p>We may also collect system usage for statistical purposes however this data will not identify any individual.</p>
......
......@@ -315,7 +315,7 @@ $string['sessiontimedout'] = 'Your session has timed out, please enter your logi
$string['sessiontimedoutpublic'] = 'Your session has timed out. You may <a href="%s">log in</a> to continue browsing';
$string['sessiontimedoutreload'] = 'Your session has timed out. Reload the page to log in again';
$string['username'] = 'Username';
$string['preferredname'] = 'Preferred Name';
$string['preferredname'] = 'Display Name';
$string['usernamedescription'] = ' ';
$string['usernamehelp'] = 'The username you have been given to access this system.';
$string['youaremasqueradingas'] = 'You are masquerading as %s.';
......
......@@ -225,6 +225,7 @@ $string['numberofcolumns'] = 'Number of columns';
$string['by'] = 'by';
$string['viewtitleby'] = '%s by <a href="%s">%s</a>';
$string['in'] = 'in';
$string['noblocks'] = 'Sorry, no blocks in this category :(';
$string['Preview'] = 'Preview';
......
......@@ -1331,6 +1331,14 @@ function xmldb_core_upgrade($oldversion=0) {
)");
}
if ($oldversion < 2010012700) {
set_config('viewmicroheaders', 1);
}
if ($oldversion < 2010012701) {
set_config('userscanchooseviewthemes', 1);
}
return $status;
}
......
......@@ -236,31 +236,29 @@ function get_helpfile($plugintype, $pluginname, $form, $element, $page=null, $se
function get_helpfile_location($plugintype, $pluginname, $form, $element, $page=null, $section=null) {
$file = 'help/';
$subdir = 'help/';
if ($plugintype != 'core') {
$location = $plugintype . '/' . $pluginname . '/lang/';
}
else {
$location = 'lang/';
}
if ($page) {
$page = str_replace('-', '/', $page);
$pagebits = split('-', $page);
$file = array_pop($pagebits) . '.html';
if ($plugintype != 'core') {
$file .= 'pages/' . $page . '.html';
$subdir .= 'pages/' . join('/', $pagebits) . '/';
}
else {
$file .= 'pages/' . $pluginname . '/' . $page . '.html';
$subdir .= 'pages/' . $pluginname . '/' . join('/', $pagebits) . '/';
}
}
else if ($section) {
$file .= 'sections/' . $section . '.html';
$subdir .= 'sections/';
$file = $section . '.html';
}
else if (!empty($form) && !empty($element)) {
$file .= 'forms/' . $form . '.' . $element . '.html';
$subdir .= 'forms/';
$file = $form . '.' . $element . '.html';
}
else if (!empty($form) && empty($element)) {
$file .= 'forms/' . $form . '.html';
$subdir .= 'forms/';
$file = $form . '.html';
}
else {
return false;
......@@ -275,8 +273,27 @@ function get_helpfile_location($plugintype, $pluginname, $form, $element, $page=
$trieden = false;
}
//try the local settings
$langfile = get_config('docroot') . 'local/lang/' . $lang . '/' . $subdir;
if ($plugintype != 'core') {
$langfile .= $plugintype . '.' . $pluginname . '.' . $file;
}
else {
$langfile .= $file;
}
if (is_readable($langfile)) {
return $langfile;
}
if ($plugintype != 'core') {
$location = $plugintype . '/' . $pluginname . '/lang/';
}
else {
$location = 'lang/';
}
// try the current language
$langfile = get_language_root() . $location . $lang . '/' . $file;
$langfile = get_language_root() . $location . $lang . '/' . $subdir . $file;
if (is_readable($langfile)) {
return $langfile;
}
......@@ -288,7 +305,7 @@ function get_helpfile_location($plugintype, $pluginname, $form, $element, $page=
if ($parentlang == 'en.utf8') {
$trieden = true;
}
$langfile = get_language_root($parentlang) . $location . $parentlang . '/' . $file;
$langfile = get_language_root($parentlang) . $location . $parentlang . '/' . $subdir . $file;
if (is_readable($langfile)) {
return $langfile;
}
......@@ -297,7 +314,7 @@ function get_helpfile_location($plugintype, $pluginname, $form, $element, $page=
// if it's STILL not found, and we haven't already tried english ...
if (empty($data) && empty($trieden)) {
$langfile = get_language_root('en.utf8') . $location . 'en.utf8/' . $file;
$langfile = get_language_root('en.utf8') . $location . 'en.utf8/' . $subdir . $file;
if (is_readable($langfile)) {
return $langfile;
}
......
......@@ -671,6 +671,8 @@ function core_install_firstcoredata_defaults() {
set_config('showtagssideblock', 1);
set_config('tagssideblockmaxtags', 20);
set_config('usersallowedmultipleinstitutions', 1);
set_config('viewmicroheaders', 1);
set_config('userscanchooseviewthemes', 1);
// install the applications
$app = new StdClass;
......
......@@ -28,7 +28,7 @@
defined('INTERNAL') || die();
$config = new StdClass;
$config->version = 2010011300;
$config->version = 2010012701;
$config->release = '1.3.0dev';
$config->minupgradefrom = 2008040200;
$config->minupgraderelease = '1.0.0 (release tag 1.0.0_RELEASE)';
......
......@@ -2672,6 +2672,39 @@ class View {
);
}
public function display_title($long=true, $titlelink=true) {
if ($this->type == 'profile') {
$title = display_name($this->owner, null, true);
if ($long) {
return '<strong>' . get_string('usersprofile', 'mahara', hsc($title)) . '</strong>';
}
return $title;
}
$ownername = $this->formatted_owner();
$wwwroot = get_config('wwwroot');
if ($this->owner) {
$ownerlink = $wwwroot . 'user/view.php?id=' . $this->owner;
}
else if ($this->group) {
$ownerlink = $wwwroot . 'group/view.php?id=' . $this->group;
}
if ($titlelink) {
$title = '<a href="' . $wwwroot . 'view/view.php?id=' . $this->id . '">' . hsc($this->title) . '</a>';
}
else {
$title = '<strong>' . hsc($this->title) . '</strong>';
}
if (isset($ownerlink)) {
return get_string('viewtitleby', 'view', $title, $ownerlink, $ownername);
}
return $title;
}
}
......
{include file="viewmicroheader.tpl"}
{if $microheaders}{include file="viewmicroheader.tpl"}{else}{include file="header.tpl"}{/if}
<div id="userview">
<div class="user-icon right">
{$institutions}
......@@ -43,4 +44,5 @@
</div>
</div>
</div>
{include file="microfooter.tpl"}
{if $microheaders}{include file="microfooter.tpl"}{else}{include file="footer.tpl"}{/if}
{include file="viewmicroheader.tpl"}
<h1>{$PAGEHEADING}</h1>
{if $microheaders}{include file="viewmicroheader.tpl"}{else}{include file="header.tpl"}{/if}
<h1>{$maintitle}</h1>
{if $columns}
{str tag="editblockspagedescription" section="view"}
......@@ -25,6 +26,7 @@
<td>
<a id="layout-link" href="columns.php?id={$view}&amp;c={$category}&amp;new={$new}"{if !$can_change_layout} class="disabled"{/if}>{str tag='changeviewlayout' section='view'}</a> {contextualhelp plugintype="core" pluginname="view" section="changeviewlayout"}
</td>
{if $viewthemes}
<td class="center">
<label for="viewtheme-select">{str tag=theme}: </label>
<select id="viewtheme-select" name="viewtheme">
......@@ -34,6 +36,7 @@
{/foreach}
</select>
</td>
{/if}
<td class="right">
<a id="btn-displaymyview" href="view.php?id={$view}&amp;new={$new}">{str tag=displaymyview section=view} &raquo;</a></td>
</td>
......@@ -91,5 +94,7 @@
{$block.html}
</div>
</div>
{if $block.javascript}<script type="text/javascript">{$block.javascript}</script>{/if}
{/if}
{include file="microfooter.tpl"}
{if $microheaders}{include file="microfooter.tpl"}{else}{include file="footer.tpl"}{/if}
{include file="viewmicroheader.tpl"}
<h1>{$PAGEHEADING}</h1>
{if $microheaders}{include file="viewmicroheader.tpl"}{else}{include file="header.tpl"}{/if}
<h1>{$maintitle}</h1>
<div class="center">
<p>{str tag=changeviewtheme section=view}</p>
<form action="{$formurl}" method="post">
......@@ -15,4 +16,4 @@
</form>
</div>
{include file="microfooter.tpl"}
{if $microheaders}{include file="microfooter.tpl"}{else}{include file="footer.tpl"}{/if}
{include file="viewmicroheader.tpl"}
{if $microheaders}{include file="viewmicroheader.tpl"}{else}{include file="header.tpl"}{/if}
{if $viewtype != 'profile'}
<h1>{if !$new}<a href="{$WWWROOT}view/view.php?id={$viewid}">{/if}{$viewtitle|escape}{if !$new}</a>{/if}</h1>
{if $maintitle}<h1>{$maintitle}</h1>{/if}
{if !$microheaders && $mnethost}
<div class="rbuttons">
<a href="{$mnethost.url}">{str tag=backto arg1=$mnethost.name}</a>
</div>
{/if}
<p id="view-description">{$viewdescription}</p>
......@@ -31,4 +35,5 @@
{if $objectionform}<div>{$objectionform}</div>{/if}
</div>
</div>
{include file="microfooter.tpl"}
{if $microheaders}{include file="microfooter.tpl"}{else}{include file="footer.tpl"}{/if}
\ No newline at end of file
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