pitit refact

This commit is contained in:
Paul Schneider 2026-06-04 12:13:37 +01:00
commit 20713eef64
235 changed files with 5374 additions and 373 deletions

43
.vscode/launch.json vendored
View file

@ -4,13 +4,32 @@
// Pour plus d'informations, visitez : https://go.microsoft.com/fwlink/?linkid=830387 // Pour plus d'informations, visitez : https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{
"name": "Yavsc.Org",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/src/Yavsc.Org/bin/Debug/net10.0/Yavsc.Org.dll",
"args": [],
"cwd": "${workspaceFolder}/src/Yavsc.Org",
"stopAtEntry": false,
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{ {
"name": "cli", "name": "cli",
"type": "coreclr", "type": "coreclr",
"request": "launch", "request": "launch",
"preLaunchTask": "build", "preLaunchTask": "build",
"program": "${workspaceFolder}/src/cli/bin/Debug/net9.0/cli.dll", "program": "${workspaceFolder}/src/cli/bin/Debug/net10.0/cli.dll",
"args": [], "args": [],
"cwd": "${workspaceFolder}", "cwd": "${workspaceFolder}",
"stopAtEntry": false, "stopAtEntry": false,
@ -21,7 +40,7 @@
"type": "coreclr", "type": "coreclr",
"request": "launch", "request": "launch",
"preLaunchTask": "build", "preLaunchTask": "build",
"program": "${workspaceFolder}/src/Yavsc.Web/bin/Debug/net9.0/Yavsc.Web.dll", "program": "${workspaceFolder}/src/Yavsc.Web/bin/Debug/net10.0/Yavsc.Web.dll",
"args": [], "args": [],
"cwd": "${workspaceFolder}/src/Yavsc.Web", "cwd": "${workspaceFolder}/src/Yavsc.Web",
"stopAtEntry": false, "stopAtEntry": false,
@ -42,28 +61,12 @@
"type": "coreclr", "type": "coreclr",
"request": "launch", "request": "launch",
"preLaunchTask": "build-webapi", "preLaunchTask": "build-webapi",
"program": "${workspaceFolder}/src/Api/bin/Debug/net9.0/Api.dll", "program": "${workspaceFolder}/src/Api/bin/Debug/net10.0/Api.dll",
"args": [], "args": [],
"cwd": "${workspaceFolder}/src/Api", "cwd": "${workspaceFolder}/src/Api",
"stopAtEntry": false, "stopAtEntry": false,
"console": "internalConsole" "console": "internalConsole"
}, },
{
"name": "Org",
"type": "dotnet",
"request": "launch",
"projectPath": "${workspaceFolder}/src/Yavsc.Org/Yavsc.Org.csproj",
"serverReadyAction": {
"action": "openExternally",
"pattern": "\\bNow listening on:\\s+(https?://\\S+)"
},
"presentation": {
"hidden": false,
"group": "run",
"order": 1
}
},
{ {
"name": "PostIt", "name": "PostIt",
"type": "dotnet", "type": "dotnet",

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<key id="5ff80ad8-c308-4392-9aec-397390fcc77a" version="1">
<creationDate>2026-06-04T11:10:20.7441303Z</creationDate>
<activationDate>2026-06-04T11:10:20.7441303Z</activationDate>
<expirationDate>2026-09-02T11:10:20.7441303Z</expirationDate>
<descriptor deserializerType="Microsoft.AspNetCore.DataProtection.AuthenticatedEncryption.ConfigurationModel.AuthenticatedEncryptorDescriptorDeserializer, Microsoft.AspNetCore.DataProtection, Version=10.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60">
<descriptor>
<encryption algorithm="AES_256_CBC" />
<validation algorithm="HMACSHA256" />
<masterKey p4:requiresEncryption="true" xmlns:p4="http://schemas.asp.net/2015/03/dataProtection">
<!-- Warning: the key below is in an unencrypted form. -->
<value>2u4Ez+bn1qe9ZGs8iBmNJFmByco48kn6noLU0h0ndc1DKrG19X6ErFsxSMOYVVzwXH5MK2nnTPKAlaEUuvdk+A==</value>
</masterKey>
</descriptor>
</descriptor>
</key>

View file

@ -709,10 +709,10 @@ IHtmlLocalizerFactory htmlLocalizerFactory,
} }
else else
{ {
ViewData["jsonres"] = JsonConvert.SerializeObject(result); ViewBag.jsonres = JsonConvert.SerializeObject(result);
// If the user does not have an account, then ask the user to create an account. // If the user does not have an account, then ask the user to create an account.
ViewData["ReturnUrl"] = returnUrl; ViewBag.ReturnUrl = returnUrl;
ViewData["LoginProvider"] = info.LoginProvider; ViewBag.LoginProvider = info.LoginProvider;
var email = info.AuthenticationProperties.GetParameter<string>(ClaimTypes.Email); var email = info.AuthenticationProperties.GetParameter<string>(ClaimTypes.Email);
var name = info.AuthenticationProperties.GetParameter<string>(ClaimTypes.Name); var name = info.AuthenticationProperties.GetParameter<string>(ClaimTypes.Name);
var avatar = info.AuthenticationProperties.GetParameter<string>("urn:google:profile"); var avatar = info.AuthenticationProperties.GetParameter<string>("urn:google:profile");
@ -780,7 +780,7 @@ IHtmlLocalizerFactory htmlLocalizerFactory,
AddErrors(result); AddErrors(result);
} }
ViewData["ReturnUrl"] = returnUrl; ViewBag.ReturnUrl = returnUrl;
return View(model); return View(model);
} }
@ -1077,7 +1077,7 @@ IHtmlLocalizerFactory htmlLocalizerFactory,
var result = await _signInManager.TwoFactorSignInAsync(model.Provider, model.Code, model.RememberMe, model.RememberMe); var result = await _signInManager.TwoFactorSignInAsync(model.Provider, model.Code, model.RememberMe, model.RememberMe);
if (result.Succeeded) if (result.Succeeded)
{ {
ViewData["StatusMessage"] = "Your code was verified"; ViewBag.StatusMessage = "Your code was verified";
_logger.LogInformation($"Signed in. returning to {model.ReturnUrl}"); _logger.LogInformation($"Signed in. returning to {model.ReturnUrl}");
if (model.ReturnUrl != null) if (model.ReturnUrl != null)
return Redirect(model.ReturnUrl); return Redirect(model.ReturnUrl);

View file

@ -75,7 +75,7 @@ namespace Yavsc.Controllers
[HttpGet] [HttpGet]
public async Task<IActionResult> Index(ManageMessageId? message = null) public async Task<IActionResult> Index(ManageMessageId? message = null)
{ {
ViewData["StatusMessage"] = ViewBag.StatusMessage =
message == ManageMessageId.ChangePasswordSuccess ? _SR["Your password has been changed."] message == ManageMessageId.ChangePasswordSuccess ? _SR["Your password has been changed."]
: message == ManageMessageId.SetPasswordSuccess ? _SR["Your password has been set."] : message == ManageMessageId.SetPasswordSuccess ? _SR["Your password has been set."]
: message == ManageMessageId.SetTwoFactorSuccess ? _SR["Your two-factor authentication provider has been set."] : message == ManageMessageId.SetTwoFactorSuccess ? _SR["Your two-factor authentication provider has been set."]
@ -484,7 +484,7 @@ namespace Yavsc.Controllers
[HttpGet] [HttpGet]
public async Task<IActionResult> ManageLogins(ManageMessageId? message = null) public async Task<IActionResult> ManageLogins(ManageMessageId? message = null)
{ {
ViewData["StatusMessage"] = ViewBag.StatusMessage =
message == ManageMessageId.RemoveLoginSuccess ? "The external login was removed." message == ManageMessageId.RemoveLoginSuccess ? "The external login was removed."
: message == ManageMessageId.AddLoginSuccess ? "The external login was added." : message == ManageMessageId.AddLoginSuccess ? "The external login was added."
: message == ManageMessageId.Error ? "An error has occurred." : message == ManageMessageId.Error ? "An error has occurred."
@ -496,7 +496,7 @@ namespace Yavsc.Controllers
} }
var userLogins = await _userManager.GetLoginsAsync(user); var userLogins = await _userManager.GetLoginsAsync(user);
ViewData["ShowRemoveButton"] = user.PasswordHash != null || userLogins.Count > 1; ViewBag.ShowRemoveButton = user.PasswordHash != null || userLogins.Count > 1;
return View(new ManageLoginsViewModel return View(new ManageLoginsViewModel
{ {
@ -748,15 +748,15 @@ namespace Yavsc.Controllers
} }
public async Task<IActionResult> PaymentInfo (string id) public async Task<IActionResult> PaymentInfo (string id)
{ {
ViewData["id"] = id; ViewBag.id = id;
var info = await PayPalHelpers.GetCheckoutInfo(_dbContext,id); var info = await PayPalHelpers.GetCheckoutInfo(_dbContext,id);
return View(info); return View(info);
} }
public IActionResult PaymentError (string id, string error) public IActionResult PaymentError (string id, string error)
{ {
ViewData["error"] = error; ViewBag.error = error;
ViewData["id"] = id; ViewBag.id = id;
return View(); return View();
} }
} }

View file

@ -44,7 +44,7 @@ namespace Yavsc.Controllers
// GET: Users/Create // GET: Users/Create
public IActionResult Create() public IActionResult Create()
{ {
ViewData["PostalAddressId"] = new SelectList(_context.Locations, "Id", "PostalAddress"); ViewBag.PostalAddressId = new SelectList(_context.Locations, "Id", "PostalAddress");
return View(); return View();
} }
@ -59,7 +59,7 @@ namespace Yavsc.Controllers
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
ViewData["PostalAddressId"] = new SelectList(_context.Locations, "Id", "PostalAddress", applicationUser.PostalAddressId); ViewBag.PostalAddressId = new SelectList(_context.Locations, "Id", "PostalAddress", applicationUser.PostalAddressId);
return View(applicationUser); return View(applicationUser);
} }
@ -76,7 +76,7 @@ namespace Yavsc.Controllers
{ {
return NotFound(); return NotFound();
} }
ViewData["PostalAddressId"] = new SelectList(_context.Locations, "Id", "PostalAddress", applicationUser.PostalAddressId); ViewBag.PostalAddressId = new SelectList(_context.Locations, "Id", "PostalAddress", applicationUser.PostalAddressId);
return View(applicationUser); return View(applicationUser);
} }
@ -91,7 +91,7 @@ namespace Yavsc.Controllers
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
ViewData["PostalAddressId"] = new SelectList(_context.Locations, "Id", "PostalAddress", applicationUser.PostalAddressId); ViewBag.PostalAddressId = new SelectList(_context.Locations, "Id", "PostalAddress", applicationUser.PostalAddressId);
return View(applicationUser); return View(applicationUser);
} }

