Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 4cab0b74

Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt

  • ID 4cab0b745055e422ff7f55c0560fdc934409a791
  • Vorgänger 921db961
  • Nachfolger 79cbb476

Pflichtenheftvorlage: Maske zur Auswahl des Einzufügenden

Unterschiede anzeigen:

SL/Controller/RequirementSpec.pm
148 148
sub action_show {
149 149
  my ($self) = @_;
150 150

  
151
  my $item = $::form->{requirement_spec_item_id} ? SL::DB::RequirementSpecItem->new(id => $::form->{requirement_spec_item_id})->load : @{ $self->requirement_spec->sections }[0];
151
  my $title  = $self->requirement_spec->is_template ? t8('Show requirement spec template') : t8('Show requirement spec');
152
  my $item   = $::form->{requirement_spec_item_id} ? SL::DB::RequirementSpecItem->new(id => $::form->{requirement_spec_item_id})->load : @{ $self->requirement_spec->sections }[0];
152 153
  $self->requirement_spec_item($item);
153 154

  
154
  $self->render('requirement_spec/show', title => t8('Show requirement spec'));
155
  $self->render('requirement_spec/show', title => $title);
155 156
}
156 157

  
157 158
sub action_create {
......
210 211
  unlink $result{file_name};
211 212
}
212 213

  
214
sub action_select_template_to_paste {
215
  my ($self) = @_;
216

  
217
  my @templates = grep { @{ $_->sections } || @{ $_->text_blocks } } @{ SL::DB::Manager::RequirementSpec->get_all(where => [ is_template => 1 ], sort_by => 'lower(title)') };
218
  $self->render('requirement_spec/select_template_to_paste', { layout => 0 }, TEMPLATES => \@templates);
219
}
220

  
213 221
#
214 222
# filters
215 223
#
js/locale/de.js
25 25
"Map":"Karte",
26 26
"Part picker":"Artikelauswahl",
27 27
"Paste":"Einfügen",
28
"Paste template":"Vorlage einfügen",
28 29
"Requirement spec actions":"Pflichtenheftaktionen",
29 30
"Requirement spec template actions":"Pflichtenheftvorlagen-Aktionen",
30 31
"Revert to version":"Auf Version zurücksetzen",
js/requirement_spec.js
206 206
    current_content_id:   $('#current_content_id').val()
207 207
  };
208 208

  
209
  // console.log("I would normally POST the following now:");
210
  // console.log(data);
211
  $.post("controller.pl", $.extend(data, other_data || {}), kivi.eval_json_result);
209
  console.log("I would normally POST the following now:");
210
  console.log(data);
211
  // $.post("controller.pl", $.extend(data, other_data || {}), kivi.eval_json_result);
212 212

  
213 213
  return true;
214 214
};
......
269 269
  return ns.handle_item_popup_menu_markings(opt, false);
270 270
};
271 271

  
272
ns.paste_template = function(key, opt, other_data) {
273
  open_jqm_window({ url: 'controller.pl?action=RequirementSpec/select_template_to_paste' });
274
};
275

  
272 276
// -------------------------------------------------------------------------
273 277
// -------------------------- time/cost estimate ---------------------------
274 278
// -------------------------------------------------------------------------
......
384 388

  
385 389
  } else {                      // if (is_template)
386 390
    var general_actions = {
387
        sep98:           "---------"
388
      , general_actions: { name: kivi.t8('Requirement spec actions'), className: 'context-menu-heading' }
389
      // , sep99:           "---------"
390
      , create_pdf:      { name: kivi.t8('Create PDF'),              icon: "pdf",    callback: kivi.requirement_spec.create_reqspec_pdf }
391
      , create_version:  { name: kivi.t8('Create new version'),      icon: "new",    callback: kivi.requirement_spec.create_version, disabled: kivi.requirement_spec.disable_commands }
392
      , copy_reqspec:    { name: kivi.t8('Copy requirement spec'),   icon: "copy",   callback: kivi.requirement_spec.copy_reqspec   }
393
      , delete_reqspec:  { name: kivi.t8('Delete requirement spec'), icon: "delete", callback: kivi.requirement_spec.delete_reqspec }
391
        sep98:              "---------"
392
      , general_actions:    { name: kivi.t8('Requirement spec actions'), className: 'context-menu-heading' }
393
      , create_pdf:         { name: kivi.t8('Create PDF'),              icon: "pdf",    callback: kivi.requirement_spec.create_reqspec_pdf }
394
      , create_version:     { name: kivi.t8('Create new version'),      icon: "new",    callback: kivi.requirement_spec.create_version, disabled: kivi.requirement_spec.disable_commands }
395
      , copy_reqspec:       { name: kivi.t8('Copy requirement spec'),   icon: "copy",   callback: kivi.requirement_spec.copy_reqspec   }
396
      , delete_reqspec:     { name: kivi.t8('Delete requirement spec'), icon: "delete", callback: kivi.requirement_spec.delete_reqspec }
397
      , sep_paste_template: "---------"
398
      , paste_template:     { name: kivi.t8('Paste template'),     icon: "paste",  callback: kivi.requirement_spec.paste_template }
394 399
    };
395 400

  
396 401
    $.contextMenu({
......
410 415
        , revert_to_version:  { name: kivi.t8('Revert to version'), icon: "revert", callback: kivi.requirement_spec.revert_to_versioned_copy_ajax_call,     disabled: kivi.requirement_spec.disable_versioned_copy_item_commands }
411 416
      }, general_actions)
412 417
    });
