View | Details | Raw Unified | Return to bug 4857 | Differences between
and this patch

Collapse All | Expand All

(-)a/locale/en_US/admin.xml (-2 / +2 lines)
 Lines 61-68    Link Here 
61
	<message key="admin.mergeUsers">Merge Users</message>
61
	<message key="admin.mergeUsers">Merge Users</message>
62
	<message key="admin.mergeUsers.mergeUser">Merge User</message>
62
	<message key="admin.mergeUsers.mergeUser">Merge User</message>
63
	<message key="admin.mergeUsers.into.description">Select a user to whom to attribute the previous user's submissions, editing assignments, etc.</message>
63
	<message key="admin.mergeUsers.into.description">Select a user to whom to attribute the previous user's submissions, editing assignments, etc.</message>
64
	<message key="admin.mergeUsers.from.description">Select a user to merge into another user account (e.g., when someone has two user accounts). The account selected first will be deleted and its submissions, assignments, etc. will be attributed to the second account.</message>
64
	<message key="admin.mergeUsers.from.description">Select a user (or several) to merge into another user account (e.g., when someone has two user accounts). The account(s) selected first will be deleted and any submissions, assignments, etc. will be attributed to the second account.</message>
65
	<message key="admin.mergeUsers.allUsers">All Enrolled Users</message>
65
	<message key="admin.mergeUsers.allUsers">All Enrolled Users</message>
66
	<message key="admin.mergeUsers.confirm">Are you sure you wish to merge the account with the username "{$oldUsername}" into the account with the username "{$newUsername}"? The account with the username "{$oldUsername}" will not exist afterwards. This action is not reversible.</message>
66
	<message key="admin.mergeUsers.confirm">Are you sure you wish to merge the selected {$oldAccountCount} account(s) into the account with the username "{$newUsername}"? The selected {$oldAccountCount} accounts will not exist afterwards. This action is not reversible.</message>
67
	<message key="admin.mergerUsers.noneEnrolled">No enrolled users.</message>
67
	<message key="admin.mergerUsers.noneEnrolled">No enrolled users.</message>
68
</locale>
68
</locale>
(-)a/locale/en_US/manager.xml (-2 / +2 lines)
 Lines 79-86    Link Here 
79
	<message key="manager.people.confirmRemove">Remove this user from this conference? This action will unenroll the user from all roles within this conference.</message>
79
	<message key="manager.people.confirmRemove">Remove this user from this conference? This action will unenroll the user from all roles within this conference.</message>
80
	<message key="manager.people.enrollExistingUser">Enroll Existing User</message>
80
	<message key="manager.people.enrollExistingUser">Enroll Existing User</message>
81
	<message key="manager.people.enrollSyncConference">With conference</message>
81
	<message key="manager.people.enrollSyncConference">With conference</message>
82
	<message key="manager.people.mergeUsers.from.description">Select a user to merge into another account. The account you select here will be deleted and any submissions, editing assignments, etc. will be attributed to another account.</message>
82
	<message key="manager.people.mergeUsers.from.description">Select a user to merge into another user account (e.g., when someone has two user accounts). The account selected first will be deleted and its submissions, assignments, etc. will be attributed to the second account.</message>
83
	<message key="manager.people.mergeUsers.into.description">Select a user to whom to attribute the previous user's presentations, editing assignments, etc.</message>
83
	<message key="manager.people.mergeUsers.into.description">Select a user to whom to attribute the previous users' authorships, editing assignments, etc.</message>
84
	<message key="manager.people.syncUserDescription">Enrollment synchronization will enroll all users enrolled in the specified role in the specified conference into the same role in this conference. This function allows a common set of users (e.g., Reviewers) to be synchronized between conferences.</message>
84
	<message key="manager.people.syncUserDescription">Enrollment synchronization will enroll all users enrolled in the specified role in the specified conference into the same role in this conference. This function allows a common set of users (e.g., Reviewers) to be synchronized between conferences.</message>
85
	<message key="manager.plugins.copyError">Plugin was not successfully copied</message>
85
	<message key="manager.plugins.copyError">Plugin was not successfully copied</message>
86
	<message key="manager.plugins.delete">Delete Plugin</message>
86
	<message key="manager.plugins.delete">Delete Plugin</message>
(-)a/pages/admin/AdminPeopleHandler.inc.php (-11 / +6 lines)
 Lines 36-57   class AdminPeopleHandler extends AdminHandler { Link Here 
36
36
37
		$templateMgr =& TemplateManager::getManager();
37
		$templateMgr =& TemplateManager::getManager();
38
38
39
		$oldUserId = Request::getUserVar('oldUserId');
39
		$oldUserIds = (array) Request::getUserVar('oldUserIds');
40
		$newUserId = Request::getUserVar('newUserId');
40
		$newUserId = Request::getUserVar('newUserId');
41
41
42
		if (!empty($oldUserId) && !empty($newUserId)) {
42
		if (!empty($oldUserIds) && !empty($newUserId)) {
43
			import('user.UserAction');
43
			import('user.UserAction');
44
			UserAction::mergeUsers($oldUserId, $newUserId);
44
			foreach ($oldUserIds as $oldUserId) {
45
				UserAction::mergeUsers($oldUserId, $newUserId);
46
			}
45
			Request::redirect(null, null, 'admin', 'mergeUsers');
47
			Request::redirect(null, null, 'admin', 'mergeUsers');
46
		}
48
		}
47
49
48
		if (!empty($oldUserId)) {
49
			// Get the old username for the confirm prompt.
50
			$oldUser =& $userDao->getUser($oldUserId);
51
			$templateMgr->assign('oldUsername', $oldUser->getUsername());
52
			unset($oldUser);
53
		}
54
55
		// The administrator must select one or both IDs.
50
		// The administrator must select one or both IDs.
56
		if (Request::getUserVar('roleSymbolic')!=null) $roleSymbolic = Request::getUserVar('roleSymbolic');
51
		if (Request::getUserVar('roleSymbolic')!=null) $roleSymbolic = Request::getUserVar('roleSymbolic');
57
		else $roleSymbolic = isset($args[0])?$args[0]:'all';
52
		else $roleSymbolic = isset($args[0])?$args[0]:'all';
 Lines 127-133   class AdminPeopleHandler extends AdminHandler { Link Here 
127
			USER_FIELD_INTERESTS => 'user.interests'
122
			USER_FIELD_INTERESTS => 'user.interests'
128
		));
123
		));
129
		$templateMgr->assign('alphaList', explode(' ', Locale::translate('common.alphaList')));
124
		$templateMgr->assign('alphaList', explode(' ', Locale::translate('common.alphaList')));
130
		$templateMgr->assign('oldUserId', $oldUserId);
125
		$templateMgr->assign('oldUserIds', $oldUserIds);
131
		$templateMgr->assign('rolePath', $roleDao->getRolePath($roleId));
126
		$templateMgr->assign('rolePath', $roleDao->getRolePath($roleId));
132
		$templateMgr->assign('roleSymbolic', $roleSymbolic);
127
		$templateMgr->assign('roleSymbolic', $roleSymbolic);
133
		$templateMgr->display('admin/selectMergeUser.tpl');
128
		$templateMgr->display('admin/selectMergeUser.tpl');
(-)a/pages/manager/PeopleHandler.inc.php (-12 / +12 lines)
 Lines 439-450   class PeopleHandler extends ManagerHandler { Link Here 
439
		$schedConf =& Request::getSchedConf();
439
		$schedConf =& Request::getSchedConf();
440
		$templateMgr =& TemplateManager::getManager();
440
		$templateMgr =& TemplateManager::getManager();
441
441
442
		$oldUserId = Request::getUserVar('oldUserId');
442
		$oldUserIds = (array) Request::getUserVar('oldUserIds');
443
		$newUserId = Request::getUserVar('newUserId');
443
		$newUserId = Request::getUserVar('newUserId');
444
444
445
		// Ensure that we have administrative priveleges over the specified user(s).
445
		// Ensure that we have administrative priveleges over the specified user(s).
446
		$canAdministerAll = true;
447
		foreach ($oldUserIds as $oldUserId) {
448
			if (!Validation::canAdminister($conference->getId(), $oldUserId)) $canAdministerAll = false;
449
		}
450
446
		if (
451
		if (
447
			(!empty($oldUserId) && !Validation::canAdminister($conference->getId(), $oldUserId)) ||
452
			(!empty($oldUserIds) && !$canAdministerAll) ||
448
			(!empty($newUserId) && !Validation::canAdminister($conference->getId(), $newUserId))
453
			(!empty($newUserId) && !Validation::canAdminister($conference->getId(), $newUserId))
449
		) {
454
		) {
450
			$templateMgr->assign('pageTitle', 'manager.people');
455
			$templateMgr->assign('pageTitle', 'manager.people');
 Lines 454-472   class PeopleHandler extends ManagerHandler { Link Here 
454
			return $templateMgr->display('common/error.tpl');
459
			return $templateMgr->display('common/error.tpl');
455
		}
460
		}
456
461
457
		if (!empty($oldUserId) && !empty($newUserId)) {
462
		if (!empty($oldUserIds) && !empty($newUserId)) {
458
			import('user.UserAction');
463
			import('user.UserAction');
459
			UserAction::mergeUsers($oldUserId, $newUserId);
464
			foreach ($oldUserIds as $oldUserId) {
465
				UserAction::mergeUsers($oldUserId, $newUserId);
466
			}
460
			Request::redirect(null, null, 'manager');
467
			Request::redirect(null, null, 'manager');
461
		}
468
		}
462
469
463
		if (!empty($oldUserId)) {
464
			// Get the old username for the confirm prompt.
465
			$oldUser =& $userDao->getUser($oldUserId);
466
			$templateMgr->assign('oldUsername', $oldUser->getUsername());
467
			unset($oldUser);
468
		}
469
470
		// The manager must select one or both IDs.
470
		// The manager must select one or both IDs.
471
		if (Request::getUserVar('roleSymbolic')!=null) $roleSymbolic = Request::getUserVar('roleSymbolic');
471
		if (Request::getUserVar('roleSymbolic')!=null) $roleSymbolic = Request::getUserVar('roleSymbolic');
472
		else $roleSymbolic = isset($args[0])?$args[0]:'all';
472
		else $roleSymbolic = isset($args[0])?$args[0]:'all';
 Lines 542-548   class PeopleHandler extends ManagerHandler { Link Here 
542
			USER_FIELD_INTERESTS => 'user.interests'
542
			USER_FIELD_INTERESTS => 'user.interests'
543
		));
543
		));
544
		$templateMgr->assign('alphaList', explode(' ', Locale::translate('common.alphaList')));
544
		$templateMgr->assign('alphaList', explode(' ', Locale::translate('common.alphaList')));
545
		$templateMgr->assign('oldUserId', $oldUserId);
545
		$templateMgr->assign('oldUserIds', $oldUserIds);
546
		$templateMgr->assign('rolePath', $roleDao->getRolePath($roleId));
546
		$templateMgr->assign('rolePath', $roleDao->getRolePath($roleId));
547
		$templateMgr->assign('roleSymbolic', $roleSymbolic);
547
		$templateMgr->assign('roleSymbolic', $roleSymbolic);
548
		$templateMgr->display('manager/people/selectMergeUser.tpl');
548
		$templateMgr->display('manager/people/selectMergeUser.tpl');
(-)a/templates/admin/selectMergeUser.tpl (-28 / +47 lines)
 Lines 12-22    Link Here 
12
{assign var="pageTitle" value="admin.mergeUsers"}
12
{assign var="pageTitle" value="admin.mergeUsers"}
13
{include file="common/header.tpl"}
13
{include file="common/header.tpl"}
14
{/strip}
14
{/strip}
15
15
<div id="selectMergeUsers">
16
<p>{if $oldUserId != ''}{translate key="admin.mergeUsers.into.description"}{else}{translate key="admin.mergeUsers.from.description"}{/if}</p>
16
<p>{if !empty($oldUserIds)}{translate key="admin.mergeUsers.into.description"}{else}{translate key="admin.mergeUsers.from.description"}{/if}</p>
17
17
<div id="roles">
18
<h3>{translate key=$roleName}</h3>
18
<h3>{translate key=$roleName}</h3>
19
<form method="post" action="{url path=$roleSymbolic oldUserId=$oldUserId}">
19
<form method="post" action="{url path=$roleSymbolic oldUserIds=$oldUserIds}">
20
	<select name="roleSymbolic" class="selectMenu">
20
	<select name="roleSymbolic" class="selectMenu">
21
		<option {if $roleSymbolic=='all'}selected="selected" {/if}value="all">{translate key="admin.mergeUsers.allUsers"}</option>
21
		<option {if $roleSymbolic=='all'}selected="selected" {/if}value="all">{translate key="admin.mergeUsers.allUsers"}</option>
22
		<option {if $roleSymbolic=='managers'}selected="selected" {/if}value="managers">{translate key="user.role.managers"}</option>
22
		<option {if $roleSymbolic=='managers'}selected="selected" {/if}value="managers">{translate key="user.role.managers"}</option>
 Lines 36-76    Link Here 
36
	<input type="text" size="10" name="search" class="textField" value="{$search|escape}" />&nbsp;<input type="submit" value="{translate key="common.search"}" class="button" />