View file

@ -132,7 +132,7 @@ namespace Yavsc.Controllers
Value = ((int) ApplicationTypes.NativeConfidential).ToString() Value = ((int) ApplicationTypes.NativeConfidential).ToString()
} }
}; };
ViewData["AccessTokenType"] = types; ViewBag.AccessTokenType = types;
} }
// GET: Client/Edit/5 // GET: Client/Edit/5
public async Task<IActionResult> Edit(int id) public async Task<IActionResult> Edit(int id)

View file

@ -53,7 +53,7 @@ namespace Yavsc.Controllers
[HttpGet] [HttpGet]
public IActionResult Title(string id) public IActionResult Title(string id)
{ {
ViewData["Title"] = id; ViewBag.Title = id;
return View("Title", blogSpotService.GetTitle(id)); return View("Title", blogSpotService.GetTitle(id));
} }
@ -70,8 +70,8 @@ namespace Yavsc.Controllers
try try
{ {
var blog = await blogSpotService.Details(User, id.Value); var blog = await blogSpotService.Details(User, id.Value);
ViewData["apicmtctlr"] = "/api/blogcomments"; ViewBag.apicmtctlr = "/api/blogcomments";
ViewData["moderatoFlag"] = User.IsInMsRole(YavscConstants.BlogModeratorGroupName); ViewBag.moderatoFlag = User.IsInMsRole(YavscConstants.BlogModeratorGroupName);
return View(blog); return View(blog);
@ -150,7 +150,7 @@ namespace Yavsc.Controllers
if (ModelState.IsValid) if (ModelState.IsValid)
{ {
await blogSpotService.Modify(User, blogEdit); await blogSpotService.Modify(User, blogEdit);
ViewData["StatusMessage"] = "Post modified"; ViewBag.StatusMessage = "Post modified";
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
return View(blogEdit); return View(blogEdit);

View file

@ -69,8 +69,8 @@ namespace Yavsc.Controllers
await _context.SaveChangesAsync(User.GetUserId()); await _context.SaveChangesAsync(User.GetUserId());
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
ViewData["CircleId"] = new SelectList(_context.Circle, "Id", "Name", circleMember.CircleId); ViewBag.CircleId = new SelectList(_context.Circle, "Id", "Name", circleMember.CircleId);
ViewData["MemberId"] = new SelectList(_context.Users, "Id", "UserName", circleMember.MemberId); ViewBag.MemberId = new SelectList(_context.Users, "Id", "UserName", circleMember.MemberId);
return View(circleMember); return View(circleMember);
} }
@ -99,8 +99,8 @@ namespace Yavsc.Controllers
await _context.SaveChangesAsync(User.GetUserId()); await _context.SaveChangesAsync(User.GetUserId());
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
ViewData["CircleId"] = new SelectList(_context.Circle, "Id", "Circle", circleMember.CircleId); ViewBag.CircleId = new SelectList(_context.Circle, "Id", "Circle", circleMember.CircleId);
ViewData["MemberId"] = new SelectList(_context.Users, "Id", "Member", circleMember.MemberId); ViewBag.MemberId = new SelectList(_context.Users, "Id", "Member", circleMember.MemberId);
return View(circleMember); return View(circleMember);
} }

View file

@ -48,7 +48,7 @@ namespace Yavsc.Controllers
// GET: Comments/Create // GET: Comments/Create
public IActionResult Create() public IActionResult Create()
{ {
ViewData["ReceiverId"] = new SelectList(_context.BlogSpot, "Id", "Post"); ViewBag.ReceiverId = new SelectList(_context.BlogSpot, "Id", "Post");
return View(); return View();
} }
@ -65,7 +65,7 @@ namespace Yavsc.Controllers
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
ViewData["ReceiverId"] = new SelectList(_context.BlogSpot, "Id", "Post", comment.ReceiverId); ViewBag.ReceiverId = new SelectList(_context.BlogSpot, "Id", "Post", comment.ReceiverId);
return View(comment); return View(comment);
} }
@ -82,7 +82,7 @@ namespace Yavsc.Controllers
{ {
return NotFound(); return NotFound();
} }
ViewData["ReceiverId"] = new SelectList(_context.BlogSpot, "Id", "Post", comment.ReceiverId); ViewBag.ReceiverId = new SelectList(_context.BlogSpot, "Id", "Post", comment.ReceiverId);
return View(comment); return View(comment);
} }
@ -97,7 +97,7 @@ namespace Yavsc.Controllers
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
ViewData["ReceiverId"] = new SelectList(_context.BlogSpot, "Id", "Post", comment.ReceiverId); ViewBag.ReceiverId = new SelectList(_context.BlogSpot, "Id", "Post", comment.ReceiverId);
return View(comment); return View(comment);
} }

View file

