Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 73c0c463

Von Bernd Bleßmann vor mehr als 3 Jahren hinzugefügt

  • ID 73c0c4632ff92978a8b7470869a6db5ba8b3b550
  • Vorgänger 5b67a0b8
  • Nachfolger 8b2ccef3

Zeiterfassung: Elemente in Eingabemaske untereinander anordnen

Unterschiede anzeigen:

templates/webpages/time_recording/form.html
13 13
  [% L.hidden_tag('callback', FORM.callback) %]
14 14

  
15 15
  <table>
16
    <thead class="listheading">
17
      <tr>
18
       [%- IF SELF.use_duration %]
19
        <th>[% 'Date'     | $T8 %]</th>
20
        <th>[% 'Duration' | $T8 %] ([% 'in minutes' | $T8 %])</th>
21
       [%- ELSE %]
22
        <th>[% 'Start' | $T8 %]</th>
23
        <th>[% 'End'   | $T8 %]</th>
24
       [%- END %]
25
        <th>[% 'Sales Order' | $T8 %]</th>
26
        <th>[% 'Customer' | $T8 %]</th>
27
        <th>[% 'Project' | $T8 %]</th>
28
        <th>[% 'Article' | $T8 %]</th>
29
        <th>[% 'Description' | $T8 %]</th>
30
        <th>[% 'Mitarbeiter' | $T8 %]</th>
31
      </tr>
32
    </thead>
33
    <tbody valign="top">
34
      <tr>
35
       [%- IF SELF.use_duration %]
36
        <td>
37
          [% P.date_tag('time_recording.date_as_date', SELF.time_recording.date_as_date, "data-validate"="required", "data-title"=LxERP.t8('Date')) %]<br>
38
        </td>
39
        <td>
40
          [% P.input_tag('time_recording.duration', SELF.time_recording.duration, size=15) %]
41
        </td>
42
       [%- ELSE %]
43
        <td>
44
          [% P.date_tag('start_date',  SELF.start_date, "data-validate"="required", "data-title"=LxERP.t8('Start date'), onchange='kivi.TimeRecording.set_end_date()') %]<br>
45
          [% P.input_tag('start_time', SELF.start_time, type="time", "data-validate"="required", "data-title"=LxERP.t8('Start time')) %]
46
          [% P.button_tag('kivi.TimeRecording.set_current_date_time("start")', LxERP.t8('now')) %]
47
        </td>
48
        <td>
49
          [% P.date_tag('end_date',  SELF.end_date) %]<br>
50
          [% P.input_tag('end_time', SELF.end_time, type="time") %]
51
          [% P.button_tag('kivi.TimeRecording.set_current_date_time("end")', LxERP.t8('now')) %]
52
        </td>
53
       [%- END %]
54
        <td>[% P.select_tag('time_recording.order_id', SELF.all_orders, default=SELF.time_recording.order_id, title_key='digest', with_empty=1, onchange='kivi.TimeRecording.order_changed(this.value)') %]</td>
55
        <td>[% P.customer_vendor.picker('time_recording.customer_id', SELF.time_recording.customer_id, type='customer', style='width: 300px', "data-validate"="required", "data-title"=LxERP.t8('Customer')) %]</td>
56
        <td>[% P.project.picker('time_recording.project_id', SELF.time_recording.project_id, style='width: 300px') %]</td>
57
        <td>[% P.select_tag('time_recording.part_id', SELF.all_time_recording_articles, default=SELF.time_recording.part_id, with_empty=1, value_key='id', title_key='description') %]</td>
58
        <td>[% L.textarea_tag('time_recording.description', SELF.time_recording.description, wrap="soft", style="width: 350px; height: 150px", class="texteditor", "data-validate"="required", "data-title"=LxERP.t8('Description')) %]</td>
59
        <td>
60
          [%- IF SELF.can_edit_all -%]
61
            [% L.select_tag('time_recording.staff_member_id', SELF.all_employees,
62
                             default    => SELF.time_recording.staff_member_id,
63
                             title_key  => 'safe_name',
64
                             value_key  => 'id',
65
                             style      => 'width: 200px') %]
66
          [%- ELSE -%]
67
            [% SELF.time_recording.staff_member.safe_name | html %]
68
          [%- END -%]
