Datenbankverwaltung in neuen Admin-Controller verschoben
[kivitendo-erp.git] / templates / webpages / admin / show.html
1 [%- USE HTML %][%- USE LxERP -%][%- USE L -%]
2
3 [% INCLUDE 'common/flash.html' %]
4
5 <h1>[% HTML.escape(title) %]</h1>
6
7 <div>
8  [% LxERP.t8("Actions") %]:
9  <span class="link_separator"></span>
10  [% L.link(SELF.url_for(action="new_user"), LxERP.t8("Add User")) %]
11  <span class="link_separator">|</span>
12  [% L.link(SELF.url_for(action="new_client"), LxERP.t8("Add Client")) %]
13  <span class="link_separator">|</span>
14  [% L.link(SELF.url_for(action="new_group"), LxERP.t8("Add User Group")) %]
15  <span class="link_separator">|</span>
16  [% L.link(SELF.url_for(action="database_administration"), LxERP.t8("Pg Database Administration")) %]
17  <span class="link_separator">|</span>
18  [% L.link(SELF.url_for(action="list_printers"), LxERP.t8("Printer Management")) %]
19  <span class="link_separator">|</span>
20  [% IF SELF.is_locked %]
21   [% L.link(SELF.url_for(action="unlock_system"), LxERP.t8("Unlock System")) %]
22  [% ELSE %]
23   [% L.link(SELF.url_for(action="lock_system"), LxERP.t8("Lock System")) %]
24  [% END %]
25  <span class="link_separator">|</span>
26  [% L.link(SELF.url_for(action="logout"), LxERP.t8("Logout")) %]
27  <span class="link_separator">|</span>
28  [% L.link(SELF.url_for(controller="LoginScreen", action="user_login"), LxERP.t8("To user login")) %]
29 </div>
30
31 <hr>
32
33 <div class="tabwidget">
34  <ul>
35   <li><a href="#user_list">[%- LxERP.t8("User list") %]</a></li>
36   <li><a href="#client_list">[%- LxERP.t8("Client list") %]</a></li>
37   <li><a href="#group_list">[%- LxERP.t8("Group list") %]</a></li>
38  </ul>
39
40  <div id="user_list">
41 [%- IF !SELF.all_users.size %]
42   <p>
43    [% LxERP.t8("No users have been created yet.") %]
44    [% LxERP.t8("In order to use kivitendo you have to create at least a client, a user and a group.") %]
45   </p>
46
47 [%- ELSE %]
48   <table width="100%">
49    <tr class="listheading">
50     <th>[% LxERP.t8('Login Name') %]</th>
51     <th>[% LxERP.t8('Name') %]</th>
52     <th>[% LxERP.t8('Language') %]</th>
53    </tr>
54
55 [% FOREACH user = SELF.all_users %]
56 [%- SET config = user.config_values %]
57    <tr class="listrow">
58     <td>[% L.link(SELF.url_for(action="edit_user", id=user.id), HTML.escape(user.login)) %]</td>
59     <td>[% HTML.escape(config.name) %]</td>
60     <td>[% HTML.escape(config.countrycode) %]</td>
61    </tr>
62 [% END %]
63   </table>
64 [%- END %]
65  </div>
66
67  <div id="client_list">
68 [%- IF !SELF.all_clients.size %]
69   <p>
70    [% LxERP.t8("No clients have been created yet.") %]
71    [% LxERP.t8("In order to use kivitendo you have to create at least a client, a user and a group.") %]
72   </p>
73
74 [%- ELSE %]
75   <table width="100%">
76    <tr class="listheading">
77     <th>[% LxERP.t8('Database ID') %]</th>
78     <th>[% LxERP.t8('Client name') %]</th>
79     <th>[% LxERP.t8('Database name') %]</th>
80     <th>[% LxERP.t8('Database Host') %]</th>
81     <th>[% LxERP.t8('Database User') %]</th>
82     <th>[% LxERP.t8('Default client') %]</th>
83    </tr>
84
85 [%- FOREACH client = SELF.all_clients %]
86    <tr class="listrow">
87     <td>[% L.link(SELF.url_for(action="edit_client", id=client.id), HTML.escape(client.id)) %]</td>
88     <td>[% L.link(SELF.url_for(action="edit_client", id=client.id), HTML.escape(client.name)) %]</td>
89     <td>[% HTML.escape(client.dbname) %]</td>
90     <td>[% HTML.escape(client.dbhost) %][% IF client.dbport %]:[%- HTML.escape(client.dbport) %][%- END %]</td>
91     <td>[% HTML.escape(client.dbuser) %]</td>
92     <td>[% IF client.is_default %][% LxERP.t8("Yes") %][%- ELSE %][% LxERP.t8("No") %][%- END %]</td>
93    </tr>
94 [%- END %]
95   </table>
96 [%- END %]
97  </div>
98
99  <div id="group_list">
100 [%- IF !SELF.all_groups.size %]
101   <p>
102    [% LxERP.t8("No groups have been created yet.") %]
103    [% LxERP.t8("In order to use kivitendo you have to create at least a client, a user and a group.") %]
104   </p>
105
106 [%- ELSE %]
107   <table width="100%">
108    <tr class="listheading">
109     <th>[% LxERP.t8('Name') %]</th>
110     <th>[% LxERP.t8('Description') %]</th>
111    </tr>
112
113 [%- FOREACH group = SELF.all_groups %]
114    <tr class="listrow">
115     <td>[% L.link(SELF.url_for(action="edit_group", id=group.id), HTML.escape(group.name)) %]</td>
116     <td>[% HTML.escape(group.description) %]</td>
117    </tr>
118 [%- END %]
119   </table>
120 [%- END %]
121  </div>
122 </div>