36
	<input type="text" size="10" name="search" class="textField" value="{$search|escape}" />&nbsp;<input type="submit" value="{translate key="common.search"}" class="button" />
37
</form>
37
</form>
38
38
39
<p>{foreach from=$alphaList item=letter}<a href="{url path=$roleSymbolic oldUserId=$oldUserId searchInitial=$letter}">{if $letter == $searchInitial}<strong>{$letter|escape}</strong>{else}{$letter|escape}{/if}</a> {/foreach}<a href="{url path=$roleSymbolic oldUserId=$oldUserId}">{if $searchInitial==''}<strong>{translate key="common.all"}</strong>{else}{translate key="common.all"}{/if}</a></p>
39
<p>{foreach from=$alphaList item=letter}<a href="{url path=$roleSymbolic oldUserIds=$oldUserIds searchInitial=$letter}">{if $letter == $searchInitial}<strong>{$letter|escape}</strong>{else}{$letter|escape}{/if}</a> {/foreach}<a href="{url path=$roleSymbolic oldUserIds=$oldUserIds}">{if $searchInitial==''}<strong>{translate key="common.all"}</strong>{else}{translate key="common.all"}{/if}</a></p>
40
40
41
{if not $roleId}
41
{if not $roleId}
42
<ul>
42
<ul>
43
	<li><a href="{url path="managers" oldUserId=$oldUserId}">{translate key="user.role.managers"}</a></li>
43
	<li><a href="{url path="managers" oldUserIds=$oldUserIds}">{translate key="user.role.managers"}</a></li>
44
	<li><a href="{url path="directors" oldUserId=$oldUserId}">{translate key="user.role.directors"}</a></li>
44
	<li><a href="{url path="directors" oldUserIds=$oldUserIds}">{translate key="user.role.directors"}</a></li>
45
	<li><a href="{url path="trackDirectors" oldUserId=$oldUserId}">{translate key="user.role.trackDirectors"}</a></li>
45
	<li><a href="{url path="trackDirectors" oldUserIds=$oldUserIds}">{translate key="user.role.trackDirectors"}</a></li>
46
	<li><a href="{url path="reviewers" oldUserId=$oldUserId}">{translate key="user.role.reviewers"}</a></li>
46
	<li><a href="{url path="reviewers" oldUserIds=$oldUserIds}">{translate key="user.role.reviewers"}</a></li>
47
	<li><a href="{url path="authors" oldUserId=$oldUserId}">{translate key="user.role.authors"}</a></li>
47
	<li><a href="{url path="authors" oldUserIds=$oldUserIds}">{translate key="user.role.authors"}</a></li>
48
	<li><a href="{url path="readers" oldUserId=$oldUserId}">{translate key="user.role.readers"}</a></li>
48
	<li><a href="{url path="readers" oldUserIds=$oldUserIds}">{translate key="user.role.readers"}</a></li>
49
</ul>
49
</ul>
50
50
51
<br />
51
<br />
52
{else}
52
{else}
53
<p><a href="{url path="all" oldUserId=$oldUserId}" class="action">{translate key="admin.mergeUsers.allUsers"}</a></p>
53
<p><a href="{url path="all" oldUserIds=$oldUserIds}" class="action">{translate key="admin.mergeUsers.allUsers"}</a></p>
54
{/if}
55
</div>
56
<div id="users">
57
{if !empty($oldUserIds)}
58
	{* Selecting target user; do not include checkboxes on LHS *}
59
	{assign var="numCols" value=4}
60
{else}
61
	{* Selecting user(s) to merge; include checkboxes on LHS *}
62
	{assign var="numCols" value=5}
63
	<form method="post" action="{url}">
54
{/if}
64
{/if}
55
56
<a name="users"></a>
65
<a name="users"></a>
57
58
<table width="100%" class="listing">
66
<table width="100%" class="listing">
59
	<tr>
67
	<tr>
60
		<td colspan="4" class="headseparator">&nbsp;</td>
68
		<td colspan="{$numCols}" class="headseparator">&nbsp;</td>
61
	</tr>
69
	</tr>
62
	<tr class="heading" valign="bottom">
70
	<tr class="heading" valign="bottom">
63
		<td width="29%">{translate key="user.username"}</td>
71
		{if empty($oldUserIds)}
72
			<td width="5%">&nbsp;</td>
73
		{/if}
74
		<td>{translate key="user.username"}</td>
64
		<td width="29%">{translate key="user.name"}</td>
75
		<td width="29%">{translate key="user.name"}</td>
65
		<td width="29%">{translate key="user.email"}</td>
