Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision f01c7d70

Von Hans P. Schlaepfer vor fast 4 Jahren hinzugefügt

  • ID f01c7d7092f62dba850bc8d4b5a7f8d6b09edfeb
  • Vorgänger 9b3a0262
  • Nachfolger be7e1cb1

Neues Design 2019 Standard-Code templates/webpages/admin/edit_group.html

Unterschiede anzeigen:

templates/webpages/admin/edit_group.html
2 2
[% USE L %]
3 3
[% USE LxERP %]
4 4

  
5
[%- INCLUDE 'common/flash.html' %]
5
[% INCLUDE 'common/flash.html' %]
6 6

  
7 7
<h1>[% HTML.escape(title) %]</h1>
8 8

  
9
<form method="post" action="controller.pl" id="form">
10
 [% L.hidden_tag("group.id", SELF.group.id) %]
11
 [% L.hidden_tag("action", "") %]
12

  
13
 <h2>[%- LxERP.t8("Settings") %]</h2>
14

  
15
 <table>
16
  <tr>
17
   <th align="right">[% LxERP.t8('Name') %]</th>
18
   <td>[% L.input_tag("group.name", SELF.group.name, class="initial_focus") %]</td>
19
  </tr>
20

  
21
  <tr>
22
   <th align="right">[% LxERP.t8('Description') %]</th>
23
   <td>[% L.input_tag("group.description", SELF.group.description) %]</td>
24
  </tr>
25
 </table>
26

  
27
 <h2>[% LxERP.t8("Access rights") %]</h2>
28

  
29
 [% SET granted_rights = SELF.group.rights_map %]
30 9

  
31
 [%- FOREACH section = SELF.all_rights %]
32
  [% SET section_number = loop.count %]
33
  [% SET num_checked = 0 %]
34
  [% FOREACH right = section.rights %][% SET name = right.name %][% IF granted_rights.$name %][% SET num_checked = num_checked + 1 %][% END %][% END %]
35
  <h3>[% L.checkbox_tag('dummy' _ section_number, label=LxERP.t8('Section "#1"', section.description), checkall='.checkallgroup' _ section_number, checked=(num_checked == section.rights.size)) %]</h3>
36

  
37
  <div class="clearfix">
10
<form method="post" action="controller.pl" id="form">
11
[% L.hidden_tag("group.id", SELF.group.id) %]
12
[% L.hidden_tag("action", "") %]
13

  
14
<div class="wrapper">
15

  
16
<div class="col wi-wide">
17
<h2>[% LxERP.t8("Settings") %]</h2>
18

  
19
<table class="tbl-horizontal">
20
  <tbody>
21
    <tr>
22
      <th>[% LxERP.t8('Name') %]</th>
23
      <td>[% L.input_tag("group.name", SELF.group.name, class="initial_focus") %]</td>
24
    </tr>
25
    <tr>
26
      <th>[% LxERP.t8('Description') %]</th>
27
      <td>[% L.input_tag("group.description", SELF.group.description) %]</td>
28
    </tr>
29
  </tbody>
30
</table>
31

  
32
<h2>[% LxERP.t8("Access rights") %]</h2>
33

  
34
[% SET granted_rights = SELF.group.rights_map %]
35

  
36
[% FOREACH section = SELF.all_rights %]
37
[% SET section_number = loop.count %]
38
[% SET num_checked = 0 %]
39
[% FOREACH right = section.rights %]
40
  [% SET name = right.name %]
41
  [% IF granted_rights.$name %][% SET num_checked = num_checked + 1 %][% END %]
42
[% END %]
43

  
44
<div class="boxes">
45
<h3 title="[% LxERP.t8('Select/Deselect all') %]">[% L.checkbox_tag('dummy' _ section_number, label=LxERP.t8('Section "#1"', section.description), checkall='.checkallgroup' _ section_number, checked=(num_checked == section.rights.size), title=LxERP.t8("Select/Deselect")) %]</h3>
38 46
   [% FOREACH right = section.rights %]
39 47
    [% SET name = right.name %]
40
    [% L.checkbox_tag("group.rights_map." _ name, label=right.description, checked=granted_rights.$name, class="checkallgroup" _ section_number) %]
41
    <br>