@ -60,8 +60,8 @@ namespace Yavsc.Controllers
await _context.SaveChangesAsync(User.GetUserId()); await _context.SaveChangesAsync(User.GetUserId());
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
ViewData["PerformerId"] = new SelectList(_context.Performers, "PerformerId", "Performer", coWorking.PerformerId); ViewBag.PerformerId = new SelectList(_context.Performers, "PerformerId", "Performer", coWorking.PerformerId);
ViewData["WorkingForId"] = new SelectList(_context.Users, "Id", "WorkingFor", coWorking.WorkingForId); ViewBag.WorkingForId = new SelectList(_context.Users, "Id", "WorkingFor", coWorking.WorkingForId);
return View(coWorking); return View(coWorking);
} }
@ -78,8 +78,8 @@ namespace Yavsc.Controllers
{ {
return NotFound(); return NotFound();
} }
ViewData["PerformerId"] = new SelectList(_context.Performers, "PerformerId", "Performer", coWorking.PerformerId); ViewBag.PerformerId = new SelectList(_context.Performers, "PerformerId", "Performer", coWorking.PerformerId);
ViewData["WorkingForId"] = new SelectList(_context.Users, "Id", "WorkingFor", coWorking.WorkingForId); ViewBag.WorkingForId = new SelectList(_context.Users, "Id", "WorkingFor", coWorking.WorkingForId);
return View(coWorking); return View(coWorking);
} }
@ -94,8 +94,8 @@ namespace Yavsc.Controllers
await _context.SaveChangesAsync(User.GetUserId()); await _context.SaveChangesAsync(User.GetUserId());
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
ViewData["PerformerId"] = new SelectList(_context.Performers, "PerformerId", "Performer", coWorking.PerformerId); ViewBag.PerformerId = new SelectList(_context.Performers, "PerformerId", "Performer", coWorking.PerformerId);
ViewData["WorkingForId"] = new SelectList(_context.Users, "Id", "WorkingFor", coWorking.WorkingForId); ViewBag.WorkingForId = new SelectList(_context.Users, "Id", "WorkingFor", coWorking.WorkingForId);
return View(coWorking); return View(coWorking);
} }

View file

@ -79,7 +79,7 @@ namespace Yavsc.Controllers
userId = User.GetUserId(); userId = User.GetUserId();
var model = new UserActivity { UserId = userId }; var model = new UserActivity { UserId = userId };
ViewBag.DoesCode = new SelectList(dbContext.Activities, "Code", "Name"); ViewBag.DoesCode = new SelectList(dbContext.Activities, "Code", "Name");
//ViewData["UserId"] = userId; //ViewBag.UserId = userId;
ViewBag.UserId = new SelectList(dbContext.Performers.Include(p=>p.Performer), "PerformerId", "Performer", userId); ViewBag.UserId = new SelectList(dbContext.Performers.Include(p=>p.Performer), "PerformerId", "Performer", userId);
return View(model); return View(model);
} }
@ -123,8 +123,8 @@ namespace Yavsc.Controllers
{ {
return NotFound(); return NotFound();
} }
ViewData["DoesCode"] = new SelectList(dbContext.Activities, "Code", "Does", userActivity.DoesCode); ViewBag.DoesCode = new SelectList(dbContext.Activities, "Code", "Does", userActivity.DoesCode);
ViewData["UserId"] = new SelectList(dbContext.Performers, "PerformerId", "User", userActivity.UserId); ViewBag.UserId = new SelectList(dbContext.Performers, "PerformerId", "User", userActivity.UserId);
return View(userActivity); return View(userActivity);
} }
@ -142,8 +142,8 @@ namespace Yavsc.Controllers
dbContext.SaveChanges(User.GetUserId()); dbContext.SaveChanges(User.GetUserId());
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
ViewData["DoesCode"] = new SelectList(dbContext.Activities, "Code", "Does", userActivity.DoesCode); ViewBag.DoesCode = new SelectList(dbContext.Activities, "Code", "Does", userActivity.DoesCode);
ViewData["UserId"] = new SelectList(dbContext.Performers, "PerformerId", "User", userActivity.UserId); ViewBag.UserId = new SelectList(dbContext.Performers, "PerformerId", "User", userActivity.UserId);
return View(userActivity); return View(userActivity);
} }

View file

@ -81,7 +81,7 @@ namespace Yavsc.Controllers
return NotFound(); return NotFound();
} }
var paymentInfo = await _context.ConfirmPayment(User.GetUserId(), PayerID, token); var paymentInfo = await _context.ConfirmPayment(User.GetUserId(), PayerID, token);
ViewData["paymentinfo"] = paymentInfo; ViewBag.paymentinfo = paymentInfo;
command.Regularisation = paymentInfo.DbContent; command.Regularisation = paymentInfo.DbContent;
command.PaymentId = token; command.PaymentId = token;
bool paymentOk = false; bool paymentOk = false;
@ -123,7 +123,7 @@ namespace Yavsc.Controllers
); );
} }
ViewData["Notify"] = new List<Notification> { ViewBag.Notify = new List<Notification> {
new Notification { new Notification {
title= "Paiment PayPal", title= "Paiment PayPal",
body = "Votre paiment a été accépté." body = "Votre paiment a été accépté."
@ -377,7 +377,7 @@ namespace Yavsc.Controllers
ViewBag.ColorsClass = (pPrestation.Tech == HairTechnos.Color ViewBag.ColorsClass = (pPrestation.Tech == HairTechnos.Color
|| pPrestation.Tech == HairTechnos.Mech) ? "" : "hidden"; || pPrestation.Tech == HairTechnos.Mech) ? "" : "hidden";
ViewBag.TechClass = (pPrestation.Gender == HairCutGenders.Women) ? "" : "hidden"; ViewBag.TechClass = (pPrestation.Gender == HairCutGenders.Women) ? "" : "hidden";
ViewData["PerfPrefs"] = _context.BrusherProfile.Single(p => p.UserId == performerId); ViewBag.PerfPrefs = _context.BrusherProfile.Single(p => p.UserId == performerId);
} }
[HttpPost, Authorize] [HttpPost, Authorize]

View file

@ -96,7 +96,7 @@ namespace Yavsc.Controllers
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
ViewData["OwnerId"] = new SelectList(_context.ApplicationUser, "Id", "Owner", gitRepositoryReference.OwnerId); ViewBag.OwnerId = new SelectList(_context.ApplicationUser, "Id", "Owner", gitRepositoryReference.OwnerId);
return View(gitRepositoryReference); return View(gitRepositoryReference);
} }
@ -124,7 +124,7 @@ namespace Yavsc.Controllers
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
ViewData["OwnerId"] = new SelectList(_context.ApplicationUser, "Id", "Owner", gitRepositoryReference.OwnerId); ViewBag.OwnerId = new SelectList(_context.ApplicationUser, "Id", "Owner", gitRepositoryReference.OwnerId);
return View(gitRepositoryReference); return View(gitRepositoryReference);
} }

View file

@ -77,7 +77,7 @@ namespace Yavsc.Controllers
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
ViewData["OwnerId"] = new SelectList(_context.Performers, "PerformerId", "Profile", instrumentRating.OwnerId); ViewBag.OwnerId = new SelectList(_context.Performers, "PerformerId", "Profile", instrumentRating.OwnerId);
return View(instrumentRating); return View(instrumentRating);
} }
@ -94,7 +94,7 @@ namespace Yavsc.Controllers
{ {
return NotFound(); return NotFound();
} }
ViewData["OwnerId"] = new SelectList(_context.Performers, "PerformerId", "Profile", instrumentRating.OwnerId); ViewBag.OwnerId = new SelectList(_context.Performers, "PerformerId", "Profile", instrumentRating.OwnerId);
return View(instrumentRating); return View(instrumentRating);
} }
@ -109,7 +109,7 @@ namespace Yavsc.Controllers
await _context.SaveChangesAsync(); await _context.SaveChangesAsync();
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
ViewData["OwnerId"] = new SelectList(_context.Performers, "PerformerId", "Profile", instrumentRating.OwnerId); ViewBag.OwnerId = new SelectList(_context.Performers, "PerformerId", "Profile", instrumentRating.OwnerId);
return View(instrumentRating); return View(instrumentRating);
} }

View file

@ -30,8 +30,8 @@ namespace Yavsc.Controllers
public async Task<IActionResult> Index(int skip = 0, int take = 25) public async Task<IActionResult> Index(int skip = 0, int take = 25)
{ {
if (take > 50) return BadRequest(); if (take > 50) return BadRequest();
ViewData["skip"]=skip; ViewBag.skip=skip;
ViewData["take"]=take; ViewBag.take=take;
return View(await _context.Bug.Skip(skip).Take(take).ToListAsync()); return View(await _context.Bug.Skip(skip).Take(take).ToListAsync());
} }

View file