76
		<td width="29%">{translate key="user.email"}</td>
66
		<td width="13%" align="right">{translate key="common.action"}</td>
77
		<td width="15%" align="right">{translate key="common.action"}</td>
67
	</tr>
78
	</tr>
68
	<tr>
79
	<tr>
69
		<td colspan="4" class="headseparator">&nbsp;</td>
80
		<td colspan="{$numCols}" class="headseparator">&nbsp;</td>
70
	</tr>
81
	</tr>
71
	{iterate from=users item=user}
82
	{iterate from=users item=user}
72
	{assign var=userExists value=1}
83
	{assign var=userExists value=1}
73
	<tr valign="top">
84
	<tr valign="top">
85
		{if empty($oldUserIds)}
86
			<td><input type="checkbox" name="oldUserIds[]" value="{$user->getId()|escape}" {if $thisUser->getId() == $user->getId()}disabled="disabled" {/if}/></td>
87
		{/if}
74
		<td>{$user->getUsername()|escape|wordwrap:15:" ":true}</td>
88
		<td>{$user->getUsername()|escape|wordwrap:15:" ":true}</td>
75
		<td>{$user->getFullName()|escape}</td>
89
		<td>{$user->getFullName()|escape}</td>
76
		<td class="nowrap">
90
		<td class="nowrap">
 Lines 80-111    Link Here 
80
			{$user->getEmail()|truncate:15:"..."|escape}&nbsp;{icon name="mail" url=$url}
94
			{$user->getEmail()|truncate:15:"..."|escape}&nbsp;{icon name="mail" url=$url}
81
		</td>
95
		</td>
82
		<td align="right">
96
		<td align="right">
83
			{if $oldUserId != ''}
97
			{if !empty($oldUserIds)}
84
				{if $oldUserId != $user->getId()}
98
				{if !in_array($user->getId(), $oldUserIds)}
85
					<a href="#" onclick="confirmAction('{url oldUserId=$oldUserId newUserId=$user->getId()}', '{translate|escape:"jsparam" key="admin.mergeUsers.confirm" oldUsername=$oldUsername newUsername=$user->getUsername()}')" class="action">{translate key="admin.mergeUsers.mergeUser"}</a>
99
					<a href="#" onclick="confirmAction('{url oldUserIds=$oldUserIds newUserId=$user->getId()}', '{translate|escape:"jsparam" key="admin.mergeUsers.confirm" oldAccountCount=$oldUserIds|@count newUsername=$user->getUsername()}')" class="action">{translate key="admin.mergeUsers.mergeUser"}</a>
86
				{/if}
100
				{/if}
87
			{elseif $thisUser->getId() != $user->getId()}
101
			{elseif $thisUser->getId() != $user->getId()}
88
				<a href="{url oldUserId=$user->getId()}" class="action">{translate key="admin.mergeUsers.mergeUser"}</a>
102
				<a href="{url oldUserIds=$user->getId()}" class="action">{translate key="admin.mergeUsers.mergeUser"}</a>
89
			{/if}
103
			{/if}
90
		</td>
104
		</td>
91
	</tr>
105
	</tr>
92
	<tr>
106
	<tr>
93
		<td colspan="4" class="{if $users->eof()}end{/if}separator">&nbsp;</td>
107
		<td colspan="{$numCols}" class="{if $users->eof()}end{/if}separator">&nbsp;</td>
94
	</tr>
108
	</tr>
95
{/iterate}
109
{/iterate}
96
{if $users->wasEmpty()}
110
{if $users->wasEmpty()}
97
	<tr>
111
	<tr>
98
		<td colspan="4" class="nodata">{translate key="admin.mergeUsers.noneEnrolled"}</td>
112
		<td colspan="{$numCols}" class="nodata">{translate key="admin.mergeUsers.noneEnrolled"}</td>
99
	</tr>
113
	</tr>
100
	<tr>
114
	<tr>
101
		<td colspan="4" class="endseparator">&nbsp;</td>
115
		<td colspan="{$numCols}" class="endseparator">&nbsp;</td>
102
	</tr>
116
	</tr>
103
{else}
117
{else}
104
	<tr>
118
	<tr>
105
		<td colspan="2" align="left">{page_info iterator=$users}</td>
119
		<td colspan="{math equation="floor(numCols / 2)" numCols=$numCols}" align="left">{page_info iterator=$users}</td>
