Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e8b07984

Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt

  • ID e8b07984052b974e46a84a2a4a8a4d3fd10e797a
  • Vorgänger 2160ce2b
  • Nachfolger bdf33d88

Pflichtenheft-Grundeinstellungen erst read/only anzeigen, nicht direkt als Maske

Unterschiede anzeigen:

SL/Controller/RequirementSpec.pm
86 86
  $self->render('requirement_spec/new', title => $self->requirement_spec->is_template ? t8('Create a new requirement spec template') : t8('Create a new requirement spec'));
87 87
}
88 88

  
89
sub action_ajax_show_basic_settings {
90
  my ($self) = @_;
91

  
92
  $self->render('requirement_spec/_show_basic_settings', { layout => 0 });
93
}
94

  
89 95
sub action_ajax_edit {
90 96
  my ($self) = @_;
91 97

  
92
  $self->render('requirement_spec/_form', { layout => 0 }, submit_as => 'ajax');
98
  my $html   = $self->render('requirement_spec/_form', { output => 0 }, submit_as => 'ajax');
99

  
100
  $self->js
101
    ->hide('#basic_settings')
102
    ->after('#basic_settings', $html)
103
    ->render($self);
93 104
}
94 105

  
95 106
sub action_ajax_show_time_and_cost_estimate {
......
346 357
  my $info = $self->requirement_spec->is_template ? t8('The requirement spec template has been saved.') : t8('The requirement spec has been saved.');
347 358

  
348 359
  if ($::request->is_ajax) {
349
    my $html = $self->render('requirement_spec/_header', { output => 0 });
360
    my $header_html = $self->render('requirement_spec/_header', { output => 0 });
361
    my $basics_html = $self->render('requirement_spec/_show_basic_settings', { output => 0 });
350 362
    return $self->invalidate_version
351
      ->replaceWith('#requirement-spec-header', $html)
363
      ->replaceWith('#requirement-spec-header', $header_html)
364
      ->replaceWith('#basic_settings',          $basics_html)
365
      ->remove('#basic_settings_form')
352 366
      ->flash('info', $info)
353 367
      ->render($self);
354 368
  }
js/locale/de.js
44 44
"The name must only consist of letters, numbers and underscores and start with a letter.":"Der Name darf nur aus Buchstaben (keine Umlaute), Ziffern und Unterstrichen bestehen und muss mit einem Buchstaben beginnen.",
45 45
"The option field is empty.":"Das Optionsfeld ist leer.",
46 46
"The selected database is still configured for client \"#1\". If you delete the database that client will stop working until you re-configure it. Do you still want to delete the database?":"Die auswählte Datenbank ist noch für Mandant \"#1\" konfiguriert. Wenn Sie die Datenbank löschen, wird der Mandanten nicht mehr funktionieren, bis er anders konfiguriert wurde. Wollen Sie die Datenbank trotzdem löschen?",
47
"There is one or more sections for which no part has been assigned yet; therefore creating the new record is not possible yet.":"Es gibt einen oder mehrere Abschnitte ohne Artikelzuweisung; daher kann der neue Beleg noch nicht erstellt werden.",
47 48
"Time/cost estimate actions":"Aktionen für Kosten-/Zeitabschätzung",
48 49
"Toggle marker":"Markierung umschalten",
49 50
"Update":"Erneuern",
js/requirement_spec.js
302 302
  return true;
303 303
};
304 304

  
305
// -------------------------------------------------------------------------
306
// ---------------------------- basic settings -----------------------------
307
// -------------------------------------------------------------------------
308
ns.standard_basic_settings_ajax_call = function(key, opt) {
309
  if (key == 'cancel') {
310
    if (confirm(kivi.t8('Do you really want to cancel?'))) {
311
      $('#basic_settings').show();
312
      $('#basic_settings_form').remove();
313
    }
314
    return true;
315
  }
316

  
317
  var data = 'action=RequirementSpec/ajax_' + key + '&id=' + encodeURIComponent($('#requirement_spec_id').val());
318

  
319
  $.post("controller.pl", data, kivi.eval_json_result);
320

  
321
  return true;
322
};
323

  
305 324
// -------------------------------------------------------------------------
306 325
// -------------------------- time/cost estimate ---------------------------
307 326
// -------------------------------------------------------------------------
......
525 544
    }, general_actions)
526 545
  });
527 546

  
547
  $.contextMenu({
548
    selector: '.basic-settings-context-menu',
549
    items:    $.extend({
550
        heading: { name: kivi.t8('Basic settings actions'), className: 'context-menu-heading' }
551
      , edit:    { name: kivi.t8('Edit'), icon: "edit", callback: kivi.requirement_spec.standard_basic_settings_ajax_call }
552
    }, general_actions)
553
  });
