|
|
| 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> |
|
|
| 37 |
<input type="text" size="10" name="search" class="textField" value="{$search|escape}" /> <input type="submit" value="{translate key="common.search"}" class="button" /> |
37 |
<input type="text" size="10" name="search" class="textField" value="{$search|escape}" /> <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"> </td> |
68 |
<td colspan="{$numCols}" class="headseparator"> </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%"> </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"> </td> |
80 |
<td colspan="{$numCols}" class="headseparator"> </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"> |
|
|
| 80 |
{$user->getEmail()|truncate:15:"..."|escape} {icon name="mail" url=$url} |
94 |
{$user->getEmail()|truncate:15:"..."|escape} {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"> </td> |
107 |
<td colspan="{$numCols}" class="{if $users->eof()}end{/if}separator"> </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"> </td> |
115 |
<td colspan="{$numCols}" class="endseparator"> </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"} |