Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Grand.Web.Models project #547

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions GrandNode.sln
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grand.Module.Api", "src\Mod
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grand.Module.ScheduledTasks", "src\Modules\Grand.Module.ScheduledTasks\Grand.Module.ScheduledTasks.csproj", "{136F1E35-8B20-465C-8D42-30A5A0D0DA1F}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Grand.Web.Models", "src\Web\Grand.Web.Models\Grand.Web.Models.csproj", "{7A07FB5A-4F1E-4D32-BAF6-D4E87BE35EF0}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -368,6 +370,10 @@ Global
{136F1E35-8B20-465C-8D42-30A5A0D0DA1F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{136F1E35-8B20-465C-8D42-30A5A0D0DA1F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{136F1E35-8B20-465C-8D42-30A5A0D0DA1F}.Release|Any CPU.Build.0 = Release|Any CPU
{7A07FB5A-4F1E-4D32-BAF6-D4E87BE35EF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7A07FB5A-4F1E-4D32-BAF6-D4E87BE35EF0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7A07FB5A-4F1E-4D32-BAF6-D4E87BE35EF0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7A07FB5A-4F1E-4D32-BAF6-D4E87BE35EF0}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -429,6 +435,7 @@ Global
{75F9D855-026B-4BCB-90CE-3800F02FA0A7} = {583FFBBD-421C-4FB7-BBDA-F9CAF35A354A}
{E0B26803-010B-4198-8016-002242076B61} = {583FFBBD-421C-4FB7-BBDA-F9CAF35A354A}
{136F1E35-8B20-465C-8D42-30A5A0D0DA1F} = {583FFBBD-421C-4FB7-BBDA-F9CAF35A354A}
{7A07FB5A-4F1E-4D32-BAF6-D4E87BE35EF0} = {BF4543A8-0731-4FDD-BB6B-0ADB9561F981}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {88B478F4-FD3B-4C24-9E84-4FAAF0254397}
Expand Down
5 changes: 0 additions & 5 deletions src/Core/Grand.Domain/Common/CommonSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,4 @@ public class CommonSettings : ISettings
/// Gets or sets to edit product where auction ended
/// </summary>
public bool AllowEditProductEndedAuction { get; set; }

/// <summary>
/// Gets or sets - allow user to read "let's encrypted file"
/// </summary>
public bool AllowToReadLetsEncryptFile { get; set; }
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using Grand.Web.Common.Models;
using Grand.Infrastructure.Models;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using System.Text.RegularExpressions;

namespace Grand.Web.Common.Binders;
namespace Grand.Infrastructure.ModelBinding;

public class CustomAttributesBinder : IModelBinder
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Grand.Domain;
using Grand.SharedKernel.Attributes;

namespace Grand.Web.Common.Page.Paging;
namespace Grand.Infrastructure.Models;

public abstract class BasePageableModel : IPageableModel
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Grand.Web.Common.Models;
namespace Grand.Infrastructure.Models;

public class CustomAttributeModel
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

using Grand.SharedKernel.Attributes;

namespace Grand.Web.Common.Page.Paging;
namespace Grand.Infrastructure.Models;

/// <summary>
/// A collection of objects that has been split into pages.
Expand Down
2 changes: 1 addition & 1 deletion src/Plugins/Theme.Modern/Theme.Modern.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<Private>false</Private>
<ExcludeAssets>all</ExcludeAssets>
</ProjectReference>
<ProjectReference Include="..\..\Web\Grand.Web\Grand.Web.csproj">
<ProjectReference Include="..\..\Web\Grand.Web.Models\Grand.Web.Models.csproj">
<Private>false</Private>
<ExcludeAssets>all</ExcludeAssets>
</ProjectReference>
Expand Down
1 change: 0 additions & 1 deletion src/Plugins/Theme.Modern/Views/Modern/_ViewImports.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
@using Grand.Web.Common.Extensions
@using Grand.Web.Common.Security.Captcha
@using Grand.Web.Common.Themes
@using Grand.Web.Extensions
@using Grand.Web.Models.Blogs
@using Grand.Web.Models.Catalog
@using Grand.Web.Models.Checkout
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -253,18 +253,6 @@
<span asp-validation-for="CommonSettings.UseSystemEmailForContactUsForm"></span>
</div>
</div>
<div class="form-group">
<div class="col-8 col-md-4 col-sm-4 text-right">
<admin-label asp-for="CommonSettings.AllowToReadLetsEncryptFile" class="control-label"/>
</div>
<div class="col-4 col-md-8 col-sm-8">
<label class="mt-checkbox mt-checkbox-outline control control-checkbox">
<admin-input asp-for="CommonSettings.AllowToReadLetsEncryptFile"/>
<div class="control__indicator"></div>
</label>
<span asp-validation-for="CommonSettings.AllowToReadLetsEncryptFile"></span>
</div>
</div>
<div class="form-group">
<div class="col-8 col-md-4 col-sm-4 text-right">
<admin-label asp-for="CommonSettings.AllowToSelectStore" class="control-label"/>
Expand Down
2 changes: 1 addition & 1 deletion src/Web/Grand.Web.Admin/Controllers/CustomerController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
using Grand.Web.Admin.Models.Orders;
using Grand.Web.Common.DataSource;
using Grand.Web.Common.Filters;
using Grand.Web.Common.Models;
using Grand.Web.Common.Security.Authorization;
using Microsoft.AspNetCore.Mvc;
using Grand.Infrastructure.Models;

namespace Grand.Web.Admin.Controllers;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Grand.Web.Common.Binders;
using Grand.Web.Common.Models;
using Grand.Infrastructure.ModelBinding;
using Grand.Infrastructure.Models;
using Microsoft.AspNetCore.Mvc;

namespace Grand.Web.Admin.Models.Orders;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ public class CommonSettingsModel : BaseModel
[GrandResourceDisplayName("Admin.Settings.GeneralCommon.UseSystemEmailForContactUsForm")]
public bool UseSystemEmailForContactUsForm { get; set; }

[GrandResourceDisplayName("Admin.Settings.GeneralCommon.AllowToReadLetsEncryptFile")]
public bool AllowToReadLetsEncryptFile { get; set; }

[GrandResourceDisplayName("Admin.Settings.GeneralCommon.AllowToSelectStore")]
public bool AllowToSelectStore { get; set; }

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Grand.Web.Common.Models;
using Grand.Infrastructure.ModelBinding;
using Grand.Infrastructure.Models;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.AspNetCore.Mvc.ModelBinding.Binders;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Grand.Business.Core.Interfaces.Common.Localization;
using Grand.Infrastructure.Models;
using Grand.Web.Common.Extensions;
using Grand.Web.Common.Page.Paging;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.AspNetCore.Mvc.ViewFeatures;
using Microsoft.AspNetCore.Razor.TagHelpers;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Grand.Web.Common.Page.Paging;
using Grand.Infrastructure.Models;

namespace Grand.Web.Models.Blogs;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Grand.Web.Common.Page.Paging;
using Grand.Infrastructure.Models;

namespace Grand.Web.Models.Catalog;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using Grand.Domain.Catalog;
using Grand.Infrastructure.Extensions;
using Grand.Infrastructure.Models;
using Grand.Web.Common.Page.Paging;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc.Rendering;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Grand.Web.Common.Page.Paging;
using Grand.Infrastructure.Models;

namespace Grand.Web.Models.Catalog;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Grand.Web.Common.Page.Paging;
using Grand.Infrastructure.Models;

namespace Grand.Web.Models.Catalog;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Grand.Web.Common.Binders;
using Grand.Web.Common.Models;
using Grand.Infrastructure.ModelBinding;
using Grand.Infrastructure.Models;
using Microsoft.AspNetCore.Mvc;

namespace Grand.Web.Models.Catalog;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Grand.Web.Common.Page.Paging;
using Grand.Infrastructure.Models;

namespace Grand.Web.Models.Catalog;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
using Grand.Infrastructure.ModelBinding;
using Grand.Infrastructure.Models;
using Grand.Web.Common.Binders;
using Grand.Web.Common.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using System.ComponentModel.DataAnnotations;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Grand.Web.Common.Page.Paging;
using Grand.Infrastructure.Models;

namespace Grand.Web.Models.Common;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Grand.Web.Common.Binders;
using Grand.Web.Common.Models;
using Grand.Infrastructure.ModelBinding;
using Grand.Infrastructure.Models;
using Microsoft.AspNetCore.Mvc;

namespace Grand.Web.Models.Contact;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
using Grand.Domain.Common;
using Grand.Infrastructure.ModelBinding;
using Grand.Infrastructure.Models;
using Grand.Web.Common.Binders;
using Grand.Web.Common.Models;
using Microsoft.AspNetCore.Mvc;

namespace Grand.Web.Models.Contact;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
using Grand.Infrastructure.ModelBinding;
using Grand.Infrastructure.Models;
using Grand.SharedKernel;
using Grand.Web.Common.Binders;
using Grand.Web.Common.Models;
using Grand.Web.Models.Newsletter;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Grand.Web.Common.Page.Paging;
using Grand.Infrastructure.Models;

namespace Grand.Web.Models.Customer;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using Grand.Infrastructure.ModelBinding;
using Grand.Infrastructure.Models;
using Grand.SharedKernel;
using Grand.Web.Common.Binders;
using Grand.Web.Common.Models;
using Grand.Web.Models.Newsletter;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
Expand Down
8 changes: 8 additions & 0 deletions src/Web/Grand.Web.Models/Grand.Web.Models.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\Build\Grand.Common.props" />
<ItemGroup>
<ProjectReference Include="..\..\Business\Grand.Business.Core\Grand.Business.Core.csproj" />
<ProjectReference Include="..\..\Core\Grand.Infrastructure\Grand.Infrastructure.csproj" />
<ProjectReference Include="..\..\Core\Grand.SharedKernel\Grand.SharedKernel.csproj" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Grand.Web.Common.Page.Paging;
using Grand.Infrastructure.Models;

namespace Grand.Web.Models.News;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Grand.Web.Common.Page.Paging;
using Grand.Infrastructure.Models;

namespace Grand.Web.Models.Orders;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Grand.Web.Common.Binders;
using Grand.Web.Common.Models;
using Grand.Infrastructure.ModelBinding;
using Grand.Infrastructure.Models;
using Microsoft.AspNetCore.Mvc;

namespace Grand.Web.Models.ShoppingCart;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Grand.Domain.Orders;
using Grand.Web.Common.Binders;
using Grand.Web.Common.Models;
using Grand.Infrastructure.ModelBinding;
using Grand.Infrastructure.Models;
using Microsoft.AspNetCore.Mvc;

namespace Grand.Web.Models.ShoppingCart;
Expand Down
Binary file not shown.
3 changes: 0 additions & 3 deletions src/Web/Grand.Web/App_Data/Resources/DefaultLanguage.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10107,9 +10107,6 @@
<Resource Name="Admin.Settings.GeneralCommon.AllowSlashChar" Area="Admin">
<Value>Allow to use slash char</Value>
</Resource>
<Resource Name="Admin.Settings.GeneralCommon.AllowToReadLetsEncryptFile" Area="Admin">
<Value>Allow to read Let's Encrypt file</Value>
</Resource>
<Resource Name="Admin.Settings.GeneralCommon.AllowToSelectAdminTheme" Area="Admin">
<Value>Allow to select admin theme</Value>
</Resource>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Grand.Domain.Customers;
using Grand.Domain.Stores;
using Grand.Web.Common.Models;
using Grand.Infrastructure.Models;
using MediatR;

namespace Grand.Web.Commands.Models.Contact;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using Grand.Domain.Customers;
using Grand.Domain.Orders;
using Grand.Domain.Stores;
using Grand.Web.Common.Models;
using Grand.Infrastructure.Models;
using MediatR;

namespace Grand.Web.Commands.Models.ShoppingCart;
Expand Down
33 changes: 0 additions & 33 deletions src/Web/Grand.Web/Controllers/LetsEncryptController.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Grand.Domain.Common;
using Grand.Web.Common.Models;
using Grand.Infrastructure.Models;
using MediatR;

namespace Grand.Web.Features.Models.Common;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Grand.Domain.Common;
using Grand.Web.Common.Models;
using Grand.Infrastructure.Models;
using MediatR;

namespace Grand.Web.Features.Models.Customers;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Grand.Domain.Catalog;
using Grand.Domain.Common;
using Grand.Web.Common.Models;
using Grand.Infrastructure.Models;
using MediatR;

namespace Grand.Web.Features.Models.ShoppingCart;
Expand Down
1 change: 1 addition & 0 deletions src/Web/Grand.Web/Grand.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<ProjectReference Include="..\..\Core\Grand.Domain\Grand.Domain.csproj" />
<ProjectReference Include="..\..\Core\Grand.Infrastructure\Grand.Infrastructure.csproj" />
<ProjectReference Include="..\..\Core\Grand.SharedKernel\Grand.SharedKernel.csproj" />
<ProjectReference Include="..\Grand.Web.Models\Grand.Web.Models.csproj" />
<ProjectReference Include="..\Grand.Web.Common\Grand.Web.Common.csproj" />
<ProjectReference Include="..\Grand.Web.Admin\Grand.Web.Admin.csproj" />
<ProjectReference Include="..\Grand.Web.Vendor\Grand.Web.Vendor.csproj" />
Expand Down
Loading