554

  
555
  $.contextMenu({
556
    selector: '.edit-basic-settings-context-menu',
557
    items:    $.extend({
558
        heading: { name: kivi.t8('Basic settings actions'), className: 'context-menu-heading' }
559
      , save:    { name: kivi.t8('Save'),   icon: "save",  callback: kivi.requirement_spec.standard_basic_settings_ajax_call }
560
      , cancel:  { name: kivi.t8('Cancel'), icon: "close", callback: kivi.requirement_spec.standard_basic_settings_ajax_call }
561
    }, general_actions)
562
  });
563

  
528 564
  $.contextMenu({
529 565
    selector: '.time-cost-estimate-context-menu',
530 566
    items:    $.extend({
locale/de/all
313 313
  'Bank transfers via SEPA'     => 'Überweisungen via SEPA',
314 314
  'Base unit'                   => 'Basiseinheit',
315 315
  'Basic Data'                  => 'Basisdaten',
316
  'Basic Settings for the Requirement Spec' => 'Grundeinstellungen des Pflichtenheftes',
317
  'Basic Settings for the Requirement Spec Template' => 'Grundeinstellungen der Pflichtenheftvorlage',
316 318
  'Basic settings'              => 'Grundeinstellungen',
317 319
  'Batch Printing'              => 'Druck',
318 320
  'Bcc'                         => 'Bcc',
templates/webpages/requirement_spec/_form.html
2 2
[%- DEFAULT id_prefix = 'basic_settings_form'
3 3
            submit_as = 'post'
4 4
%]
5
<form method="post" action="controller.pl" id="[% id_prefix %]">
5
<form method="post" action="controller.pl" id="[% id_prefix %]"[% UNLESS submit_as == 'post' %] class="edit-basic-settings-context-menu"[% END %]>
6 6
 [% L.hidden_tag("id", SELF.requirement_spec.id, id=id_prefix _ '_id') %]
7 7
 [% L.hidden_tag("requirement_spec.is_template", SELF.requirement_spec.is_template, id=id_prefix _ '_is_template') %]
8 8

  
templates/webpages/requirement_spec/_show_basic_settings.html
1
[%- USE HTML -%][%- USE LxERP -%]
2
<div id="basic_settings" class="basic-settings-context-menu">
3
 <table>
4
  <tr class="listheading">
5
   <th colspan="2">
6
    [% IF SELF.requirement_spec.is_template %]
7
     [% LxERP.t8("Basic Settings for the Requirement Spec Template") %]
8
    [% ELSE %]
9
     [% LxERP.t8("Basic Settings for the Requirement Spec") %]
10
    [% END %]
11
   </th>
12
  </tr>
13

  
14
  <tr class="listrow">
15
   <td>[% LxERP.t8("Title") %]:</td>
16
   <td>[% HTML.escape(SELF.requirement_spec.title) %]</td>
17
  </tr>
18

  
19
[%- UNLESS SELF.requirement_spec.is_template %]
20

  
21
  <tr class="listrow">
22
   <td>[% LxERP.t8("Requirement Spec Type") %]:</td>
23
   <td>[% HTML.escape(SELF.requirement_spec.type.description) %]</td>
24
  </tr>
25

  
26
  <tr class="listrow">
27
   <td>[% LxERP.t8("Requirement Spec Status") %]:</td>
28
   <td>[% HTML.escape(SELF.requirement_spec.status.description) %]</td>
29
  </tr>
30

  
31
  <tr class="listrow">
32
   <td>[% LxERP.t8("Customer") %]:</td>
33
   <td>[% HTML.escape(SELF.requirement_spec.customer.name) %]</td>
34
  </tr>
35

  
36
  <tr class="listrow">
37
   <td>[% LxERP.t8("Hourly Rate") %]:</td>
38
   <td>[% HTML.escape(SELF.requirement_spec.hourly_rate_as_number) %]</td>
39
  </tr>
40

  
41
[%- END %]
42

  
43
 </table>
44
</div>
templates/webpages/requirement_spec/show.html
9 9
<div class="tabwidget">
10 10
 <ul>
11 11
  <li><a href="#function-blocks-tab">[%- LxERP.t8("Content") %]</a></li>
12
  <li><a href="controller.pl?action=RequirementSpec/ajax_edit&id=[% HTML.url(SELF.requirement_spec.id) %]">[%- LxERP.t8("Basic settings") %]</a></li>
12
  <li><a href="controller.pl?action=RequirementSpec/ajax_show_basic_settings&id=[% HTML.url(SELF.requirement_spec.id) %]">[%- LxERP.t8("Basic settings") %]</a></li>
13 13
  <li><a href="controller.pl?action=RequirementSpec/ajax_show_time_and_cost_estimate&id=[% HTML.url(SELF.requirement_spec.id) %]">[%- LxERP.t8("Time and cost estimate") %]</a></li>
14 14
  [%- UNLESS SELF.requirement_spec.is_template %]
15 15
   <li><a href="controller.pl?action=RequirementSpecVersion/list&requirement_spec_id=[% HTML.url(SELF.requirement_spec.id) %]">[%- LxERP.t8("Versions") %]</a></li>

Auch abrufbar als: Unified diff