Skip to content
Snippets Groups Projects
Commit e31c9d95 authored by srosse's avatar srosse
Browse files

FXOLAT-358: consolidate mail function (send mail controller -> mail package)

parent 23f20158
No related branches found
No related tags found
No related merge requests found
send.mail.title=Dateien per E-Mail versenden
send.mail.description=Sie können E-Mail mit Dokumenten versenden
send.mail.attachments=Anhang
send.mail.subject=Betreff
send.mail.body=Nachricht
send.mail.to=An
send.mail.to.auto=An
send.mail.to.auto.add=+
send.mail.noFileSelected=Sie haben keine Dateien ausgewählt.
send.mail.error=Achtung!!!
send.mail.selectionContainsFolder=Nur einzelne Dateien können versendet werden.
send.mail.fileToBigForAttachments={0}MB ist die maximale Grösse für Anhänge. E-Mail wird nur Links zu Dokumenten enthalten.
#Thu May 26 10:42:18 CEST 2011
send.mail.attachments=Attachment
send.mail.body=Message
send.mail.description=You can send e-mails with attachments
send.mail.error=Attention\!\!\!
send.mail.fileToBigForAttachments=The maximum size for mail attachments is {0}MB. The e-mail will contain links to the documents instead.
send.mail.noFileSelected=No document selected.
send.mail.selectionContainsFolder=You can send only single documents.
send.mail.subject=Subject
send.mail.title=Send files by e-mail
send.mail.to=To
send.mail.to.auto=To
send.mail.to.auto.add=+
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<bean id="sendDocumentByEMailControllerCreator" class="org.olat.core.gui.control.creator.AutoCreator" >
<property name="className" value="org.olat.commons.file.mail.SendDocumentsByEMailController"/>
</bean>
</beans>
\ No newline at end of file
...@@ -77,4 +77,16 @@ mail.action.unread=Nicht gelesen ...@@ -77,4 +77,16 @@ mail.action.unread=Nicht gelesen
mail.action.mark=Markieren mail.action.mark=Markieren
mail.action.unmark=Nicht markieren mail.action.unmark=Nicht markieren
mail.action.emtpy=Wählen Sie mindestens eine E-Mail aus um eine Aktion auszulösen. mail.action.emtpy=Wählen Sie mindestens eine E-Mail aus um eine Aktion auszulösen.
send.mail.title=Dateien per E-Mail versenden
send.mail.description=Sie können E-Mail mit Dokumenten versenden
send.mail.attachments=Anhang
send.mail.subject=Betreff
send.mail.body=Nachricht
send.mail.to=An
send.mail.to.auto=An
send.mail.to.auto.add=+
send.mail.noFileSelected=Sie haben keine Dateien ausgewählt.
send.mail.error=Achtung!!!
send.mail.selectionContainsFolder=Nur einzelne Dateien können versendet werden.
send.mail.fileToBigForAttachments={0}MB ist die maximale Grösse für Anhänge. E-Mail wird nur Links zu Dokumenten enthalten.
...@@ -76,3 +76,15 @@ mailtemplateform.sendMailSwitchElem=Send e-mail ...@@ -76,3 +76,15 @@ mailtemplateform.sendMailSwitchElem=Send e-mail
mailtemplateform.subject=Mail subject mailtemplateform.subject=Mail subject
menu.mail=E-mail menu.mail=E-mail
menu.mail.alt=E-mail system configuration menu.mail.alt=E-mail system configuration
send.mail.attachments=Attachment
send.mail.body=Message
send.mail.description=You can send e-mails with attachments
send.mail.error=Attention\!\!\!
send.mail.fileToBigForAttachments=The maximum size for mail attachments is {0}MB. The e-mail will contain links to the documents instead.
send.mail.noFileSelected=No document selected.
send.mail.selectionContainsFolder=You can send only single documents.
send.mail.subject=Subject
send.mail.title=Send files by e-mail
send.mail.to=To
send.mail.to.auto=To
send.mail.to.auto.add=+
\ No newline at end of file
...@@ -34,6 +34,10 @@ ...@@ -34,6 +34,10 @@
</property> </property>
</bean> </bean>
<bean id="sendDocumentByEMailControllerCreator" class="org.olat.core.gui.control.creator.AutoCreator" >
<property name="className" value="org.olat.core.util.mail.ui.SendDocumentsByEMailController"/>
</bean>
<!-- Mail admin. panel --> <!-- Mail admin. panel -->
<bean class="org.olat.core.extensions.action.GenericActionExtension" id="sysadmin.menupoint.syscfg.mailcfg" init-method="initExtensionPoints"> <bean class="org.olat.core.extensions.action.GenericActionExtension" id="sysadmin.menupoint.syscfg.mailcfg" init-method="initExtensionPoints">
<property name="actionController"> <property name="actionController">
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
* frentix GmbH, http://www.frentix.com * frentix GmbH, http://www.frentix.com
* <p> * <p>
*/ */
package org.olat.commons.file.mail; package org.olat.core.util.mail.ui;
import java.io.File; import java.io.File;
import java.text.DecimalFormat; import java.text.DecimalFormat;
...@@ -68,6 +68,7 @@ import org.olat.core.id.context.ContextEntry; ...@@ -68,6 +68,7 @@ import org.olat.core.id.context.ContextEntry;
import org.olat.core.util.StringHelper; import org.olat.core.util.StringHelper;
import org.olat.core.util.Util; import org.olat.core.util.Util;
import org.olat.core.util.mail.MailHelper; import org.olat.core.util.mail.MailHelper;
import org.olat.core.util.mail.MailModule;
import org.olat.core.util.mail.MailTemplate; import org.olat.core.util.mail.MailTemplate;
import org.olat.core.util.mail.MailerResult; import org.olat.core.util.mail.MailerResult;
import org.olat.core.util.mail.MailerWithTemplate; import org.olat.core.util.mail.MailerWithTemplate;
...@@ -103,7 +104,8 @@ public class SendDocumentsByEMailController extends FormBasicController implemen ...@@ -103,7 +104,8 @@ public class SendDocumentsByEMailController extends FormBasicController implemen
private static final int MAX_RESULTS_USERS = 12; private static final int MAX_RESULTS_USERS = 12;
public SendDocumentsByEMailController(UserRequest ureq, WindowControl wControl) { public SendDocumentsByEMailController(UserRequest ureq, WindowControl wControl) {
super(ureq, wControl, null, Util.createPackageTranslator(MetaInfoFormController.class, ureq.getLocale(), Util.createPackageTranslator(SendDocumentsByEMailController.class, ureq.getLocale()))); super(ureq, wControl, null, Util.createPackageTranslator(MetaInfoFormController.class, ureq.getLocale(), Util.createPackageTranslator(MailModule.class, ureq.getLocale())));
setBasePackage(MailModule.class);
securityManager = BaseSecurityManager.getInstance(); securityManager = BaseSecurityManager.getInstance();
allowAttachments = !FolderConfig.getSendDocumentLinkOnly(); allowAttachments = !FolderConfig.getSendDocumentLinkOnly();
...@@ -133,7 +135,7 @@ public class SendDocumentsByEMailController extends FormBasicController implemen ...@@ -133,7 +135,7 @@ public class SendDocumentsByEMailController extends FormBasicController implemen
bodyElement = uifactory.addTextAreaElement("tbody", "send.mail.body", -1, 20, emailCols, false, "", formLayout); bodyElement = uifactory.addTextAreaElement("tbody", "send.mail.body", -1, 20, emailCols, false, "", formLayout);
if(allowAttachments) { if(allowAttachments) {
String page = Util.getPackageVelocityRoot(SendDocumentsByEMailController.class) + "/attachments.html"; String page = Util.getPackageVelocityRoot(MailModule.class) + "/sendattachments.html";
attachmentsLayout = FormLayoutContainer.createCustomFormLayout("attachments", getTranslator(), page); attachmentsLayout = FormLayoutContainer.createCustomFormLayout("attachments", getTranslator(), page);
attachmentsLayout.setRootForm(mainForm); attachmentsLayout.setRootForm(mainForm);
attachmentsLayout.setLabel("send.mail.attachments", null); attachmentsLayout.setLabel("send.mail.attachments", null);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment