Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision c1551e49

Von Moritz Bunkus vor mehr als 3 Jahren hinzugefügt

  • ID c1551e49adc832aae84be606c74794679ebc1bec
  • Vorgänger 7608d92e
  • Nachfolger 9f3c46ff

Benutzerdef. Var. als HTML-Feld: Druckunterstützung

Unterschiede anzeigen:

SL/BackgroundJob/CreatePeriodicInvoices.pm
longdescription => 'html',
partnotes => 'html',
notes => 'html',
$::form->get_variable_content_types_for_cvars,
},
);
SL/Controller/Order.pm
longdescription => 'html',
partnotes => 'html',
notes => 'html',
$::form->get_variable_content_types_for_cvars,
},
);
1;
SL/DN.pm
longdescription => 'html',
partnotes => 'html',
notes => 'html',
$print_form->get_variable_content_types_for_cvars,
},
);
SL/Form.pm
use SL::DBUtils;
use SL::DB::AdditionalBillingAddress;
use SL::DB::Customer;
use SL::DB::CustomVariableConfig;
use SL::DB::Default;
use SL::DB::PaymentTerm;
use SL::DB::Vendor;
......
}
sub get_variable_content_types {
my ($self) = @_;
my %html_variables = (
longdescription => 'html',
partnotes => 'html',
......
header_text => 'html',
footer_text => 'html',
);
return \%html_variables;
return {
%html_variables,
$self->get_variable_content_types_for_cvars,
};
}
sub get_variable_content_types_for_cvars {
my ($self) = @_;
my $html_configs = SL::DB::Manager::CustomVariableConfig->get_all(where => [ type => 'htmlfield' ]);
my %types;
if (@{ $html_configs }) {
my %prefix_by_module = (
Contacts => 'cp_cvar_',
CT => 'vc_cvar_',
IC => 'ic_cvar_',
Projects => 'project_cvar_',
ShipTo => 'shiptocvar_',
);
foreach my $cfg (@{ $html_configs }) {
my $prefix = $prefix_by_module{$cfg->module};
$types{$prefix . $cfg->name} = 'html' if $prefix;
}
}
return %types;
}
sub current_date {
templates/print/marei/requirement_spec.tex
%\tableofcontents
%%%% Deaktiviertes Beispiel, wie benutzerdefinierte Variablen ausgegeben werden können: %%%%
%% \newpage
%%
%% \section{Benutzerdefinierte Variablen}
%%
%% %$ ( FOREACH cvar = rspec.cvars_by_config ) $
%% Name: $ ( KiviLatex.filter(cvar.config.name) ) $
%%
%% Wert:% $ ( IF cvar.config.type == 'htmlfield' ) $
%% $ ( KiviLatex.filter_html(cvar.value_as_text) ) $
%% % $ ( ELSE ) $
%% $ ( KiviLatex.filter(cvar.value_as_text) ) $
%% % $ ( END ) $
%%
%% %$ ( END ) $
%%%% ENDE Beispiel für benutzerdefinierte Variablen %%%%
%% Versionen
\newpage

Auch abrufbar als: Unified diff