From dcd6ddcdeb6c6621f84d246a13bd342b509ab320 Mon Sep 17 00:00:00 2001 From: "Janus C. H. Knudsen" Date: Tue, 3 Feb 2026 19:13:03 +0100 Subject: [PATCH] Restructure project shared files and update layout paths Rename '_Shared' directory to 'Shared' to improve project structure Update layout and view location references accordingly Clean up unnecessary files and standardize project organization --- .gitignore | 184 +----------------- .../Features/Accounts/Pages/Payment.cshtml | 2 +- .../Features/Accounts/Pages/Pricing.cshtml | 2 +- .../Features/Accounts/Pages/Signup.cshtml | 2 +- .../Pages/_AuthLayout.cshtml | 0 .../{_Shared => Shared}/Pages/_Layout.cshtml | 0 .../Pages/_ViewImports.cshtml | 0 .../Features/Shared/Pages/_ViewStart.cshtml | 3 + .../TagHelpers/LocalizeTagHelper.cs | 2 +- .../Components/SideMenu/Default.cshtml | 39 ---- .../Features/_Shared/Pages/_TopBar.cshtml | 26 --- .../Features/_Shared/Pages/_ViewStart.cshtml | 3 - .../Features/_ViewStart.cshtml | 2 +- PlanTempus.Application/Startup.cs | 4 +- 14 files changed, 20 insertions(+), 249 deletions(-) rename PlanTempus.Application/Features/{_Shared => Shared}/Pages/_AuthLayout.cshtml (100%) rename PlanTempus.Application/Features/{_Shared => Shared}/Pages/_Layout.cshtml (100%) rename PlanTempus.Application/Features/{_Shared => Shared}/Pages/_ViewImports.cshtml (100%) create mode 100644 PlanTempus.Application/Features/Shared/Pages/_ViewStart.cshtml rename PlanTempus.Application/Features/{_Shared => Shared}/TagHelpers/LocalizeTagHelper.cs (92%) delete mode 100644 PlanTempus.Application/Features/_Shared/Components/SideMenu/Default.cshtml delete mode 100644 PlanTempus.Application/Features/_Shared/Pages/_TopBar.cshtml delete mode 100644 PlanTempus.Application/Features/_Shared/Pages/_ViewStart.cshtml diff --git a/.gitignore b/.gitignore index 686d1cb..ce4fd55 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,4 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore +## .NET / Visual Studio gitignore # User-specific files *.rsuser @@ -10,12 +7,6 @@ *.userosscache *.sln.docstates -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - # Build results [Dd]ebug/ [Dd]ebugPublic/ @@ -32,13 +23,8 @@ bld/ [Ll]og/ [Ll]ogs/ -# Visual Studio 2015/2017 cache/options directory +# Visual Studio cache/options directory .vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ # MSTest test Results [Tt]est[Rr]esult*/ @@ -49,11 +35,6 @@ Generated\ Files/ TestResult.xml nunit-*.xml -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - # Benchmark Results BenchmarkDotNet.Artifacts/ @@ -62,16 +43,10 @@ project.lock.json project.fragment.lock.json artifacts/ -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - # StyleCop StyleCopReport.xml # Files built by Visual Studio -*_i.c -*_p.c -*_h.h *.ilk *.meta *.obj @@ -97,9 +72,6 @@ StyleCopReport.xml *.svclog *.scc -# Chutzpah Test files -_Chutzpah* - # Visual C++ cache files ipch/ *.aps @@ -123,25 +95,22 @@ ipch/ # TFS 2012 Local Workspace $tf/ -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in +# ReSharper _ReSharper*/ *.[Rr]e[Ss]harper *.DotSettings.user -# TeamCity is a build add-in +# TeamCity _TeamCity* -# DotCover is a Code Coverage Tool +# DotCover *.dotCover -# AxoCover is a Code Coverage Tool +# AxoCover .axoCover/* !.axoCover/settings.json -# Coverlet is a free, cross platform Code Coverage Tool +# Coverlet coverage*.json coverage*.xml coverage*.info @@ -155,53 +124,23 @@ _NCrunch_* .*crunch*.local.xml nCrunchTemp_* -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - # Click-Once directory publish/ # Publish Web Output *.[Pp]ublish.xml *.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted *.pubxml *.publishproj -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted +# Microsoft Azure Web App publish settings PublishScripts/ # NuGet Packages *.nupkg -# NuGet Symbol Packages *.snupkg -# The packages folder can be ignored because of Package Restore **/[Pp]ackages/* -# except build/, which is used as an MSBuild target. !**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files *.nuget.props *.nuget.targets @@ -213,19 +152,8 @@ csx/ ecf/ rcf/ -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - # Visual Studio cache files -# files ending in .cache can be ignored *.[Cc]ache -# but keep track of directories ending in .cache !?*.[Cc]ache/ # Others @@ -237,22 +165,8 @@ ClientBin/ *.jfm *.pfx *.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ # Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) _UpgradeReport_Files/ Backup*/ UpgradeLog*.XML @@ -265,87 +179,15 @@ ServiceFabricBackup/ *.ldf *.ndf -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - # Microsoft Fakes FakesAssemblies/ -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat +# Node.js (for TypeScript frontend) node_modules/ -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - # MSBuild Binary and Structured Log *.binlog -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - # Local History for Visual Studio .localhistory/ @@ -355,20 +197,14 @@ healthchecksdb # Backup folder for Package Reference Convert tool in Visual Studio 2017 MigrationBackup/ -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - # Fody - auto-generated XML schema FodyWeavers.xsd nul +# Project-specific tmpclaude* PlanTempus.Application/tmpclaude* - - PlanTempus.Application/wwwroot/js/app.js - PlanTempus.Application/wwwroot/js/app.js.map - PlanTempus.Application/wwwroot/lib/* diff --git a/PlanTempus.Application/Features/Accounts/Pages/Payment.cshtml b/PlanTempus.Application/Features/Accounts/Pages/Payment.cshtml index 23417a6..58e294b 100644 --- a/PlanTempus.Application/Features/Accounts/Pages/Payment.cshtml +++ b/PlanTempus.Application/Features/Accounts/Pages/Payment.cshtml @@ -2,7 +2,7 @@ @model PlanTempus.Application.Features.Accounts.Pages.PaymentModel @{ ViewData["Title"] = "Betaling"; - Layout = "/Features/_Shared/Pages/_AuthLayout.cshtml"; + Layout = "/Features/Shared/Pages/_AuthLayout.cshtml"; var plan = Model.SelectedPlan; } diff --git a/PlanTempus.Application/Features/Accounts/Pages/Pricing.cshtml b/PlanTempus.Application/Features/Accounts/Pages/Pricing.cshtml index 5808513..7f03a84 100644 --- a/PlanTempus.Application/Features/Accounts/Pages/Pricing.cshtml +++ b/PlanTempus.Application/Features/Accounts/Pages/Pricing.cshtml @@ -2,7 +2,7 @@ @model PlanTempus.Application.Features.Accounts.Pages.PricingModel @{ ViewData["Title"] = "Vælg abonnement"; - Layout = "/Features/_Shared/Pages/_AuthLayout.cshtml"; + Layout = "/Features/Shared/Pages/_AuthLayout.cshtml"; } diff --git a/PlanTempus.Application/Features/Accounts/Pages/Signup.cshtml b/PlanTempus.Application/Features/Accounts/Pages/Signup.cshtml index efcc2d1..d5a82a9 100644 --- a/PlanTempus.Application/Features/Accounts/Pages/Signup.cshtml +++ b/PlanTempus.Application/Features/Accounts/Pages/Signup.cshtml @@ -2,7 +2,7 @@ @model PlanTempus.Application.Features.Accounts.Pages.SignupModel @{ ViewData["Title"] = Model.SelectedPlan.IsContactSales ? "Kontakt salg" : "Opret konto"; - Layout = "/Features/_Shared/Pages/_AuthLayout.cshtml"; + Layout = "/Features/Shared/Pages/_AuthLayout.cshtml"; var plan = Model.SelectedPlan; var badgeClass = plan.IsContactSales ? plan.BadgeClass : (plan.IsFree ? plan.BadgeClass : "selected"); diff --git a/PlanTempus.Application/Features/_Shared/Pages/_AuthLayout.cshtml b/PlanTempus.Application/Features/Shared/Pages/_AuthLayout.cshtml similarity index 100% rename from PlanTempus.Application/Features/_Shared/Pages/_AuthLayout.cshtml rename to PlanTempus.Application/Features/Shared/Pages/_AuthLayout.cshtml diff --git a/PlanTempus.Application/Features/_Shared/Pages/_Layout.cshtml b/PlanTempus.Application/Features/Shared/Pages/_Layout.cshtml similarity index 100% rename from PlanTempus.Application/Features/_Shared/Pages/_Layout.cshtml rename to PlanTempus.Application/Features/Shared/Pages/_Layout.cshtml diff --git a/PlanTempus.Application/Features/_Shared/Pages/_ViewImports.cshtml b/PlanTempus.Application/Features/Shared/Pages/_ViewImports.cshtml similarity index 100% rename from PlanTempus.Application/Features/_Shared/Pages/_ViewImports.cshtml rename to PlanTempus.Application/Features/Shared/Pages/_ViewImports.cshtml diff --git a/PlanTempus.Application/Features/Shared/Pages/_ViewStart.cshtml b/PlanTempus.Application/Features/Shared/Pages/_ViewStart.cshtml new file mode 100644 index 0000000..a44d928 --- /dev/null +++ b/PlanTempus.Application/Features/Shared/Pages/_ViewStart.cshtml @@ -0,0 +1,3 @@ +@{ + Layout = "/Features/Shared/Pages/_Layout.cshtml"; +} diff --git a/PlanTempus.Application/Features/_Shared/TagHelpers/LocalizeTagHelper.cs b/PlanTempus.Application/Features/Shared/TagHelpers/LocalizeTagHelper.cs similarity index 92% rename from PlanTempus.Application/Features/_Shared/TagHelpers/LocalizeTagHelper.cs rename to PlanTempus.Application/Features/Shared/TagHelpers/LocalizeTagHelper.cs index 9e77cf0..742e824 100644 --- a/PlanTempus.Application/Features/_Shared/TagHelpers/LocalizeTagHelper.cs +++ b/PlanTempus.Application/Features/Shared/TagHelpers/LocalizeTagHelper.cs @@ -1,7 +1,7 @@ using Microsoft.AspNetCore.Razor.TagHelpers; using PlanTempus.Application.Features.Localization.Services; -namespace PlanTempus.Application.Features._Shared.TagHelpers; +namespace PlanTempus.Application.Features.Shared.TagHelpers; [HtmlTargetElement(Attributes = "localize")] public class LocalizeTagHelper : TagHelper diff --git a/PlanTempus.Application/Features/_Shared/Components/SideMenu/Default.cshtml b/PlanTempus.Application/Features/_Shared/Components/SideMenu/Default.cshtml deleted file mode 100644 index 29af4b1..0000000 --- a/PlanTempus.Application/Features/_Shared/Components/SideMenu/Default.cshtml +++ /dev/null @@ -1,39 +0,0 @@ -@model PlanTempus.Application.Features.Menu.SideMenuViewModel - - - - - Salon OS - - - - - - - @foreach (var group in Model.Groups) - { - - @group.Label - @foreach (var item in group.Items) - { - - - @item.Label - - } - - } - - - - - - Lås skærm - - - - - - diff --git a/PlanTempus.Application/Features/_Shared/Pages/_TopBar.cshtml b/PlanTempus.Application/Features/_Shared/Pages/_TopBar.cshtml deleted file mode 100644 index 41b140a..0000000 --- a/PlanTempus.Application/Features/_Shared/Pages/_TopBar.cshtml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - ⌘K - - - - - - - 3 - - - - - - - MJ - - Maria Jensen - Administrator - - - - diff --git a/PlanTempus.Application/Features/_Shared/Pages/_ViewStart.cshtml b/PlanTempus.Application/Features/_Shared/Pages/_ViewStart.cshtml deleted file mode 100644 index f9f7d10..0000000 --- a/PlanTempus.Application/Features/_Shared/Pages/_ViewStart.cshtml +++ /dev/null @@ -1,3 +0,0 @@ -@{ - Layout = "/Features/_Shared/Pages/_Layout.cshtml"; -} diff --git a/PlanTempus.Application/Features/_ViewStart.cshtml b/PlanTempus.Application/Features/_ViewStart.cshtml index f9f7d10..a44d928 100644 --- a/PlanTempus.Application/Features/_ViewStart.cshtml +++ b/PlanTempus.Application/Features/_ViewStart.cshtml @@ -1,3 +1,3 @@ @{ - Layout = "/Features/_Shared/Pages/_Layout.cshtml"; + Layout = "/Features/Shared/Pages/_Layout.cshtml"; } diff --git a/PlanTempus.Application/Startup.cs b/PlanTempus.Application/Startup.cs index 06f1cd6..97630b3 100644 --- a/PlanTempus.Application/Startup.cs +++ b/PlanTempus.Application/Startup.cs @@ -37,8 +37,8 @@ public class Startup }) .AddRazorOptions(options => { - options.ViewLocationFormats.Add("/Features/_Shared/Pages/{0}.cshtml"); - options.ViewLocationFormats.Add("/Features/_Shared/Components/{1}/{0}.cshtml"); + options.ViewLocationFormats.Add("/Features/Shared/Pages/{0}.cshtml"); + options.ViewLocationFormats.Add("/Features/Shared/Components/{1}/{0}.cshtml"); }); services.AddAntiforgery(x => x.HeaderName = "X-ANTI-FORGERY-TOKEN");