diff --git a/src/EventHub.Admin.HttpApi.Host/EventHubAdminHttpApiHostModule.cs b/src/EventHub.Admin.HttpApi.Host/EventHubAdminHttpApiHostModule.cs index c93e3f6..335116c 100644 --- a/src/EventHub.Admin.HttpApi.Host/EventHubAdminHttpApiHostModule.cs +++ b/src/EventHub.Admin.HttpApi.Host/EventHubAdminHttpApiHostModule.cs @@ -6,7 +6,7 @@ using EventHub.Admin.Events; using EventHub.Admin.Organizations; using EventHub.Admin.Utils; using EventHub.EntityFrameworkCore; -using EventHub.Web; +using EventHub.Options; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Cors; diff --git a/src/EventHub.Admin.Web/Pages/EventManagement.razor b/src/EventHub.Admin.Web/Pages/EventManagement.razor index cf4371b..f739e21 100644 --- a/src/EventHub.Admin.Web/Pages/EventManagement.razor +++ b/src/EventHub.Admin.Web/Pages/EventManagement.razor @@ -2,7 +2,7 @@ @using EventHub.Admin.Events @using EventHub.Admin.Permissions @using EventHub.Events -@using EventHub.Web +@using EventHub.Options @using Microsoft.AspNetCore.Authorization @using Microsoft.Extensions.Options @inherits EventHubComponentBase diff --git a/src/EventHub.Admin.Web/Pages/OrganizationManagement.razor b/src/EventHub.Admin.Web/Pages/OrganizationManagement.razor index 47d1167..65cc909 100644 --- a/src/EventHub.Admin.Web/Pages/OrganizationManagement.razor +++ b/src/EventHub.Admin.Web/Pages/OrganizationManagement.razor @@ -1,8 +1,8 @@ @page "/organizations" @using EventHub.Admin.Organizations @using EventHub.Admin.Permissions +@using EventHub.Options @using EventHub.Organizations -@using EventHub.Web @using Microsoft.AspNetCore.Authorization @using Microsoft.Extensions.Options @using Volo.Abp.AspNetCore.Components.Notifications diff --git a/src/EventHub.Admin.Web/wwwroot/assets/Newsletter/img-01.png b/src/EventHub.Admin.Web/wwwroot/assets/Newsletter/img-01.png deleted file mode 100644 index f6416e3..0000000 Binary files a/src/EventHub.Admin.Web/wwwroot/assets/Newsletter/img-01.png and /dev/null differ diff --git a/src/EventHub.BackgroundServices/Events/EventReminderNotifier.cs b/src/EventHub.BackgroundServices/Events/EventReminderNotifier.cs index d2b3944..101c8fe 100644 --- a/src/EventHub.BackgroundServices/Events/EventReminderNotifier.cs +++ b/src/EventHub.BackgroundServices/Events/EventReminderNotifier.cs @@ -3,7 +3,9 @@ using System.Linq; using System.Threading.Tasks; using EventHub.Emailing; using EventHub.Events.Registrations; +using EventHub.Options; using EventHub.Users; +using Microsoft.Extensions.Options; using Volo.Abp.DependencyInjection; using Volo.Abp.Domain.Repositories; using Volo.Abp.Emailing; @@ -20,19 +22,22 @@ namespace EventHub.Events private readonly IRepository _userRepository; private readonly IRepository _eventRegistrationRepository; private readonly IAsyncQueryableExecuter _asyncExecuter; + private readonly EventHubUrlOptions _eventHubUrlOptions; public EventReminderNotifier( IEmailSender emailSender, ITemplateRenderer templateRenderer, IRepository userRepository, IRepository eventRegistrationRepository, - IAsyncQueryableExecuter asyncExecuter) + IAsyncQueryableExecuter asyncExecuter, + IOptions eventHubUrlOptions) { _emailSender = emailSender; _templateRenderer = templateRenderer; _userRepository = userRepository; _eventRegistrationRepository = eventRegistrationRepository; _asyncExecuter = asyncExecuter; + _eventHubUrlOptions = eventHubUrlOptions.Value; } public async Task NotifyAsync(Event @event) @@ -60,7 +65,10 @@ namespace EventHub.Events Title = @event.Title, StartTime = @event.StartTime, EndTime = @event.EndTime, - Url = @event.Url + Url = @event.Url, + Address = $"{@event.City}, {@event.CountryName}", + Description = @event.Description.TruncateWithPostfix(250, "..."), + ImageUrl = _eventHubUrlOptions.Api.EnsureEndsWith('/') + $"api/eventhub/event/cover-image/{@event.Id}" }; await _emailSender.QueueAsync( diff --git a/src/EventHub.Domain.Shared/EventHubDomainSharedModule.cs b/src/EventHub.Domain.Shared/EventHubDomainSharedModule.cs index 8994768..8f5b2d4 100644 --- a/src/EventHub.Domain.Shared/EventHubDomainSharedModule.cs +++ b/src/EventHub.Domain.Shared/EventHubDomainSharedModule.cs @@ -1,5 +1,5 @@ using EventHub.Localization; -using EventHub.Web; +using EventHub.Options; using Microsoft.Extensions.DependencyInjection; using Payment; using Volo.Abp.AuditLogging; diff --git a/src/EventHub.Domain.Shared/Web/EventHubUrlOptions.cs b/src/EventHub.Domain.Shared/Options/EventHubUrlOptions.cs similarity index 98% rename from src/EventHub.Domain.Shared/Web/EventHubUrlOptions.cs rename to src/EventHub.Domain.Shared/Options/EventHubUrlOptions.cs index 72037e6..be034a0 100644 --- a/src/EventHub.Domain.Shared/Web/EventHubUrlOptions.cs +++ b/src/EventHub.Domain.Shared/Options/EventHubUrlOptions.cs @@ -1,6 +1,6 @@ using Microsoft.Extensions.Configuration; -namespace EventHub.Web +namespace EventHub.Options { public class EventHubUrlOptions { diff --git a/src/EventHub.Domain/Emailing/EventHubEmailTemplateRenderingEngine.cs b/src/EventHub.Domain/Emailing/EventHubEmailTemplateRenderingEngine.cs index 443acd7..d49130f 100644 --- a/src/EventHub.Domain/Emailing/EventHubEmailTemplateRenderingEngine.cs +++ b/src/EventHub.Domain/Emailing/EventHubEmailTemplateRenderingEngine.cs @@ -1,7 +1,7 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; -using EventHub.Web; +using EventHub.Options; using JetBrains.Annotations; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Localization; diff --git a/src/EventHub.Domain/Emailing/Templates/EventReminder.tpl b/src/EventHub.Domain/Emailing/Templates/EventReminder.tpl index 0ed38fa..8c1e1e5 100644 --- a/src/EventHub.Domain/Emailing/Templates/EventReminder.tpl +++ b/src/EventHub.Domain/Emailing/Templates/EventReminder.tpl @@ -4,18 +4,16 @@ - -


-

DevTernity 2022 – The main developer conference

- 7 pm - 9 pm | Istanbul, Kadıköy -

DevTernity is the top 3 international software development conference.
- We focus on the core skills paramount to your success – coding, architecture, and leadership.
- 🚀 Start preparing for the role of a software architect, engineering leader, or CTO today.

+ +


+

{{model.title}}

+ {{model.start_time}} - {{model.end_time}} | {{model.address}} +

{{model.description}}

- E-Mail Button + Details diff --git a/src/EventHub.Domain/Emailing/Templates/Layout.tpl b/src/EventHub.Domain/Emailing/Templates/Layout.tpl index 2514806..bb7f9be 100644 --- a/src/EventHub.Domain/Emailing/Templates/Layout.tpl +++ b/src/EventHub.Domain/Emailing/Templates/Layout.tpl @@ -4,7 +4,7 @@ - EventHub Email + EventHub @@ -12,9 +12,9 @@ style="width:880px; max-width:680px; padding-top: 100px; padding-bottom: 100px;"> - + + + @@ -27,16 +27,14 @@ - - + - + @@ -49,24 +47,18 @@
- www.openeventhub.com - Copyright © 2002 Eventhub.com All rights reserved + www.openeventhub.com + Copyright © 2021 Eventhub.com All rights reserved - View - in browser - Unsubscribe + View in browser + Unsubscribe
- - \ No newline at end of file diff --git a/src/EventHub.HttpApi.Host/EventHubHttpApiHostModule.cs b/src/EventHub.HttpApi.Host/EventHubHttpApiHostModule.cs index 78ad9fa..46dd615 100644 --- a/src/EventHub.HttpApi.Host/EventHubHttpApiHostModule.cs +++ b/src/EventHub.HttpApi.Host/EventHubHttpApiHostModule.cs @@ -5,10 +5,10 @@ using System.IO; using System.Linq; using EventHub.EntityFrameworkCore; using EventHub.Events; +using EventHub.Options; using EventHub.Organizations; using EventHub.Organizations.Plans; using EventHub.Utils; -using EventHub.Web; using Microsoft.AspNetCore.Authentication.JwtBearer; using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Cors; diff --git a/src/EventHub.IdentityServer/EventHubIdentityServerModule.cs b/src/EventHub.IdentityServer/EventHubIdentityServerModule.cs index 0408175..9e345db 100644 --- a/src/EventHub.IdentityServer/EventHubIdentityServerModule.cs +++ b/src/EventHub.IdentityServer/EventHubIdentityServerModule.cs @@ -2,6 +2,7 @@ using System.IO; using System.Security.Cryptography.X509Certificates; using EventHub.EntityFrameworkCore; using EventHub.Localization; +using EventHub.Options; using EventHub.Utils; using EventHub.Web; using EventHub.Web.Theme; diff --git a/src/EventHub.Web.Theme/Themes/EventHub/Components/Footer/Default.cshtml b/src/EventHub.Web.Theme/Themes/EventHub/Components/Footer/Default.cshtml index 6603a88..9d52e16 100644 --- a/src/EventHub.Web.Theme/Themes/EventHub/Components/Footer/Default.cshtml +++ b/src/EventHub.Web.Theme/Themes/EventHub/Components/Footer/Default.cshtml @@ -3,6 +3,7 @@ @using Volo.Abp.Users @using EventHub.Web @using System.Net +@using EventHub.Options @inject ICurrentUser CurrentUser @inject IOptions UrlOptions diff --git a/src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/Default.cshtml b/src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/Default.cshtml index fa69bbe..4d32b6b 100644 --- a/src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/Default.cshtml +++ b/src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/Default.cshtml @@ -6,6 +6,7 @@ @using EventHub.Localization @using EventHub.Web @using System.Net +@using EventHub.Options @inject ICurrentUser CurrentUser @inject ILanguageProvider LanguageProvider @inject IStringLocalizer L diff --git a/src/EventHub.Web.Theme/Themes/EventHub/Layouts/Application.cshtml b/src/EventHub.Web.Theme/Themes/EventHub/Layouts/Application.cshtml index 44082b6..662f711 100644 --- a/src/EventHub.Web.Theme/Themes/EventHub/Layouts/Application.cshtml +++ b/src/EventHub.Web.Theme/Themes/EventHub/Layouts/Application.cshtml @@ -12,6 +12,7 @@ @using EventHub.Web.Theme.Themes.EventHub.Components.Footer @using EventHub.Web.Theme.Themes.EventHub.Components.MainNavbar @using EventHub.Web.Theme.Themes.EventHub.Components.PageAlerts +@using EventHub.Options @inject IBrandingProvider BrandingProvider @inject IPageLayout PageLayout @inject IOptions UrlOptions diff --git a/src/EventHub.Web/EventHubWebModule.cs b/src/EventHub.Web/EventHubWebModule.cs index 115168d..783ff57 100644 --- a/src/EventHub.Web/EventHubWebModule.cs +++ b/src/EventHub.Web/EventHubWebModule.cs @@ -1,6 +1,7 @@ using System; using System.IO; using EventHub.Localization; +using EventHub.Options; using EventHub.Web.Menus; using EventHub.Web.Theme; using EventHub.Web.Theme.Bundling; diff --git a/src/EventHub.Web/Menus/EventHubMenuContributor.cs b/src/EventHub.Web/Menus/EventHubMenuContributor.cs index 9368404..d97c898 100644 --- a/src/EventHub.Web/Menus/EventHubMenuContributor.cs +++ b/src/EventHub.Web/Menus/EventHubMenuContributor.cs @@ -1,6 +1,7 @@ using System; using System.Threading.Tasks; using EventHub.Localization; +using EventHub.Options; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Volo.Abp.Account.Localization; diff --git a/src/EventHub.Web/Pages/Events/Components/CreateOrEditEventArea/_eventSection.cshtml b/src/EventHub.Web/Pages/Events/Components/CreateOrEditEventArea/_eventSection.cshtml index 3aba351..dae929d 100644 --- a/src/EventHub.Web/Pages/Events/Components/CreateOrEditEventArea/_eventSection.cshtml +++ b/src/EventHub.Web/Pages/Events/Components/CreateOrEditEventArea/_eventSection.cshtml @@ -1,3 +1,4 @@ +@using EventHub.Options @using EventHub.Web @using EventHub.Web.Pages.Events.Components.CreateOrEditEventArea @using Microsoft.AspNetCore.Http diff --git a/src/EventHub.Web/Pages/Events/Components/CreateOrEditEventArea/_previewSection.cshtml b/src/EventHub.Web/Pages/Events/Components/CreateOrEditEventArea/_previewSection.cshtml index 18d55ab..aa1f517 100644 --- a/src/EventHub.Web/Pages/Events/Components/CreateOrEditEventArea/_previewSection.cshtml +++ b/src/EventHub.Web/Pages/Events/Components/CreateOrEditEventArea/_previewSection.cshtml @@ -1,3 +1,4 @@ +@using EventHub.Options @using EventHub.Web @using EventHub.Web.Pages.Events @using EventHub.Web.Pages.Events.Components.CreateOrEditEventArea diff --git a/src/EventHub.Web/Pages/Events/Components/EventsArea/_eventListSection.cshtml b/src/EventHub.Web/Pages/Events/Components/EventsArea/_eventListSection.cshtml index 3130791..287302b 100644 --- a/src/EventHub.Web/Pages/Events/Components/EventsArea/_eventListSection.cshtml +++ b/src/EventHub.Web/Pages/Events/Components/EventsArea/_eventListSection.cshtml @@ -1,3 +1,4 @@ +@using EventHub.Options @using EventHub.Web @using EventHub.Web.Pages.Events @using Microsoft.Extensions.Options diff --git a/src/EventHub.Web/Pages/Events/Detail.cshtml b/src/EventHub.Web/Pages/Events/Detail.cshtml index dfc0ebc..dde9558 100644 --- a/src/EventHub.Web/Pages/Events/Detail.cshtml +++ b/src/EventHub.Web/Pages/Events/Detail.cshtml @@ -6,6 +6,7 @@ @using EventHub.Web @using EventHub.Web.Pages.Events @using EventHub.Events +@using EventHub.Options @using EventHub.Web.Pages.Events.Components.AttendeesArea @using EventHub.Web.Pages.Events.Components.EventsArea @using EventHub.Web.Pages.Events.Components.LocationArea diff --git a/src/EventHub.Web/Pages/Index.cshtml b/src/EventHub.Web/Pages/Index.cshtml index 118aa4f..17e7483 100644 --- a/src/EventHub.Web/Pages/Index.cshtml +++ b/src/EventHub.Web/Pages/Index.cshtml @@ -1,6 +1,7 @@ @page @using System.Globalization @using EventHub.Localization +@using EventHub.Options @using EventHub.Web @using EventHub.Web.Pages.Events.Components.EventsArea @using Microsoft.AspNetCore.Mvc.Localization diff --git a/src/EventHub.Web/Pages/Organizations/Components/OrganizationsArea/_organizationListSection.cshtml b/src/EventHub.Web/Pages/Organizations/Components/OrganizationsArea/_organizationListSection.cshtml index 942abd3..df9f348 100644 --- a/src/EventHub.Web/Pages/Organizations/Components/OrganizationsArea/_organizationListSection.cshtml +++ b/src/EventHub.Web/Pages/Organizations/Components/OrganizationsArea/_organizationListSection.cshtml @@ -1,3 +1,4 @@ +@using EventHub.Options @using EventHub.Organizations @using EventHub.Web @using Microsoft.Extensions.Options diff --git a/src/EventHub.Web/Pages/Organizations/Edit.cshtml b/src/EventHub.Web/Pages/Organizations/Edit.cshtml index e5f91aa..212fbb9 100644 --- a/src/EventHub.Web/Pages/Organizations/Edit.cshtml +++ b/src/EventHub.Web/Pages/Organizations/Edit.cshtml @@ -1,6 +1,7 @@ @page "/organization/edit/{name}" @inject IHtmlLocalizer L @using EventHub.Localization +@using EventHub.Options @using EventHub.Organizations @using EventHub.Web @using Microsoft.AspNetCore.Mvc.Localization diff --git a/src/EventHub.Web/Pages/Organizations/Profile.cshtml b/src/EventHub.Web/Pages/Organizations/Profile.cshtml index 42b7466..0e8b350 100644 --- a/src/EventHub.Web/Pages/Organizations/Profile.cshtml +++ b/src/EventHub.Web/Pages/Organizations/Profile.cshtml @@ -1,6 +1,7 @@ @page "/organizations/{name}" @inject IHtmlLocalizer L @using EventHub.Localization +@using EventHub.Options @using EventHub.Organizations @using EventHub.Web @using EventHub.Web.Pages.Events.Components.EventsArea diff --git a/src/EventHub.Web/Pages/Payment/PostCheckout.cshtml b/src/EventHub.Web/Pages/Payment/PostCheckout.cshtml index 5bb0f2b..79a5e14 100644 --- a/src/EventHub.Web/Pages/Payment/PostCheckout.cshtml +++ b/src/EventHub.Web/Pages/Payment/PostCheckout.cshtml @@ -1,5 +1,6 @@ @page @inherits Payment.Web.Pages.PaymentPageBase +@using EventHub.Options @using EventHub.Web @using Microsoft.Extensions.Options @using Payment.PaymentRequests diff --git a/src/EventHub.Admin.Web/wwwroot/assets/Newsletter/facebook.png b/src/EventHub.Web/wwwroot/assets/email/facebook.png similarity index 100% rename from src/EventHub.Admin.Web/wwwroot/assets/Newsletter/facebook.png rename to src/EventHub.Web/wwwroot/assets/email/facebook.png diff --git a/src/EventHub.Admin.Web/wwwroot/assets/Newsletter/instagram.png b/src/EventHub.Web/wwwroot/assets/email/instagram.png similarity index 100% rename from src/EventHub.Admin.Web/wwwroot/assets/Newsletter/instagram.png rename to src/EventHub.Web/wwwroot/assets/email/instagram.png diff --git a/src/EventHub.Admin.Web/wwwroot/assets/Newsletter/twitter.png b/src/EventHub.Web/wwwroot/assets/email/twitter.png similarity index 100% rename from src/EventHub.Admin.Web/wwwroot/assets/Newsletter/twitter.png rename to src/EventHub.Web/wwwroot/assets/email/twitter.png