418

  
419
    var paste_template_actions = {
420
    };
413 421
  }                             // if (is_template) ... else ...
414 422

  
415 423
  var events = {
locale/de/all
19 19
  '#1 h'                        => '#1 h',
20 20
  '#1 of #2 importable objects were imported.' => '#1 von #2 importierbaren Objekten wurden importiert.',
21 21
  '#1 prices were updated.'     => '#1 Preise wurden aktualisiert.',
22
  '#1 section(s)'               => '#1 Abschnitt(e)',
23
  '#1 text block(s) back'       => '#1 Textlock/-blöcke vorne',
24
  '#1 text block(s) front'      => '#1 Textblock/-blöcke hinten',
22 25
  '%'                           => '%',
23 26
  '(recommended) Insert the used currencies in the system. You can simply change the name of the currencies by editing the textfields above. Do not use a name of a currency that is already in use.' => '(empfohlen) Fügen Sie die verwaisten Währungen in Ihr System ein. Sie können den Namen der Währung einfach ändern, indem Sie die Felder oben bearbeiten. Benutzen Sie keine Namen von Währungen, die Sie bereits benutzen.',
24 27
  '*/'                          => '*/',
......
771 774
  'Destination bin'             => 'Ziellagerplatz',
772 775
  'Destination warehouse'       => 'Ziellager',
773 776
  'Destination warehouse and bin' => 'Ziellager und -lagerplatz',
777
  'Detail view'                 => 'Detailanzeige',
774 778
  'Details (one letter abbreviation)' => 'D',
775 779
  'Difference'                  => 'Differenz',
776 780
  'Directory'                   => 'Verzeichnis',
......
1485 1489
  'No project type has been created yet.' => 'Es wurden noch keine Projekttypen angelegt.',
1486 1490
  'No report with id #1'        => 'Es gibt keinen Report mit der Id #1',
1487 1491
  'No requirement spec statuses has been created yet.' => 'Es wurden noch keine Pflichtenheftstatus angelegt.',
1492
  'No requirement spec templates have been created yet.' => 'Es wurden noch keine Pflichtenheftvorlangen angelegt.',
1488 1493
  'No requirement spec type has been created yet.' => 'Es wurden noch keine Pflichtenhefttypen angelegt.',
1489 1494
  'No risks level has been created yet.' => 'Es wurden noch keine Risikograde angelegt.',
1490 1495
  'No sections created yet'     => 'Keine Abschnitte erstellt',
......
1627 1632
  'Partsgroup (name)'           => 'Warengruppe (Name)',
1628 1633
  'Password'                    => 'Passwort',
1629 1634
  'Paste'                       => 'Einfügen',
1635
  'Paste template'              => 'Vorlage einfügen',
1630 1636
  'Payables'                    => 'Verbindlichkeiten',
1631 1637
  'Payment'                     => 'Zahlungsausgang',
1632 1638
  'Payment / Delivery Options'  => 'Zahlungs- und Lieferoptionen',
......
1987 1993
  'Select from one of the projects below' => 'Wählen Sie eines der untenstehenden Projekte',
1988 1994
  'Select postscript or PDF!'   => 'Postscript oder PDF auswählen!',
1989 1995
  'Select tax office...'        => 'Finanzamt auswählen...',
1996
  'Select template to paste'    => 'Einzufügende Vorlage auswählen',
1990 1997
  'Select type of removal'      => 'Grund der Entnahme auswählen',
1991 1998
  'Select type of transfer'     => 'Grund der Umlagerung auswählen',
1992 1999
  'Selected'                    => 'Ausgewählt',
......
2064 2071
  'Show overdue sales quotations and requests for quotations...' => 'Überfällige Angebote und Preisanfragen anzeigen...',
2065 2072
  'Show parts'                  => 'Artikel anzeigen',
2066 2073
  'Show requirement spec'       => 'Pflichtenheft anzeigen',
2074
  'Show requirement spec template' => 'Pflichtenheftvorlage anzeigen',
2067 2075
  'Show settings'               => 'Einstellungen anzeigen',
2068 2076
  'Show the picture in the part form' => 'Bild in Warenmaske anzeigen',
2069 2077
  'Show the pictures in the result for search parts' => 'Bilder in Suchergebnis für Stammdaten -> Berichte -> Waren anzeigen',
......
2684 2692
  'Weight'                      => 'Gewicht',
2685 2693
  'Weight unit'                 => 'Gewichtseinheit',
2686 2694
  'What <b>term</b> you are looking for?' => 'Nach welchem <b>Begriff</b> wollen Sie suchen?',
2695
  'What this template contains' => 'Was diese Vorlage enthält',
2687 2696
  'What type of item is this?'  => 'Was ist dieser Artikel?',
2688 2697
  'Which is located at doc/kivitendo-Dokumentation.pdf. Click here: ' => 'Diese befindet sich unter doc/kivitendo-Dokumentation.pdf. Klicken Sie hier:',
2689 2698
  'With Extension Of Time'      => 'mit Dauerfristverlängerung',
templates/webpages/requirement_spec/select_template_to_paste.html
1
[%- USE LxERP -%][%- USE HTML -%][%- USE L -%]
2
[%- BLOCK text_blocks %]
3
 [%- IF blocks.size %]
4
     <li>
5
      [%- title %]:
6
      <ol>
7
       [%- FOREACH block = blocks %]
8
        <li>[%- HTML.escape(block.title) %]</li>
9
       [%- END %]
10
      </ol>
11
     </li>
12
 [%- END %]
13
[%- END %]
14

  
15
<h1>[%- LxERP.t8("Select template to paste") %]</h1>
16

  
17
[%- IF !TEMPLATES.size %]
18
<p>[%- LxERP.t8("No requirement spec templates have been created yet.") %]</p>
19

  
20
<p><a href="#" onclick="$('#jqm_popup_dialog').jqmClose();">[%- LxERP.t8("Abort") %]</a></p>
21

  
22
[%- ELSE %]
23

  
24
<table>
25
 <tr class="listheading">
26
  <th>[%- LxERP.t8("Detail view") %]</th>
27
  <th>[%- LxERP.t8("Paste template") %]</th>
28
  <th>[%- LxERP.t8("Title") %]</th>
29
  <th>[%- LxERP.t8("Last modification") %]</th>
30
 </tr>
31

  
32
[%- FOREACH template = TEMPLATES %]
33
 <tr class="listrow[% loop.count % 2 %]">
34
  <td>
35
   <a href="#" onclick="$('#select-template-details-row-[% template.id %]').toggle(); $(this).find('span').toggle();">
36
    <span>[+]</span>
37
    <span style="display: none;">[-]</span>
38
   </a>
39
  </td>
40
  <td><a href="#" onclick="paste_selected_template([% template.id %]);">[%- LxERP.t8("Paste template") %]</a></td>
41
  <td>[%- HTML.escape(template.title) %]</td>
42
  <td>[% template.mtime ? template.mtime.to_kivitendo(precision='minute') : template.itime.to_kivitendo(precision='minute') %]</td>
43
 </tr>
44

  
45
 <tr class="listrow[% loop.count % 2 %]" style="display: none;" id="select-template-details-row-[% template.id %]">
46
  [% SET front    = template.text_blocks_sorted(output_position=0) %]
47
  [% SET sections = template.sections_sorted %]
48
  [% SET back     = template.text_blocks_sorted(output_position=1) %]
49
  <td colspan="4">
50
   [%- LxERP.t8("What this template contains") %]:<br>
51
   <ul>
52
    [% PROCESS text_blocks blocks=front title=LxERP.t8("#1 text block(s) front", front.size) %]
53

  
54
    [%- IF sections.size %]
55
    <li>[%- LxERP.t8("#1 section(s)", sections.size) %]:
56
     <ol>
57
      [%- FOREACH section = sections %]
58
       <li>[%- HTML.escape(section.fb_number) %]: [%- HTML.escape(section.title) %]</li>
59
      [%- END %]
60
     </ol>
61
    </li>
62
    [%- END %]
63

  
64
    [% PROCESS text_blocks blocks=back  title=LxERP.t8("#1 text block(s) back",  back.size)  %]
65
   </ul>
66
  </td>
67
 </tr>
68
[%- END %]
69
</table>
70

  
71
<p><a href="#" onclick="$('#jqm_popup_dialog').jqmClose();">[%- LxERP.t8("Abort") %]</a></p>
72
[%- END %]

Auch abrufbar als: Unified diff