42
   [%- END %]
48
    <div>[% L.checkbox_tag("group.rights_map." _ name, label=right.description, checked=granted_rights.$name, class="checkallgroup" _ section_number) %]</div>
49
     [% END %]
43 50
  </div>
44
 [%- END %]
51
 [% END %]
45 52

  
46
 <h2>[%- LxERP.t8("Group membership") %]</h2>
53
</div><!-- /.col -->
47 54

  
48
[% IF SELF.all_users.size %]
49
 <p>
50
  [%- LxERP.t8("The following users are a member of this group") %]:
51
 </p>
55
<div class="col">
56
<h2>[% LxERP.t8("Group membership") %]</h2>
52 57

  
53
 <div class="clearfix">
58
[% IF SELF.all_users.size %]
59
<div class="ms2side">
60
  <p>[% LxERP.t8("The following users are a member of this group") %]:</p>
61
  <!-- vormals:.clearfix -->
54 62
  [% L.select_tag("group.users[]", SELF.all_users, id="group_users", title_key="login", default=SELF.group.users, default_value_key='id', multiple=1) %]
55 63
  [% L.multiselect2side("group_users", labelsx => LxERP.t8("All users"), labeldx => LxERP.t8("Users that are a member in this group")) %]
56
 </div>
64
</div>
65
[% ELSE %]
66
  <p>[% LxERP.t8("No users have been created yet.") %]</p>
67
[% END %]
57 68

  
58
[%- ELSE %]
59
 <p>
60
  [% LxERP.t8("No users have been created yet.") %]
61
 </p>
62
[%- END %]
63 69

  
64
 <h2>[%- LxERP.t8("Client assignment") %]</h2>
70
<h2>[% LxERP.t8("Client assignment") %]</h2>
65 71

  
66 72
[% IF SELF.all_clients.size %]
67
 <p>
68
  [%- LxERP.t8("This group is valid for the following clients") %]:
69
 </p>
70

  
71
 <div class="clearfix">
73
<div class="ms2side">
74
  <p>[% LxERP.t8("This group is valid for the following clients") %]:</p>
75
  <!-- vormals:.clearfix -->
72 76
  [% L.select_tag("group.clients[]", SELF.all_clients, id="group_clients", title_key="name", default=SELF.group.clients, default_value_key='id', multiple=1) %]
73 77
  [% L.multiselect2side("group_clients", labelsx => LxERP.t8("All clients"), labeldx => LxERP.t8("Clients this Group is valid for")) %]
74
 </div>
78
</div>
79

  
80
[% ELSE %]
81
  <p>[% LxERP.t8("No clients have been created yet.") %]</p>
82
[% END %]
75 83

  
76
[%- ELSE %]
77
 <p>
78
  [% LxERP.t8("No clients have been created yet.") %]
79
 </p>
80
[%- END %]
81 84

  
82
<hr size="3" noshade>
85
<div class="buttons">
86
  [% L.link(SELF.url_for(action="show"), LxERP.t8("Back"), class="button neutral") %]
83 87

  
84
<p>
85
 [% L.link(SELF.url_for(action="show"), LxERP.t8("Back")) %]
88
  [% L.button_tag("submit_with_action('save_group')", LxERP.t8("Save")) %]
89
  [% IF SELF.group.id %]
90
    [% L.button_tag("save_as_new()", LxERP.t8("Save as new")) %]
91
    [% L.button_tag("submit_with_action('delete_group')", LxERP.t8("Delete"), confirm=LxERP.t8("Are you sure?")) %]
92
  [% END %]
93
</div>
86 94

  
87
 [% L.button_tag("submit_with_action('save_group')", LxERP.t8("Save")) %]
88
 [% IF SELF.group.id %]
89
  [% L.button_tag("save_as_new()", LxERP.t8("Save as new")) %]
90
  [% L.button_tag("submit_with_action('delete_group')", LxERP.t8("Delete"), confirm=LxERP.t8("Are you sure?")) %]
91
 [%- END %]
92
</p>
95
</div><!-- /.col -->
93 96

  
97
</div><!-- /.wrapper -->
94 98
</form>
95 99

  
96 100
<script type="text/javascript">

Auch abrufbar als: Unified diff