106
		<td colspan="2" align="right">{page_links anchor="users" name="users" iterator=$users searchInitial=$searchInitial searchField=$searchField searchMatch=$searchMatch search=$search dateFromDay=$dateFromDay dateFromYear=$dateFromYear dateFromMonth=$dateFromMonth dateToDay=$dateToDay dateToYear=$dateToYear dateToMonth=$dateToMonth roleSymbolic=$roleSymbolic oldUserId=$oldUserId}</td>
120
		<td colspan="{math equation="ceil(numCols / 2)" numCols=$numCols}" align="right">{page_links anchor="users" name="users" iterator=$users searchInitial=$searchInitial searchField=$searchField searchMatch=$searchMatch search=$search dateFromDay=$dateFromDay dateFromYear=$dateFromYear dateFromMonth=$dateFromMonth dateToDay=$dateToDay dateToYear=$dateToYear dateToMonth=$dateToMonth roleSymbolic=$roleSymbolic oldUserIds=$oldUserIds}</td>
107
	</tr>
121
	</tr>
108
{/if}
122
{/if}
109
</table>
123
</table>
110
124
{if empty($oldUserIds)}
125
	<input type="submit" class="button defaultButton" value="{translate key="admin.mergeUsers"}" />
126
	</form>
127
{/if}
128
</div>
129
</div>
111
{include file="common/footer.tpl"}
130
{include file="common/footer.tpl"}
(-)a/templates/manager/people/selectMergeUser.tpl (-26 / +44 lines)
 Lines 12-22    Link Here 
12
{assign var="pageTitle" value="manager.people.mergeUsers"}
12
{assign var="pageTitle" value="manager.people.mergeUsers"}
13
{include file="common/header.tpl"}
13
{include file="common/header.tpl"}
14
{/strip}
14
{/strip}
15
15
<div id="selectMergeUsers">
16
<p>{if $oldUserId != ''}{translate key="manager.people.mergeUsers.into.description"}{else}{translate key="manager.people.mergeUsers.from.description"}{/if}</p>
16
<p>{if !empty($oldUserIds)}{translate key="manager.people.mergeUsers.into.description"}{else}{translate key="manager.people.mergeUsers.from.description"}{/if}</p>
17
17
<div id="roles">
18
<h3>{translate key=$roleName}</h3>
18
<h3>{translate key=$roleName}</h3>
19
<form method="post" action="{url path=$roleSymbolic oldUserId=$oldUserId}">
19
<form method="post" action="{url path=$roleSymbolic oldUserIds=$oldUserIds}">
20
	<select name="roleSymbolic" class="selectMenu">
20
	<select name="roleSymbolic" class="selectMenu">
21
		<option {if $roleSymbolic=='all'}selected="selected" {/if}value="all">{translate key="manager.people.allUsers"}</option>
21
		<option {if $roleSymbolic=='all'}selected="selected" {/if}value="all">{translate key="manager.people.allUsers"}</option>
22
		<option {if $roleSymbolic=='managers'}selected="selected" {/if}value="managers">{translate key="user.role.managers"}</option>
22
		<option {if $roleSymbolic=='managers'}selected="selected" {/if}value="managers">{translate key="user.role.managers"}</option>
 Lines 37-76    Link Here 
37
	<input type="text" size="10" name="search" class="textField" value="{$search|escape}" />&nbsp;<input type="submit" value="{translate key="common.search"}" class="button" />
37
	<input type="text" size="10" name="search" class="textField" value="{$search|escape}" />&nbsp;<input type="submit" value="{translate key="common.search"}" class="button" />
38
</form>
38
</form>
39
39
40
<p>{foreach from=$alphaList item=letter}<a href="{url path=$roleSymbolic oldUserId=$oldUserId searchInitial=$letter}">{if $letter == $searchInitial}<strong>{$letter|escape}</strong>{else}{$letter|escape}{/if}</a> {/foreach}<a href="{url path=$roleSymbolic oldUserId=$oldUserId}">{if $searchInitial==''}<strong>{translate key="common.all"}</strong>{else}{translate key="common.all"}{/if}</a></p>
40
<p>{foreach from=$alphaList item=letter}<a href="{url path=$roleSymbolic oldUserIds=$oldUserIds searchInitial=$letter}">{if $letter == $searchInitial}<strong>{$letter|escape}</strong>{else}{$letter|escape}{/if}</a> {/foreach}<a href="{url path=$roleSymbolic oldUserIds=$oldUserIds}">{if $searchInitial==''}<strong>{translate key="common.all"}</strong>{else}{translate key="common.all"}{/if}</a></p>
41
41
42
{if not $roleId}
42
{if not $roleId}
43
<ul>
43
<ul>
44
	<li><a href="{url path="managers" oldUserId=$oldUserId}">{translate key="user.role.managers"}</a></li>
