<html>
<head>
{ include file="header.tpl" }
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="js/frame_adjuster.js"></script>
<script type="text/javascript" src="js/table_sorter.js"></script>
<script type="text/javascript" src="js/read.js"></script>
</head>
<body>
<div class="windowStyle">
<table width="100%" border="0" cellspacing="0" cellpadding="5">
{ assign var="window_name" value = "ユーザ一覧" }
{if $form.operation}
  {if isset($session.tenant) && $session.tenant && $session.role == "system_admin"}
  { assign var="window_name" value = "`$session.tenant`/$window_name" }
  {/if}
  {if isset($session.system)}
  { assign var="window_name" value = "`$session.system`/$window_name" }
  {/if}
{/if}
{ include file="window_name.tpl"}
<tr align="left">
    <th><img src="images/publish.png"></th>
    <th>
    <a href="#" onClick="goAction('action_user_create')"
       title="ユーザを登録します">新規登録</a>
    </th>
    <th>
    &nbsp;&nbsp;
    </th>
    <th><img src="images/import_wiz.gif"></th>
    <th>
    <a href="#" onClick="goAction('action_user_importCSV')"
       title="ユーザを登録します">CSV登録</a>
    </th>
    <th width="100%" align="right">
      <div style="color:red">{message name=""}</div>
    </th>
</tr>
</table>
</div>
{form name="input" target="main"}
<div class="listName">
<table width="100%" frame="box" rules="none" cellspacing="0" cellpadding="3">
{ assign var="frame" value = "menu" }
{ assign var="action" value = "action_user_read" }
{ include file="change_page.tpl" }
</table>
</div>
<div style="height:{ if $app.total_num > 10 }306{ elseif $app.total_num < 1 }88{ else }{ $app.list_num*34+64 }{ /if }px; overflow:scroll;">
<table width="100%" border="1" cellspacing="1" cellpadding="4" bordercolor="lightgrey">
<thead>
<tr class="listHead">
    <td align="center" width="5%" rowspan="2">選択</td>
    <td align="center" width="5%" rowspan="2">No.</td>
    <td align="center" width="15%" rowspan="2">操作</td>
    <td align="center" width="15%" rowspan="2">{form_name name="id"}</a></td>
    <td align="center" width="45%" colspan="2">{form_name name="name"}</td>
{if isset($config.secioss.user.status)}
    <td align="center" width="15%" rowspan="2">{form_name name="status"}</a></td>
{/if}
</tr>
<tr class="listHead">
    <td align="center" width="20%">漢字</a></td>
    <td align="center" width="25%">かな</a></td>
</tr>
</thead>
<tbody id="listData">
{ foreach from=$app.list item="info" name="users"}
<tr>
    <td align="center"><input type="checkbox" name="user_list[]" value="{$info.dn}"></td>
    <td align="center">{ $app.beginning_num+$smarty.foreach.users.iteration-1 }</td>
    <td align="center">
    <a href="#"
       onClick="doRefer('action_user_update', '{ $info.dn }')"
       title="編集"><img src="images/edit.png" border="0"></a>
    &nbsp;
    <a href="#"
       onClick="doDelete('action_user_delete', '{ $info.dn }', '{ $info.name }')"
       title="削除"><img src="images/delete.png" border="0"></a>
    </td>
    <td align="center">{$info.id}</td>
    <td align="left">{if isset($info.name)}{$info.name}{/if}</td>
    <td align="left">{if isset($info.kana)}{$info.kana}{/if}</td>
{if isset($config.modules.SSO)}
    <td align="left">{if isset($info.status)}{$info.status}{/if}</td>
{/if}
</tr>
{ foreachelse }
<tr class="listNone"><td colspan="9">&nbsp;</td></tr>
{ /foreach }
</tbody>
</table>
</div>
<div align="center">
<hr>
<input type="button" value="削除" onClick="doDelete('action_user_delete', null, 'ユーザ情報')">&nbsp;
<input type="button" value="ファイル出力" onClick="doDownloadFile('menu', 'action_user_read')">
</div>
{form_input name="dn"}
{form_input name="operation"}
<input type="hidden" name="action_user_read" value="">
<input type="hidden" name="action_user_create" value="">
<input type="hidden" name="action_user_importCSV" value="">
<input type="hidden" name="action_user_update" value="">
<input type="hidden" name="action_user_delete" value="">
{/form}
</body>
</html>
