Ejemplo n.º 1
0
        public override void Define(ITemplateDefinitionContext context)
        {
            context.Add(
                new TemplateDefinition(
                    TestTemplates.WelcomeEmail,
                    defaultCultureName: "en"
                    )
                );

            context.Add(
                new TemplateDefinition(
                    TestTemplates.ForgotPasswordEmail,
                    localizationResource: typeof(TestLocalizationSource),
                    layout: TestTemplates.TestTemplateLayout1
                    )
                );

            context.Add(
                new TemplateDefinition(
                    TestTemplates.TestTemplateLayout1,
                    isLayout: true
                    )
                );

            context.Add(
                new TemplateDefinition(
                    TestTemplates.ShowDecimalNumber,
                    localizationResource: typeof(TestLocalizationSource),
                    layout: TestTemplates.TestTemplateLayout1
                    )
                );
        }
Ejemplo n.º 2
0
        public override void Define(ITemplateDefinitionContext context)
        {
            context.Add(
                new TemplateDefinition(
                    Templates.WelcomeEmail,
                    typeof(TestLocalizationResource),
                    defaultCultureName: "en"
                    ).WithVirtualFilePath("/WelcomeEmail", false)
                );

            context.Add(
                new TemplateDefinition(
                    Templates.SayHelloEmail,
                    localizationResource: typeof(TestLocalizationResource),
                    layout: Templates.TestTemplateLayout
                    ).WithVirtualFilePath("/SayHelloEmail.tpl", true)
                );

            context.Add(
                new TemplateDefinition(
                    Templates.TestTemplateLayout,
                    typeof(TestLocalizationResource),
                    isLayout: true
                    ).WithVirtualFilePath("/TestTemplateLayout.tpl", true)
                );

            context.Add(
                new TemplateDefinition(
                    Templates.ShowDecimalNumber,
                    localizationResource: typeof(TestLocalizationResource),
                    layout: Templates.TestTemplateLayout
                    ).WithVirtualFilePath("/ShowDecimalNumber.tpl", true)
                );
        }
        public override void Define(ITemplateDefinitionContext context)
        {
            context.Add(
                new TemplateDefinition(
                    TestTemplates.WelcomeEmail,
                    defaultCultureName: "en"
                    ).WithVirtualFilePath("/SampleTemplates/WelcomeEmail", false)
                );

            context.Add(
                new TemplateDefinition(
                    TestTemplates.ForgotPasswordEmail,
                    localizationResource: typeof(TestLocalizationSource),
                    layout: TestTemplates.TestTemplateLayout1
                    ).WithVirtualFilePath("/SampleTemplates/ForgotPasswordEmail.tpl", true)
                );

            context.Add(
                new TemplateDefinition(
                    TestTemplates.TestTemplateLayout1,
                    isLayout: true
                    ).WithVirtualFilePath("/SampleTemplates/TestTemplateLayout1.tpl", true)
                );

            context.Add(
                new TemplateDefinition(
                    TestTemplates.ShowDecimalNumber,
                    localizationResource: typeof(TestLocalizationSource),
                    layout: TestTemplates.TestTemplateLayout1
                    ).WithVirtualFilePath("/SampleTemplates/ShowDecimalNumber.tpl", true)
                );
        }
        public override void Define(ITemplateDefinitionContext context)
        {
            context.Add(
                new TemplateDefinition("Hello")  //template name: "Hello"
                .WithVirtualFilePath(
                    "/Demos/Hello/Hello.cshtml", //template content path
                    isInlineLocalized: true
                    )
                );

            context.Add(
                new TemplateDefinition(
                    name: "PasswordReset",
                    localizationResource: typeof(DemoResource)
                    ).WithVirtualFilePath(
                    "/Demos/PasswordReset/PasswordReset.cshtml",     //template content path
                    isInlineLocalized: true
                    )
                );

            context.Add(
                new TemplateDefinition(
                    name: "WelcomeEmail",
                    defaultCultureName: "en",
                    layout: "EmailLayout"            //Set the LAYOUT
                    ).WithVirtualFilePath(
                    "/Demos/WelcomeEmail/Templates", //template content folder
                    isInlineLocalized: false
                    )
                );

            context.Add(
                new TemplateDefinition(
                    "EmailLayout",
                    isLayout: true
                    ).WithVirtualFilePath(
                    "/Demos/EmailLayout/EmailLayout.cshtml", //template content path
                    isInlineLocalized: true
                    )
                );

            context.Add(
                new TemplateDefinition("GlobalContextUsage")
                .WithVirtualFilePath(
                    "/Demos/GlobalContext/GlobalContextUsage.cshtml",
                    isInlineLocalized: true
                    )
                );
        }
        public override void Define(ITemplateDefinitionContext context)
        {
            context.Add(
                new TemplateDefinition("Welcome")
                .WithVirtualFilePath(
                    "/TextTemplating/Welcome.tpl",
                    isInlineLocalized: true
                    )
                );

            context.Add(
                new TemplateDefinition("Welcome2")
                .WithVirtualFilePath(
                    "/TextTemplating/Welcome2.tpl",
                    isInlineLocalized: true
                    )
                );
        }
    public override void Define(ITemplateDefinitionContext context)
    {
        context.Add(
            new TemplateDefinition(
                StandardEmailTemplates.Layout,
                displayName: LocalizableString.Create <EmailingResource>("TextTemplate:StandardEmailTemplates.Layout"),
                isLayout: true
                ).WithVirtualFilePath("/Volo/Abp/Emailing/Templates/Layout.tpl", true)
            );

        context.Add(
            new TemplateDefinition(
                StandardEmailTemplates.Message,
                displayName: LocalizableString.Create <EmailingResource>("TextTemplate:StandardEmailTemplates.Message"),
                layout: StandardEmailTemplates.Layout
                ).WithVirtualFilePath("/Volo/Abp/Emailing/Templates/Message.tpl", true)
            );
    }
        public override void Define(ITemplateDefinitionContext context)
        {
            context.Add(new TemplateDefinition(
                            EmailingTemplates.ResetPasswordLink,
                            layout: EmailingTemplates.Layout,
                            localizationResource: typeof(EmailingResource),
                            defaultCultureName: ScoringConsts.Localization.DefaultCulture
                            ).WithVirtualFilePath($"{ScoringConsts.VirtualFiles.RootPath}/Templates/ResetPasswordLink.tpl", true)
                        );

            context.Add(new TemplateDefinition(
                            EmailingTemplates.Layout,
                            isLayout: true,
                            localizationResource: typeof(EmailingResource),
                            defaultCultureName: ScoringConsts.Localization.DefaultCulture
                            ).WithVirtualFilePath($"{ScoringConsts.VirtualFiles.RootPath}/Templates/EmailLayout.tpl", true)
                        );
        }