@ -24,10 +24,10 @@ namespace Yavsc.Helpers
} }
private static List<Notification> SetupNotificationList(this Controller controller) private static List<Notification> SetupNotificationList(this Controller controller)
{ {
List<Notification> notifs = (List<Notification>)controller.ViewData["Notify"]; List<Notification> notifs = (List<Notification>)controller.ViewBag.Notify;
if (notifs == null) if (notifs == null)
{ {
controller.ViewData["Notify"] = notifs = new List<Notification>(); controller.ViewBag.Notify = notifs = new List<Notification>();
} }
return notifs; return notifs;
} }

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,193 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
#nullable disable
namespace Yavsc.Migrations
{
/// <inheritdoc />
public partial class pending : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "RegexAlertPatterns",
columns: table => new
{
Id = table.Column<int>(type: "integer", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
Pattern = table.Column<string>(type: "character varying(500)", maxLength: 500, nullable: false),
Description = table.Column<string>(type: "character varying(200)", maxLength: 200, nullable: true),
Severity = table.Column<int>(type: "integer", nullable: false),
IsActive = table.Column<bool>(type: "boolean", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_RegexAlertPatterns", x => x.Id);
});
migrationBuilder.CreateTable(
name: "TrustTokens",
columns: table => new
{
Id = table.Column<Guid>(type: "uuid", nullable: false),
TokenHash = table.Column<string>(type: "character varying(128)", maxLength: 128, nullable: false),
TokenSource = table.Column<string>(type: "character varying(32)", maxLength: 32, nullable: false),
CreatedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
TrustScore = table.Column<int>(type: "integer", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_TrustTokens", x => x.Id);
});
migrationBuilder.CreateTable(
name: "TrustDeclarations",
columns: table => new
{
Id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
TrustTokenId = table.Column<Guid>(type: "uuid", nullable: false),
DeclarantTokenId = table.Column<Guid>(type: "uuid", nullable: false),
Content = table.Column<string>(type: "character varying(2000)", maxLength: 2000, nullable: true),
Sentiment = table.Column<int>(type: "integer", nullable: false),
SubmittedAt = table.Column<DateTime>(type: "timestamp with time zone", nullable: false),
Status = table.Column<int>(type: "integer", nullable: false),
ScoreDelta = table.Column<int>(type: "integer", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_TrustDeclarations", x => x.Id);
table.ForeignKey(
name: "FK_TrustDeclarations_TrustTokens_TrustTokenId",
column: x => x.TrustTokenId,
principalTable: "TrustTokens",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateTable(
name: "DeclarationFlag",
columns: table => new
{
Id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
DeclarationId = table.Column<long>(type: "bigint", nullable: false),
PatternId = table.Column<int>(type: "integer", nullable: false),
MatchExcerpt = table.Column<string>(type: "character varying(100)", maxLength: 100, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_DeclarationFlag", x => x.Id);
table.ForeignKey(
name: "FK_DeclarationFlag_RegexAlertPatterns_PatternId",
column: x => x.PatternId,
principalTable: "RegexAlertPatterns",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_DeclarationFlag_TrustDeclarations_DeclarationId",
column: x => x.DeclarationId,
principalTable: "TrustDeclarations",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "ModerationLogs",
columns: table => new
{
Id = table.Column<long>(type: "bigint", nullable: false)
.Annotation("Npgsql:ValueGenerationStrategy", NpgsqlValueGenerationStrategy.IdentityByDefaultColumn),
DeclarationId = table.Column<long>(type: "bigint", nullable: false),
ModeratorId = table.Column<string>(type: "text", nullable: true),
Action = table.Column<int>(type: "integer", nullable: false),
ScoreDelta = table.Column<int>(type: "integer", nullable: false),
Timestamp = table.Column<DateTime>(type: "timestamp with time zone", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_ModerationLogs", x => x.Id);
table.CheckConstraint("CK_ModerationLog_Immutable", "1=1");
table.ForeignKey(
name: "FK_ModerationLogs_TrustDeclarations_DeclarationId",
column: x => x.DeclarationId,
principalTable: "TrustDeclarations",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_DeclarationFlag_DeclarationId",
table: "DeclarationFlag",
column: "DeclarationId");
migrationBuilder.CreateIndex(
name: "IX_DeclarationFlag_PatternId",
table: "DeclarationFlag",
column: "PatternId");
migrationBuilder.CreateIndex(
name: "IX_ModerationLogs_DeclarationId",
table: "ModerationLogs",
column: "DeclarationId");
migrationBuilder.CreateIndex(
name: "IX_ModerationLogs_ModeratorId",
table: "ModerationLogs",
column: "ModeratorId");
migrationBuilder.CreateIndex(
name: "IX_ModerationLogs_Timestamp",
table: "ModerationLogs",
column: "Timestamp");
migrationBuilder.CreateIndex(
name: "IX_RegexAlertPatterns_IsActive",
table: "RegexAlertPatterns",
column: "IsActive");
migrationBuilder.CreateIndex(
name: "IX_TrustDeclarations_Status",
table: "TrustDeclarations",
column: "Status");
migrationBuilder.CreateIndex(
name: "IX_TrustDeclarations_SubmittedAt",
table: "TrustDeclarations",
column: "SubmittedAt");
migrationBuilder.CreateIndex(
name: "IX_TrustDeclarations_TrustTokenId",
table: "TrustDeclarations",
column: "TrustTokenId");
migrationBuilder.CreateIndex(
name: "IX_TrustTokens_TokenHash",
table: "TrustTokens",
column: "TokenHash",
unique: true);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "DeclarationFlag");
migrationBuilder.DropTable(
name: "ModerationLogs");
migrationBuilder.DropTable(
name: "RegexAlertPatterns");
migrationBuilder.DropTable(
name: "TrustDeclarations");
migrationBuilder.DropTable(
name: "TrustTokens");
}
}
}

View file

@ -17,7 +17,7 @@ namespace Yavsc.Migrations
{ {
#pragma warning disable 612, 618 #pragma warning disable 612, 618
modelBuilder modelBuilder
.HasAnnotation("ProductVersion", "9.0.7") .HasAnnotation("ProductVersion", "10.0.8")
.HasAnnotation("Relational:MaxIdentifierLength", 63); .HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder); NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
@ -2170,6 +2170,171 @@ namespace Yavsc.Migrations
b.ToTable("DeviceDeclaration"); b.ToTable("DeviceDeclaration");
}); });
modelBuilder.Entity("Yavsc.Models.Kyc.DeclarationFlag", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<long>("DeclarationId")
.HasColumnType("bigint");
b.Property<string>("MatchExcerpt")
.HasMaxLength(100)
.HasColumnType("character varying(100)");
b.Property<int>("PatternId")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("DeclarationId");
b.HasIndex("PatternId");
b.ToTable("DeclarationFlag");
});
modelBuilder.Entity("Yavsc.Models.Kyc.ModerationLog", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<int>("Action")
.HasColumnType("integer");
b.Property<long>("DeclarationId")
.HasColumnType("bigint");
b.Property<string>("ModeratorId")
.HasColumnType("text");
b.Property<int>("ScoreDelta")
.HasColumnType("integer");
b.Property<DateTime>("Timestamp")
.HasColumnType("timestamp with time zone");
b.HasKey("Id");
b.HasIndex("DeclarationId");
b.HasIndex("ModeratorId");
b.HasIndex("Timestamp");
b.ToTable("ModerationLogs", t =>
{
t.HasCheckConstraint("CK_ModerationLog_Immutable", "1=1");
});
});
modelBuilder.Entity("Yavsc.Models.Kyc.RegexAlertPattern", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("Description")
.HasMaxLength(200)
.HasColumnType("character varying(200)");
b.Property<bool>("IsActive")
.HasColumnType("boolean");
b.Property<string>("Pattern")
.IsRequired()
.HasMaxLength(500)
.HasColumnType("character varying(500)");
b.Property<int>("Severity")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("IsActive");
b.ToTable("RegexAlertPatterns");
});
modelBuilder.Entity("Yavsc.Models.Kyc.TrustDeclaration", b =>
{
b.Property<long>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<long>("Id"));
b.Property<string>("Content")
.HasMaxLength(2000)
.HasColumnType("character varying(2000)");
b.Property<Guid>("DeclarantTokenId")
.HasColumnType("uuid");
b.Property<int?>("ScoreDelta")
.HasColumnType("integer");
b.Property<int>("Sentiment")
.HasColumnType("integer");
b.Property<int>("Status")
.HasColumnType("integer");
b.Property<DateTime>("SubmittedAt")
.HasColumnType("timestamp with time zone");
b.Property<Guid>("TrustTokenId")
.HasColumnType("uuid");
b.HasKey("Id");
b.HasIndex("Status");
b.HasIndex("SubmittedAt");
b.HasIndex("TrustTokenId");
b.ToTable("TrustDeclarations");
});
modelBuilder.Entity("Yavsc.Models.Kyc.TrustToken", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("uuid");
b.Property<DateTime>("CreatedAt")
.HasColumnType("timestamp with time zone");
b.Property<string>("TokenHash")
.IsRequired()
.HasMaxLength(128)
.HasColumnType("character varying(128)");
b.Property<string>("TokenSource")
.IsRequired()
.HasMaxLength(32)
.HasColumnType("character varying(32)");
b.Property<int?>("TrustScore")
.HasColumnType("integer");
b.HasKey("Id");
b.HasIndex("TokenHash")
.IsUnique();
b.ToTable("TrustTokens");
});
modelBuilder.Entity("Yavsc.Models.Market.Product", b => modelBuilder.Entity("Yavsc.Models.Market.Product", b =>
{ {
b.Property<long>("Id") b.Property<long>("Id")
@ -3838,6 +4003,47 @@ namespace Yavsc.Migrations
b.Navigation("DeviceOwner"); b.Navigation("DeviceOwner");
}); });
modelBuilder.Entity("Yavsc.Models.Kyc.DeclarationFlag", b =>
{
b.HasOne("Yavsc.Models.Kyc.TrustDeclaration", "Declaration")
.WithMany("Flags")
.HasForeignKey("DeclarationId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Yavsc.Models.Kyc.RegexAlertPattern", "Pattern")
.WithMany()
.HasForeignKey("PatternId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("Declaration");
b.Navigation("Pattern");
});
modelBuilder.Entity("Yavsc.Models.Kyc.ModerationLog", b =>
{
b.HasOne("Yavsc.Models.Kyc.TrustDeclaration", "Declaration")
.WithMany()
.HasForeignKey("DeclarationId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("Declaration");
});
modelBuilder.Entity("Yavsc.Models.Kyc.TrustDeclaration", b =>
{
b.HasOne("Yavsc.Models.Kyc.TrustToken", "Subject")
.WithMany("Declarations")
.HasForeignKey("TrustTokenId")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.Navigation("Subject");
});
modelBuilder.Entity("Yavsc.Models.Market.Service", b => modelBuilder.Entity("Yavsc.Models.Market.Service", b =>
{ {
b.HasOne("Yavsc.Models.Workflow.Activity", "Context") b.HasOne("Yavsc.Models.Workflow.Activity", "Context")
@ -4303,6 +4509,16 @@ namespace Yavsc.Migrations
b.Navigation("Taints"); b.Navigation("Taints");
}); });
modelBuilder.Entity("Yavsc.Models.Kyc.TrustDeclaration", b =>
{
b.Navigation("Flags");
});
modelBuilder.Entity("Yavsc.Models.Kyc.TrustToken", b =>
{
b.Navigation("Declarations");
});
modelBuilder.Entity("Yavsc.Models.Musical.Profiles.DjSettings", b => modelBuilder.Entity("Yavsc.Models.Musical.Profiles.DjSettings", b =>
{ {
b.Navigation("SoundColor"); b.Navigation("SoundColor");

View file

@ -1,6 +1,4 @@
using Anthropic.SDK; using Anthropic.SDK;
using Microsoft.AspNetCore;
using Yavsc.Abstract.Interfaces; using Yavsc.Abstract.Interfaces;
using Yavsc.Extensions; using Yavsc.Extensions;
@ -17,7 +15,7 @@ namespace Yavsc
new AnthropicClient( new AnthropicClient(
new APIAuthentication( new APIAuthentication(
builder.Configuration["ANTHROPIC_API_KEY"] builder.Configuration["ANTHROPIC_API_KEY"]
?? throw new InvalidOperationException("ANTHROPIC_API_KEY manquante") ?? throw new InvalidOperationException("ANTHROPIC_API_KEY manquante")
) )
) )
); );
@ -28,15 +26,10 @@ namespace Yavsc
else else
builder.Services.AddScoped<IModerationService, ClaudeModerationService>(); builder.Services.AddScoped<IModerationService, ClaudeModerationService>();
var rootConfig = builder.Configuration var app = await builder
.AddJsonFile("appsettings.json") .ConfigureWebAppServices()
.AddJsonFile($"appsettings.{builder.Environment.EnvironmentName}.json", optional: true) .ConfigurePipeline();
.AddEnvironmentVariables()
.Build();
rootConfig.GetConnectionString(YavscConstants.YavscConnectionStringName);
var app = await builder.ConfigureWebAppServices().ConfigurePipeline();
app.Run(); app.Run();
} }
} }

View file

@ -23,7 +23,7 @@ namespace Yavsc.ViewComponents
var comment = await context.Comment.Include(c=>c.Children).FirstOrDefaultAsync(c => c.Id==id); var comment = await context.Comment.Include(c=>c.Children).FirstOrDefaultAsync(c => c.Id==id);
if (comment == null) if (comment == null)
throw new InvalidOperationException(); throw new InvalidOperationException();
ViewData["apictlr"] = "/api/blogcomments"; ViewBag.apictlr = "/api/blogcomments";
return View("Default", comment); return View("Default", comment);
} }