69
        </td>
70
      </tr>
71
    </tbody>
16
   [%- IF SELF.use_duration %]
17
    <tr>
18
      <th align="right">[% 'Date' | $T8 %]</th>
19
      <td>
20
        [% P.date_tag('time_recording.date_as_date', SELF.time_recording.date_as_date, "data-validate"="required", "data-title"=LxERP.t8('Date')) %]<br>
21
      </td>
22
    </tr>
23
    <tr>
24
      <th align="right">[% 'Duration' | $T8 %] ([% 'in minutes' | $T8 %])</th>
25
      <td>
26
        [% P.input_tag('time_recording.duration', SELF.time_recording.duration, size=11) %]
27
      </td>
28
    </tr>
29
   [%- ELSE %]
30
    <tr>
31
      <th align="right">[% 'Start' | $T8 %]</th>
32
      <td>
33
        [% P.date_tag('start_date',  SELF.start_date, "data-validate"="required", "data-title"=LxERP.t8('Start date'), onchange='kivi.TimeRecording.set_end_date()') %]
34
        [% P.input_tag('start_time', SELF.start_time, type="time", "data-validate"="required", "data-title"=LxERP.t8('Start time')) %]
35
        [% P.button_tag('kivi.TimeRecording.set_current_date_time("start")', LxERP.t8('now')) %]
36
      </td>
37
    </tr>
38
    <tr>
39
      <th align="right">[% 'End' | $T8 %]</th>
40
      <td>
41
        [% P.date_tag('end_date',  SELF.end_date) %]
42
        [% P.input_tag('end_time', SELF.end_time, type="time") %]
43
        [% P.button_tag('kivi.TimeRecording.set_current_date_time("end")', LxERP.t8('now')) %]
44
      </td>
45
    </tr>
46
   [%- END %]
47
    <tr></tr><tr></tr>
48
    <tr>
49
      <th align="right">[% 'Sales Order' | $T8 %]</th>
50
      <td>[% P.select_tag('time_recording.order_id', SELF.all_orders, default=SELF.time_recording.order_id, title_key='digest', with_empty=1, style='width: 300px', onchange='kivi.TimeRecording.order_changed(this.value)') %]</td>
51
    </tr>
52
    <tr>
53
      <th align="right">[% 'Customer' | $T8 %]</th>
54
      <td>[% P.customer_vendor.picker('time_recording.customer_id', SELF.time_recording.customer_id, type='customer', style='width: 300px', "data-validate"="required", "data-title"=LxERP.t8('Customer')) %]</td>
55
    </tr>
56
    <tr>
57
      <th align="right">[% 'Project' | $T8 %]</th>
58
      <td>[% P.project.picker('time_recording.project_id', SELF.time_recording.project_id, style='width: 300px') %]</td>
59
    </tr>
60
    <tr></tr><tr></tr>
61
    <tr>
62
      <th align="right">[% 'Article' | $T8 %]</th>
63
      <td>[% P.select_tag('time_recording.part_id', SELF.all_time_recording_articles, default=SELF.time_recording.part_id, with_empty=1, value_key='id', title_key='description', style='width: 300px') %]</td>
64
    </tr>
65
    <tr>
66
      <th align="right">[% 'Description' | $T8 %]</th>
67
      <td>[% L.textarea_tag('time_recording.description', SELF.time_recording.description, wrap="soft", style="width: 300px; height: 150px", class="texteditor", "data-validate"="required", "data-title"=LxERP.t8('Description')) %]</td>
68
    </tr>
69
    <tr>
70
      <th align="right">[% 'Mitarbeiter' | $T8 %]</th>
71
      <td>
72
       [%- IF SELF.can_edit_all -%]
73
        [% L.select_tag('time_recording.staff_member_id', SELF.all_employees,
74
                        default    => SELF.time_recording.staff_member_id,
75
                        title_key  => 'safe_name',
76
                        value_key  => 'id',
77
                        style      => 'width: 300px') %]
78
       [%- ELSE -%]
79
        [% SELF.time_recording.staff_member.safe_name | html %]
80
       [%- END -%]
81
      </td>
82
    </tr>
72 83
  </table>
73 84

  
74 85
</form>

Auch abrufbar als: Unified diff