Revision ee264bd8
Von Tamino Steinert vor mehr als 1 Jahr hinzugefügt
SL/Controller/EmailJournal.pm | ||
---|---|---|
$additional_params{controller} = $RECORD_TYPE_TO_CONTROLLER{$record_action};
|
||
|
||
$self->redirect_to(
|
||
action => 'add',
|
||
email_journal_id => $email_journal_id,
|
||
attachment_id => $attachment_id,
|
||
action => 'add_from_email_journal',
|
||
from_id => $email_journal_id,
|
||
from_type => 'email_journal',
|
||
email_attachment_id => $attachment_id,
|
||
%additional_params,
|
||
);
|
||
}
|
SL/Controller/Order.pm | ||
---|---|---|
use SL::DB::Shipto;
|
||
use SL::DB::Translation;
|
||
use SL::DB::ValidityToken;
|
||
use SL::DB::EmailJournal;
|
||
use SL::DB::EmailJournalAttachment;
|
||
|
||
use SL::Helper::CreatePDF qw(:all);
|
||
use SL::Helper::PrintOptions;
|
||
... | ... | |
);
|
||
}
|
||
|
||
sub action_add_from_email_journal {
|
||
my ($self) = @_;
|
||
my $email_journal_id = $::form->{from_id};
|
||
my $email_attachment_id = $::form->{email_attachment_id};
|
||
|
||
$self->{converted_from_email_journal_id} = $email_journal_id;
|
||
$self->{email_attachment_id} = $email_attachment_id;
|
||
|
||
$self->action_add();
|
||
}
|
||
|
||
# edit an existing order
|
||
sub action_edit {
|
||
my ($self) = @_;
|
||
... | ... | |
}
|
||
}
|
||
}
|
||
if ($::form->{converted_from_email_journal_id}) {
|
||
my $email_journal_id = $::form->{converted_from_email_journal_id};
|
||
my $src = SL::DB::EmailJournal->new(id => $email_journal_id)->load;
|
||
$src->link_to_record($self->order);
|
||
$src->hard_link_to_record($self->order);
|
||
}
|
||
if ($::form->{email_attachment_id}) {
|
||
my $email_attachment_id = $::form->{email_attachment_id};
|
||
my $attachment = SL::DB::EmailJournalAttachment->new(id => $email_attachment_id)->load;
|
||
$attachment->add_file_to_record($self->order);
|
||
}
|
||
|
||
$self->set_project_in_linked_requirement_specs if $self->order->globalproject_id;
|
||
|
templates/design40_webpages/order/form.html | ||
---|---|---|
[% L.hidden_tag('id', SELF.order.id) %]
|
||
[% L.hidden_tag('converted_from_oe_id', SELF.converted_from_oe_id) %]
|
||
[% L.hidden_tag('converted_from_reclamation_id', SELF.converted_from_reclamation_id) %]
|
||
[% L.hidden_tag('converted_from_email_journal_id', SELF.converted_from_email_journal_id) %]
|
||
[% L.hidden_tag('email_attachment_id' , SELF.email_attachment_id) %]
|
||
|
||
[% IF !SELF.order.id %]
|
||
[% L.hidden_tag('form_validity_token', FORM.form_validity_token) %]
|
||
... | ... | |
|
||
<ul>
|
||
<li><a href="#ui-tabs-basic-data">[% 'Basic Data' | $T8 %]</a></li>
|
||
[% IF SELF.email_attachment_id %]
|
||
<li><a href="#ui-tabs-email-attachment-preview">[% 'Email Attachment Preview' | $T8 %]</a></li>
|
||
[% END %]
|
||
[% IF INSTANCE_CONF.get_webdav %]
|
||
<li><a href="#ui-tabs-webdav">[% 'WebDAV' | $T8 %]</a></li>
|
||
[% END %]
|
||
... | ... | |
cvars=SELF.order.custom_shipto.cvars_by_config
|
||
id_selector='#order_shipto_id' %]
|
||
</div>
|
||
[% IF SELF.email_attachment_id %]
|
||
<div id="ui-tabs-email-attachment-preview">
|
||
<div class="wrapper" id="email_attachment_wrapper">
|
||
[% P.email_journal.attachment_preview(
|
||
SELF.email_attachment_id,
|
||
style="border:1px solid black;margin:9px"
|
||
);
|
||
%]
|
||
</div><!-- /.wrapper -->
|
||
</div><!-- /#ui-tabs-attachment-preview -->
|
||
[% END %]
|
||
|
||
|
||
</div><!-- /.tabwidget -->
|
||
</form>
|
templates/design40_webpages/order/tabs/basic_data.html | ||
---|---|---|
<div id="ui-tabs-basic-data">
|
||
<!-- PENDENT: EXPERIMENTELL -->
|
||
|
||
[% IF SELF.email_attachment_id %]
|
||
<div class="wrapper" id="email_attachment_wrapper">
|
||
[%
|
||
BLOCK panel_1;
|
||
P.email_journal.attachment_preview(
|
||
SELF.email_attachment_id,
|
||
style="width:520px;border:1px solid black;margin:9px"
|
||
);
|
||
END;
|
||
INCLUDE 'common/toggle_panel.html'
|
||
block_name='panel_1'
|
||
button_closed = LxERP.t8('Show Attachment')
|
||
button_open = LxERP.t8('Hide Attachment')
|
||
;
|
||
%]
|
||
</div>
|
||
[% END %]
|
||
|
||
<div class="wrapper" id="wrapper-1">
|
||
[% INCLUDE 'generic/toggle_wrapper.html' %]
|
Auch abrufbar als: Unified diff
Workflow: E-Mail → Angebot/Auftrag