View file

@ -16,9 +16,9 @@ namespace Yavsc.ViewComponents
} }
public IViewComponentResult Invoke(ITaggable<long> longTaggable) public IViewComponentResult Invoke(ITaggable<long> longTaggable)
{ {
ViewData["Tags"] = longTaggable.GetTags(); ViewBag.Tags = longTaggable.GetTags();
ViewData["at"] = localizer["at"]; ViewBag.at = localizer["at"];
ViewData["apictlr"] = "~/api/"+localizer["apiRouteTag"+longTaggable.GetType().Name]; ViewBag.apictlr = "~/api/"+localizer["apiRouteTag"+longTaggable.GetType().Name];
return View(longTaggable); return View(longTaggable);
} }
} }

View file

@ -1,9 +1,9 @@
@{ @{
ViewData["Title"] = "Account creation success"; ViewBag.Title = "Account creation success";
} }
<h1>@ViewData["Title"]</h1> <h1>@ViewBag.Title</h1>
Your account has successfully been created. Your account has successfully been created.

View file

@ -1,9 +1,9 @@
@model UnregisterViewModel @model UnregisterViewModel
@{ @{
ViewData["Title"] = "Unregister"; ViewBag.Title = "Unregister";
} }
<h2>@ViewData["Title"].</h2> <h2>@ViewBag.Title.</h2>
<form asp-controller="Account" asp-action="AdminDelete" method="post" class="form-horizontal" role="form"> <form asp-controller="Account" asp-action="AdminDelete" method="post" class="form-horizontal" role="form">

View file

@ -1,10 +1,10 @@
@model Yavsc.Abstract.Manage.EmailSentViewModel @model Yavsc.Abstract.Manage.EmailSentViewModel
@{ @{
ViewData["Title"] = "S'il vous plait, veuillez confirmer votre adresse e-mail"; ViewBag.Title = "S'il vous plait, veuillez confirmer votre adresse e-mail";
} }
<h2>@ViewData["Title"].</h2> <h2>@ViewBag.Title.</h2>
<div> <div>
<p> <p>
Un message vient d'être envoyé à l'adresse e-mail ( @Model.EMail , id:@Model.MessageId ). Un message vient d'être envoyé à l'adresse e-mail ( @Model.EMail , id:@Model.MessageId ).

View file

@ -1,8 +1,8 @@
@{ @{
ViewData["Title"] = "Confirmation de votre adresse e-mail"; ViewBag.Title = "Confirmation de votre adresse e-mail";
} }
<h2>@ViewData["Title"].</h2> <h2>@ViewBag.Title.</h2>
<div> <div>
<p> <p>
Merci d&rsquo;avoir confirmé votre e-mail. Merci d&rsquo;avoir confirmé votre e-mail.

View file

@ -1,7 +1,7 @@
@{ @{
ViewData["Title"] = "Reset password confirmation"; ViewBag.Title = "Reset password confirmation";
} }
<h1>@ViewData["Title"].</h1> <h1>@ViewBag.Title.</h1>
<p>Votre mot de passe a été ré-initialisé. <p>Votre mot de passe a été ré-initialisé.
<a href="~/signin">Cliquez ici pour vous connecter</a>.</p> <a href="~/signin">Cliquez ici pour vous connecter</a>.</p>

View file

