Browse Source

Merge pull request #68 from volosoft/berkan/fix-minor-problems

fix minor problems and enhance UX
pull/74/merge
Halil İbrahim Kalkan 5 years ago
committed by GitHub
parent
commit
8a3cf446f0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 37
      delete-bin-obj-folders.js
  2. 8
      etc/azure/deploy-to-k8s.yml
  3. 3
      etc/k8s/README.md
  4. 2
      src/EventHub.Admin.Application.Contracts/Organizations/UpdateOrganizationDto.cs
  5. 6
      src/EventHub.Admin.HttpApi.Host/Controllers/Events/EventController.cs
  6. 7
      src/EventHub.Admin.HttpApi.Host/Controllers/Organizations/OrganizationController.cs
  7. 2
      src/EventHub.Admin.HttpApi.Host/Dockerfile
  8. 6
      src/EventHub.Admin.HttpApi.Host/EventHub.Admin.HttpApi.Host.csproj
  9. 5
      src/EventHub.Admin.Web/Components/UserPicker/UserPicker.razor
  10. 2
      src/EventHub.Admin.Web/Dockerfile
  11. 4
      src/EventHub.Admin.Web/EventHub.Admin.Web.csproj
  12. 3
      src/EventHub.Admin.Web/Pages/AttendeeDetail.razor
  13. 3
      src/EventHub.Admin.Web/Pages/EventManagement.razor
  14. 6
      src/EventHub.Admin.Web/Pages/EventManagement.razor.cs
  15. 3
      src/EventHub.Admin.Web/Pages/OrganizationManagement.razor
  16. 7
      src/EventHub.Admin.Web/Pages/OrganizationManagement.razor.cs
  17. 1
      src/EventHub.Admin.Web/Pages/OrganizationMembershipManagement.razor
  18. 2
      src/EventHub.Admin.Web/wwwroot/global.css
  19. 2
      src/EventHub.Admin.Web/wwwroot/global.js
  20. 5
      src/EventHub.Admin.Web/wwwroot/main.css
  21. 2
      src/EventHub.Application.Contracts/Organizations/IOrganizationAppService.cs
  22. 12
      src/EventHub.Application.Contracts/Organizations/OrganizationDto.cs
  23. 3
      src/EventHub.Application/EventHubApplicationAutoMapperProfile.cs
  24. 4
      src/EventHub.Application/Organizations/OrganizationAppService.cs
  25. 2
      src/EventHub.BackgroundServices/Dockerfile
  26. 4
      src/EventHub.BackgroundServices/EventHub.BackgroundServices.csproj
  27. 2
      src/EventHub.DbMigrator/Dockerfile
  28. 2
      src/EventHub.DbMigrator/EventHub.DbMigrator.csproj
  29. 2
      src/EventHub.Domain.Shared/EventHub.Domain.Shared.csproj
  30. 2
      src/EventHub.Domain/EventHub.Domain.csproj
  31. 10
      src/EventHub.Domain/Events/EventUrlHelper.cs
  32. 2
      src/EventHub.Domain/Organizations/OrganizationManager.cs
  33. 6
      src/EventHub.EntityFrameworkCore/EventHub.EntityFrameworkCore.csproj
  34. 4
      src/EventHub.HttpApi.Host/Controllers/Organizations/OrganizationController.cs
  35. 2
      src/EventHub.HttpApi.Host/Dockerfile
  36. 6
      src/EventHub.HttpApi.Host/EventHub.HttpApi.Host.csproj
  37. 2
      src/EventHub.IdentityServer/Dockerfile
  38. 4
      src/EventHub.IdentityServer/EventHub.IdentityServer.csproj
  39. 35
      src/EventHub.IdentityServer/Pages/Account/LoggedOut.cshtml
  40. 14
      src/EventHub.IdentityServer/Pages/Account/LoggedOut.css
  41. 2
      src/EventHub.Web.Theme/EventHub.Web.Theme.csproj
  42. 36
      src/EventHub.Web.Theme/Themes/EventHub/Components/Footer/Default.cshtml
  43. 18
      src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/Default.cshtml
  44. 4
      src/EventHub.Web.Theme/Themes/EventHub/Layouts/Account.cshtml
  45. 4
      src/EventHub.Web.Theme/Themes/EventHub/Layouts/Application.cshtml
  46. 4
      src/EventHub.Web.Theme/Themes/EventHub/Layouts/Empty.cshtml
  47. 8
      src/EventHub.Web.Theme/wwwroot/themes/eventhub/owl-edit.css
  48. 556
      src/EventHub.Web.Theme/wwwroot/themes/eventhub/style.css
  49. 2
      src/EventHub.Web/Dockerfile
  50. 2
      src/EventHub.Web/EventHub.Web.csproj
  51. 5
      src/EventHub.Web/Pages/Events/Edit.cshtml
  52. 3
      src/EventHub.Web/Pages/Events/Edit.cshtml.cs
  53. 4
      src/EventHub.Web/Pages/Events/Edit.js
  54. 7
      src/EventHub.Web/Pages/Events/New.cshtml
  55. 3
      src/EventHub.Web/Pages/Events/New.cshtml.cs
  56. 4
      src/EventHub.Web/Pages/Events/New.js
  57. 202
      src/EventHub.Web/Pages/Index.cshtml
  58. 54
      src/EventHub.Web/Pages/Index.js
  59. 2
      src/EventHub.Web/Pages/Organizations/Components/OrganizationsArea/_organizationListSection.cshtml
  60. 7
      src/EventHub.Web/Pages/Organizations/Edit.cshtml
  61. 2
      src/EventHub.Web/Pages/Organizations/Edit.cshtml.cs
  62. 2
      src/EventHub.Web/Pages/Organizations/New.cshtml
  63. 7
      src/EventHub.Web/Pages/Organizations/New.cshtml.cs
  64. 4
      src/EventHub.Web/Pages/Organizations/Profile.cshtml
  65. 2
      src/EventHub.Web/Pages/TermsService.cshtml
  66. 15
      src/EventHub.Web/Pages/User.cshtml

37
delete-bin-obj-folders.js

@ -0,0 +1,37 @@
const { resolve } = require("path");
const { readdir, rmdir } = require("fs").promises;
async function* removeFolder(dir) {
await rmdir(dir, { recursive: true });
yield dir;
}
async function* getBinObj(dir) {
const dirents = await readdir(dir, { withFileTypes: true });
for (const dirent of dirents) {
if (!dirent.isDirectory()) continue;
const name = dirent.name;
if (name === "node_modules") continue;
const res = resolve(dir, dirent.name);
if (name === "bin" || name === "obj") {
yield* removeFolder(res);
continue;
}
yield* getBinObj(res);
}
}
(async () => {
console.log("\x1b[36m%s\x1b[0m", "Deleting all BIN and OBJ folders...");
for await (const dir of getBinObj(".")) {
console.log("\x1b[33m%s\x1b[0m", `Removed: ${dir}`);
}
console.log("\x1b[36m%s\x1b[0m", "All BIN and OBJ folders are deleted.");
})();

