diff --git a/application/controllers/api/frontend/v1/stv/Config.php b/application/controllers/api/frontend/v1/stv/Config.php
index e06fbab06..832fe3559 100644
--- a/application/controllers/api/frontend/v1/stv/Config.php
+++ b/application/controllers/api/frontend/v1/stv/Config.php
@@ -245,6 +245,11 @@ class Config extends FHCAPI_Controller
]
];
+ $result['kontaktieren'] = [
+ 'title' => $this->p->t('stv', 'tab_kontaktieren'),
+ 'component' => './Stv/Studentenverwaltung/Details/Kontaktieren.js',
+ ];
+
Events::trigger('stv_conf_students', function & () use (&$result) {
return $result;
});
diff --git a/public/js/components/Stv/Studentenverwaltung/Details/Kontaktieren.js b/public/js/components/Stv/Studentenverwaltung/Details/Kontaktieren.js
new file mode 100644
index 000000000..bd7554a47
--- /dev/null
+++ b/public/js/components/Stv/Studentenverwaltung/Details/Kontaktieren.js
@@ -0,0 +1,101 @@
+export default {
+ name: "Kontaktieren",
+ computed: {
+ internMails() {
+ if (this.modelValue.mail_intern)
+ {
+ return [this.modelValue.mail_intern];
+ }
+ return this.modelValue.map(e => e.mail_intern);
+ },
+ privateMails()
+ {
+ if (this.modelValue.mail_privat)
+ {
+ return [this.modelValue.mail_privat];
+ }
+ return this.modelValue.map(e => e.mail_privat);
+ },
+ },
+ props: {
+ modelValue: Object
+ },
+
+ methods: {
+ async splitMails(mails, event) {
+ let splititem = ",";
+ let maillist = mails.join(splititem);
+ let mailto = "";
+
+ if (maillist.length > 2024)
+ {
+ if (await this.$fhcAlert.confirm({message: this.$p.t('stv', 'zuvieleEMails') }) === false)
+ return;
+ }
+
+ let firstrun = true;
+ let useBcc = event?.ctrlKey || event?.metaKey;
+ while (maillist.length > 0)
+ {
+ if (maillist.length > 2024)
+ {
+ let splitposition = maillist.lastIndexOf(splititem, 1900);
+ mailto = maillist.substring(0, splitposition);
+ maillist = maillist.substring(splitposition + 1);
+ }
+ else
+ {
+ mailto = maillist;
+ maillist = "";
+ }
+
+ let mailLink = useBcc ? `mailto:?bcc=${mailto}` : `mailto:${mailto}`;
+
+ if (firstrun)
+ {
+ window.location.href = mailLink;
+ firstrun = false;
+ }
+ else
+ {
+ if (await this.$fhcAlert.confirm({message: this.$p.t('stv', 'weitereEMail')}) === true)
+ {
+ window.location.href = mailLink;
+ }
+ }
+
+ }
+ },
+ internMail(event) {
+ if (this.internMails.length)
+ {
+ this.splitMails(this.internMails, event);
+ }
+ },
+ privateMail(event) {
+ if (this.privateMails.length)
+ {
+ this.splitMails(this.privateMails, event);
+ }
+ }
+ },
+ template: `
+
+
+
+
+
+
+
+
+
+
+
+
+
+
`
+};
\ No newline at end of file
diff --git a/system/phrasesupdate.php b/system/phrasesupdate.php
index 06c89c9e6..d6b8a9737 100644
--- a/system/phrasesupdate.php
+++ b/system/phrasesupdate.php
@@ -43318,6 +43318,126 @@ array(
)
)
),
+ array(
+ 'app' => 'core',
+ 'category' => 'stv',
+ 'phrase' => 'tab_kontaktieren',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => 'Kontaktieren',
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'Get in Contact',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
+ array(
+ 'app' => 'core',
+ 'category' => 'stv',
+ 'phrase' => 'internEMail',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => 'E-Mail senden (intern)',
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'Send email (internal)',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
+ array(
+ 'app' => 'core',
+ 'category' => 'stv',
+ 'phrase' => 'privateEMail',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => 'E-Mail senden (privat)',
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'Send email (private)',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
+ array(
+ 'app' => 'core',
+ 'category' => 'stv',
+ 'phrase' => 'bccEMail',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => 'STRG-Taste für BCC',
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'CTRL-Key for BCC',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
+ array(
+ 'app' => 'core',
+ 'category' => 'stv',
+ 'phrase' => 'weitereEMail',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => 'Ein weiteres Fenster wird geöffnet. Fortfahren?',
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'A new window will open. Continue?',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
+ array(
+ 'app' => 'core',
+ 'category' => 'stv',
+ 'phrase' => 'zuvieleEMails',
+ 'insertvon' => 'system',
+ 'phrases' => array(
+ array(
+ 'sprache' => 'German',
+ 'text' => 'Aufgrund der hohen Empfängerzahl muss die Nachricht auf mehrere E-Mails aufgeteilt werden.',
+ 'description' => '',
+ 'insertvon' => 'system'
+ ),
+ array(
+ 'sprache' => 'English',
+ 'text' => 'Due to the large number of recipients, the message needs to be split across multiple emails.',
+ 'description' => '',
+ 'insertvon' => 'system'
+ )
+ )
+ ),
array(
'app' => 'core',
'category' => 'abschlusspruefung',