44
	<li><a href="{url path="managers" oldUserIds=$oldUserIds}">{translate key="user.role.managers"}</a></li>
45
	<li><a href="{url path="directors" oldUserId=$oldUserId}">{translate key="user.role.directors"}</a></li>
45
	<li><a href="{url path="directors" oldUserIds=$oldUserIds}">{translate key="user.role.directors"}</a></li>
46
	<li><a href="{url path="trackDirectors" oldUserId=$oldUserId}">{translate key="user.role.trackDirectors"}</a></li>
46
	<li><a href="{url path="trackDirectors" oldUserIds=$oldUserIds}">{translate key="user.role.trackDirectors"}</a></li>
47
	<li><a href="{url path="reviewers" oldUserId=$oldUserId}">{translate key="user.role.reviewers"}</a></li>
47
	<li><a href="{url path="reviewers" oldUserIds=$oldUserIds}">{translate key="user.role.reviewers"}</a></li>
48
	<li><a href="{url path="authors" oldUserId=$oldUserId}">{translate key="user.role.authors"}</a></li>
48
	<li><a href="{url path="authors" oldUserIds=$oldUserIds}">{translate key="user.role.authors"}</a></li>
49
	<li><a href="{url path="readers" oldUserId=$oldUserId}">{translate key="user.role.readers"}</a></li>
49
	<li><a href="{url path="readers" oldUserIds=$oldUserIds}">{translate key="user.role.readers"}</a></li>
50
</ul>
50
</ul>
51
51
52
<br />
52
<br />
53
{else}
53
{else}
54
<p><a href="{url path="all" oldUserId=$oldUserId}" class="action">{translate key="manager.people.allUsers"}</a></p>
54
<p><a href="{url path="all" oldUserIds=$oldUserIds}" class="action">{translate key="manager.people.allUsers"}</a></p>
55
{/if}
55
{/if}
56
56
</div>
57
<div id="users">
57
<div id="users">
58
{if !empty($oldUserIds)}
59
	{* Selecting target user; do not include checkboxes on LHS *}
60
	{assign var="numCols" value=4}
61
{else}
62
	{* Selecting user(s) to merge; include checkboxes on LHS *}
63
	{assign var="numCols" value=5}
64
	<form method="post" action="{url}">
65
{/if}
58
<table width="100%" class="listing">
66
<table width="100%" class="listing">
59
	<tr>
67
	<tr>
60
		<td colspan="4" class="headseparator">&nbsp;</td>
68
		<td colspan="{$numCols}" class="headseparator">&nbsp;</td>
61
	</tr>
69
	</tr>
62
	<tr class="heading" valign="bottom">
70
	<tr class="heading" valign="bottom">
63
		<td width="29%">{translate key="user.username"}</td>
71
		{if empty($oldUserIds)}
72
			<td width="5%">&nbsp;</td>
73
		{/if}
74
		<td>{translate key="user.username"}</td>
64
		<td width="29%">{translate key="user.name"}</td>
75
		<td width="29%">{translate key="user.name"}</td>
65
		<td width="29%">{translate key="user.email"}</td>
76
		<td width="29%">{translate key="user.email"}</td>
66
		<td width="13%" align="right">{translate key="common.action"}</td>
77
		<td width="15%" align="right">{translate key="common.action"}</td>
67
	</tr>
78
	</tr>
68
	<tr>
79
	<tr>
69
		<td colspan="4" class="headseparator">&nbsp;</td>
80
		<td colspan="{$numCols}" class="headseparator">&nbsp;</td>
70
	</tr>
81
	</tr>
71
	{iterate from=users item=user}
82
	{iterate from=users item=user}
72
	{assign var=userExists value=1}
83
	{assign var=userExists value=1}
73
	<tr valign="top">
84
	<tr valign="top">
85
		{if empty($oldUserIds)}
86
			<td><input type="checkbox" name="oldUserIds[]" value="{$user->getId()|escape}" {if $thisUser->getId() == $user->getId()}disabled="disabled" {/if}/></td>
87
		{/if}
74
		<td><a class="action" href="{url op="userProfile" path=$user->getId()}">{$user->getUsername()|escape|wordwrap:15:" ":true}</a></td>
88
		<td><a class="action" href="{url op="userProfile" path=$user->getId()}">{$user->getUsername()|escape|wordwrap:15:" ":true}</a></td>
75
		<td>{$user->getFullName()|escape}</td>