Ejemplo n.º 8
0
        public override void Define(ITemplateDefinitionContext context)
        {
            context.Add(
                new TemplateDefinition("UserWelcomeEmailSubject")
                .WithVirtualFilePath(
                    "/EasyAbp/NotificationService/Provider/Mailing/UserWelcomeNotifications/UserWelcomeEmailSubject.tpl",
                    isInlineLocalized: true
                    )
                );

            context.Add(
                new TemplateDefinition("UserWelcomeEmailBody")
                .WithVirtualFilePath(
                    "/EasyAbp/NotificationService/Provider/Mailing/UserWelcomeNotifications/UserWelcomeEmailBody.tpl",
                    isInlineLocalized: true
                    )
                );
        }
Ejemplo n.º 9
0
 public override void Define(ITemplateDefinitionContext context)
 {
     context.Add(
         new TemplateDefinition(
             "TestTemplate",
             localizationResource: typeof(LockHeldResource)
             ).WithVirtualFilePath("/Templating/Emails/TestTemplate.tpl", true)
         );
 }
 public override void Define(ITemplateDefinitionContext context)
 {
     context.Add(
         new TemplateDefinition(EmailConsts.DefaultDefinitionName) //template name: "Hello"
         .WithVirtualFilePath(
             "/Volo/Abp/Emailing/Templates/Layout.tpl",            //template content path
             isInlineLocalized: true
             )
         );
 }
