vnext
Paul Schneider 8 years ago
parent ba433e51a1
commit 47025602f2
10 changed files with 74 additions and 94 deletions

@ -12,39 +12,53 @@ namespace Yavsc.Models
public partial class Blog : IBlog, ICircleAuthorized public partial class Blog : IBlog, ICircleAuthorized
{ {
[Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)] [Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Display(Name="Identifiant du post")]
public long Id { get; set; } public long Id { get; set; }
[Display(Name="Contenu")]
public string Content { get; set; } public string Content { get; set; }
[Display(Name="Photo")]
public string Photo { get; set; } public string Photo { get; set; }
[Display(Name="Indice de qualité")]
public int Rate { get; set; } public int Rate { get; set; }
[Display(Name="Titre")]
public string Title { get; set; } public string Title { get; set; }
[Display(Name="Identifiant de l'auteur")]
public string AuthorId { get; set; } public string AuthorId { get; set; }
[Display(Name="Auteur")]
[ForeignKey("AuthorId"),JsonIgnore] [ForeignKey("AuthorId"),JsonIgnore]
public ApplicationUser Author { set; get; } public ApplicationUser Author { set; get; }
[Display(Name="Visible")]
public bool Visible { get; set; } public bool Visible { get; set; }
[Display(Name="Date de création")]
public DateTime DateCreated public DateTime DateCreated
{ {
get; set; get; set;
} }
[Display(Name="Créateur")]
public string UserCreated public string UserCreated
{ {
get; set; get; set;
} }
[Display(Name="Dernière modification")]
public DateTime DateModified public DateTime DateModified
{ {
get; set; get; set;
} }
[Display(Name="Utilisateur ayant modifé le dernier")]
public string UserModified public string UserModified
{ {
get; set; get; set;
} }
[InverseProperty("Target")] [InverseProperty("Target")]
[Display(Name="Liste de contrôle d'accès")]
public virtual List<CircleAuthorizationToBlogPost> ACL { get; set; } public virtual List<CircleAuthorizationToBlogPost> ACL { get; set; }
public bool AuthorizeCircle(long circleId) public bool AuthorizeCircle(long circleId)

@ -349,6 +349,7 @@
<data name="Send a public message"><value>Envoyer un message publique</value></data> <data name="Send a public message"><value>Envoyer un message publique</value></data>
<data name="Set"><value>Positioner</value></data> <data name="Set"><value>Positioner</value></data>
<data name="SettingsClass"><value>Classe du paramétrage</value></data> <data name="SettingsClass"><value>Classe du paramétrage</value></data>
<data name="Son blog"><value>Son blog</value></data>
<data name="Your performer profile"><value>Votre profile professionel</value></data> <data name="Your performer profile"><value>Votre profile professionel</value></data>
<data name="Setup below your activity parameters"><value>Positionnez ci-après vos les paramêtre de votre activité</value></data> <data name="Setup below your activity parameters"><value>Positionnez ci-après vos les paramêtre de votre activité</value></data>

@ -12,25 +12,19 @@
<hr/> <hr/>
<div class="meta"> <div class="meta">
@SR["Author"] : @Model.Author.UserName - @Html.DisplayFor(model => model.Author)
@SR["Modified"] : @Html.DisplayNameFor(model => model.DateModified) :
@Html.DisplayFor(model => model.DateModified) - @Html.DisplayFor(model => model.DateModified)
@SR["Created"] : @Html.DisplayNameFor(model => model.DateCreated) :
@Html.DisplayFor(model => model.DateCreated) @Html.DisplayFor(model => model.DateCreated)
</div> </div>
</div> </div>
<ul>
@if (await AuthorizationService.AuthorizeAsync(User, Model, new EditRequirement())) { @if (await AuthorizationService.AuthorizeAsync(User, Model, new EditRequirement())) {
<li> <a asp-action="Edit" asp-route-id="@Model.Id" class="btn btn-link">@SR["Edit"]</a>
<a asp-action="Edit" asp-route-id="@Model.Id">@SR["Edit"]</a>
</li>
} }
<li> <a asp-action="Index" class="btn btn-link">@SR["Back to List"]</a>
<a asp-action="Index">@SR["Back to List"]</a>
</li>
</ul>

@ -12,9 +12,9 @@
<script> <script>
$("#cbv").change(function() { $("#cbv").change(function() {
if (this.checked) { if (this.checked) {
$("tr.ipost").removeClass("hidden"); $("tr.hiddenpost").removeClass("hidden");
} else { } else {
$("tr.ipost").addClass("hidden"); $("tr.hiddenpost").addClass("hidden");
} }
}); });
</script> </script>
@ -31,11 +31,11 @@
</tr> </tr>
@foreach (var item in Model) { @foreach (var item in Model) {
var trclass = (item.Visible)?"vpost":"ipost"; var trclass = (item.Visible)?"visiblepost":"hiddenpost";
<tr class="@trclass"> <tr class="@trclass">
<td><a asp-action="Details" asp-route-id="@item.Id"> <td><a asp-action="Details" asp-route-id="@item.Id" class="bloglink">
<img src="@item.Photo" > <img src="@item.Photo" class="smalltofhol">
<markdown>@item.Title</markdown></a> <markdown>@item.Title</markdown></a>
</td> </td>
<td> <td>
@ -52,13 +52,13 @@
<ul class="actiongroup"> <ul class="actiongroup">
@if (await AuthorizationService.AuthorizeAsync(User, item, new ViewRequirement())) { @if (await AuthorizationService.AuthorizeAsync(User, item, new ViewRequirement())) {
<li> <li>
<a asp-action="Details" asp-route-id="@item.Id">Details</a> <a asp-action="Details" asp-route-id="@item.Id" class="btn btn-lg">Details</a>
</li> </li>
} }
@if (await AuthorizationService.AuthorizeAsync(User, item, new EditRequirement())) { @if (await AuthorizationService.AuthorizeAsync(User, item, new EditRequirement())) {
<li><a asp-action="Edit" asp-route-id="@item.Id">@SR["Edit"]</a> <li><a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-default">@SR["Edit"]</a>
</li> </li>
<li><a asp-action="Delete" asp-route-id="@item.Id">@SR["Delete"]</a> <li><a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">@SR["Delete"]</a>
</li> </li>
} }
</ul> </ul>

@ -1,22 +1,7 @@
@model ApplicationUser @model ApplicationUser
<img src="~/Avatars/@(Model.UserName).xs.png" alt=""> <img src="~/Avatars/@(Model.UserName).s.png" alt="" class="smalltofhol">
@Model.UserName @Model.UserName
<ul> @if (Model.Posts!=null) { <a asp-controller="Blogspot" asp-action="UserPosts"
@if (Model.Posts!=null) { asp-route-id="@Model.UserName" class="btn btn-link">@SR["index de ses articles"]</a>
<li> <a asp-controller="Blogspot" asp-action="UserPosts"
asp-route-id="@Model.UserName">@SR["His blog"]</a>
</li>
} }
@if (!string.IsNullOrEmpty(
Model.DedicatedGoogleCalendar))
{
<li> @SR["Exposes his Google calendar!"]
</li>
}
@if (Model.Devices?.Count>0)
{
<li> @SR["Uses the mobile application, and receives push notifications"]
</li>
}
</ul>

@ -1592,21 +1592,11 @@ pre code {
margin-right: auto; margin-right: auto;
margin-left: auto; margin-left: auto;
} }
@media (min-width: 768px) {
.container {
width: 750px;
}
}
@media (min-width: 992px) {
.container {
width: 970px;
}
}
@media (min-width: 1200px) {
.container { .container {
width: 1170px; width: calc(100% - 22px);
}
} }
.container-fluid { .container-fluid {
padding-right: 15px; padding-right: 15px;
padding-left: 15px; padding-left: 15px;
@ -3062,9 +3052,9 @@ fieldset[disabled] a.btn {
pointer-events: none; pointer-events: none;
} }
.btn-default { .btn-default {
color: #333; color: #fff;
background-color: #fff; background-color: #222;
border-color: #ccc; border-color: #aaa;
} }
.btn-default:focus, .btn-default:focus,
.btn-default.focus { .btn-default.focus {
@ -3459,7 +3449,7 @@ fieldset[disabled] .btn-danger.active {
} }
.btn-link { .btn-link {
font-weight: normal; font-weight: normal;
color: #337ab7; color: #c470f0;
border-radius: 0; border-radius: 0;
} }
.btn-link, .btn-link,
@ -3479,7 +3469,7 @@ fieldset[disabled] .btn-link {
} }
.btn-link:hover, .btn-link:hover,
.btn-link:focus { .btn-link:focus {
color: #23527c; color: #f9a6f9;
text-decoration: underline; text-decoration: underline;
background-color: transparent; background-color: transparent;
} }
@ -3487,7 +3477,7 @@ fieldset[disabled] .btn-link {
fieldset[disabled] .btn-link:hover, fieldset[disabled] .btn-link:hover,
.btn-link[disabled]:focus, .btn-link[disabled]:focus,
fieldset[disabled] .btn-link:focus { fieldset[disabled] .btn-link:focus {
color: #777; color: #ae8fae;
text-decoration: none; text-decoration: none;
} }
.btn-lg, .btn-lg,

File diff suppressed because one or more lines are too long

@ -6,8 +6,8 @@ body {
background-color: #210912; background-color: #210912;
color:#999; color:#999;
} }
h1,h2,h3{color:#fff;} h1,h2,h3,h4,h5,h6{color:#fff;}
.smalltofhol { max-height: 3em; max-width: 3em; float:left; margin:.5em; }
.price { .price {
font-weight: bold; font-weight: bold;
font-size: x-large; font-size: x-large;
@ -32,34 +32,37 @@ h1,h2,h3{color:#fff;}
padding: 1em; padding: 1em;
} }
.blog a { .blog a {
color: #9f9; color: #FF8;
font-weight: 900; font-weight: 900;
} }
.blog a:active, .blog a:active,
.blog a:hover { .blog a:hover {
outline: 0; outline: 0;
color: #6C6; color: #FAFA09;
} }
tr.vpost { tr.visiblepost {
background-color: #306020;
max-height: 3em; max-height: 3em;
} }
tr.ipost { tr.hiddenpost {
background-color: #303030; background-color: #130414;
font-size: smaller; font-size: smaller;
max-height: 2em; max-height: 2em;
} }
tr.vpost a { a.bloglink {
font-weight: bold; font-weight: bold;
color: white; text-shadow: 0px 0px 8px white;
text-shadow: 3px 3px 8px black;
} }
tr.ipost a { a {
font-style: bold; font-weight: 900;
color: #b0b0b0; color: #FF8;
text-shadow: 3px 3px 5px #505050; }
a:active,
a:hover {
outline: 0;
color: #FAFA09;
} }
.panel{ .panel{
float: left; float: left;
padding:1em; padding:1em;
@ -76,15 +79,6 @@ select,
color: #333; color: #333;
} }
a {
font-weight: 900;
color: #9f9;
}
a:active,
a:hover {
outline: 0;
color: #6C6;
}
.jumbotron { .jumbotron {
background-color: #502020; background-color: #502020;
padding: .5em; padding: .5em;

File diff suppressed because one or more lines are too long

@ -3,20 +3,22 @@
"version": 2, "version": 2,
"targets": { "targets": {
".NETFramework,Version=v4.5.1": {}, ".NETFramework,Version=v4.5.1": {},
".NETPortable,Version=v4.5,Profile=Profile111": {} ".NETPortable,Version=v4.5,Profile=Profile111": {},
".NETFramework,Version=v4.5.1/debian.8-x86": {},
".NETFramework,Version=v4.5.1/debian.8-x64": {},
".NETPortable,Version=v4.5,Profile=Profile111/debian.8-x86": {},
".NETPortable,Version=v4.5,Profile=Profile111/debian.8-x64": {}
}, },
"libraries": {}, "libraries": {},
"projectFileDependencyGroups": { "projectFileDependencyGroups": {
"": [], "": [],
".NETFramework,Version=v4.5.1": [], ".NETFramework,Version=v4.5.1": [],
".NETPortable,Version=v4.5,Profile=Profile111": [ ".NETPortable,Version=v4.5,Profile=Profile111": [
"System.Collections >= 4.0.0", "fx/System.Runtime >= 4.0.0",
"System.Collections.Generic >= 4.0.0", "fx/System.Globalization >= 4.0.0",
"System.Globalization >= 4.0.0", "fx/System.Resources.ResourceManager >= 4.0.0",
"System.Resources.ResourceManager >= 4.0.0", "fx/System.Collections >= 4.0.0",
"System.Runtime >= 4.0.0" "fx/System.Collections.Generic >= 4.0.0"
] ]
}, }
"tools": {},
"projectFileToolGroups": {}
} }
Loading…