Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 07948c34

Von Moritz Bunkus vor mehr als 16 Jahren hinzugefügt

  • ID 07948c344b0f699314c1b05b4e9c41b8babc3981
  • Vorgänger 2381f1e3
  • Nachfolger d33ad436

Trennung zwischen Dienstleistungs- und Wareneinheiten aufgehoben.

Unterschiede anzeigen:

bin/mozilla/am.pl
2586 2586

  
2587 2587
  $auth->assert('config');
2588 2588

  
2589
  $units = AM->retrieve_units(\%myconfig, $form, $form->{"unit_type"}, "resolved_");
2589
  $units = AM->retrieve_units(\%myconfig, $form, "resolved_");
2590 2590
  AM->units_in_use(\%myconfig, $form, $units);
2591 2591
  map({ $units->{$_}->{"BASE_UNIT_DDBOX"} = AM->unit_select_data($units, $units->{$_}->{"base_unit"}, 1); } keys(%{$units}));
2592 2592

  
......
2610 2610
    $i++;
2611 2611
  }
2612 2612

  
2613
  $units = AM->retrieve_units(\%myconfig, $form, $form->{"unit_type"});
2613
  $units = AM->retrieve_units(\%myconfig, $form);
2614 2614
  $ddbox = AM->unit_select_data($units, undef, 1);
2615 2615

  
2616
  my $updownlink = build_std_url("action=swap_units", "unit_type");
2616
  my $updownlink = build_std_url("action=swap_units");
2617 2617

  
2618
  $form->{"title"} = sprintf($locale->text("Add and edit %s"), $form->{"unit_type"} eq "dimension" ? $locale->text("dimension units") : $locale->text("service units"));
2618
  $form->{"title"} = $locale->text("Add and edit units");
2619 2619
  $form->header();
2620 2620
  print($form->parse_html_template("am/edit_units",
2621 2621
                                   { "UNITS"               => \@unit_list,
......
2632 2632
  $auth->assert('config');
2633 2633

  
2634 2634
  $form->isblank("new_name", $locale->text("The name is missing."));
2635
  $units = AM->retrieve_units(\%myconfig, $form, $form->{"unit_type"});
2635
  $units = AM->retrieve_units(\%myconfig, $form);
2636 2636
  $all_units = AM->retrieve_units(\%myconfig, $form);
2637 2637
  $form->show_generic_error($locale->text("A unit with this name does already exist.")) if ($all_units->{$form->{"new_name"}});
2638 2638

  
......
2655 2655
         });
2656 2656
  }
2657 2657

  
2658
  AM->add_unit(\%myconfig, $form, $form->{"new_name"}, $base_unit, $factor, $form->{"unit_type"}, \@languages);
2658
  AM->add_unit(\%myconfig, $form, $form->{"new_name"}, $base_unit, $factor, \@languages);
2659 2659

  
2660 2660
  $form->{"saved_message"} = $locale->text("The unit has been saved.");
2661 2661

  
......
2689 2689

  
2690 2690
  $auth->assert('config');
2691 2691

  
2692
  $old_units = AM->retrieve_units(\%myconfig, $form, $form->{"unit_type"}, "resolved_");
2692
  $old_units = AM->retrieve_units(\%myconfig, $form, "resolved_");
2693 2693
  AM->units_in_use(\%myconfig, $form, $old_units);
2694 2694

  
2695 2695
  @languages = AM->language(\%myconfig, $form, 1);
......
2755 2755
    }
2756 2756
  }
2757 2757

  
2758
  AM->save_units(\%myconfig, $form, $form->{"unit_type"}, $new_units, \@delete_units);
2758
  AM->save_units(\%myconfig, $form, $new_units, \@delete_units);
2759 2759

  
2760 2760
  $form->{"saved_message"} = $locale->text("The units have been saved.");
2761 2761

  
......
2885 2885
  $auth->assert('config');
2886 2886

  
2887 2887
  my $dir = $form->{"dir"} eq "down" ? "down" : "up";
2888
  my $unit_type = $form->{"unit_type"} eq "dimension" ?
2889
    "dimension" : "service";
2890
  AM->swap_units(\%myconfig, $form, $dir, $form->{"name"}, $unit_type);
2888
  AM->swap_units(\%myconfig, $form, $dir, $form->{"name"});
2891 2889

  
2892 2890
  edit_units();
2893 2891

  

Auch abrufbar als: Unified diff