Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 4ee26bcc

Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt

  • ID 4ee26bcc22fa980555706ca24323ee9c552c1303
  • Vorgänger f2fa8662
  • Nachfolger e1261979

Pflichtenhefte: Druckvorlagendateinamen bei Pflicthenhefttypen festlegen können

Unterschiede anzeigen:

SL/Controller/RequirementSpec.pm
204 204
sub action_create_pdf {
205 205
  my ($self, %params) = @_;
206 206

  
207
  my %result = SL::Template::LaTeX->parse_and_create_pdf('requirement_spec.tex', SELF => $self, rspec => $self->requirement_spec);
207
  my $base_name       = $self->requirement_spec->type->template_file_name || 'requirement_spec';
208
  my %result          = SL::Template::LaTeX->parse_and_create_pdf("${base_name}.tex", SELF => $self, rspec => $self->requirement_spec);
208 209

  
209 210
  $::form->error(t8('Conversion to PDF failed: #1', $result{error})) if $result{error};
210 211

  
SL/Controller/RequirementSpecType.pm
31 31
sub action_new {
32 32
  my ($self) = @_;
33 33

  
34
  $self->{requirement_spec_type} = SL::DB::RequirementSpecType->new;
34
  $self->{requirement_spec_type} = SL::DB::RequirementSpecType->new(template_file_name => 'requirement_spec');
35 35
  $self->render('requirement_spec_type/form', title => t8('Create a new requirement spec type'));
36 36
}
37 37

  
SL/DB/MetaSetup/RequirementSpecType.pm
9 9
__PACKAGE__->meta->table('requirement_spec_types');
10 10

  
11 11
__PACKAGE__->meta->columns(
12
  description => { type => 'text', not_null => 1 },
13
  id          => { type => 'serial', not_null => 1 },
14
  itime       => { type => 'timestamp', default => 'now()' },
15
  mtime       => { type => 'timestamp' },
16
  position    => { type => 'integer', not_null => 1 },
12
  description        => { type => 'text', not_null => 1 },
13
  id                 => { type => 'serial', not_null => 1 },
14
  itime              => { type => 'timestamp', default => 'now()' },
15
  mtime              => { type => 'timestamp' },
16
  position           => { type => 'integer', not_null => 1 },
17
  template_file_name => { type => 'text' },
17 18
);
18 19

  
19 20
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
locale/de/all
1764 1764
  'Print dunnings'              => 'Mahnungen drucken',
1765 1765
  'Print list'                  => 'Liste ausdrucken',
1766 1766
  'Print options'               => 'Druckoptionen',
1767
  'Print template base file name' => 'Druckvorlagen-Basisdateiname',
1767 1768
  'Print templates'             => 'Druckvorlagen',
1768 1769
  'Print templates to use'      => 'Zu verwendende Druckvorlagen',
1769 1770
  'Printer'                     => 'Drucker',
......
2275 2276
  'The background job has been saved.' => 'Der Hintergrund-Job wurde gespeichert.',
2276 2277
  'The background job was executed successfully.' => 'Der Hintergrund-Job wurde erfolgreich ausgeführt.',
2277 2278
  'The bank information must not be empty.' => 'Die Bankinformationen müssen vollständig ausgefüllt werden.',
2279
  'The base file name without a path or an extension to be used for printing for this type of requirement spec.' => 'Der Basisdateiname ohne Pfadanteil oder Erweiterung, der bei Drucken dieses Pflichtenhefttyps verwendet wird.',
2278 2280
  'The base unit does not exist or it is about to be deleted in row %d.' => 'Die Basiseinheit in Zeile %d existiert nicht oder soll gelöscht werden.',
2279 2281
  'The base unit does not exist.' => 'Die Basiseinheit existiert nicht.',
2280 2282
  'The base unit relations must not contain loops (e.g. by saying that unit A\'s base unit is B, B\'s base unit is C and C\'s base unit is A) in row %d.' => 'Die Beziehungen der Einheiten dürfen keine Schleifen beinhalten (z.B. wenn gesagt wird, dass Einheit As Basiseinheit B, Bs Basiseinheit C und Cs Basiseinheit A ist) in Zeile %d.',
sql/Pg-upgrade2/requirement_spec_types_template_file_name.sql
1
-- @tag: requirement_spec_types_template_file_name
2
-- @description: Pflichtenhefttypen: Spalte für Druckvorlagendateinamen
3
-- @depends: requirement_specs
4
ALTER TABLE requirement_spec_types ADD COLUMN template_file_name TEXT;
5
UPDATE requirement_spec_types SET template_file_name = 'requirement_spec';
templates/webpages/requirement_spec_type/form.html
10 10
    <td>[% LxERP.t8('Description') %]</td>
11 11
    <td>[% L.input_tag("requirement_spec_type.description", SELF.requirement_spec_type.description) %]</td>
12 12
   </tr>
13

  
14
   <tr>
15
    <td>[% LxERP.t8('Print template base file name') %]<sup>(1)</sup></td>
16
    <td>[% L.input_tag("requirement_spec_type.template_file_name", SELF.requirement_spec_type.template_file_name) %]</td>
17
   </tr>
13 18
  </table>
14 19

  
15 20
  <p>
......
21 26
   [%- END %]
22 27
   <a href="[% SELF.url_for(action => 'list') %]">[%- LxERP.t8('Abort') %]</a>
23 28
  </p>
29

  
30
  <p>
31
   <sup>(1)</sup>: [% LxERP.t8("The base file name without a path or an extension to be used for printing for this type of requirement spec.") %]
32
  </p>
24 33
 </form>

Auch abrufbar als: Unified diff