cratie+lang btn
This commit is contained in:
@ -53,6 +53,7 @@ namespace Yavsc.Models
|
||||
builder.Entity<HairTaintInstance>().HasKey(ti=>new { ti.TaintId, ti.PrestationId } );
|
||||
builder.Entity<HyperLink>().HasKey(l=>new { l.HRef, l.Method });
|
||||
builder.Entity<Period>().HasKey(l=>new { l.Start, l.End });
|
||||
builder.Entity<Models.Cratie.Option>().HasKey( o => new { o.Code, o.CodeScrutin });
|
||||
|
||||
foreach (var et in builder.Model.GetEntityTypes()) {
|
||||
if (et.ClrType.GetInterface("IBaseTrackedEntity")!=null)
|
||||
|
17
Yavsc/Models/Cratie/Option.cs
Normal file
17
Yavsc/Models/Cratie/Option.cs
Normal file
@ -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 ; }
|
||||
}
|
||||
}
|
16
Yavsc/Models/Cratie/Scrutin.cs
Normal file
16
Yavsc/Models/Cratie/Scrutin.cs
Normal file
@ -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; }
|
||||
}
|
||||
}
|
@ -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<IRequestCultureProvider>
|
||||
{
|
||||
new QueryStringRequestCultureProvider { Options = options },
|
||||
new CookieRequestCultureProvider { Options = options, CookieName="ASPNET_CULTURE" },
|
||||
new AcceptLanguageHeaderRequestCultureProvider { Options = options }
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
|
||||
services.Add(ServiceDescriptor.Singleton(typeof(IOptions<SiteSettings>), typeof(OptionsManager<SiteSettings>)));
|
||||
services.Add(ServiceDescriptor.Singleton(typeof(IOptions<SmtpSettings>), typeof(OptionsManager<SmtpSettings>)));
|
||||
services.Add(ServiceDescriptor.Singleton(typeof(IOptions<GoogleAuthSettings>), typeof(OptionsManager<GoogleAuthSettings>)));
|
||||
|
38
Yavsc/Views/Home/AboutAccess.cshtml
Normal file
38
Yavsc/Views/Home/AboutAccess.cshtml
Normal file
@ -0,0 +1,38 @@
|
||||
@{
|
||||
ViewData["Title"] = @SR["À propos des restrictions d'accès"];
|
||||
}
|
||||
<h1>@ViewData["Title"]</h1>
|
||||
|
||||
<markdown>
|
||||
|
||||
# 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)
|
||||
|
||||
|
||||
|
||||
</markdown>
|
@ -1,5 +1,5 @@
|
||||
@{
|
||||
ViewData["Title"] = @SR["About"]+" Markdown";
|
||||
ViewData["Title"] = @SR["À propos de Markdown"];
|
||||
}
|
||||
<h1>@ViewData["Title"]</h1>
|
||||
|
||||
@ -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"
|
||||
|
||||
</markdown>
|
||||
|
@ -89,9 +89,18 @@ h6 {
|
||||
<li><a asp-controller="Home" asp-action="Chat" class="navbar-link">@SR["Chat"]</a></li>
|
||||
<li><a asp-controller="Home" asp-action="Contact" class="navbar-link">@SR["Contact"]</a></li>
|
||||
<li><a asp-controller="Home" asp-action="About" class="navbar-link">@SR["About"] @SiteSettings.Value.Title</a> </li>
|
||||
<li class="dropdown">
|
||||
<a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="badge"> @System.Globalization.CultureInfo.CurrentUICulture.DisplayName </span> <span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a onclick="setUiCult('fr')" >FR</a></li>
|
||||
<li><a onclick="setUiCult('en')" >EN</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
|
||||
|
||||
@await Html.PartialAsync("_LoginPartial")
|
||||
</div>
|
||||
</div>
|
||||
|
@ -5,4 +5,7 @@ var notifClick =
|
||||
.fail(function() {})
|
||||
.always(function() {});
|
||||
}
|
||||
};
|
||||
};
|
||||
var setUiCult = function(lngspec) {
|
||||
document.cookie = 'ASPNET_CULTURE=c=' + lngspec + '|uic=' + lngspec;
|
||||
};
|
Reference in New Issue
Block a user