]> wagnertech.de Git - mfinanz.git/blobdiff - templates/webpages/admin/list_users.html
SL::Form->dbconnect*: Connect-Settings nicht aus %::myconfig, sondern SL::DBConnect...
[mfinanz.git] / templates / webpages / admin / list_users.html
index 664a6141b9569d47fdf99a0efd172995027fdf9f..0d75e6b0cdd8d69be7be0089b3ed2d817450e0d4 100644 (file)
@@ -1,61 +1,90 @@
 [%- USE T8 %]
-[%- USE HTML %]
-<body class="admin">
-
+[%- USE HTML %][%- USE LxERP -%][%- USE L -%]
  <h1>[% title %]</h1>
 
  <form method="post" action="admin.pl">
 
-  <p>
-   <table width="100%">
-    <tr>
-     <th class="listtop">[% 'Login Name' | $T8 %]</th>
-     <th class="listtop">[% 'Name' | $T8 %]</th>
-     <th class="listtop">[% 'Company' | $T8 %]</th>
-     <th class="listtop">[% 'Templates' | $T8 %]</th>
-     <th class="listtop">[% 'Print' | $T8 %]</th>
-     <th class="listtop">[% 'Language' | $T8 %]</th>
-     <th class="listtop">[% 'Dataset' | $T8 %]</th>
-     <th class="listtop">[% 'Host' | $T8 %]</th>
-     <th class="listtop">[% 'Last Action' | $T8 %]</th>
-<!-- <th class="listtop">[% 'Driver' | $T8 %]</th> -->
-    </tr>
+  <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>
+
+   <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>
+
+[%- 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>
 
-    [% FOREACH row = MEMBERS %]
-     <tr class="listrow[% loop.count % 2 %]">
-      <td>&nbsp;<a href="admin.pl?action=edit&user.id=[% HTML.url(row.id) %]">[% HTML.escape(row.login) %]</a></td>
-      <td>&nbsp;[% HTML.escape(row.name) %]</td>
-      <td>&nbsp;[% HTML.escape(row.company) %]</td>
-      <td>&nbsp;[% HTML.escape(row.templates) %]</td>
-      <td>&nbsp;[% HTML.escape(row.template_format) %]</td>
-      <td>&nbsp;[% HTML.escape(row.countrycode) %]</td>
-      <td>&nbsp;[% HTML.escape(row.dbname) %]</td>
-      <td>&nbsp;[% IF row.dbhost %][% HTML.escape(row.dbhost) %][% ELSE %]localhost[% END %]</td>
-      <td>&nbsp;
-        [% IF( row.last_action ) %]
-          [% HTML.escape(row.last_action) %]
-        [% ELSE %]
-          [% 'not logged in' | $T8 %]
-        [% END %]</td>
-<!--  <td>&nbsp;[% HTML.escape(row.dbdriver) %]</td> -->
+ [%- 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 %]
+ [%- END %]
+    </table>
+[%- END %]
+   </div>
 
-   </table>
-  <hr size="3" noshade>
-  </p>
+   <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>
 
-  <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 %]">
-  <input type="submit" class="submit" name="action" value="[% 'Printer Management' | $T8 %]">
+ [% 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>
+
+  [% 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>
@@ -63,7 +92,9 @@
   </div>
  </form>
 
- <h1>[% 'User Login' | $T8 %]</h1>
+ <hr>
+
+ <h2>[% 'User Login' | $T8 %]</h2>
 
  <form method="post" action="controller.pl">
   <input type="hidden" name="action" value="LoginScreen/login">
   </table>
 
  </form>
-
- <hr size="3" noshade>
-