|
|
| 13 |
{include file="common/header.tpl"} |
13 |
{include file="common/header.tpl"} |
| 14 |
{/strip} |
14 |
{/strip} |
| 15 |
<div id="selectMergeUsers"> |
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 |
<div id="roles"> |
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> |
|
|
| 47 |
<input type="text" size="10" name="search" class="textField" value="{$search|escape}" /> <input type="submit" value="{translate key="common.search"}" class="button" /> |
47 |
<input type="text" size="10" name="search" class="textField" value="{$search|escape}" /> <input type="submit" value="{translate key="common.search"}" class="button" /> |
| 48 |
</form> |
48 |
</form> |
| 49 |
|
49 |
|
| 50 |
<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> |
50 |
<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> |
| 51 |
|
51 |
|
| 52 |
{if not $roleId} |
52 |
{if not $roleId} |
| 53 |
<ul> |
53 |
<ul> |
| 54 |
<li><a href="{url path="managers" oldUserId=$oldUserId}">{translate key="user.role.managers"}</a></li> |
54 |
<li><a href="{url path="managers" oldUserIds=$oldUserIds}">{translate key="user.role.managers"}</a></li> |
| 55 |
<li><a href="{url path="editors" oldUserId=$oldUserId}">{translate key="user.role.editors"}</a></li> |
55 |
<li><a href="{url path="editors" oldUserIds=$oldUserIds}">{translate key="user.role.editors"}</a></li> |
| 56 |
<li><a href="{url path="sectionEditors" oldUserId=$oldUserId}">{translate key="user.role.sectionEditors"}</a></li> |
56 |
<li><a href="{url path="sectionEditors" oldUserIds=$oldUserIds}">{translate key="user.role.sectionEditors"}</a></li> |
| 57 |
{if $roleSettings.useLayoutEditors} |
57 |
{if $roleSettings.useLayoutEditors} |
| 58 |
<li><a href="{url path="layoutEditors" oldUserId=$oldUserId}">{translate key="user.role.layoutEditors"}</a></li> |
58 |
<li><a href="{url path="layoutEditors" oldUserIds=$oldUserIds}">{translate key="user.role.layoutEditors"}</a></li> |
| 59 |
{/if} |
59 |
{/if} |
| 60 |
{if $roleSettings.useCopyeditors} |
60 |
{if $roleSettings.useCopyeditors} |
| 61 |
<li><a href="{url path="copyeditors" oldUserId=$oldUserId}">{translate key="user.role.copyeditors"}</a></li> |
61 |
<li><a href="{url path="copyeditors" oldUserIds=$oldUserIds}">{translate key="user.role.copyeditors"}</a></li> |
| 62 |
{/if} |
62 |
{/if} |
| 63 |
{if $roleSettings.useProofreaders} |
63 |
{if $roleSettings.useProofreaders} |
| 64 |
<li><a href="{url path="proofreaders" oldUserId=$oldUserId}">{translate key="user.role.proofreaders"}</a></li> |
64 |
<li><a href="{url path="proofreaders" oldUserIds=$oldUserIds}">{translate key="user.role.proofreaders"}</a></li> |
| 65 |
{/if} |
65 |
{/if} |
| 66 |
<li><a href="{url path="reviewers" oldUserId=$oldUserId}">{translate key="user.role.reviewers"}</a></li> |
66 |
<li><a href="{url path="reviewers" oldUserIds=$oldUserIds}">{translate key="user.role.reviewers"}</a></li> |
| 67 |
<li><a href="{url path="authors" oldUserId=$oldUserId}">{translate key="user.role.authors"}</a></li> |
67 |
<li><a href="{url path="authors" oldUserIds=$oldUserIds}">{translate key="user.role.authors"}</a></li> |
| 68 |
<li><a href="{url path="readers" oldUserId=$oldUserId}">{translate key="user.role.readers"}</a></li> |
68 |
<li><a href="{url path="readers" oldUserIds=$oldUserIds}">{translate key="user.role.readers"}</a></li> |
| 69 |
<li><a href="{url path="subscriptionManagers" oldUserId=$oldUserId}">{translate key="user.role.subscriptionManagers"}</a></li> |
69 |
<li><a href="{url path="subscriptionManagers" oldUserIds=$oldUserIds}">{translate key="user.role.subscriptionManagers"}</a></li> |
| 70 |
</ul> |
70 |
</ul> |
| 71 |
|
71 |
|
| 72 |
<br /> |
72 |
<br /> |
| 73 |
{else} |
73 |
{else} |
| 74 |
<p><a href="{url path="all" oldUserId=$oldUserId}" class="action">{translate key="manager.people.allUsers"}</a></p> |
74 |
<p><a href="{url path="all" oldUserIds=$oldUserIds}" class="action">{translate key="manager.people.allUsers"}</a></p> |
| 75 |
{/if} |
75 |
{/if} |
| 76 |
</div> |
76 |
</div> |
| 77 |
<div id="users"> |
77 |
<div id="users"> |
|
|
78 |
{if !empty($oldUserIds)} |
| 79 |
{* Selecting target user; do not include checkboxes on LHS *} |
| 80 |
{assign var="numCols" value=4} |
| 81 |
{else} |
| 82 |
{* Selecting user(s) to merge; include checkboxes on LHS *} |
| 83 |
{assign var="numCols" value=5} |
| 84 |
<form method="post" action="{url}"> |
| 85 |
{/if} |
| 78 |
<table width="100%" class="listing"> |
86 |
<table width="100%" class="listing"> |
| 79 |
<tr> |
87 |
<tr> |
| 80 |
<td colspan="4" class="headseparator"> </td> |
88 |
<td colspan="{$numCols}" class="headseparator"> </td> |
| 81 |
</tr> |
89 |
</tr> |
| 82 |
<tr class="heading" valign="bottom"> |
90 |
<tr class="heading" valign="bottom"> |
| 83 |
<td width="29%">{sort_heading key="user.username" sort="username"}</td> |
91 |
{if empty($oldUserIds)} |
|
|
92 |
<td width="5%"> </td> |
| 93 |
{/if} |
| 94 |
<td>{sort_heading key="user.username" sort="username"}</td> |
| 84 |
<td width="29%">{sort_heading key="user.name" sort="name"}</td> |
95 |
<td width="29%">{sort_heading key="user.name" sort="name"}</td> |
| 85 |
<td width="29%">{sort_heading key="user.email" sort="email"}</td> |
96 |
<td width="29%">{sort_heading key="user.email" sort="email"}</td> |
| 86 |
<td width="13%" align="right">{translate key="common.action"}</td> |
97 |
<td width="15%" align="right">{translate key="common.action"}</td> |
| 87 |
</tr> |
98 |
</tr> |
| 88 |
<tr> |
99 |
<tr> |
| 89 |
<td colspan="4" class="headseparator"> </td> |
100 |
<td colspan="{$numCols}" class="headseparator"> </td> |
| 90 |
</tr> |
101 |
</tr> |
| 91 |
{iterate from=users item=user} |
102 |
{iterate from=users item=user} |
| 92 |
{assign var=userExists value=1} |
103 |
{assign var=userExists value=1} |
| 93 |
<tr valign="top"> |
104 |
<tr valign="top"> |
|
|
105 |
{if empty($oldUserIds)} |
| 106 |
<td><input type="checkbox" name="oldUserIds[]" value="{$user->getId()|escape}" {if $thisUser->getId() == $user->getId()}disabled="disabled" {/if}/></td> |
| 107 |
{/if} |
| 94 |
<td><a class="action" href="{url op="userProfile" path=$user->getId()}">{$user->getUsername()|escape|wordwrap:15:" ":true}</a></td> |
108 |
<td><a class="action" href="{url op="userProfile" path=$user->getId()}">{$user->getUsername()|escape|wordwrap:15:" ":true}</a></td> |
| 95 |
<td>{$user->getFullName()|escape}</td> |
109 |
<td>{$user->getFullName()|escape}</td> |
| 96 |
<td class="nowrap"> |
110 |
<td class="nowrap"> |
|
|
| 100 |
{$user->getEmail()|truncate:15:"..."|escape} {icon name="mail" url=$url} |
114 |
{$user->getEmail()|truncate:15:"..."|escape} {icon name="mail" url=$url} |
| 101 |
</td> |
115 |
</td> |
| 102 |
<td align="right"> |
116 |
<td align="right"> |
| 103 |
{if $oldUserId != ''} |
117 |
{if !empty($oldUserIds)} |
| 104 |
{if $oldUserId != $user->getId()} |
118 |
{if !in_array($user->getId(), $oldUserIds)} |
| 105 |
<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> |
119 |
<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> |
| 106 |
{/if} |
120 |
{/if} |
| 107 |
{elseif $thisUser->getId() != $user->getId()} |
121 |
{elseif $thisUser->getId() != $user->getId()} |
| 108 |
<a href="{url oldUserId=$user->getId()}" class="action">{translate key="manager.people.mergeUser"}</a> |
122 |
<a href="{url oldUserIds=$user->getId()}" class="action">{translate key="manager.people.mergeUser"}</a> |
| 109 |
{/if} |
123 |
{/if} |
| 110 |
</td> |
124 |
</td> |
| 111 |
</tr> |
125 |
</tr> |
| 112 |
<tr> |
126 |
<tr> |
| 113 |
<td colspan="4" class="{if $users->eof()}end{/if}separator"> </td> |
127 |
<td colspan="{$numCols}" class="{if $users->eof()}end{/if}separator"> </td> |
| 114 |
</tr> |
128 |
</tr> |
| 115 |
{/iterate} |
129 |
{/iterate} |
| 116 |
{if $users->wasEmpty()} |
130 |
{if $users->wasEmpty()} |
| 117 |
<tr> |
131 |
<tr> |
| 118 |
<td colspan="4" class="nodata">{translate key="manager.people.noneEnrolled"}</td> |
132 |
<td colspan="{$numCols}" class="nodata">{translate key="manager.people.noneEnrolled"}</td> |
| 119 |
</tr> |
133 |
</tr> |
| 120 |
<tr> |
134 |
<tr> |
| 121 |
<td colspan="4" class="endseparator"> </td> |
135 |
<td colspan="{$numCols}" class="endseparator"> </td> |
| 122 |
</tr> |
136 |
</tr> |
| 123 |
{else} |
137 |
{else} |
| 124 |
<tr> |
138 |
<tr> |
| 125 |
<td colspan="2" align="left">{page_info iterator=$users}</td> |
139 |
<td colspan="{math equation="floor(numCols / 2)" numCols=$numCols}" align="left">{page_info iterator=$users}</td> |
| 126 |
<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 sort=$sort sortDirection=$sortDirection}</td> |
140 |
<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 sort=$sort sortDirection=$sortDirection}</td> |
| 127 |
</tr> |
141 |
</tr> |
| 128 |
{/if} |
142 |
{/if} |
| 129 |
</table> |
143 |
</table> |
|
|
144 |
{if empty($oldUserIds)} |
| 145 |
<input type="submit" class="button defaultButton" value="{translate key="manager.people.mergeUsers"}" /> |
| 146 |
</form> |
| 147 |
{/if} |
| 130 |
</div> |
148 |
</div> |
| 131 |
</div> |
149 |
</div> |
| 132 |
{include file="common/footer.tpl"} |
150 |
{include file="common/footer.tpl"} |