@ -1,8 +1,8 @@
@{ @{
ViewData["Title"] = "Reset password confirmation"; ViewBag.Title = "Reset password confirmation";
} }
<h1>@ViewData["Title"].</h1> <h1>@ViewBag.Title.</h1>
<p> <p>
Your password has been reset. Please <a href="~/signin">Click here to log in</a>. Your password has been reset. Please <a href="~/signin">Click here to log in</a>.
</p> </p>

View file

@ -1,9 +1,9 @@
@model ApplicationUser[] @model ApplicationUser[]
@{ @{
ViewData["Title"] = "Liste des utilisateurs"; ViewBag.Title = "Liste des utilisateurs";
} }
<h2>@ViewData["Title"].</h2> <h2>@ViewBag.Title.</h2>
<table > <table >
<thead> <thead>
<th> <th>

View file

@ -1,7 +1,7 @@
@model Activity @model Activity
@{ @{
ViewData["Title"] = "Create"; ViewBag.Title = "Create";
} }
<h2>Create</h2> <h2>Create</h2>

View file

@ -1,7 +1,7 @@
@model Activity @model Activity
@{ @{
ViewData["Title"] = "Delete"; ViewBag.Title = "Delete";
} }
<h2>Delete</h2> <h2>Delete</h2>

View file

@ -1,7 +1,7 @@
@model Activity @model Activity
@{ @{
ViewData["Title"] = "Details"; ViewBag.Title = "Details";
} }
<h2>Details</h2> <h2>Details</h2>

View file

@ -1,7 +1,7 @@
@model Activity @model Activity
@{ @{
ViewData["Title"] = "Edit"; ViewBag.Title = "Edit";
} }
<h2>Edit</h2> <h2>Edit</h2>

View file

@ -1,7 +1,7 @@
@model IEnumerable<Activity> @model IEnumerable<Activity>
@{ @{
ViewData["Title"] = "Index"; ViewBag.Title = "Index";
} }
@section scripts { @section scripts {
<script> <script>
@ -10,7 +10,7 @@
}) })
</script> </script>
} }
<h2>@ViewData["Title"]</h2> <h2>@ViewBag.Title</h2>
<p> <p>
<a asp-action="Create">Create New</a> <a asp-action="Create">Create New</a>

View file

@ -1,7 +1,7 @@
@model Yavsc.Models.Messaging.Announce @model Yavsc.Models.Messaging.Announce
@{ @{
ViewData["Title"] = "Create"; ViewBag.Title = "Create";
} }
<h2>Create</h2> <h2>Create</h2>

View file

@ -1,7 +1,7 @@
@model Yavsc.Models.Messaging.Announce @model Yavsc.Models.Messaging.Announce
@{ @{
ViewData["Title"] = "Delete"; ViewBag.Title = "Delete";
} }
<h2>Delete</h2> <h2>Delete</h2>

View file

@ -1,7 +1,7 @@
@model Yavsc.Models.Messaging.Announce @model Yavsc.Models.Messaging.Announce
@{ @{
ViewData["Title"] = "Details"; ViewBag.Title = "Details";
} }
<h2>Details</h2> <h2>Details</h2>

View file

@ -1,7 +1,7 @@
@model Yavsc.Models.Messaging.Announce @model Yavsc.Models.Messaging.Announce
@{ @{
ViewData["Title"] = "Edit"; ViewBag.Title = "Edit";
} }
<h2>Edit</h2> <h2>Edit</h2>

View file

@ -1,7 +1,7 @@
@model IEnumerable<Yavsc.Models.Messaging.Announce> @model IEnumerable<Yavsc.Models.Messaging.Announce>
@{ @{
ViewData["Title"] = "Index"; ViewBag.Title = "Index";
} }
<h2>Index</h2> <h2>Index</h2>

View file

