diff --git a/Yavsc/Models/ApplicationDbContext.cs b/Yavsc/Models/ApplicationDbContext.cs index d0432c45..21dcac96 100644 --- a/Yavsc/Models/ApplicationDbContext.cs +++ b/Yavsc/Models/ApplicationDbContext.cs @@ -53,6 +53,7 @@ namespace Yavsc.Models builder.Entity().HasKey(ti=>new { ti.TaintId, ti.PrestationId } ); builder.Entity().HasKey(l=>new { l.HRef, l.Method }); builder.Entity().HasKey(l=>new { l.Start, l.End }); + builder.Entity().HasKey( o => new { o.Code, o.CodeScrutin }); foreach (var et in builder.Model.GetEntityTypes()) { if (et.ClrType.GetInterface("IBaseTrackedEntity")!=null) diff --git a/Yavsc/Models/Cratie/Option.cs b/Yavsc/Models/Cratie/Option.cs new file mode 100644 index 00000000..47f6b0fb --- /dev/null +++ b/Yavsc/Models/Cratie/Option.cs @@ -0,0 +1,17 @@ +using System; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Yavsc.Models.Cratie +{ + public class Option: IBaseTrackedEntity + { + public string CodeScrutin { get; set; } + public string Code { get; set ; } + public string Description { get; set; } + public DateTime DateCreated { get ; set ; } + public string UserCreated { get ; set ; } + public DateTime DateModified { get ; set ; } + public string UserModified { get ; set ; } + } +} \ No newline at end of file diff --git a/Yavsc/Models/Cratie/Scrutin.cs b/Yavsc/Models/Cratie/Scrutin.cs new file mode 100644 index 00000000..45634901 --- /dev/null +++ b/Yavsc/Models/Cratie/Scrutin.cs @@ -0,0 +1,16 @@ +using System; +using System.ComponentModel.DataAnnotations; + +namespace Yavsc.Models.Cratie +{ + public class Scrutin : IBaseTrackedEntity + { + [Key] + public string Code { get; set ; } + public string Description { get ; set ; } + public DateTime DateCreated { get; set; } + public string UserCreated { get; set; } + public DateTime DateModified { get; set; } + public string UserModified { get; set; } + } +} \ No newline at end of file diff --git a/Yavsc/Startup/Startup.cs b/Yavsc/Startup/Startup.cs index c4a12471..8881da41 100755 --- a/Yavsc/Startup/Startup.cs +++ b/Yavsc/Startup/Startup.cs @@ -25,6 +25,7 @@ using Microsoft.Net.Http.Headers; namespace Yavsc { + using System.Collections.Generic; using System.Net; using Formatters; using Google.Apis.Util.Store; @@ -129,14 +130,14 @@ namespace Yavsc // return new ProviderCultureResult("fr"); //})); - options.RequestCultureProviders.Insert(0, new AcceptLanguageHeaderRequestCultureProvider()); - options.RequestCultureProviders.Insert(0, new CookieRequestCultureProvider()); - - + options.RequestCultureProviders = new List + { + new QueryStringRequestCultureProvider { Options = options }, + new CookieRequestCultureProvider { Options = options, CookieName="ASPNET_CULTURE" }, + new AcceptLanguageHeaderRequestCultureProvider { Options = options } + }; }); - - services.Add(ServiceDescriptor.Singleton(typeof(IOptions), typeof(OptionsManager))); services.Add(ServiceDescriptor.Singleton(typeof(IOptions), typeof(OptionsManager))); services.Add(ServiceDescriptor.Singleton(typeof(IOptions), typeof(OptionsManager))); diff --git a/Yavsc/Views/Home/AboutAccess.cshtml b/Yavsc/Views/Home/AboutAccess.cshtml new file mode 100644 index 00000000..663d3cf7 --- /dev/null +++ b/Yavsc/Views/Home/AboutAccess.cshtml @@ -0,0 +1,38 @@ +@{ + ViewData["Title"] = @SR["À propos des restrictions d'accès"]; +} +

@ViewData["Title"]

+ + + +# Blog et fichiers utilisateurs + +Par défaut, un envoi à destination du serveur est privé, visible seulement pour son possesseur (et l'administration). + +L'utilisateur peu publier chacun de ces derniers à l'adresse : + +* de tout le monde, +* ou d'une liste de cercles d'utilisateurs, +* ou de personne + +Quand il s'agit d'un fichier, son adresse permanente relative à la racine du serveur web est: `/UserFiles/(Nom Utilisateur)/(cheminVersLeFichier)` + +Les restrictions d'accès à ce fichier sont celles associées à tous les fichiers du même dossier. +Il n'y a pas de regle assiciée à chaque fichier individuellement, +elles appartiennent au dossier qui les contient. + +Les billet de blog sont regroupés par utilisateur, à l'Url + + /Blog/(Nom d'Utilisateur) + +Ils sont aussi regroupés par titre : + + /Title/(Titre de post) + +Et ils possèdent une addresse permanente de la forme : + + /Blogspot/Details/(Id Numerique De Post) + + + + \ No newline at end of file diff --git a/Yavsc/Views/Home/AboutMarkdown.cshtml b/Yavsc/Views/Home/AboutMarkdown.cshtml index 1e25e0fb..c75ed05c 100644 --- a/Yavsc/Views/Home/AboutMarkdown.cshtml +++ b/Yavsc/Views/Home/AboutMarkdown.cshtml @@ -1,5 +1,5 @@ @{ - ViewData["Title"] = @SR["About"]+" Markdown"; + ViewData["Title"] = @SR["À propos de Markdown"]; }

@ViewData["Title"]

@@ -12,8 +12,8 @@ Quelques extensions à un Markdown de base : à faire: -* le tag "Numéro de ticket": `Ticket#6854` -* le tag "Titre d'article": `#1_great_title` -* le tag "User" = `@@(007, it'sme)` ou `@@james` +* le tag "Numéro de ticket": "Ticket#6854" +* le tag "Titre d'article": "#1_great_title" +* le tag "User" = "@@(John Doe)" ou "@@jdoe" diff --git a/Yavsc/Views/Shared/_Layout.cshtml b/Yavsc/Views/Shared/_Layout.cshtml index 3a5673cb..05f15ae0 100755 --- a/Yavsc/Views/Shared/_Layout.cshtml +++ b/Yavsc/Views/Shared/_Layout.cshtml @@ -89,9 +89,18 @@ h6 {
  • @SR["Chat"]
  • @SR["Contact"]
  • @SR["About"] @SiteSettings.Value.Title
  • + - - + + @await Html.PartialAsync("_LoginPartial") diff --git a/Yavsc/wwwroot/js/site.js b/Yavsc/wwwroot/js/site.js index b3e7b2b5..3d7c7e00 100755 --- a/Yavsc/wwwroot/js/site.js +++ b/Yavsc/wwwroot/js/site.js @@ -5,4 +5,7 @@ var notifClick = .fail(function() {}) .always(function() {}); } - }; \ No newline at end of file + }; +var setUiCult = function(lngspec) { + document.cookie = 'ASPNET_CULTURE=c=' + lngspec + '|uic=' + lngspec; +}; \ No newline at end of file