Gruppenverwaltung auf Controllermodel umgestellt
[kivitendo-erp.git] / templates / webpages / admin / show.html
index 1f1a834..734deae 100644 (file)
  <span class="link_separator">|</span>
  [% L.link(SELF.url_for(action="new_client"), LxERP.t8("Add Client")) %]
  <span class="link_separator">|</span>
- [% L.link(SELF.url_for(action="edit_groups"), LxERP.t8("Edit groups")) %]
+ [% L.link(SELF.url_for(action="new_group"), LxERP.t8("Add User Group")) %]
  <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 %]
+ [% IF SELF.is_locked %]
   [% 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")) %]
  <ul>
   <li><a href="#user_list">[%- LxERP.t8("User list") %]</a></li>
   <li><a href="#client_list">[%- LxERP.t8("Client list") %]</a></li>
+  <li><a href="#group_list">[%- LxERP.t8("Group list") %]</a></li>
  </ul>
 
  <div id="user_list">
-[%- IF !USERS.size %]
+[%- IF !SELF.all_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.") %]
+   [% LxERP.t8("In order to use kivitendo you have to create at least a client, a user and a group.") %]
   </p>
 
 [%- ELSE %]
@@ -51,7 +52,7 @@
     <th>[% LxERP.t8('Language') %]</th>
    </tr>
 
-[% FOREACH user = USERS %]
+[% FOREACH user = SELF.all_users %]
 [%- SET config = user.config_values %]
    <tr class="listrow">
     <td>[% L.link(SELF.url_for(action="edit_user", id=user.id), HTML.escape(user.login)) %]</td>
  </div>
 
  <div id="client_list">
-[%- IF !CLIENTS.size %]
+[%- IF !SELF.all_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.") %]
+   [% LxERP.t8("In order to use kivitendo you have to create at least a client, a user and a group.") %]
   </p>
 
 [%- ELSE %]
@@ -81,7 +82,7 @@
     <th>[% LxERP.t8('Default client') %]</th>
    </tr>
 
-[%- FOREACH client = CLIENTS %]
+[%- FOREACH client = SELF.all_clients %]
    <tr class="listrow">
     <td>[% L.link(SELF.url_for(action="edit_client", id=client.id), HTML.escape(client.name)) %]</td>
     <td>[% HTML.escape(client.id) %]</td>
    </tr>
 [%- END %]
   </table>
+[%- END %]
+ </div>
+
+ <div id="group_list">
+[%- IF !SELF.all_groups.size %]
+  <p>
+   [% LxERP.t8("No groups have been created yet.") %]
+   [% LxERP.t8("In order to use kivitendo you have to create at least a client, a user and a group.") %]
+  </p>
+
+[%- ELSE %]
+  <table width="100%">
+   <tr class="listheading">
+    <th>[% LxERP.t8('Name') %]</th>
+    <th>[% LxERP.t8('Description') %]</th>
+   </tr>
+
+[%- FOREACH group = SELF.all_groups %]
+   <tr class="listrow">
+    <td>[% L.link(SELF.url_for(action="edit_group", id=group.id), HTML.escape(group.name)) %]</td>
+    <td>[% HTML.escape(group.description) %]</td>
+   </tr>
+[%- END %]
+  </table>
 [%- END %]
  </div>
 </div>