8
etc/azure/deploy-to-k8s.yml

@ -8,9 +8,13 @@ pool:
steps:
- task: UseDotNet@2
displayName: 'Use .NET sdk'
inputs:
packageType: 'sdk'
useGlobalJson: true
packageType: sdk
version: 6.0.x
installationPath: $(Agent.ToolsDirectory)/dotnet
includePreviewVersions: true
- task: PowerShell@2
displayName: Build docker images
inputs:

3
etc/k8s/README.md

@ -6,7 +6,7 @@
### How to run?
* Add entries to the hosts file (in Windows: `C:\Windows\System32\drivers\etc\hosts`):
* Add entries to the hosts file (in Windows: `C:\Windows\System32\drivers\etc\hosts`, in MacOs: `/etc/hosts`):
````
127.0.0.1 eh-st-account
@ -17,6 +17,7 @@
````
* Run `build-images.ps1` in the `scripts` directory.
* Run `minikube-load-images.ps1` in the `scripts` directory(only for `minikube`).
* Run `deploy-staging.ps1` in the `helm-chart` directory. It is deployed with the `eventhub` namespace.
* *You may wait ~30 seconds on first run for preparing the database*.
* Browse https://eh-st-www and https://eh-st-admin

2
src/EventHub.Admin.Application.Contracts/Organizations/UpdateOrganizationDto.cs

@ -16,7 +16,7 @@ namespace EventHub.Admin.Organizations
public string Description { get; set; }
[CanBeNull]
public RemoteStreamContent ProfilePictureStreamContent { get; set; }
public IRemoteStreamContent ProfilePictureStreamContent { get; set; }
[CanBeNull]
[StringLength(OrganizationConsts.MaxWebsiteLength)]

6
src/EventHub.Admin.HttpApi.Host/Controllers/Events/EventController.cs

@ -2,14 +2,12 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using EventHub.Admin.Events;
using EventHub.Events;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Content;
using Volo.Abp.VirtualFileSystem;
namespace EventHub.Admin.Controllers.Events
{
@ -21,12 +19,10 @@ namespace EventHub.Admin.Controllers.Events
public class EventController : AbpController, IEventAppService
{
private readonly IEventAppService _eventAppService;
private readonly IVirtualFileProvider _virtualFileProvider;
public EventController(IEventAppService eventAppService, IVirtualFileProvider virtualFileProvider)
public EventController(IEventAppService eventAppService)
{
_eventAppService = eventAppService;
_virtualFileProvider = virtualFileProvider;
}
[HttpGet("{id}")]

7
src/EventHub.Admin.HttpApi.Host/Controllers/Organizations/OrganizationController.cs

@ -1,15 +1,12 @@
using System;
using System.IO;
using System.Threading.Tasks;
using EventHub.Admin.Organizations;
using EventHub.Organizations;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Content;
using Volo.Abp.VirtualFileSystem;
namespace EventHub.Admin.Controllers.Organizations
{
@ -21,12 +18,10 @@ namespace EventHub.Admin.Controllers.Organizations
public class OrganizationController : AbpController, IOrganizationAppService
{
private readonly IOrganizationAppService _organizationAppService;
private readonly IVirtualFileProvider _virtualFileProvider;
public OrganizationController(IOrganizationAppService organizationAppService, IVirtualFileProvider virtualFileProvider)
public OrganizationController(IOrganizationAppService organizationAppService)
{
_organizationAppService = organizationAppService;
_virtualFileProvider = virtualFileProvider;
}
[HttpGet]

2
src/EventHub.Admin.HttpApi.Host/Dockerfile

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0
FROM mcr.microsoft.com/dotnet/aspnet:6.0.0-rc.1-bullseye-slim
COPY bin/Release/net6.0/publish/ app/
WORKDIR /app
ENTRYPOINT ["dotnet", "EventHub.Admin.HttpApi.Host.dll"]

6
src/EventHub.Admin.HttpApi.Host/EventHub.Admin.HttpApi.Host.csproj

@ -12,9 +12,9 @@
<ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="3.2.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.0-rc.*" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="6.0.0-rc.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0-rc.*" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.0-rc.1.*" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="6.0.0-rc.1.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0-rc.1.*" />
<PackageReference Include="Volo.Abp.Autofac" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="5.0.0-beta.1" />

5
src/EventHub.Admin.Web/Components/UserPicker/UserPicker.razor

@ -3,7 +3,7 @@
@inject IUserAppService UserAppService
<Modal @ref="@UserPickerModal" Closing="@ClosingUserPickerModal">
<ModalContent Centered="true">
<ModalContent Centered="true" size="@ModalSize.Large">
<ModalHeader>
<ModalTitle>@L["AddUser"]</ModalTitle>
<CloseButton Clicked="CloseUserPickerModalAsync" />
@ -23,8 +23,7 @@
ReadData="OnDataGridReadAsync"
TotalItems="TotalCount"
ShowPager="true"
PageSize="PageSize"
Responsive="true">
PageSize="PageSize">
<DataGridColumns>
<DataGridColumn Sortable="false" TItem="UserDto" Field="@nameof(UserDto.Id)">
<CaptionTemplate>

2
src/EventHub.Admin.Web/Dockerfile

@ -1,3 +1,3 @@
FROM nginx:latest
COPY ./bin/Release/net5.0/publish/wwwroot/ /usr/share/nginx/html/
COPY ./bin/Release/net6.0/publish/wwwroot/ /usr/share/nginx/html/
COPY ./nginx.conf /etc/nginx/conf.d/default.conf

4
src/EventHub.Admin.Web/EventHub.Admin.Web.csproj

@ -12,8 +12,8 @@
<ItemGroup>
<PackageReference Include="Blazorise.Bootstrap" Version="0.9.4.1" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="0.9.4.1" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.0-rc.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.0-rc.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.0-rc.1.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.0-rc.1.*" />
</ItemGroup>
<ItemGroup>

3
src/EventHub.Admin.Web/Pages/AttendeeDetail.razor

@ -28,8 +28,7 @@
ReadData="OnDataGridReadAsync"
TotalItems="TotalCount"
ShowPager="true"
PageSize="PageSize"
Responsive="true">
PageSize="PageSize">
<DataGridColumns>
<DataGridEntityActionsColumn TItem="EventAttendeeDto">
<DisplayTemplate>

3
src/EventHub.Admin.Web/Pages/EventManagement.razor

@ -64,8 +64,7 @@
ReadData="OnDataGridReadAsync"
TotalItems="TotalCount"
ShowPager="true"
PageSize="PageSize"
Responsive="true">
PageSize="PageSize">
<DataGridColumns>
<DataGridEntityActionsColumn TItem="EventInListDto">
<DisplayTemplate>

6
src/EventHub.Admin.Web/Pages/EventManagement.razor.cs

@ -159,7 +159,7 @@ namespace EventHub.Admin.Web.Pages
await FileEntry.WriteToStreamAsync(stream);
stream.Seek(0, SeekOrigin.Begin);
EditingEvent.CoverImageStreamContent = new RemoteStreamContent(stream, fileName: FileEntry.Name, contentType: FileEntry.Type);
EditingEvent.CoverImageStreamContent = new RemoteStreamContent(stream);
void SetCoverImageUrl(string contentType, byte[] content)
{
@ -173,7 +173,9 @@ namespace EventHub.Admin.Web.Pages
DisabledCoverImageButton = false;
}
SetCoverImageUrl(FileEntry.Type, stream.ToArray());
SetCoverImageUrl(EditingEvent.CoverImageStreamContent.ContentType, stream.ToArray());
await stream.FlushAsync();
await InvokeAsync(StateHasChanged);
}

3
src/EventHub.Admin.Web/Pages/OrganizationManagement.razor

@ -61,8 +61,7 @@
ReadData="OnDataGridReadAsync"
TotalItems="TotalCount"
ShowPager="true"
PageSize="PageSize"
Responsive="true">
PageSize="PageSize">
<DataGridColumns>
<DataGridEntityActionsColumn TItem="OrganizationInListDto">
<DisplayTemplate>

7
src/EventHub.Admin.Web/Pages/OrganizationManagement.razor.cs

@ -121,8 +121,7 @@ namespace EventHub.Admin.Web.Pages
var stream = new MemoryStream();
await FileEntry.WriteToStreamAsync(stream);
stream.Seek(0, SeekOrigin.Begin);
EditingOrganization.ProfilePictureStreamContent = new RemoteStreamContent(stream, fileName: FileEntry.Name, contentType: FileEntry.Type);
EditingOrganization.ProfilePictureStreamContent = new RemoteStreamContent(stream);
void SetProfileImageUrl(string contentType, byte[] content)
{
@ -135,7 +134,9 @@ namespace EventHub.Admin.Web.Pages
}
}
SetProfileImageUrl(FileEntry.Type, stream.ToArray());
SetProfileImageUrl(EditingOrganization.ProfilePictureStreamContent.ContentType, stream.ToArray());
await stream.FlushAsync();
await InvokeAsync(StateHasChanged);
}

1
src/EventHub.Admin.Web/Pages/OrganizationMembershipManagement.razor

@ -46,7 +46,6 @@
TotalItems="TotalCount"
ShowPager="true"
PageSize="PageSize"
Responsive="true"
Sortable="false">
<DataGridColumns>
<DataGridColumn TItem="OrganizationMemberDto"

2
src/EventHub.Admin.Web/wwwroot/global.css

File diff suppressed because one or more lines are too long

2
src/EventHub.Admin.Web/wwwroot/global.js

File diff suppressed because one or more lines are too long

5
src/EventHub.Admin.Web/wwwroot/main.css

@ -1,4 +1,5 @@
.spinner {
/* Global styles for the EventHub application */
.spinner {
width: 40px;
height: 40px;
display: block;
@ -45,4 +46,4 @@
transform: scale(1.0);
-webkit-transform: scale(1.0);
}
}
}

