Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 5c399b82

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

  • ID 5c399b8268285b0561c07e7deb6506de040c2aa4
  • Vorgänger e4bb6dc4
  • Nachfolger 54450d2c

Zeiterfassung: Mitarbeiter ändern können bei entspr. Recht

Unterschiede anzeigen:

SL/Controller/TimeRecording.pm
121 121
    }
122 122
  }
123 123

  
124
  $attributes{employee_id}     = SL::DB::Manager::Employee->current->id;
124
  # do not overwright staff member if you do not have the right
125
  delete $attributes{staff_member_id} if !$_[0]->can_edit_all;
125 126
  $attributes{staff_member_id} = SL::DB::Manager::Employee->current->id if $is_new;
126 127

  
128
  $attributes{employee_id}     = SL::DB::Manager::Employee->current->id;
129

  
127 130
  $time_recording->assign_attributes(%attributes);
128 131

  
129 132
  return $time_recording;
templates/webpages/time_recording/form.html
2 2
[% USE P %]
3 3
[% USE T8 %]
4 4
[% USE LxERP %]
5
[% USE HTML %]
5 6

  
6 7
<h1>[% title %]</h1>
7 8

  
......
19 20
      <th>[% 'Type' | $T8 %]</th>
20 21
      <th>[% 'Project' | $T8 %]</th>
21 22
      <th>[% 'Description' | $T8 %]</th>
23
      <th>[% 'Mitarbeiter' | $T8 %]</th>
22 24
    </thead>
23 25
    <tbody valign="top">
24 26
      <td>
......
35 37
      <td>[% P.select_tag('time_recording.type_id', SELF.all_time_recording_types, default=SELF.time_recording.type.id, with_empty=1, title_key='abbreviation') %]</td>
36 38
      <td>[% P.project.picker('time_recording.project_id', SELF.time_recording.project_id, style='width: 300px') %]</td>
37 39
      <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>
40
      <td>
41
        [%- IF SELF.can_edit_all -%]
42
          [% L.select_tag('time_recording.staff_member_id', SELF.all_employees,
43
                           default    => SELF.time_recording.staff_member_id,
44
                           title_key  => 'safe_name',
45
                           value_key  => 'id',
46
                           style      => 'width: 200px') %]
47
        [%- ELSE -%]
48
          [% SELF.time_recording.staff_member.safe_name | html %]
49
        [%- END -%]
50
      </td>
38 51
    </tbody>
39 52
  </table>
40 53

  

Auch abrufbar als: Unified diff