Commit 7acb8113 authored by Richard Mansfield's avatar Richard Mansfield
Browse files
parents c14ecfd5 5073f8c9
......@@ -47,7 +47,10 @@ $form = array(
'type' => 'userlist',
'title' => get_string('adminusers', 'admin'),
'defaultvalue' => $adminusers,
'filter' => false
'filter' => false,
'rules' => array(
'required' => true
)
),
'submit' => array(
'type' => 'submit',
......@@ -69,7 +72,7 @@ function adminusers_submit($values) {
WHERE id IN (' . join(',', $values['users']) . ')');
db_commit();
$SESSION->add_ok_msg(get_string('adminusersupdated', 'admin'));
redirect(get_config('wwwroot') . 'admin/usermanagement/adminusers.php');
redirect(get_config('wwwroot') . 'admin/users/admins.php');
}
$smarty->assign('adminusersform', pieform($form));
......
......@@ -63,9 +63,11 @@ function staffusers_submit($values) {
execute_sql('UPDATE ' . $table . '
SET staff = 0
WHERE staff = 1');
execute_sql('UPDATE ' . $table . '
SET staff = 1
WHERE id IN (' . join(',', $values['users']) . ')');
if ($values['users']) {
execute_sql('UPDATE ' . $table . '
SET staff = 1
WHERE id IN (' . join(',', $values['users']) . ')');
}
db_commit();
$SESSION->add_ok_msg(get_string('staffusersupdated', 'admin'));
redirect(get_config('wwwroot') . 'admin/users/staff.php');
......
......@@ -3,37 +3,41 @@
This template displays a list of the user's blogs. The list is populated
using javascript.
*}{include file="header.tpl"}
*}
{include file="header.tpl"}
<div id="column-right">
{include file="adminmenu.tpl"}
</div>
<div id="column-left">
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{str section="artefact.blog" tag="blogs"}</h2>
<div class="newblog">
<a href="{$WWWROOT}/artefact/blog/new/">{str section="artefact.blog" tag="newblog"}</a>
</div>
<table id="bloglist">
<thead>
<tr>
<th>{str section="artefact.blog" tag="title"}</th>
<th>{str section="artefact.blog" tag="description"}</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{str section="artefact.blog" tag="blogs"}</h2>
<div class="newblog">
<a href="{$WWWROOT}/artefact/blog/new/">{str section="artefact.blog" tag="newblog"}</a>
</div>
<table id="bloglist">
<thead>
<tr>
<th>{str section="artefact.blog" tag="title"}</th>
<th>{str section="artefact.blog" tag="description"}</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<div class="newblog">
<a href="{$WWWROOT}/artefact/blog/new/">{str section="artefact.blog" tag="newblog"}</a>
</div>
</div>
</span></span></span></span></div>
</div>
<div class="newblog">
<a href="{$WWWROOT}/artefact/blog/new/">{str section="artefact.blog" tag="newblog"}</a>
</div>
</div>
</span></span></span></span></div>
</div>
</div>
{include file="footer.tpl"}
......@@ -2,19 +2,23 @@
This template displays the 'new blog' form
*}{include file="header.tpl"}
*}
{include file="header.tpl"}
<div id="column-right">
{include file="adminmenu.tpl"}
</div>
<div id="column-left">
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{str section="artefact.blog" tag="newblog"}</h2>
{$newblogform}
</div>
</span></span></span></span></div>
</div>
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{str section="artefact.blog" tag="newblog"}</h2>
{$newblogform}
</div>
</span></span></span></span></div>
</div>
</div>
{include file="footer.tpl"}
......@@ -2,21 +2,25 @@
This template displays the 'new blog post' form
*}{include file="header.tpl"}
*}
{include file="header.tpl"}
<div id="column-right">
{include file="adminmenu.tpl"}
</div>
<div id="column-left">
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{str section="artefact.blog" tag="newpost"}</h2>
{$newpostform}
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{str section="artefact.blog" tag="newpost"}</h2>
{$newpostform}
ADD RADIO BUTTONS
</div>
</span></span></span></span></div>
</div>
ADD RADIO BUTTONS
</div>
</span></span></span></span></div>
</div>
</div>
{include file="footer.tpl"}
......@@ -2,33 +2,37 @@
This template displays a list of the user's blog posts for a particular blog.
*}{include file="header.tpl"}
<div id="column-right">
*}
{include file="header.tpl"}
<div id="column-right">
{include file="adminmenu.tpl"}
</div>
<div id="column-left">
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{$blog->get('title')}</h2>
<div>
<a href="{$WWWROOT}/artefact/blog/newpost/?id={$blog->get('id')}">{str section="artefact.blog" tag="newpost"}</a>
</div>
<table id="postlist">
<thead>
</thead>
<tbody>
</tbody>
</table>
<div>
<a href="{$WWWROOT}/artefact/blog/newpost/?id={$blog->get('id')}">{str section="artefact.blog" tag="newpost"}</a>
</div>
</div>
</span></span></span></span></div>
</div>
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{$blog->get('title')}</h2>
<div>
<a href="{$WWWROOT}/artefact/blog/newpost/?id={$blog->get('id')}">{str section="artefact.blog" tag="newpost"}</a>
</div>
<table id="postlist">
<thead>
</thead>
<tbody>
</tbody>
</table>
<div>
<a href="{$WWWROOT}/artefact/blog/newpost/?id={$blog->get('id')}">{str section="artefact.blog" tag="newpost"}</a>
</div>
</div>
</span></span></span></span></div>
</div>
</div>
{include file="footer.tpl"}
\ No newline at end of file
{include file="header.tpl"}
<div id="column-right">
{include file="adminmenu.tpl"}
</div>
<div id="column-left">
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span
class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{str section="artefact.file" tag="myfiles"}</h2>
<div id="uploader"></div>
<div id="foldernav"></div>
<table id="filelist">
<thead><tr>
<th>Name</th>
<th>Size</th>
<th>Time</th>
<th></th>
</tr></thead>
<tbody><tr><th></th></tr></tbody>
</table>
</div>
</span></span></span></span></div>
</div>
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{str section="artefact.file" tag="myfiles"}</h2>
<div id="uploader"></div>
<div id="foldernav"></div>
<table id="filelist">
<thead><tr>
<th>Name</th>
<th>Size</th>
<th>Time</th>
<th></th>
</tr></thead>
<tbody><tr><th></th></tr></tbody>
</table>
</div>
</span></span></span></span></div>
</div>
</div>
{include file="footer.tpl"}
......@@ -5,15 +5,15 @@
</div>
<div id="column-left">
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span
class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{str section="artefact.internal" tag="profile"}</h2>
{$profileform}
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{str section="artefact.internal" tag="profile"}</h2>
{$profileform}
</div>
</span></span></span></span></div>
</div>
</span></span></span></span></div>
</div>
</div>
{include file="footer.tpl"}
......@@ -5,16 +5,16 @@
</div>
<div id="column-left">
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span
class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{str section="artefact.internal" tag="emailactivation"}</h2>
<p>
{$message|escape}
</p>
<div class="content">
<div class="box-cnrs"><span class="cnr-tl"><span class="cnr-tr"><span class="cnr-bl"><span class="cnr-br">
<div class="maincontent">
<h2>{str section="artefact.internal" tag="emailactivation"}</h2>
<p>
{$message|escape}
</p>
</div>
</span></span></span></span></div>
</div>
</span></span></span></span></div>
</div>
</div>
{include file="footer.tpl"}
......@@ -43,15 +43,17 @@ $offset = param_integer('offset', 0);
$data = search_user($query, $limit, $offset);
foreach ($data['data'] as &$result) {
$result->name = display_name($result);
unset($result->email);
unset($result->institution);
unset($result->username);
unset($result->firstname);
unset($result->lastname);
unset($result->preferredname);
if ($data['data']) {
foreach ($data['data'] as &$result) {
$result->name = display_name($result);
unset($result->email);
unset($result->institution);
unset($result->username);
unset($result->firstname);
unset($result->lastname);
unset($result->preferredname);
}
}
json_headers();
......
......@@ -155,7 +155,7 @@ $string['uploadcsvpagedescription'] = 'You may use this facility to upload new u
$string['uploadcsvusersaddedsuccessfully'] = 'The users in the file have been added successfully';
// Admin Users
$string['adminuserspagedescription'] = 'Here you can choose which users are administrators for the site. The current administrators are on the right, and potential administrators are on the left.';
$string['adminuserspagedescription'] = '<p>Here you can choose which users are administrators for the site. The current administrators are on the right, and potential administrators are on the left.</p><p>The system must have at least one administrator, and may have more.</p>';
$string['adminusersupdated'] = 'Admin users updated';
// Staff Users
......
......@@ -1040,6 +1040,7 @@ function searchform() {
'action' => get_config('wwwroot') . 'user/search.php',
'renderer' => 'oneline',
'autofocus' => 'false',
'validate' => false,
'elements' => array(
'query' => array(
'type' => 'text',
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
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