2
src/EventHub.Application.Contracts/Organizations/IOrganizationAppService.cs

@ -8,7 +8,7 @@ namespace EventHub.Organizations
{
public interface IOrganizationAppService : IApplicationService
{
Task CreateAsync(CreateOrganizationDto input);
Task<OrganizationDto> CreateAsync(CreateOrganizationDto input);
Task<PagedResultDto<OrganizationInListDto>> GetListAsync(OrganizationListFilterDto input);

12
src/EventHub.Application.Contracts/Organizations/OrganizationDto.cs

@ -0,0 +1,12 @@
using System;
using Volo.Abp.Application.Dtos;
namespace EventHub.Organizations
{
public class OrganizationDto : EntityDto<Guid>
{
public string Name { get; set; }
public string DisplayName { get; set; }
}
}

3
src/EventHub.Application/EventHubApplicationAutoMapperProfile.cs

@ -17,7 +17,8 @@ namespace EventHub
{
CreateMap<Organization, OrganizationInListDto>();
CreateMap<Organization, OrganizationProfileDto>();
CreateMap<Organization, OrganizationDto>();
CreateMap<IdentityUser, OrganizationMemberDto>();
CreateMap<Event, EventDto>();

4
src/EventHub.Application/Organizations/OrganizationAppService.cs

@ -38,7 +38,7 @@ namespace EventHub.Organizations
}
[Authorize]
public async Task CreateAsync(CreateOrganizationDto input)
public async Task<OrganizationDto> CreateAsync(CreateOrganizationDto input)
{
var organization = await _organizationManager.CreateAsync(
CurrentUser.GetId(),
@ -60,6 +60,8 @@ namespace EventHub.Organizations
{
await SaveProfilePictureAsync(organization.Id, input.ProfilePictureStreamContent);
}
return ObjectMapper.Map<Organization, OrganizationDto>(organization);
}
public async Task<PagedResultDto<OrganizationInListDto>> GetListAsync(OrganizationListFilterDto input)

2
src/EventHub.BackgroundServices/Dockerfile

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0
FROM mcr.microsoft.com/dotnet/aspnet:6.0.0-rc.1-bullseye-slim
COPY bin/Release/net6.0/ app/
WORKDIR /app
ENTRYPOINT ["dotnet", "EventHub.BackgroundServices.dll"]

4
src/EventHub.BackgroundServices/EventHub.BackgroundServices.csproj

@ -20,12 +20,12 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0-rc.*" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0-rc.1.*" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="3.1.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="6.0.0-rc.*" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="6.0.0-rc.1.*" />
</ItemGroup>
<ItemGroup>

2
src/EventHub.DbMigrator/Dockerfile

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0
FROM mcr.microsoft.com/dotnet/aspnet:6.0.0-rc.1-bullseye-slim
COPY bin/Release/net6.0/ app/
WORKDIR /app
ENTRYPOINT ["dotnet", "EventHub.DbMigrator.dll"]

2
src/EventHub.DbMigrator/EventHub.DbMigrator.csproj

@ -23,7 +23,7 @@
<PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0-rc.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0-rc.1.*" />
</ItemGroup>
<ItemGroup>

2
src/EventHub.Domain.Shared/EventHub.Domain.Shared.csproj

@ -24,7 +24,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.0-rc.*" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.0-rc.1.*" />
</ItemGroup>
</Project>

2
src/EventHub.Domain/EventHub.Domain.csproj

@ -30,7 +30,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.0-rc.*" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.0-rc.1.*" />
</ItemGroup>
</Project>

10
src/EventHub.Domain/Events/EventUrlHelper.cs

@ -5,21 +5,27 @@ namespace EventHub.Events
{
internal static class EventUrlHelper
{
private static string AllowedUrlChars = "abcdefghijklmnopqrstuvwxyz0123456789";
private static string AllowedUrlChars = "abcdefghijklmnopqrstuvwxyz0123456789-";
public static string ConvertTitleToUrlPart(string title)
{
var normalizedTitle = title
.Trim()
.Replace(' ', '-')
.ToKebabCase()
.ToLowerInvariant();
var urlPartBuilder = new StringBuilder();
char previousChar = ' ';
foreach (var c in normalizedTitle)
{
if (AllowedUrlChars.Contains(c))
{
if (previousChar == '-' && c == '-')
{
continue;
}
urlPartBuilder.Append(c);
}
@ -27,6 +33,8 @@ namespace EventHub.Events
{
break;
}
previousChar = c;
}
return urlPartBuilder.ToString();

2
src/EventHub.Domain/Organizations/OrganizationManager.cs

@ -21,6 +21,8 @@ namespace EventHub.Organizations
string displayName,
string description)
{
name = name.Trim().Replace(' ', '-').ToKebabCase().ToLowerInvariant();;
if (await _organizationRepository.AnyAsync(o => o.Name == name))
{
throw new BusinessException(EventHubErrorCodes.OrganizationNameAlreadyExists)

6
src/EventHub.EntityFrameworkCore/EventHub.EntityFrameworkCore.csproj

@ -8,14 +8,14 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0-rc.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="6.0.0-rc.1.*" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.BlobStoring.Database.EntityFrameworkCore" Version="5.0.0-beta.1" />
<ProjectReference Include="..\EventHub.Domain\EventHub.Domain.csproj" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.PostgreSql" Version="5.0.0-beta.1" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.0-rc.*" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.PostgreSql" Version="5.0.0-beta.1" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="6.0.0-rc.*" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.Identity.EntityFrameworkCore" Version="5.0.0-beta.1" />

4
src/EventHub.HttpApi.Host/Controllers/Organizations/OrganizationController.cs

@ -28,9 +28,9 @@ namespace EventHub.Controllers.Organizations
}
[HttpPost]
public async Task CreateAsync([FromForm] CreateOrganizationDto input)
public async Task<OrganizationDto> CreateAsync([FromForm] CreateOrganizationDto input)
{
await _organizationAppService.CreateAsync(input);
return await _organizationAppService.CreateAsync(input);
}
[HttpGet]

2
src/EventHub.HttpApi.Host/Dockerfile

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0
FROM mcr.microsoft.com/dotnet/aspnet:6.0.0-rc.1-bullseye-slim
COPY bin/Release/net6.0/publish/ app/
WORKDIR /app
ENTRYPOINT ["dotnet", "EventHub.HttpApi.Host.dll"]

6
src/EventHub.HttpApi.Host/EventHub.HttpApi.Host.csproj

@ -12,9 +12,9 @@
<ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="3.2.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.0-rc.*" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="6.0.0-rc.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0-rc.*" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.0-rc.1.*" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="6.0.0-rc.1.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0-rc.1.*" />
<PackageReference Include="Volo.Abp.Autofac" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" Version="5.0.0-beta.1" />
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="5.0.0-beta.1" />

2
src/EventHub.IdentityServer/Dockerfile

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0
FROM mcr.microsoft.com/dotnet/aspnet:6.0.0-rc.1-bullseye-slim
COPY bin/Release/net6.0/publish/ app/
WORKDIR /app
ENTRYPOINT ["dotnet", "EventHub.IdentityServer.dll"]

4
src/EventHub.IdentityServer/EventHub.IdentityServer.csproj

@ -37,8 +37,8 @@
<ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="3.2.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="6.0.0-rc.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0-rc.*" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="6.0.0-rc.1.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0-rc.1.*" />
</ItemGroup>
<ItemGroup>

35
src/EventHub.IdentityServer/Pages/Account/LoggedOut.cshtml

@ -0,0 +1,35 @@
page "/Account/LoggedOut"
@model Volo.Abp.Account.Web.Pages.Account.LoggedOutModel
@using Volo.Abp.Account.Localization
@using Microsoft.AspNetCore.Mvc.Localization
@using Volo.Abp.Account.Web.Pages.Account
@using Volo.Abp.AspNetCore.Mvc.UI.Theming
@inject IThemeManager ThemeManager
@inject IHtmlLocalizer<AccountResource> L
@{
Layout = ThemeManager.CurrentTheme.GetApplicationLayout();
}
@section scripts {
<abp-script-bundle name="@typeof(LoggedOutModel).FullName">
<abp-script src="/Pages/Account/LoggedOut.js" />
</abp-script-bundle>
}
@section styles {
<abp-style src="/Pages/Account/LoggedOut.css" />
}
<abp-card class="loggedOutCard">
<abp-card-body>
<abp-card-title>@L["LoggedOutTitle"]</abp-card-title>
<abp-card-text>@L["LoggedOutText"]</abp-card-text>
@if (Model.PostLogoutRedirectUri != null)
{
<a abp-button="Primary" id="redirectButton" href="@Model.PostLogoutRedirectUri" cname="@Model.ClientName">@L["ReturnToText"]</a>
}
@if (Model.SignOutIframeUrl != null)
{
<iframe class="signout logoutiframe" src="@Model.SignOutIframeUrl"></iframe>
}
</abp-card-body>
</abp-card>

14
src/EventHub.IdentityServer/Pages/Account/LoggedOut.css

@ -0,0 +1,14 @@
.logoutiframe {
display: none;
width: 0;
height: 0;
}
.loggedOutCard {
max-width: 64rem;
position: absolute;
top: 50%;
left: 50%;
margin-right: -50%;
transform: translate(-50%, -50%)
}

2
src/EventHub.Web.Theme/EventHub.Web.Theme.csproj

@ -35,7 +35,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.0-rc.*" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.0-rc.1.*" />
</ItemGroup>
</Project>

36
src/EventHub.Web.Theme/Themes/EventHub/Components/Footer/Default.cshtml

@ -13,7 +13,7 @@
EventHub
</a>
</div>
<div class="col-md">
@if (!CurrentUser.IsAuthenticated)
{
@ -45,23 +45,23 @@
</div>
</div>
</div>
</footer>
<footer class="footer-bottom">
<div class="container">
<div class="row">
<div class="col-md-auto">
<span class="copyright">© 2021 EventHub</span>
</div>
<div class="col-md text-center text-md-right">
<a href="@UrlOptions.Value.Www/terms-service">
Terms of Service
</a>
<span>
<img src="/assets/seperator2.svg" class="mx-3">
</span>
<a href="@UrlOptions.Value.Www/privacy-policy">
Privacy Policy
</a>
<div class="footer-bottom">
<div class="container">
<div class="row">
<div class="col-md-auto">
<span class="copyright">© 2021 EventHub</span>
</div>
<div class="col-md text-center text-md-right">
<a href="@UrlOptions.Value.Www/terms-service">
Terms of Service
</a>
<span>
<img src="/assets/seperator2.svg" class="mx-3">
</span>
<a href="@UrlOptions.Value.Www/privacy-policy">
Privacy Policy
</a>
</div>
</div>
</div>
</div>

18
src/EventHub.Web.Theme/Themes/EventHub/Components/MainNavbar/Default.cshtml

@ -20,7 +20,7 @@
<nav class="navbar navbar-expand-lg navbar-light bg-light static-top">
<div class="container">
<a class="navbar-brand font-weight-bold" href="@Url.Page("/index")">
<img src="/assets/eventhub-logo.svg" class="logo" />
<img src="/assets/eventhub-logo.svg" class="logo"/>
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
@ -43,9 +43,18 @@
{
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link event-link" href="@UrlOptions.Value.Www@Url.Page("/events/new")">+ Create an Event</a>
<div class="dropdown">
<a class="nav-link event-link" type="button" id="createDropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+ Create
</a>
<div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
<a class="dropdown-item" href="@UrlOptions.Value.Www@Url.Page("/organizations/new")">Organization</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="@UrlOptions.Value.Www@Url.Page("/events/new")">Event</a>
</div>
</div>
</li>
</ul>
</ul>
}
<ul class="navbar-nav">
@ -97,13 +106,14 @@
</nav>
@functions{
public string GetPageActiveClassOrEmpty(ViewContext viewContext, string pageUrl)
{
if (!UrlOptions.Value.Www.Contains(Context.Request.Host.ToString()))
{
return "";
}
var activeRoute = viewContext?.RouteData.Values["page"]?.ToString()?.ToLowerInvariant();
pageUrl = pageUrl.ToLowerInvariant();

4
src/EventHub.Web.Theme/Themes/EventHub/Layouts/Account.cshtml

@ -86,7 +86,9 @@
}
@(await Component.InvokeAsync<PageAlertsViewComponent>())
@await Component.InvokeLayoutHookAsync(LayoutHooks.PageContent.First, StandardLayouts.Account)
@RenderBody()
<div class="render-wrapper">
@RenderBody()
</div>
@await Component.InvokeLayoutHookAsync(LayoutHooks.PageContent.Last, StandardLayouts.Account)
</abp-column>
</abp-row>

4
src/EventHub.Web.Theme/Themes/EventHub/Layouts/Application.cshtml

@ -75,7 +75,9 @@
@(await Component.InvokeAsync<MainNavbarViewComponent>())
@(await Component.InvokeAsync<PageAlertsViewComponent>())
@await Component.InvokeLayoutHookAsync(LayoutHooks.PageContent.First, StandardLayouts.Application)
@RenderBody()
<div class="render-wrapper">
@RenderBody()
</div>
@await Component.InvokeLayoutHookAsync(LayoutHooks.PageContent.Last, StandardLayouts.Application)
@(await Component.InvokeAsync<FooterViewComponent>())
<abp-script-bundle name="@EventHubThemeBundles.Scripts.Global"/>

4
src/EventHub.Web.Theme/Themes/EventHub/Layouts/Empty.cshtml

@ -57,7 +57,9 @@
<div class="@containerClass">
@(await Component.InvokeAsync<PageAlertsViewComponent>())
@await Component.InvokeLayoutHookAsync(LayoutHooks.PageContent.First, StandardLayouts.Empty)
@RenderBody()
<div class="render-wrapper">
@RenderBody()
</div>
@await Component.InvokeLayoutHookAsync(LayoutHooks.PageContent.Last, StandardLayouts.Empty)
</div>

8
src/EventHub.Web.Theme/wwwroot/themes/eventhub/owl-edit.css

@ -44,7 +44,7 @@
height: 40px;
top:0;
left: 0;
background-image: url(../../../../assets/slider-right.svg);
background-image: url(/assets/slider-right.svg);
background-position: center;
background-repeat: no-repeat;
}
@ -56,7 +56,7 @@
height: 40px;
top:0;
left: 0;
background-image: url(../../../../assets/slider-left.svg);
background-image: url(/assets/slider-left.svg);
background-position: center;
background-repeat: no-repeat;
}
@ -79,7 +79,7 @@
height: 15px;
top:0;
left: 0;
background-image: url(../../../../assets/owl-2-right.svg);
background-image: url(/assets/owl-2-right.svg);
background-position: center;
background-repeat: no-repeat;
}
@ -91,7 +91,7 @@
height: 15px;
top:0;
left: 0;
background-image: url(../../../../assets/owl-2-left.svg);
background-image: url(/assets/owl-2-left.svg);
background-position: center;
background-repeat: no-repeat;
}

556
src/EventHub.Web.Theme/wwwroot/themes/eventhub/style.css

File diff suppressed because it is too large

2
src/EventHub.Web/Dockerfile

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0
FROM mcr.microsoft.com/dotnet/aspnet:6.0.0-rc.1-bullseye-slim
COPY bin/Release/net6.0/publish/ app/
WORKDIR /app
ENTRYPOINT ["dotnet", "EventHub.Web.dll"]

2
src/EventHub.Web/EventHub.Web.csproj

@ -22,7 +22,7 @@
<ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="3.2.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="6.0.0-rc.*" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="6.0.0-rc.1.*" />
</ItemGroup>
<ItemGroup>

5
src/EventHub.Web/Pages/Events/Edit.cshtml

@ -53,9 +53,8 @@
</div>
</div>
<div class="col-md-12">
<div class="form-label-group">
<textarea rows="3" type="text" id="inputDescription" asp-for="Event.Description" class="form-control" placeholder="Description"></textarea>
<label for="inputDescription">Description</label>
<div class="form-label-group form-floating">
<textarea rows="5" type="text" id="inputDescription" asp-for="Event.Description" class="form-control" placeholder="Description"></textarea>
<span asp-validation-for="Event.Description" class="text-danger"></span>
</div>
</div>

3
src/EventHub.Web/Pages/Events/Edit.cshtml.cs

@ -66,7 +66,8 @@ namespace EventHub.Web.Pages.Events
if (Event.CoverImageFile != null && Event.CoverImageFile.Length > 0)
{
await Event.CoverImageFile.CopyToAsync(memoryStream);
memoryStream.Position = 0;
updateEventDto.CoverImageStreamContent = new RemoteStreamContent(memoryStream, fileName: Event.CoverImageFile.FileName, contentType: Event.CoverImageFile.ContentType);
}

4
src/EventHub.Web/Pages/Events/Edit.js

@ -13,9 +13,13 @@ $(function () {
$('#Event_IsOnline').on('change', '', function () {
var isOnline = $("#Event_IsOnline option:selected").val()
if (isOnline === "True") {
$("#Event_CountryId").attr("required", false);
$("#inputCity").attr("required", false);
$(".event-link-group").show();
$(".event-location-group").hide();
} else {
$("#Event_CountryId").attr("required", true);
$("#inputCity").attr("required", true);
$(".event-link-group").hide();
$(".event-location-group").show();
}

7
src/EventHub.Web/Pages/Events/New.cshtml

@ -37,7 +37,10 @@ else
<div class="col-md-6">
<div class="form-label-group">
<select asp-for="Event.OrganizationId" asp-items="Model.Organizations" class="form-select">
<option selected value="">Organization</option>
@if (Model.Organizations.Count > 1)
{
<option selected value="">Pick an organization</option>
}
</select>
<span asp-validation-for="Event.OrganizationId" class="text-danger"></span>
</div>
@ -65,7 +68,7 @@ else
</div>
<div class="col-md-12">
<div class="form-label-group">
<textarea rows="3" type="text" id="inputDescription" asp-for="Event.Description" class="form-control" placeholder="Description"></textarea>
<textarea rows="5" type="text" id="inputDescription" asp-for="Event.Description" class="form-control" placeholder="Description"></textarea>
<span asp-validation-for="Event.Description" class="text-danger"></span>
</div>
</div>

3
src/EventHub.Web/Pages/Events/New.cshtml.cs

@ -64,7 +64,8 @@ namespace EventHub.Web.Pages.Events
if (Event.CoverImageFile != null && Event.CoverImageFile.Length > 0)
{
await Event.CoverImageFile.CopyToAsync(memoryStream);
memoryStream.Position = 0;
createEventDto.CoverImageStreamContent = new RemoteStreamContent(memoryStream, fileName: Event.CoverImageFile.FileName, contentType: Event.CoverImageFile.ContentType);
}

4
src/EventHub.Web/Pages/Events/New.js

@ -13,9 +13,13 @@ $(function () {
$('#Event_IsOnline').on('change', '', function () {
var isOnline = $("#Event_IsOnline option:selected").val()
if (isOnline === "True") {
$("#Event_CountryId").attr("required", false);
$("#inputCity").attr("required", false);
$(".event-link-group").show();
$(".event-location-group").hide();
} else {
$("#Event_CountryId").attr("required", true);
$("#inputCity").attr("required", true);
$(".event-link-group").hide();
$(".event-location-group").show();
}

202
src/EventHub.Web/Pages/Index.cshtml

@ -31,53 +31,16 @@
<div class="container-fluid p-0">
<div class="main-slider">
<div class="owl-carousel owl-theme">
<div class="item">
<div class="slider-container d-flex align-items-center text-center text-dark" style="background-image: url('/assets/eh-banner-4.png')">
<div class="container">
<div class="row">
<div class="col-lg-9 col-md-11 mx-auto">
<h1>.Net Foundation Week</h1>
<p class="lead">
Lorem ipsum is placeholder text commonly used in the graphic!!
</p>
<div>
<a href="#" class="btn btn-primary">Join Now</a>
<a href="#" class="btn btn-link">More Details</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="item">
<div class="slider-container d-flex align-items-center text-center text-dark" style="background-image: url('/assets/eh-banner-5.png')">
<div class="container">
<div class="row">
<div class="col-lg-9 col-md-11 mx-auto">
<h1>.Net Foundation Week</h1>
<p class="lead">
Lorem ipsum is placeholder text commonly used in the graphic!
</p>
<div>
<a href="#" class="btn btn-primary">Join Now</a>
<a href="#" class="btn btn-link">More Details</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="item">
<div class="slider-container d-flex align-items-center text-center text-light" style="background-image: url('/assets/slide.jpg')">
<div class="container">
<div class="row">
<div class="col-lg-9 col-md-11 mx-auto">
<h1>Let's Share Together!</h1>
<p class="lead">Try something new, or do more of what you love :)</p>
</div>
</div>
<div class="slider-container d-flex align-items-center text-center text-dark" style="background-image: url('/assets/eh-banner-4.png')">
<div class="container">
<div class="row">
<div class="col-lg-9 col-md-11 mx-auto">
<img src="/assets/eventhub-logo.svg" >
<p class="lead mt-2">
Benefit from a community of millions.
</p>
<div>
<a href="@Url.Page("/Events/New")" class="btn btn-primary">Join Now</a>
</div>
</div>
</div>
@ -115,7 +78,7 @@
<label for="inputWhen">When</label>
</div>
</div>
<div class="col-md-auto">
<div class="col-md-2">
<button id="SearchButton" class="btn btn-primary btn-lg btn-block ">
<img src="/assets/search.svg">
Search
@ -126,100 +89,101 @@
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md">
<h2 class=" mb-4">Upcoming Events</h2>
<div class="container">
<div class="row">
<div class="col-md">
<h2 class=" mb-4">Upcoming Events</h2>
</div>
</div>
</div>
@await Component.InvokeAsync(typeof(EventsAreaViewComponent), new
{
minDate = Clock.Now,
maxResultCount = 15
})
</div>
@await Component.InvokeAsync(typeof(EventsAreaViewComponent), new
{
minDate = Clock.Now,
maxResultCount = 15
})
</div>
<div class="container-fluid bg-white mt-5 py-5">
<div class="container py-3">
<div class="card-slider">
<div class="container-fluid bg-white mt-5 py-5">
<div class="container py-3">
<div class="card-slider">
<h2 class="mb-4">Online Events</h2>
<div class="owl-carousel owl-theme">
@for (var i = 0; i < Model.OnlineEvents.Count; i += 2)
{
<div class="item">
<div class="card mb-3">
<div class="row no-glutters">
<div class="col-5 pr-0">
<div class="event-thumbnail-left" style="background-image: url( @(UrlOptions.Value.Api.EnsureEndsWith('/') + $"api/eventhub/event/cover-image/{Model.OnlineEvents[i].Id}") );" alt="@Model.OnlineEvents[i].Title">
</div>
</div>
<div class="col-7">
<div class="card-body">
<div class="event-container online-event">
<div class="event-info">
<h5>@Model.OnlineEvents[i].Title</h5>
<small>@Model.OnlineEvents[i].StartTime.ToString("MMMM dd, yyyy dddd") <br /> @Model.OnlineEvents[i].StartTime.ToString("hh tt", CultureInfo.InvariantCulture) - @Model.OnlineEvents[i].EndTime.ToString("hh tt", CultureInfo.InvariantCulture) | Online</small>
<p>@Model.OnlineEvents[i].Description</p>
</div>
<a href="@Url.Page("/Events/Detail", new {url = Model.OnlineEvents[i].Url})" class="btn btn-link p-0">Learn More <img src="/assets/more-btn.svg"></a>
</div>
</div>
</div>
</div>
</div>
@if (i + 1 <= Model.OnlineEvents.Count - 1)
{
<h2 class="mb-4">Online Events</h2>
<div class="owl-carousel owl-theme">
@for (var i = 0; i < Model.OnlineEvents.Count; i += 2)
{
<div class="item">
<div class="card mb-3">
<div class="row no-glutters">
<div class="col-5 pr-0">
<div class="event-thumbnail-left" style="background-image: url( @(UrlOptions.Value.Api.EnsureEndsWith('/') + $"api/eventhub/event/cover-image/{Model.OnlineEvents[i + 1].Id}") );" alt="@Model.OnlineEvents[i + 1].Title">
<div class="event-thumbnail-left" style="background-image: url( @(UrlOptions.Value.Api.EnsureEndsWith('/') + $"api/eventhub/event/cover-image/{Model.OnlineEvents[i].Id}") );" alt="@Model.OnlineEvents[i].Title">
</div>
</div>
<div class="col-7">
<div class="card-body">
<div class="event-container online-event">
<div class="event-info">
<h5>@Model.OnlineEvents[i + 1].Title</h5>
<small>@Model.OnlineEvents[i + 1].StartTime.ToString("MMMM dd, yyyy dddd") <br /> @Model.OnlineEvents[i + 1].StartTime.ToString("hh tt", CultureInfo.InvariantCulture) - @Model.OnlineEvents[i + 1].EndTime.ToString("hh tt", CultureInfo.InvariantCulture) | Online</small>
<p>@Model.OnlineEvents[i + 1].Description</p>
<h5>@Model.OnlineEvents[i].Title</h5>
<small>@Model.OnlineEvents[i].StartTime.ToString("MMMM dd, yyyy dddd") <br /> @Model.OnlineEvents[i].StartTime.ToString("hh tt", CultureInfo.InvariantCulture) - @Model.OnlineEvents[i].EndTime.ToString("hh tt", CultureInfo.InvariantCulture) | Online</small>
<p>@Model.OnlineEvents[i].Description</p>
</div>
<a href="@Url.Page("/Events/Detail", new {url = @Model.OnlineEvents[i + 1].Url})" class="btn btn-link p-0">Learn More <img src="/assets/more-btn.svg"></a>
<a href="@Url.Page("/Events/Detail", new {url = Model.OnlineEvents[i].Url})" class="btn btn-link p-0">Learn More <img src="/assets/more-btn.svg"></a>
</div>
</div>
</div>
</div>
</div>
</div>
}
</div>
}
@if (i + 1 <= Model.OnlineEvents.Count - 1)
{
<div class="card mb-3">
<div class="row no-glutters">
<div class="col-5 pr-0">
<div class="event-thumbnail-left" style="background-image: url( @(UrlOptions.Value.Api.EnsureEndsWith('/') + $"api/eventhub/event/cover-image/{Model.OnlineEvents[i + 1].Id}") );" alt="@Model.OnlineEvents[i + 1].Title">
</div>
</div>
<div class="col-7">
<div class="card-body">
<div class="event-container online-event">
<div class="event-info">
<h5>@Model.OnlineEvents[i + 1].Title</h5>
<small>@Model.OnlineEvents[i + 1].StartTime.ToString("MMMM dd, yyyy dddd") <br /> @Model.OnlineEvents[i + 1].StartTime.ToString("hh tt", CultureInfo.InvariantCulture) - @Model.OnlineEvents[i + 1].EndTime.ToString("hh tt", CultureInfo.InvariantCulture) | Online</small>
<p>@Model.OnlineEvents[i + 1].Description</p>
</div>
<a href="@Url.Page("/Events/Detail", new {url = @Model.OnlineEvents[i + 1].Url})" class="btn btn-link p-0">Learn More <img src="/assets/more-btn.svg"></a>
</div>
</div>
</div>
</div>
</div>
}
</div>
}
</div>
</div>
</div>
</div>
</div>
<div class="container text-center py-5">
<h1 class="my-5 pb-5">How EventHub Works?</h1>
<div class="row my-4">
<div class="col-md-5 ml-auto">
<div class="px-5">
<h3>Explore groups</h3>
<p class="lead">
List who is organizing local events
with one click.
</p>
@if (!CurrentUser.IsAuthenticated)
{
<a href="@UrlOptions.Value.Account/Account/Register?returnUrl=@UrlOptions.Value.Www" class="btn btn-link btn-lg">Join EventHub</a>
}
<div class="container text-center py-5">
<h1 class="my-5 pb-5">How EventHub Works?</h1>
<div class="row my-4">
<div class="col-md-5 ml-auto">
<div class="px-5">
<h3>Explore groups</h3>
<p class="lead">
List who is organizing local events
with one click.
</p>
@if (!CurrentUser.IsAuthenticated)
{
<a href="@UrlOptions.Value.Account/Account/Register?returnUrl=@UrlOptions.Value.Www" class="btn btn-link btn-lg">Join EventHub</a>
}
</div>
</div>
</div>
<div class="col-md-5 mr-auto border-left">
<div class="px-5">
<h3>Start an Event</h3>
<p class="lead">Create your own Eventhub group and benefit from a community of millions.</p>
<a href="@Url.Page("/Events/New")" class="btn btn-link btn-lg">Start</a>
<div class="col-md-5 mr-auto border-left">
<div class="px-5">
<h3>Start an Event</h3>
<p class="lead">Create your own Eventhub group and benefit from a community of millions.</p>
<a href="@Url.Page("/Events/New")" class="btn btn-link btn-lg">Start</a>
</div>
</div>
</div>
</div>

54
src/EventHub.Web/Pages/Index.js

@ -1,32 +1,4 @@
$(function () {
$('.main-slider .owl-carousel').owlCarousel({
loop: true,
center: true,
margin: 0,
padding: 0,
nav: true,
items: 1,
dots: false,
});
$('.card-slider .owl-carousel').owlCarousel({
loop: false,
center: false,
margin: 30,
padding: 0,
nav: true,
slideBy: 2,
responsive: {
0: {
items: 1,
},
991: {
items: 2,
},
},
dots: true,
});
function cb(start, end) {
$('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
}
@ -49,52 +21,50 @@
}
}, cb);
$inputWhen.on('apply.daterangepicker', function(ev, picker) {
$inputWhen.on('apply.daterangepicker', function (ev, picker) {
$(this).val(picker.startDate.format('MM/DD/YYYY') + ' - ' + picker.endDate.format('MM/DD/YYYY'));
minDate = picker.startDate.format('MM/DD/YYYY')
maxDate = picker.endDate.format('MM/DD/YYYY')
});
$inputWhen.on('cancel.daterangepicker', function(ev, picker) {
$inputWhen.on('cancel.daterangepicker', function (ev, picker) {
$(this).val('');
minDate = ""
maxDate = ""
});
function isNullOrEmpty(str){
function isNullOrEmpty(str) {
return str === null || str.match(/^ *$/) !== null;
}
$('#SearchButton').on('click', '', function () {
var language = $('#LanguageSelect').find(":selected").val();
var countryId = $('#CountrySelect').find(":selected").val();
console.log(language)
console.log(countryId)
var location = "/Events?"
if (minDate.length > 0 && !isNullOrEmpty(minDate)){
if (minDate.length > 0 && !isNullOrEmpty(minDate)) {
location += "MinDate=" + minDate
}
if (maxDate.length > 0 && !isNullOrEmpty(maxDate)){
if (maxDate.length > 0 && !isNullOrEmpty(maxDate)) {
location += "&MaxDate=" + maxDate
}
if (!isNullOrEmpty(language)){
if (!isNullOrEmpty(language)) {
location += "&Language=" + language
}
if (!isNullOrEmpty(countryId)){
if(countryId === "00000000-0000-0000-0000-000000000000"){
if (!isNullOrEmpty(countryId)) {
if (countryId === "00000000-0000-0000-0000-000000000000") {
location += "&IsOnline=true"
}else{
} else {
location += "&CountryId=" + countryId + "&IsOnline=false"
}
}
if (!isNullOrEmpty(location) && location !== "/Events?"){
if (!isNullOrEmpty(location) && location !== "/Events?") {
window.location.replace(location)
}else{
} else {
abp.notify.error("Please select a filter", "Search")
}
});

2
src/EventHub.Web/Pages/Organizations/Components/OrganizationsArea/_organizationListSection.cshtml

@ -7,7 +7,7 @@
{
<div class="col-lg-4 col-md-6 organization">
<div class="card">
<div class="event-thumbnail" style="background-image: url(@(UrlOptions.Value.ApiInternal.EnsureEndsWith('/') + $"api/eventhub/organization/profile-picture/{organization.Id}"));" alt="@organization.Name">
<div class="event-thumbnail" style="background-image: url(@(UrlOptions.Value.Api.EnsureEndsWith('/') + $"api/eventhub/organization/profile-picture/{organization.Id}"));" alt="@organization.Name">
</div>
<div class="card-body">
<div class="event-container">

7
src/EventHub.Web/Pages/Organizations/Edit.cshtml

@ -29,7 +29,7 @@
<div class="row">
<div class="col-4">
<div class="image-area">
<img id="imageResult" src="@(UrlOptions.Value.ApiInternal.EnsureEndsWith('/') + $"api/eventhub/organization/profile-picture/{Model.Organization.Id}")" alt="" class="img-fluid rounded shadow-sm mx-auto d-block">
<img id="imageResult" src="@(UrlOptions.Value.Api.EnsureEndsWith('/') + $"api/eventhub/organization/profile-picture/{Model.Organization.Id}")" alt="" class="img-fluid rounded shadow-sm mx-auto d-block">
</div>
</div>
@ -61,9 +61,8 @@
</div>
<div class="col-md-12">
<div class="form-label-group">
<textarea rows="3" type="text" id="inputDescription" asp-for="Organization.Description" class="form-control" placeholder="Description*" required=""></textarea>
<label for="inputDescription">Description*</label>
<div class="form-label-group form-floating">
<textarea rows="5" type="text" id="inputDescription" asp-for="Organization.Description" class="form-control" placeholder="Description*" required=""></textarea>
<span asp-validation-for="Organization.Description" class="text-danger"></span>
</div>
</div>

2
src/EventHub.Web/Pages/Organizations/Edit.cshtml.cs

@ -48,7 +48,7 @@ namespace EventHub.Web.Pages.Organizations
if (Organization.ProfilePictureFile != null && Organization.ProfilePictureFile.Length > 0)
{
await Organization.ProfilePictureFile.CopyToAsync(memoryStream);
memoryStream.Position = 0;
updateOrganizationDto.ProfilePictureStreamContent = new RemoteStreamContent(memoryStream, fileName: Organization.ProfilePictureFile.FileName, contentType: Organization.ProfilePictureFile.ContentType);
}

2
src/EventHub.Web/Pages/Organizations/New.cshtml

@ -57,7 +57,7 @@
</div>
<div class="col-md-12">
<div class="form-label-group">
<textarea rows="3" type="text" id="inputDescription" asp-for="Organization.Description" class="form-control" placeholder="Description*" required=""></textarea>
<textarea rows="5" type="text" id="inputDescription" asp-for="Organization.Description" class="form-control" placeholder="Description*" required=""></textarea>
<span asp-validation-for="Organization.Description" class="text-danger"></span>
</div>
</div>

7
src/EventHub.Web/Pages/Organizations/New.cshtml.cs

@ -43,14 +43,15 @@ namespace EventHub.Web.Pages.Organizations
if (Organization.ProfilePictureFile != null && Organization.ProfilePictureFile.Length > 0)
{
await Organization.ProfilePictureFile.CopyToAsync(memoryStream);
memoryStream.Position = 0;
createOrganizationDto.ProfilePictureStreamContent = new RemoteStreamContent(memoryStream, fileName: Organization.ProfilePictureFile.FileName, contentType: Organization.ProfilePictureFile.ContentType);
}
await _organizationAppService.CreateAsync(createOrganizationDto);
var organization = await _organizationAppService.CreateAsync(createOrganizationDto);
await memoryStream.DisposeAsync();
return RedirectToPage("./Profile", new {name = Organization.Name});
return RedirectToPage("./Profile", new {name = organization.Name});
}
catch (Exception exception)
{

4
src/EventHub.Web/Pages/Organizations/Profile.cshtml

@ -21,7 +21,7 @@
<div class="row">
<div class="col-md-12">
<div class="detail-image">
<img class="detail-img" src="@(UrlOptions.Value.ApiInternal.EnsureEndsWith('/') + $"api/eventhub/organization/profile-picture/{Model.Organization.Id}")" alt="@Model.Organization.Name">
<img class="detail-img" src="@(UrlOptions.Value.Api.EnsureEndsWith('/') + $"api/eventhub/organization/profile-picture/{Model.Organization.Id}")" alt="@Model.Organization.Name">
</div>
</div>
@ -59,7 +59,7 @@
@if (Model.IsOrganizationOwner)
{
<a href="/organization/edit/@Model.Organization.Name" class="btn btn-primary mt-4 text-white">
<i class="far fa-edit"></i> edit
<i class="far fa-edit"></i> Edit
</a>
}
@await Component.InvokeAsync(typeof(JoinAreaViewComponent), new {organizationId = Model.Organization.Id})

2
src/EventHub.Web/Pages/TermsService.cshtml

@ -33,7 +33,7 @@
capable of acceptance. The Purchaser's order constitutes a contractual
offer and our acceptance of that offer is deemed to occur upon our sending
a dispatch email to the Purchaser indicating that the order has been
fulfilled and has been dispatched.<a href="https://commercial.abp.io/Eula">Eula</a>, <a href="https://commercial.abp.io/Privacy">Privacy</a>, and
fulfilled and has been dispatched. <a href="https://commercial.abp.io/Eula">Eula</a>, <a href="https://commercial.abp.io/Privacy">Privacy</a>, and
<a href="https://commercial.abp.io/TermsConditions">Terms &amp; Conditions</a>
support each other and together form part of your agreement with Volosoft Bilişim Anonim Şirketi.
</p>

15
src/EventHub.Web/Pages/User.cshtml

@ -62,17 +62,6 @@
</li>
</ul>
</abp-column>
@if (CurrentUser.IsAuthenticated)
{
@if (CurrentUser.Id == Model.User.Id)
{
<abp-column size="_4">
<div class="text-right">
<a abp-button="Primary" size="Small" href="@Url.Page("/Organizations/New")">@L["CreateAnOrganization"]</a>
</div>
</abp-column>
}
}
</abp-row>
<div class="tab-content profile-content py-4">
<div id="UpcomingEvents" class="tab-pane fade show active">
@ -134,7 +123,9 @@
</h3>
</div>
</div>
<partial name="~/Pages/Organizations/Components/OrganizationsArea/_organizationListSection.cshtml" model="@Model.Organizations"/>
<div class="row">
<partial name="~/Pages/Organizations/Components/OrganizationsArea/_organizationListSection.cshtml" model="@Model.Organizations"/>
</div>
</div>
</div>
</div>

Loading…
Cancel
Save