Ejemplo n.º 11
0
 public override void Define(ITemplateDefinitionContext context)
 {
     context.Add(
         new TemplateDefinition(
             ExceptionHandlingTemplates.SendEmail,
             displayName: LocalizableString.Create <ExceptionHandlingResource>("TextTemplate:ExceptionHandlingTemplates.SendEmail"),
             defaultCultureName: "en"
             ).WithVirtualFilePath("/LINGYUN/Abp/ExceptionHandling/Emailing/Templates/SendEmail", false)
         );
 }
 public override void Define(ITemplateDefinitionContext context)
 {
     context.Add(
         new TemplateDefinition(
             IdentityEmailTemplates.EmailConfirmed,
             displayName: LocalizableString.Create <IdentityResource>($"TextTemplate:{IdentityEmailTemplates.EmailConfirmed}"),
             layout: StandardEmailTemplates.Layout,
             localizationResource: typeof(IdentityResource)
             ).WithVirtualFilePath("/LINGYUN/Abp/IdentityServer4/Emailing/Templates/EmailConfirmed.tpl", true)
         );
 }
Ejemplo n.º 13
0
 public override void Define(ITemplateDefinitionContext context)
 {
     context.Add(
         new TemplateDefinition(
             AccountEmailTemplates.PasswordResetLink,
             displayName: LocalizableString.Create <AccountResource>($"TextTemplate:{AccountEmailTemplates.PasswordResetLink}"),
             layout: StandardEmailTemplates.Layout,
             localizationResource: typeof(AccountResource)
             ).WithVirtualFilePath("/Volo/Abp/Account/Emailing/Templates/PasswordResetLink.tpl", true)
         );
 }
Ejemplo n.º 14
0
        public override void Define(ITemplateDefinitionContext context)
        {
            context.Add(
                new TemplateDefinition(
                    "EmailLayout",
                    isLayout: true
                    ).WithVirtualFilePath(
                    "/EmailLayout/EmailLayout.tpl", //template content path
                    isInlineLocalized: true
                    )
                );

            context.Add(
                new TemplateDefinition(
                    name: "PasswordReset",
                    typeof(GenericTextTemplateResource),
                    defaultCultureName: "en",
                    layout: "EmailLayout"
                    ).WithVirtualFilePath(
                    "/PasswordReset/Templates",  //template content path
                    true
                    )
                );
        }
        public override void Define(ITemplateDefinitionContext context)
        {
            context.GetOrNull(TestTemplates.WelcomeEmail)?
            .WithVirtualFilePath("/SampleTemplates/WelcomeEmail", false);

            context.GetOrNull(TestTemplates.ForgotPasswordEmail)?
            .WithVirtualFilePath("/SampleTemplates/ForgotPasswordEmail.cshtml", true);

            context.GetOrNull(TestTemplates.TestTemplateLayout1)?
            .WithVirtualFilePath("/SampleTemplates/TestTemplateLayout1.cshtml", true);

            context.GetOrNull(TestTemplates.ShowDecimalNumber)?
            .WithVirtualFilePath("/SampleTemplates/ShowDecimalNumber.cshtml", true);

            context.Add(new TemplateDefinition(RazorTestTemplates.TestTemplate).WithVirtualFilePath("/SampleTemplates/TestTemplate.cshtml", true));
        }
