Revision 21f24006
Von Moritz Bunkus vor fast 11 Jahren hinzugefügt
SL/Controller/RequirementSpecComplexity.pm | ||
---|---|---|
package SL::Controller::RequirementSpecComplexity;
|
||
|
||
use strict;
|
||
|
||
use parent qw(SL::Controller::Base);
|
||
|
||
use SL::DB::RequirementSpecComplexity;
|
||
use SL::DB::Language;
|
||
use SL::Helper::Flash;
|
||
use SL::Locale::String;
|
||
|
||
use Rose::Object::MakeMethods::Generic
|
||
(
|
||
scalar => [ qw(requirement_spec_complexity) ],
|
||
);
|
||
|
||
__PACKAGE__->run_before('check_auth');
|
||
__PACKAGE__->run_before('load_requirement_spec_complexity', only => [ qw(edit update destroy) ]);
|
||
|
||
#
|
||
# actions
|
||
#
|
||
|
||
sub action_list {
|
||
my ($self) = @_;
|
||
|
||
$self->render('requirement_spec_complexity/list',
|
||
title => t8('Complexities'),
|
||
REQUIREMENT_SPEC_COMPLEXITIES => SL::DB::Manager::RequirementSpecComplexity->get_all_sorted);
|
||
}
|
||
|
||
sub action_new {
|
||
my ($self) = @_;
|
||
|
||
$self->{requirement_spec_complexity} = SL::DB::RequirementSpecComplexity->new;
|
||
$self->render('requirement_spec_complexity/form', title => t8('Create a new complexity'));
|
||
}
|
||
|
||
sub action_edit {
|
||
my ($self) = @_;
|
||
$self->render('requirement_spec_complexity/form', title => t8('Edit complexity'));
|
||
}
|
||
|
||
sub action_create {
|
||
my ($self) = @_;
|
||
|
||
$self->{requirement_spec_complexity} = SL::DB::RequirementSpecComplexity->new;
|
||
$self->create_or_update;
|
||
}
|
||
|
||
sub action_update {
|
||
my ($self) = @_;
|
||
$self->create_or_update;
|
||
}
|
||
|
||
sub action_destroy {
|
||
my ($self) = @_;
|
||
|
||
if (eval { $self->{requirement_spec_complexity}->delete; 1; }) {
|
||
flash_later('info', t8('The complexity has been deleted.'));
|
||
} else {
|
||
flash_later('error', t8('The complexity is in use and cannot be deleted.'));
|
||
}
|
||
|
||
$self->redirect_to(action => 'list');
|
||
}
|
||
|
||
sub action_reorder {
|
||
my ($self) = @_;
|
||
|
||
SL::DB::RequirementSpecComplexity->reorder_list(@{ $::form->{requirement_spec_complexity_id} || [] });
|
||
|
||
$self->render('1;', { type => 'js', inline => 1 });
|
||
}
|
||
|
||
#
|
||
# filters
|
||
#
|
||
|
||
sub check_auth {
|
||
$::auth->assert('config');
|
||
}
|
||
|
||
#
|
||
# helpers
|
||
#
|
||
|
||
sub create_or_update {
|
||
my $self = shift;
|
||
my $is_new = !$self->{requirement_spec_complexity}->id;
|
||
my $params = delete($::form->{requirement_spec_complexity}) || { };
|
||
my $title = $is_new ? t8('Create a new complexity') : t8('Edit complexity');
|
||
|
||
$self->{requirement_spec_complexity}->assign_attributes(%{ $params });
|
||
|
||
my @errors = $self->{requirement_spec_complexity}->validate;
|
||
|
||
if (@errors) {
|
||
flash('error', @errors);
|
||
$self->render('requirement_spec_complexity/form', title => $title);
|
||
return;
|
||
}
|
||
|
||
$self->{requirement_spec_complexity}->save;
|
||
|
||
flash_later('info', $is_new ? t8('The complexity has been created.') : t8('The complexity has been saved.'));
|
||
$self->redirect_to(action => 'list');
|
||
}
|
||
|
||
sub load_requirement_spec_complexity {
|
||
my ($self) = @_;
|
||
$self->{requirement_spec_complexity} = SL::DB::RequirementSpecComplexity->new(id => $::form->{id})->load;
|
||
}
|
||
|
||
1;
|
SL/DB/RequirementSpecComplexity.pm | ||
---|---|---|
my ($self) = @_;
|
||
|
||
my @errors;
|
||
push @errors, t8('The description is missing.') if !$self->description;
|
||
push @errors, t8('The description is missing.') if !$self->description;
|
||
push @errors, t8('The description is not unique.') if $self->get_first_conflicting('description');
|
||
|
||
return @errors;
|
||
}
|
locale/de/all | ||
---|---|---|
'Create a new background job' => 'Einen neuen Hintergrund-Job anlegen',
|
||
'Create a new business' => 'Einen neuen Kunden-/Lieferantentyp erfassen',
|
||
'Create a new client' => 'Einen neuen Mandanten anlegen',
|
||
'Create a new complexity' => 'Einen Komplexitätsgrad anlegen',
|
||
'Create a new delivery term' => 'Neue Lieferbedingungen anlegen',
|
||
'Create a new department' => 'Eine neue Abteilung erfassen',
|
||
'Create a new group' => 'Neue Benutzergruppe erfassen',
|
||
... | ... | |
'Edit background job' => 'Hintergrund-Job bearbeiten',
|
||
'Edit bank account' => 'Bankkonto bearbeiten',
|
||
'Edit business' => 'Kunden-/Lieferantentyp bearbeiten',
|
||
'Edit complexity' => 'Komplexitätsgrad bearbeiten',
|
||
'Edit custom variable' => 'Benutzerdefinierte Variable bearbeiten',
|
||
'Edit delivery term' => 'Lieferbedingungen bearbeiten',
|
||
'Edit department' => 'Abteilung bearbeiten',
|
||
... | ... | |
'No bins have been added to this warehouse yet.' => 'Es wurden zu diesem Lager noch keine Lagerplätze angelegt.',
|
||
'No business has been created yet.' => 'Es wurden noch kein Kunden-/Lieferantentyp erfasst.',
|
||
'No clients have been created yet.' => 'Es wurden noch keine Mandanten angelegt.',
|
||
'No complexities has been created yet.' => 'Es wurden noch keine Komplexitätsgrade angelegt.',
|
||
'No contact selected to delete' => 'Keine Ansprechperson zum Löschen ausgewählt',
|
||
'No customer has been selected yet.' => 'Es wurde noch kein Kunde ausgewählt.',
|
||
'No data was found.' => 'Es wurden keine Daten gefunden.',
|
||
... | ... | |
'The columns "Dunning Duedate", "Total Fees" and "Interest" show data for the previous dunning created for this invoice.' => 'Die Spalten "Zahlbar bis", "Kumulierte Gebühren" und "Zinsen" zeigen Daten der letzten für diese Rechnung erzeugten Mahnung.',
|
||
'The combination of database host, port and name is not unique.' => 'Die Kombination aus Datenbankhost, -port und -name ist nicht eindeutig.',
|
||
'The command is missing.' => 'Der Befehl fehlt.',
|
||
'The complexity has been created.' => 'Der Komplexitätsgrad wurde angelegt.',
|
||
'The complexity has been deleted.' => 'Der Komplexitätsgrad wurde gelöscht.',
|
||
'The complexity has been saved.' => 'Der Komplexitätsgrad wurde gespeichert.',
|
||
'The complexity is in use and cannot be deleted.' => 'Der Komplexitätsgrad wird verwendet und kann nicht gelöscht werden.',
|
||
'The connection to the LDAP server cannot be encrypted (SSL/TLS startup failure). Please check config/kivitendo.conf.' => 'Die Verbindung zum LDAP-Server kann nicht verschlüsselt werden (Fehler bei SSL/TLS-Initialisierung). Bitte überprüfen Sie die Angaben in config/kivitendo.conf.',
|
||
'The connection to the authentication database failed:' => 'Die Verbindung zur Authentifizierungsdatenbank schlug fehl:',
|
||
'The connection to the configured client database "#1" on host "#2:#3" failed.' => 'Die Verbindung zur konfigurierten Datenbank "#1" auf Host "#2:#3" schlug fehl.',
|
templates/webpages/requirement_spec_complexity/form.html | ||
---|---|---|
[% USE HTML %][% USE L %][% USE LxERP %]
|
||
|
||
<form method="post" action="controller.pl">
|
||
<div class="listtop">[% FORM.title %]</div>
|
||
|
||
[%- INCLUDE 'common/flash.html' %]
|
||
|
||
<table>
|
||
<tr>
|
||
<td>[% LxERP.t8("Description") %]</td>
|
||
<td>[% L.input_tag("requirement_spec_complexity.description", SELF.requirement_spec_complexity.description) %]</td>
|
||
</tr>
|
||
</table>
|
||
|
||
<p>
|
||
[% L.hidden_tag("id", SELF.requirement_spec_complexity.id) %]
|
||
[% L.hidden_tag("action", "RequirementSpecComplexity/dispatch") %]
|
||
[% L.submit_tag("action_" _ (SELF.requirement_spec_complexity.id ? "update" : "create"), LxERP.t8('Save')) %]
|
||
[%- IF SELF.requirement_spec_complexity.id %]
|
||
[% L.submit_tag("action_destroy", LxERP.t8('Delete'), confirm=LxERP.t8('Do you really want to delete this object?')) %]
|
||
[%- END %]
|
||
<a href="[% SELF.url_for(action => 'list') %]">[%- LxERP.t8('Abort') %]</a>
|
||
</p>
|
||
</form>
|
templates/webpages/requirement_spec_complexity/list.html | ||
---|---|---|
[% USE HTML %][% USE L %][% USE LxERP %]
|
||
|
||
<div class="listtop">[% FORM.title %]</div>
|
||
|
||
[%- INCLUDE "common/flash.html" %]
|
||
|
||
<form method="post" action="controller.pl">
|
||
[% IF !REQUIREMENT_SPEC_COMPLEXITIES.size %]
|
||
<p>
|
||
[%- LxERP.t8("No complexities has been created yet.") %]
|
||
</p>
|
||
|
||
[%- ELSE %]
|
||
<table id="requirement_spec_complexity_list">
|
||
<thead>
|
||
<tr class="listheading">
|
||
<th align="center"><img src="image/updown.png" alt="[ LxERP.t8("reorder item") %]"></th>
|
||
<th>[%- LxERP.t8("Description") %]</th>
|
||
</tr>
|
||
</thead>
|
||
|
||
<tbody>
|
||
[%- FOREACH requirement_spec_complexity = REQUIREMENT_SPEC_COMPLEXITIES %]
|
||
<tr class="listrow[% loop.count % 2 %]" id="requirement_spec_complexity_id_[% requirement_spec_complexity.id %]">
|
||
<td align="center" class="dragdrop"><img src="image/updown.png" alt="[ LxERP.t8("reorder item") %]"></td>
|
||
<td>
|
||
<a href="[% SELF.url_for(action => "edit", id => requirement_spec_complexity.id) %]">
|
||
[%- HTML.escape(requirement_spec_complexity.description) %]
|
||
</a>
|
||
</td>
|
||
</tr>
|
||
[%- END %]
|
||
</tbody>
|
||
</table>
|
||
[%- END %]
|
||
|
||
<p>
|
||
<a href="[% SELF.url_for(action => "new") %]">[%- LxERP.t8("Create a new complexity") %]</a>
|
||
</p>
|
||
</form>
|
||
|
||
[% L.sortable_element("#requirement_spec_complexity_list tbody", url => "controller.pl?action=RequirementSpecComplexity/reorder", with => "requirement_spec_complexity_id") %]
|
templates/webpages/requirement_spec_status/form.html | ||
---|---|---|
|
||
<table>
|
||
<tr>
|
||
<td>[% LxERP.t8('Name') %]</sup></td>
|
||
<td>[% LxERP.t8('Name') %]</td>
|
||
<td>[% L.select_tag("requirement_spec_status.name", SELF.valid_names, default = SELF.requirement_spec_status.name) %]</td>
|
||
</tr>
|
||
|
Auch abrufbar als: Unified diff
Verwaltung von Pflichtenheftkomplexitätsgraden