89
		<td>{$user->getFullName()|escape}</td>
76
		<td class="nowrap">
90
		<td class="nowrap">
 Lines 80-111    Link Here 
80
			{$user->getEmail()|truncate:15:"..."|escape}&nbsp;{icon name="mail" url=$url}
94
			{$user->getEmail()|truncate:15:"..."|escape}&nbsp;{icon name="mail" url=$url}
81
		</td>
95
		</td>
82
		<td align="right">
96
		<td align="right">
83
			{if $oldUserId != ''}
97
			{if !empty($oldUserIds)}
84
				{if $oldUserId != $user->getId()}
98
				{if !in_array($user->getId(), $oldUserIds)}
85
					<a href="#" onclick="confirmAction('{url oldUserId=$oldUserId newUserId=$user->getId()}', '{translate|escape:"jsparam" key="manager.people.mergeUsers.confirm" oldUsername=$oldUsername newUsername=$user->getUsername()}')" class="action">{translate key="manager.people.mergeUser"}</a>
99
					<a href="#" onclick="confirmAction('{url oldUserIds=$oldUserIds newUserId=$user->getId()}', '{translate|escape:"jsparam" key="manager.people.mergeUsers.confirm" oldAccountCount=$oldUserIds|@count newUsername=$user->getUsername()}')" class="action">{translate key="manager.people.mergeUser"}</a>
86
				{/if}
100
				{/if}
87
			{elseif $thisUser->getId() != $user->getId()}
101
			{elseif $thisUser->getId() != $user->getId()}
88
				<a href="{url oldUserId=$user->getId()}" class="action">{translate key="manager.people.mergeUser"}</a>
102
				<a href="{url oldUserIds=$user->getId()}" class="action">{translate key="manager.people.mergeUser"}</a>
89
			{/if}
103
			{/if}
90
		</td>
104
		</td>
91
	</tr>
105
	</tr>
92
	<tr>
106
	<tr>
93
		<td colspan="4" class="{if $users->eof()}end{/if}separator">&nbsp;</td>
107
		<td colspan="{$numCols}" class="{if $users->eof()}end{/if}separator">&nbsp;</td>
94
	</tr>
108
	</tr>
95
{/iterate}
109
{/iterate}
96
{if $users->wasEmpty()}
110
{if $users->wasEmpty()}
97
	<tr>
111
	<tr>
98
		<td colspan="4" class="nodata">{translate key="manager.people.noneEnrolled"}</td>
112
		<td colspan="{$numCols}" class="nodata">{translate key="manager.people.noneEnrolled"}</td>
99
	</tr>
113
	</tr>
100
	<tr>
114
	<tr>
101
		<td colspan="4" class="endseparator">&nbsp;</td>
115
		<td colspan="{$numCols}" class="endseparator">&nbsp;</td>
102
	</tr>
116
	</tr>
103
{else}
117
{else}
104
	<tr>
118
	<tr>
105
		<td colspan="2" align="left">{page_info iterator=$users}</td>
119
		<td colspan="{math equation="floor(numCols / 2)" numCols=$numCols}" align="left">{page_info iterator=$users}</td>
106
		<td colspan="2" align="right">{page_links anchor="users" name="users" iterator=$users searchInitial=$searchInitial searchField=$searchField searchMatch=$searchMatch search=$search dateFromDay=$dateFromDay dateFromYear=$dateFromYear dateFromMonth=$dateFromMonth dateToDay=$dateToDay dateToYear=$dateToYear dateToMonth=$dateToMonth roleSymbolic=$roleSymbolic oldUserId=$oldUserId}</td>
120
		<td colspan="{math equation="ceil(numCols / 2)" numCols=$numCols}" align="right">{page_links anchor="users" name="users" iterator=$users searchInitial=$searchInitial searchField=$searchField searchMatch=$searchMatch search=$search dateFromDay=$dateFromDay dateFromYear=$dateFromYear dateFromMonth=$dateFromMonth dateToDay=$dateToDay dateToYear=$dateToYear dateToMonth=$dateToMonth roleSymbolic=$roleSymbolic oldUserIds=$oldUserIds}</td>
107
	</tr>
121
	</tr>
108
{/if}
122
{/if}
109
</table>
123
</table>
124
{if empty($oldUserIds)}
125
	<input type="submit" class="button defaultButton" value="{translate key="manager.people.mergeUsers"}" />
126
	</form>
127
{/if}
110
</div>
128
</div>
111
{include file="common/footer.tpl"}
129
{include file="common/footer.tpl"}

Return to bug 4857