Ejemplo n.º 16
0
        public override void Define(ITemplateDefinitionContext context)
        {
            context.Add(
                new TemplateDefinition(
                    TestTemplates.WelcomeEmail,
                    defaultCultureName: "en"
                    )
                );

            context.Add(
                new TemplateDefinition(
                    TestTemplates.ForgotPasswordEmail,
                    localizationResource: typeof(TestLocalizationSource),
                    layout: TestTemplates.TestTemplateLayout1
                    )
                );

            context.Add(
                new TemplateDefinition(
                    TestTemplates.TestTemplateLayout1,
                    isLayout: true
                    )
                );

            context.Add(
                new TemplateDefinition(
                    TestTemplates.ShowDecimalNumber,
                    localizationResource: typeof(TestLocalizationSource),
                    layout: TestTemplates.TestTemplateLayout1
                    )
                );

            context.Add(
                new TemplateDefinition(
                    TestTemplates.HybridTemplateScriban,
                    localizationResource: typeof(TestLocalizationSource),
                    layout: null
                    )
                .WithVirtualFilePath("/SampleTemplates/TestScribanTemplate.tpl", true)
                .WithScribanEngine()
                );

            context.Add(
                new TemplateDefinition(
                    TestTemplates.HybridTemplateRazor,
                    localizationResource: typeof(TestLocalizationSource),
                    layout: null
                    )
                .WithVirtualFilePath("/SampleTemplates/TestRazorTemplate.cshtml", true)
                .WithRazorEngine()
                );
        }
