useradmin.smarty 2.26 KB
<h2>User Management</h2>


<!-- FIXME inline CSS is _very_ bad. -->
<fieldset>
<legend>Add New Users</legend>
<p class="descriptiveText">{i18n}To allow users access to the DMS, you need to provide them with
credentials through this section.  Even if you are using an external source
of login information like <strong>LDAP</strong>, you will need to use this section
to retrieve their information from the external source.{/i18n}</p>
<p><a href="?action=addUser" class="ktAction ktAddUser" style="float:
left; padding-right: 0.5em;">{i18n}Add a new user{/i18n}</a><a
href="?action=addUser">{i18n}Add a new user{/i18n}</a>.</p>
</fieldset>

<!-- we roll both in here. -->
<form action="{$smarty.server.PHP_SELF}" method="POST">
<input type="hidden" name="do_search" value="1" />
<fieldset>
<legend>Search for users</legend>
<p class="descriptiveText">{i18n}Since there may be many users in the system, please
select a group from the list below, or type a few letters from the person's username
to begin. Alternatively, <a href="?show_all=1">view all users</a> (note that this may be
very slow if you have many users.{/i18n}</p>

{foreach item=oWidget from=$search_fields}
  {$oWidget->render()}
{/foreach}

<div class="form_actions">
   <input type="submit" value="{i18n}search for users{/i18n}" />
</div class="form_actions">
</fieldset>
</form>

{if ($no_search === true)}
{else}
   {if (!empty($search_results))}
<table class="listing">
<thead>
   <tr>
      <th>{i18n}Name{/i18n}</th>
      <th>{i18n}Username{/i18n}</th>
      <th>{i18n}Edit{/i18n}</th>
      <th>{i18n}Delete{/i18n}</th>
      <th>{i18n}Group Memberships{/i18n}</th>
   </tr>
</thead>
<tbody>
   <!-- do we want to batch here? -->
     {foreach item=oUser from=$search_results}
     <tr>
        <td>{$oUser->getName()}</td>
        <td>{$oUser->getUsername()}</td>
        <td><a href="?action=editUser&user_id={$oUser->getId()}" class="ktAction ktEdit">{i18n}Edit{/i18n}</a></td>
        <td><a href="?action=deleteuser&user_id={$oUser->getId()}" class="ktAction ktDelete">{i18n}Delete{/i18n}</a></td>
        <td><a href="?action=editgroups&user_id={$oUser->getId()}">{i18n}Groups{/i18n}</a></td>  
     </tr>   
     {/foreach}

</tbody>
</table>

{else}
<div class="ktError"><p>{i18n}No results for your search.{/i18n}</p></div>

{/if}
{/if}