@ -1,7 +1,7 @@
@model BlogPostEditViewModel @model BlogPostEditViewModel
@{ @{
ViewData["Title"] = "Blog post edition"; ViewBag.Title = "Blog post edition";
} }
@section header { @section header {

View file

@ -1,6 +1,6 @@
@model BlogPost @model BlogPost
@{ @{
ViewData["Title"] = "Delete"; ViewBag.Title = "Delete";
} }
@section Scripts { @section Scripts {
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }

View file

@ -1,6 +1,6 @@
@model BlogPost @model BlogPost
@{ @{
ViewData["Title"]=Model.Title; ViewBag.Title=Model.Title;
} }
@section scripts { @section scripts {
@ -42,7 +42,7 @@ $('#commentValidation').html(
var comment = $('#Comment').val(); var comment = $('#Comment').val();
$('#Comment').val(''); $('#Comment').val('');
$('#commentValidation').empty(); $('#commentValidation').empty();
var nnode = '<div data-type="blogcomment" data-id="'+data.id+'" data-allow-edit="True" data-allow-moderate="@ViewData["moderatoFlag"]" data-date="'+data.dateCreated+'" data-username="@User.GetUserName()">'+comment+'</div>'; var nnode = '<div data-type="blogcomment" data-id="'+data.id+'" data-allow-edit="True" data-allow-moderate="@ViewBag.moderatoFlag" data-date="'+data.dateCreated+'" data-username="@User.GetUserName()">'+comment+'</div>';
$('#comments').append($(nnode).blogcomment()) $('#comments').append($(nnode).blogcomment())
}, },
url:'/api/blogcomments' url:'/api/blogcomments'

View file

@ -1,6 +1,6 @@
@model BlogPostEditViewModel @model BlogPostEditViewModel
@{ @{
ViewData["Title"] = "Blog post edition"; ViewBag.Title = "Blog post edition";
} }
@section header { @section header {

View file

@ -1,6 +1,6 @@
@model IEnumerable<IBlogPost> @model IEnumerable<IBlogPost>
@{ @{
ViewData["Title"] = "Blogs, l'index"; ViewBag.Title = "Blogs, l'index";
} }
@section header { @section header {
<style> <style>
@ -36,8 +36,8 @@
) )
</script> </script>
} }
<h2>@ViewData["Title"]</h2> <h2>@ViewBag.Title</h2>
<p class="text-success">@ViewData["StatusMessage"]</p> <p class="text-success">@ViewBag.StatusMessage</p>
@if (User.IsSignedIn()) { @if (User.IsSignedIn()) {
<p> <p>
<a asp-action="Create">Create a new article</a> <a asp-action="Create">Create a new article</a>

View file

@ -1,10 +1,10 @@
@model IEnumerable<BlogPost> @model IEnumerable<BlogPost>
<h2 markdown="@ViewData["Title"]"></h2> <h2 markdown="@ViewBag.Title"></h2>
<p class="text-success">@ViewData["StatusMessage"]</p> <p class="text-success">@ViewBag.StatusMessage</p>
<p> <p>
<a asp-action="Create" asp-route-title="@ViewData["Title"]">Poster au même titre</a> <a asp-action="Create" asp-route-title="@ViewBag.Title">Poster au même titre</a>
</p> </p>
<table class="table"> <table class="table">

View file

@ -1,10 +1,10 @@
@model IEnumerable<BlogPost> @model IEnumerable<BlogPost>
@{ @{
ViewData["Title"] = "User posts"; ViewBag.Title = "User posts";
} }
<h2>Index</h2> <h2>Index</h2>
<p class="text-success">@ViewData["StatusMessage"]</p> <p class="text-success">@ViewBag.StatusMessage</p>
<p> <p>
<a asp-action="Create">Create New</a> <a asp-action="Create">Create New</a>
</p> </p>

View file

@ -1,7 +1,7 @@
@model Yavsc.Models.Haircut.BrusherProfile @model Yavsc.Models.Haircut.BrusherProfile
@{ @{
ViewData["Title"] = "Delete"; ViewBag.Title = "Delete";
} }
<h2>Delete</h2> <h2>Delete</h2>

View file

@ -1,7 +1,7 @@
@model Yavsc.Models.Haircut.BrusherProfile @model Yavsc.Models.Haircut.BrusherProfile
@{ @{
ViewData["Title"] = "Edition du profile coiffeu(se|r)"; ViewBag.Title = "Edition du profile coiffeu(se|r)";
} }
@section header { @section header {
@ -19,7 +19,7 @@
</script> </script>
} }
<h1>@ViewData["Title"]</h1> <h1>@ViewBag.Title</h1>
<form asp-action="Edit"> <form asp-action="Edit">
<div class="form-horizontal"> <div class="form-horizontal">

View file

@ -1,9 +1,9 @@
@model Yavsc.Models.Haircut.BrusherProfile @model Yavsc.Models.Haircut.BrusherProfile
@{ @{
ViewData["Title"] = "Profile coiffeur"; ViewBag.Title = "Profile coiffeur";
} }
<h2>@ViewData["Title"]</h2> <h2>@ViewBag.Title</h2>
<div> <div>
<hr /> <hr />

View file

@ -1,7 +1,7 @@
@model Yavsc.Models.IT.Fixing.Bug @model Yavsc.Models.IT.Fixing.Bug
@{ @{
ViewData["Title"] = "Create"; ViewBag.Title = "Create";
} }
<h2>Create</h2> <h2>Create</h2>

View file

@ -1,7 +1,7 @@
@model Yavsc.Models.IT.Fixing.Bug @model Yavsc.Models.IT.Fixing.Bug
@{ @{
ViewData["Title"] = "Delete"; ViewBag.Title = "Delete";
} }
<h2>Delete</h2> <h2>Delete</h2>

View file

@ -1,7 +1,7 @@
@model IEnumerable<Yavsc.Models.IT.Fixing.Bug> @model IEnumerable<Yavsc.Models.IT.Fixing.Bug>
@{ @{
ViewData["Title"] = "DeleteAllLike"; ViewBag.Title = "DeleteAllLike";
} }
<h2>Index</h2> <h2>Index</h2>

View file

@ -1,7 +1,7 @@
@model Yavsc.Models.IT.Fixing.Bug @model Yavsc.Models.IT.Fixing.Bug
@{ @{
ViewData["Title"] = "Details"; ViewBag.Title = "Details";
} }
<h2>Details</h2> <h2>Details</h2>

View file

@ -1,10 +1,10 @@
@model Yavsc.Models.IT.Fixing.Bug @model Yavsc.Models.IT.Fixing.Bug
@{ @{
ViewData["Title"] = "Édition d'un bug"; ViewBag.Title = "Édition d'un bug";
} }
<h2>@ViewData["Title"]</h2> <h2>@ViewBag.Title</h2>
<form asp-action="Edit"> <form asp-action="Edit">
<div class="form-horizontal"> <div class="form-horizontal">

View file

@ -1,7 +1,7 @@
@model IEnumerable<Yavsc.Models.IT.Fixing.Bug> @model IEnumerable<Yavsc.Models.IT.Fixing.Bug>
@{ @{
ViewData["Title"] = "Index"; ViewBag.Title = "Index";
} }
<h2>Index</h2> <h2>Index</h2>

View file

@ -1,7 +1,7 @@
@model Circle @model Circle
@{ @{
ViewData["Title"] = "Create"; ViewBag.Title = "Create";
} }
<h2>Create</h2> <h2>Create</h2>

View file

@ -1,7 +1,7 @@
@model Circle @model Circle
@{ @{
ViewData["Title"] = "Delete"; ViewBag.Title = "Delete";
} }
<h2>Delete</h2> <h2>Delete</h2>

View file

@ -1,7 +1,7 @@
@model Circle @model Circle
@{ @{
ViewData["Title"] = "Details"; ViewBag.Title = "Details";
} }
<h2>Details</h2> <h2>Details</h2>

View file

@ -1,7 +1,7 @@
@model Circle @model Circle
@{ @{
ViewData["Title"] = "Edit"; ViewBag.Title = "Edit";
} }
<h2>Edit</h2> <h2>Edit</h2>

View file

@ -1,7 +1,7 @@
@model IEnumerable<Circle> @model IEnumerable<Circle>
@{ @{
ViewData["Title"] = "Index"; ViewBag.Title = "Index";
} }
<h2>Index</h2> <h2>Index</h2>

View file

@ -1,7 +1,7 @@
@model CircleMember @model CircleMember
@{ @{
ViewData["Title"] = "Create"; ViewBag.Title = "Create";
} }
<h2>Create</h2> <h2>Create</h2>

View file

@ -1,7 +1,7 @@
@model CircleMember @model CircleMember
@{ @{
ViewData["Title"] = "Delete"; ViewBag.Title = "Delete";
} }
<h2>Delete</h2> <h2>Delete</h2>

View file

@ -1,7 +1,7 @@
@model CircleMember @model CircleMember
@{ @{
ViewData["Title"] = $"{Model.Member.UserName}, du cercle {Model.Circle.Name}" ; ViewBag.Title = $"{Model.Member.UserName}, du cercle {Model.Circle.Name}" ;
} }
<h2></h2> <h2></h2>

View file

@ -1,7 +1,7 @@
@model CircleMember @model CircleMember
@{ @{
ViewData["Title"] = "Edit"; ViewBag.Title = "Edit";
} }
<h2>Edit</h2> <h2>Edit</h2>

View file

@ -1,7 +1,7 @@
@model IEnumerable<CircleMember> @model IEnumerable<CircleMember>
@{ @{
ViewData["Title"] = "Index"; ViewBag.Title = "Index";
} }
<h2>Index</h2> <h2>Index</h2>

View file

@ -1,7 +1,7 @@
@model CoWorking @model CoWorking
@{ @{
ViewData["Title"] = "Create"; ViewBag.Title = "Create";
} }
<h2>Create</h2> <h2>Create</h2>

View file

@ -1,7 +1,7 @@
@model CoWorking @model CoWorking
@{ @{
ViewData["Title"] = "Delete"; ViewBag.Title = "Delete";
} }
<h2>Delete</h2> <h2>Delete</h2>

View file

@ -1,7 +1,7 @@
@model CoWorking @model CoWorking
@{ @{
ViewData["Title"] = "Details"; ViewBag.Title = "Details";
} }
<h2>Details</h2> <h2>Details</h2>

View file

@ -1,7 +1,7 @@
@model CoWorking @model CoWorking
@{ @{
ViewData["Title"] = "Edit"; ViewBag.Title = "Edit";
} }
<h2>Edit</h2> <h2>Edit</h2>

View file

@ -1,7 +1,7 @@
@model IEnumerable<CoWorking> @model IEnumerable<CoWorking>
@{ @{
ViewData["Title"] = "Index"; ViewBag.Title = "Index";
} }
<h2>Index</h2> <h2>Index</h2>

View file

@ -1,6 +1,6 @@
@model Color @model Color
@{ @{
ViewData["Title"] = "Create"; ViewBag.Title = "Create";
} }
<h2>Create</h2> <h2>Create</h2>

View file

@ -1,7 +1,7 @@
@model Yavsc.Models.Drawing.Color @model Yavsc.Models.Drawing.Color
@{ @{
ViewData["Title"] = "Delete"; ViewBag.Title = "Delete";
} }
<h2>Delete</h2> <h2>Delete</h2>

View file

@ -1,7 +1,7 @@
@model Yavsc.Models.Drawing.Color @model Yavsc.Models.Drawing.Color
@{ @{
ViewData["Title"] = "Details"; ViewBag.Title = "Details";
} }
<h2>Details</h2> <h2>Details</h2>

View file

@ -1,7 +1,7 @@
@model Yavsc.Models.Drawing.Color @model Yavsc.Models.Drawing.Color
@{ @{
ViewData["Title"] = "Edit"; ViewBag.Title = "Edit";
} }
<h2>Edit</h2> <h2>Edit</h2>

View file

@ -1,7 +1,7 @@
@model IEnumerable<Color> @model IEnumerable<Color>
@{ @{
ViewData["Title"] = "Index"; ViewBag.Title = "Index";
} }
<h2>Index</h2> <h2>Index</h2>

View file

@ -1,6 +1,6 @@
@model RdvQuery @model RdvQuery
@{ ViewData["Title"] = "Proposition de rendez-vous ["+ViewBag.Activity.Code+"]"; } @{ ViewBag.Title = "Proposition de rendez-vous ["+ViewBag.Activity.Code+"]"; }
<script src="https://maps.googleapis.com/maps/api/js?key=@ViewBag.GoogleSettings.BrowserApiKey"></script> <script src="https://maps.googleapis.com/maps/api/js?key=@ViewBag.GoogleSettings.BrowserApiKey"></script>
<script type="text/javascript" src="~/lib/moment/moment-with-locales.min.js"></script> <script type="text/javascript" src="~/lib/moment/moment-with-locales.min.js"></script>
<script type="text/javascript" src="~/lib/eonasdan-bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script> <script type="text/javascript" src="~/lib/eonasdan-bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
@ -112,7 +112,7 @@
}); });
</script> </script>
} }
<h2>@ViewData["Title"]</h2> <h2>@ViewBag.Title</h2>
<form asp-action="Create" id="FrmComCre" role="form"> <form asp-action="Create" id="FrmComCre" role="form">
<div class="form-horizontal"> <div class="form-horizontal">
<h4>Fill in your book query</h4> <h4>Fill in your book query</h4>

