[%- USE T8 %]
-[% USE HTML %]<body class="admin" onload="">
+[%- USE HTML %][%- USE LxERP -%][%- USE L -%]
+ <h1>[% title %]</h1>
<form method="post" action="admin.pl">
- <div class="listtop" width="100%">[% title %]</div>
+ <div class="tabwidget">
+ <ul>
+ <li><a href="#client_list">[%- LxERP.t8("Client list") %]</a></li>
+ <li><a href="#user_list">[%- LxERP.t8("User list") %]</a></li>
+ </ul>
- <p>
- <table width="100%">
- <tr>
- <th class="listtop">[% 'Login' | $T8 %]</th>
- <th class="listtop">[% 'Name' | $T8 %]</th>
- <th class="listtop">[% 'Company' | $T8 %]</th>
- <th class="listtop">[% 'Driver' | $T8 %]</th>
- <th class="listtop">[% 'Host' | $T8 %]</th>
- <th class="listtop">[% 'Dataset' | $T8 %]</th>
- <th class="listtop">[% 'Templates' | $T8 %]</th>
- </tr>
+ <div id="client_list">
+[%- IF !CLIENTS.size %]
+ <p>
+ [% LxERP.t8("No clients have been created yet.") %]
+ [% LxERP.t8("In order to use kivitendo you have to create at least one client, one user, and grant that user access to the client.") %]
+ </p>
- [% FOREACH row = MEMBERS %]
- <tr class="listrow[% loop.count % 2 %]">
- <td><a href="admin.pl?action=edit&login=[% HTML.url(row.login) %]">[% HTML.escape(row.login) %]</a></td>
- <td>[% HTML.escape(row.name) %]</td>
- <td>[% HTML.escape(row.company) %]</td>
- <td>[% HTML.escape(row.dbdriver) %]</td>
- <td>[% IF row.dbhost %][% HTML.escape(row.dbhost) %][% ELSE %]localhost[% END %]</td>
- <td>[% HTML.escape(row.dbname) %]</td>
- <td>[% HTML.escape(row.templates) %]</td>
+[%- ELSE %]
+ <table width="100%">
+ <tr>
+ <th class="listtop">[% 'Client name' | $T8 %]</th>
+ <th class="listtop">[% 'Database ID' | $T8 %]</th>
+ <th class="listtop">[% 'Database name' | $T8 %]</th>
+ <th class="listtop">[% 'Database Host' | $T8 %]</th>
+ <th class="listtop">[% 'Database User' | $T8 %]</th>
</tr>
- [% END %]
- <td colspan="7"><hr size="3" noshade></td>
- </table>
- </p>
+ [%- FOREACH client = CLIENTS %]
+ <tr class="listrow">
+ <td><a href="admin.pl?action=edit_client&client.id=[% HTML.url(client.id) %]">[% HTML.escape(client.name) %]</a></td>
+ <td>[% HTML.escape(client.id) %]</td>
+ <td>[% HTML.escape(client.dbname) %]</td>
+ <td>[% HTML.escape(client.dbhost) %][% IF client.dbport %]:[%- HTML.escape(client.dbport) %][%- END %]</td>
+ <td>[% HTML.escape(client.dbuser) %]</td>
+ </tr>
+ [%- END %]
+ </table>
+[%- END %]
+ </div>
+
+ <div id="user_list">
+[%- IF !USERS.size %]
+ <p>
+ [% LxERP.t8("No users have been created yet.") %]
+ [% LxERP.t8("In order to use kivitendo you have to create at least one client, one user, and grant that user access to the client.") %]
+ </p>
+[%- ELSE %]
+ <table width="100%">
+ <tr>
+ <th class="listtop">[% 'Login Name' | $T8 %]</th>
+ <th class="listtop">[% 'Name' | $T8 %]</th>
+ <th class="listtop">[% 'Language' | $T8 %]</th>
+ </tr>
+
+ [% FOREACH user = USERS %]
+ [%- SET config = user.config_values %]
+ <tr class="listrow">
+ <td><a href="admin.pl?action=edit&user.id=[% HTML.url(user.id) %]">[% HTML.escape(user.login) %]</a></td>
+ <td>[% HTML.escape(config.name) %]</td>
+ <td>[% HTML.escape(config.countrycode) %]</td>
+ </tr>
+ [% END %]
+ </table>
+[%- END %]
+ </div>
+ </div>
- <input type="submit" class="submit" name="action" value="[% 'Add User' | $T8 %]">
- <input type="submit" class="submit" name="action" value="[% 'Edit groups' | $T8 %]">
- <input type="submit" class="submit" name="action" value="[% 'Pg Database Administration' | $T8 %]">
+ [% L.link(SELF.url_for(action="add_client"), LxERP.t8("Add Client")) %]
+ <span class="link_separator">|</span>
+ [% L.link(SELF.url_for(action="add_user"), LxERP.t8("Add User")) %]
+ <span class="link_separator">|</span>
+ [% L.link(SELF.url_for(action="edit_groups"), LxERP.t8("Edit groups")) %]
+ <span class="link_separator">|</span>
+ [% L.link(SELF.url_for(action="pg_database_administration", controller="admin.pl"), LxERP.t8("Pg Database Administration")) %]
+ <span class="link_separator">|</span>
+ [% L.link(SELF.url_for(action="printer_management", controller="admin.pl"), LxERP.t8("Printer Management")) %]
+ <span class="link_separator">|</span>
[% IF LOCKED %]
- <input type="submit" class="submit" name="action" value="[% 'Unlock System' | $T8 %]">
- [% ELSE %]
- <input type="submit" class="submit" name="action" value="[% 'Lock System' | $T8 %]">
+ [% L.link(SELF.url_for(action="unlock_system"), LxERP.t8("Unlock System")) %]
+ [% ELSE %]
+ [% L.link(SELF.url_for(action="lock_system"), LxERP.t8("Lock System")) %]
[% END %]
- <input type="submit" class="submit" name="action" value="[% 'Logout' | $T8 %]">
+ <span class="link_separator">|</span>
+ [% L.link(SELF.url_for(action="logout"), LxERP.t8("Logout")) %]
+ <div style="background-color: #FFFFDA; font-size: 12px; padding: 0.5em; max-width: 720px; margin: 1em;">
<p>[% 'Click on login name to edit!' | $T8 %]</p>
-
<p>[% 'To add a user to a group edit a name, change the login name and save. A new user with the same variables will then be saved under the new login name.' | $T8 %]</p>
+ </div>
</form>
- <form method="post" action="login.pl">
+ <hr>
+
+ <h2>[% 'User Login' | $T8 %]</h2>
- <div class="listheading">Lx-Office ERP [% 'Login' | $T8 %]</div>
+ <form method="post" action="controller.pl">
+ <input type="hidden" name="action" value="LoginScreen/login">
<table border="0">
<tr>
- <th align="right">[% 'Name' | $T8 %]</th>
- <td><input class="login" name="login"></td>
+ <th align="right">[% 'Login Name' | $T8 %]</th>
+ <td><input class="login" name="{AUTH}login"></td>
<td> </td>
</tr>
<tr>
<th align="right">[% 'Password' | $T8 %]</th>
- <td><input class="login" type="password" name="password"></td>
- <td><input type="submit" name="action" value="[% 'Login' | $T8 %]"></td>
+ <td><input class="login" type="password" name="{AUTH}password"></td>
+ <td><input type="submit" value="[% 'Login' | $T8 %]"></td>
</tr>
</table>
</form>
-
- <hr size="3" noshade>
-
-</body>
-</html>