Ejemplo n.º 17
0
        public override void Define(ITemplateDefinitionContext context)
        {
            const string fallbackCultureName = "en";

            context.Add(
                new TemplateDefinition(
                    TemplateName.ConfirmNewPrimaryEmailHtml,
                    localizationResource: typeof(EmailResource),
                    defaultCultureName: CultureInfo.DefaultThreadCurrentCulture?.Name ?? fallbackCultureName,
                    layout: TemplateName.HtmlLayout)
                .WithVirtualFilePath(
                    "/Email/ConfirmNewPrimaryEmailHtml.tpl",     //template content path
                    isInlineLocalized: true
                    )
                );

            context.Add(
                new TemplateDefinition(
                    TemplateName.ConfirmNewPrimaryEmailTxt,
                    localizationResource: typeof(EmailResource),
                    defaultCultureName: CultureInfo.DefaultThreadCurrentCulture?.Name ?? fallbackCultureName)
                .WithVirtualFilePath(
                    "/Email/ConfirmNewPrimaryEmailTxt.tpl",     //template content path
                    isInlineLocalized: true
                    )
                );

            context.Add(
                new TemplateDefinition(
                    name: TemplateName.ConfirmTeamApplicationTxt,
                    localizationResource: typeof(EmailResource),
                    defaultCultureName: CultureInfo.DefaultThreadCurrentCulture?.Name ?? fallbackCultureName
                    ).WithVirtualFilePath(
                    "/Email/ConfirmTeamApplicationTxt.tpl", //template content path
                    isInlineLocalized: true
                    )
                );

            context.Add(
                new TemplateDefinition(
                    name: TemplateName.ContactFormTxt,
                    localizationResource: typeof(EmailResource),
                    defaultCultureName: CultureInfo.DefaultThreadCurrentCulture?.Name ?? fallbackCultureName
                    ).WithVirtualFilePath(
                    "/Email/ContactFormTxt.tpl", //template content folder
                    isInlineLocalized: true
                    )
                );

            context.Add(
                new TemplateDefinition(
                    TemplateName.PasswordResetHtml,
                    localizationResource: typeof(EmailResource),
                    defaultCultureName: CultureInfo.DefaultThreadCurrentCulture?.Name ?? fallbackCultureName,
                    layout: TemplateName.HtmlLayout)
                .WithVirtualFilePath(
                    "/Email/PasswordResetHtml.tpl",     //template content path
                    isInlineLocalized: true
                    )
                );

            context.Add(
                new TemplateDefinition(
                    TemplateName.PasswordResetTxt,
                    localizationResource: typeof(EmailResource),
                    defaultCultureName: CultureInfo.DefaultThreadCurrentCulture?.Name ?? fallbackCultureName)
                .WithVirtualFilePath(
                    "/Email/PasswordResetTxt.tpl",     //template content path
                    isInlineLocalized: true
                    )
                );

            context.Add(
                new TemplateDefinition(
                    TemplateName.PleaseConfirmEmailHtml,
                    localizationResource: typeof(EmailResource),
                    defaultCultureName: CultureInfo.DefaultThreadCurrentCulture?.Name ?? fallbackCultureName,
                    layout: TemplateName.HtmlLayout)
                .WithVirtualFilePath(
                    "/Email/PleaseConfirmEmailHtml.tpl",     //template content path
                    isInlineLocalized: true
                    )
                );

            context.Add(
                new TemplateDefinition(
                    TemplateName.PleaseConfirmEmailTxt,
                    localizationResource: typeof(EmailResource),
                    defaultCultureName: CultureInfo.DefaultThreadCurrentCulture?.Name ?? fallbackCultureName)
                .WithVirtualFilePath(
                    "/Email/PleaseConfirmEmailTxt.tpl",     //template content path
                    isInlineLocalized: true
                    )
                );

            context.Add(
                new TemplateDefinition(
                    name: TemplateName.ChangeFixtureTxt,
                    localizationResource: typeof(EmailResource),
                    defaultCultureName: CultureInfo.DefaultThreadCurrentCulture?.Name ?? fallbackCultureName
                    ).WithVirtualFilePath(
                    "/Email/ChangeFixtureTxt.tpl", //template content folder
                    isInlineLocalized: true
                    )
                );

            context.Add(
                new TemplateDefinition(
                    TemplateName.NotifyCurrentPrimaryEmailHtml,
                    localizationResource: typeof(EmailResource),
                    defaultCultureName: CultureInfo.DefaultThreadCurrentCulture?.Name ?? fallbackCultureName,
                    layout: TemplateName.HtmlLayout)
                .WithVirtualFilePath(
                    "/Email/NotifyCurrentPrimaryEmailHtml.tpl",     //template content path
                    isInlineLocalized: true
                    )
                );

            context.Add(
                new TemplateDefinition(
                    TemplateName.NotifyCurrentPrimaryEmailTxt,
                    localizationResource: typeof(EmailResource),
                    defaultCultureName: CultureInfo.DefaultThreadCurrentCulture?.Name ?? fallbackCultureName)
                .WithVirtualFilePath(
                    "/Email/NotifyCurrentPrimaryEmailTxt.tpl",     //template content path
                    isInlineLocalized: true
                    )
                );

            context.Add(
                new TemplateDefinition(
                    name: TemplateName.ResultEnteredTxt,
                    localizationResource: typeof(EmailResource),
                    defaultCultureName: CultureInfo.DefaultThreadCurrentCulture?.Name ?? fallbackCultureName
                    ).WithVirtualFilePath(
                    "/Email/ResultEnteredTxt.tpl", //template content folder
                    isInlineLocalized: true
                    )
                );

            context.Add(
                new TemplateDefinition(
                    name: TemplateName.AnnounceNextMatchTxt,
                    localizationResource: null,
                    defaultCultureName: CultureInfo.DefaultThreadCurrentCulture?.Name ?? fallbackCultureName
                    ).WithVirtualFilePath(
                    "/Email/AnnounceNextMatchTxt", //template content folder
                    isInlineLocalized: false
                    )
                );

            context.Add(
                new TemplateDefinition(
                    name: TemplateName.RemindMatchResultTxt,
                    localizationResource: null,
                    defaultCultureName: CultureInfo.DefaultThreadCurrentCulture?.Name ?? fallbackCultureName
                    ).WithVirtualFilePath(
                    "/Email/RemindMatchResultTxt", //template content folder
                    isInlineLocalized: false
                    )
                );

            context.Add(
                new TemplateDefinition(
                    name: TemplateName.UrgeMatchResultTxt,
                    localizationResource: null,
                    defaultCultureName: CultureInfo.DefaultThreadCurrentCulture?.Name ?? fallbackCultureName
                    ).WithVirtualFilePath(
                    "/Email/UrgeMatchResultTxt", //template content folder
                    isInlineLocalized: false
                    )
                );

            context.Add(
                new TemplateDefinition(
                    TemplateName.HtmlLayout,
                    isLayout: true
                    ).WithVirtualFilePath(
                    "/Email/HtmlLayout.tpl", //template content path
                    isInlineLocalized: true
                    )
                );
        }