View file

@ -1,9 +1,9 @@
@model RdvQuery @model RdvQuery
@using Yavsc.Models.Google.Messaging @using Yavsc.Models.Google.Messaging
@{ @{
ViewData["Title"] = "Command confirmation"+" "+ViewBag.Activity.Name; ViewBag.Title = "Command confirmation"+" "+ViewBag.Activity.Name;
} }
<h2>@ViewData["Title"]</h2> <h2>@ViewBag.Title</h2>
<div class="form-horizontal"> <div class="form-horizontal">
<h4>Your book query</h4> <h4>Your book query</h4>
<hr /> <hr />

View file

@ -12,8 +12,8 @@
<link rel="stylesheet" href="~/lib/eonasdan-bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" /> <link rel="stylesheet" href="~/lib/eonasdan-bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" />
} }
@{ ViewData["Title"] = $"Proposition de rendez-vous à {Model.PerformerProfile.Performer.UserName} [{ViewBag.Activity.Name}]"; } @{ ViewBag.Title = $"Proposition de rendez-vous à {Model.PerformerProfile.Performer.UserName} [{ViewBag.Activity.Name}]"; }
<h2>@ViewData["Title"]</h2> <h2>@ViewBag.Title</h2>
<form asp-action="Create" method="post"> <form asp-action="Create" method="post">
<div class="form-horizontal"> <div class="form-horizontal">
<h4>Saisissez votre demande de rendez-vous</h4> <h4>Saisissez votre demande de rendez-vous</h4>

View file

@ -1,7 +1,7 @@
@model RdvQuery @model RdvQuery
@{ @{
ViewData["Title"] = "Delete"; ViewBag.Title = "Delete";
} }
<h2>Delete</h2> <h2>Delete</h2>

View file

@ -1,10 +1,10 @@
@model RdvQuery @model RdvQuery
@{ @{
ViewData["Title"] = "Details"; ViewBag.Title = "Details";
} }
<h2>@ViewData["Title"]</h2> <h2>@ViewBag.Title</h2>
<div> <div>
<h4>Command</h4> <h4>Command</h4>

View file

@ -1,7 +1,7 @@
@model RdvQuery @model RdvQuery
@{ @{
ViewData["Title"] = "Edit"; ViewBag.Title = "Edit";
} }
<h2>Edit</h2> <h2>Edit</h2>

View file

@ -1,7 +1,7 @@
@model IEnumerable<RdvQuery> @model IEnumerable<RdvQuery>
@{ @{
ViewData["Title"] = "Index"; ViewBag.Title = "Index";
} }
<h2>Index</h2> <h2>Index</h2>

View file

@ -1,7 +1,7 @@
@model CommandForm @model CommandForm
@{ @{
ViewData["Title"] = "Create"; ViewBag.Title = "Create";
} }
<h2>Create</h2> <h2>Create</h2>

View file

@ -1,7 +1,7 @@
@model CommandForm @model CommandForm
@{ @{
ViewData["Title"] = "Delete"; ViewBag.Title = "Delete";
} }
<h2>Delete</h2> <h2>Delete</h2>

View file

@ -1,7 +1,7 @@
@model CommandForm @model CommandForm
@{ @{
ViewData["Title"] = "Details"; ViewBag.Title = "Details";
} }
<h2>Details</h2> <h2>Details</h2>

View file

@ -1,7 +1,7 @@
@model CommandForm @model CommandForm
@{ @{
ViewData["Title"] = "Edit"; ViewBag.Title = "Edit";
} }
<h2>Edit</h2> <h2>Edit</h2>

View file

@ -1,7 +1,7 @@
@model IEnumerable<CommandForm> @model IEnumerable<CommandForm>
@{ @{
ViewData["Title"] = "Index"; ViewBag.Title = "Index";
} }
<h2>Index</h2> <h2>Index</h2>

View file

@ -1,7 +1,7 @@
@model Yavsc.Models.Blog.Comment @model Yavsc.Models.Blog.Comment
@{ @{
ViewData["Title"] = "Create"; ViewBag.Title = "Create";
} }
<h2>Create</h2> <h2>Create</h2>

View file

@ -1,7 +1,7 @@
@model Yavsc.Models.Blog.Comment @model Yavsc.Models.Blog.Comment
@{ @{
ViewData["Title"] = "Delete"; ViewBag.Title = "Delete";
} }
<h2>Delete</h2> <h2>Delete</h2>

View file

@ -1,7 +1,7 @@
@model Yavsc.Models.Blog.Comment @model Yavsc.Models.Blog.Comment
@{ @{
ViewData["Title"] = "Details"; ViewBag.Title = "Details";
} }
<h2>Details</h2> <h2>Details</h2>

View file

@ -1,7 +1,7 @@
@model Yavsc.Models.Blog.Comment @model Yavsc.Models.Blog.Comment
@{ @{
ViewData["Title"] = "Edit"; ViewBag.Title = "Edit";
} }
<h2>Edit</h2> <h2>Edit</h2>

View file

@ -1,7 +1,7 @@
@model IEnumerable<Yavsc.Models.Blog.Comment> @model IEnumerable<Yavsc.Models.Blog.Comment>
@{ @{
ViewData["Title"] = "Index"; ViewBag.Title = "Index";
} }
<h2>Index</h2> <h2>Index</h2>

View file

@ -1,7 +1,7 @@
@model Yavsc.Models.Musical.Profiles.DjSettings @model Yavsc.Models.Musical.Profiles.DjSettings
@{ @{
ViewData["Title"] = "Create"; ViewBag.Title = "Create";
} }
<h2>Create</h2> <h2>Create</h2>

View file

@ -1,7 +1,7 @@
@model Yavsc.Models.Musical.Profiles.DjSettings @model Yavsc.Models.Musical.Profiles.DjSettings
@{ @{
ViewData["Title"] = "Delete"; ViewBag.Title = "Delete";
} }
<h2>Delete</h2> <h2>Delete</h2>

View file

@ -1,7 +1,7 @@
@model Yavsc.Models.Musical.Profiles.DjSettings @model Yavsc.Models.Musical.Profiles.DjSettings
@{ @{
ViewData["Title"] = "Details"; ViewBag.Title = "Details";
} }
<h2>Details</h2> <h2>Details</h2>

View file

@ -1,7 +1,7 @@
@model Yavsc.Models.Musical.Profiles.DjSettings @model Yavsc.Models.Musical.Profiles.DjSettings
@{ @{
ViewData["Title"] = "Edit"; ViewBag.Title = "Edit";
} }
<h2>Edit</h2> <h2>Edit</h2>

View file

@ -1,7 +1,7 @@
@model IEnumerable<Yavsc.Models.Musical.Profiles.DjSettings> @model IEnumerable<Yavsc.Models.Musical.Profiles.DjSettings>
@{ @{
ViewData["Title"] = "Index"; ViewBag.Title = "Index";
} }
<h2>Index</h2> <h2>Index</h2>

View file

@ -1,7 +1,7 @@
@model UserActivity @model UserActivity
@{ @{
ViewData["Title"] = "Create"; ViewBag.Title = "Create";
} }
<h2>Create</h2> <h2>Create</h2>

View file

@ -1,7 +1,7 @@
@model UserActivity @model UserActivity
@{ @{
ViewData["Title"] = "Create"; ViewBag.Title = "Create";
} }
<h2>Create</h2> <h2>Create</h2>

View file

@ -1,7 +1,7 @@
@model UserActivity @model UserActivity
@{ @{
ViewData["Title"] = "Delete"; ViewBag.Title = "Delete";
} }
<h2>Delete</h2> <h2>Delete</h2>

Some files were not shown because too many files have changed in this diff Show more