refx & wf actions config

This commit is contained in:
2017-02-12 23:53:53 +01:00
parent bdc77cbc3c
commit a011da33ef
11 changed files with 38 additions and 25 deletions

View File

@ -42,7 +42,6 @@ namespace Yavsc.Controllers
[AllowAnonymous]
public IActionResult Index(string id, int skip=0, int maxLen=25)
{
if (!string.IsNullOrEmpty(id))
return UserPosts(id);
string uid = User.GetUserId();

View File

@ -49,7 +49,7 @@ namespace Yavsc.Controllers
}
private void SetViewBag(CommandForm commandForm=null) {
ViewBag.ActivityCode = new SelectList(_context.Activities, "Code", "Name", commandForm?.ActivityCode);
ViewBag.Action = YavscLib.YavscConstants.Forms.Select( c => new SelectListItem { Text = c, Selected = commandForm?.Action == c } );
ViewBag.Action = Startup.Forms.Select( c => new SelectListItem { Text = c, Selected = commandForm?.Action == c } );
}
// POST: CommandForms/Create
[HttpPost]

View File

@ -46,8 +46,8 @@ namespace Yavsc.Controllers
return View(model);
}
[Route("Book/{id?}"), HttpGet, AllowAnonymous]
public ActionResult Book(string id)
[Route("Profiles/{id?}"), HttpGet, AllowAnonymous]
public ActionResult Profiles(string id)
{
if (id == null)
{

View File

@ -323,10 +323,10 @@
<data name="XHasBeenNotified"><value>{0} has been notified of your query, you should be fast contacted</value></data>
<data name="Xshouldbeavailable"><value>regarding his calendar,
{0} should be available for this booking</value></data>
<data name="Yavsc.Models.Booking.Profiles.Instrumentation"><value>Paramètres musicien (l'instrument)</value></data>
<data name="Yavsc.Models.Booking.Profiles.DjSettings"><value>Paramètres Dj (le compte SoundCloud.com)</value></data>
<data name="Yavsc.Models.Booking.Profiles.FormationSettings"><value>Paramètres formation (les partenaires)</value></data>
<data name="Yavsc.Models.Booking.Profiles.GeneralSettings"><value>Paramètres généraux: une couleur musicale</value></data>
<data name="Yavsc.Models.Musical.Profiles.Instrumentation"><value>Paramètres musicien (l'instrument)</value></data>
<data name="Yavsc.Models.Musical.Profiles.DjSettings"><value>Paramètres Dj (le compte SoundCloud.com)</value></data>
<data name="Yavsc.Models.Musical.Profiles.FormationSettings"><value>Paramètres formation (les partenaires)</value></data>
<data name="Yavsc.Models.Musical.Profiles.GeneralSettings"><value>Paramètres généraux: une couleur musicale</value></data>
<data name="YouNeedToBeAuthenticatedIOToContact"><value>You need to be authenticated in order to
contact a performer</value></data>
<data name="younotadmin"><value>You're not administrator</value></data>

View File

@ -396,10 +396,10 @@
<data name="XHasBeenNotified"><value>{0} à été notifié de votre demande, vous devriez être contacté rapidement</value></data>
<data name="Xshouldbeavailable"><value>Au vu de son calendrier,
{0} devrait être disponible pour ce rendez-vous</value></data>
<data name="Yavsc.Models.Booking.Profiles.Instrumentation"><value>Paramètres musicien (l'instrument)</value></data>
<data name="Yavsc.Models.Booking.Profiles.DjSettings"><value>Paramètres Dj (le compte SoundCloud.com)</value></data>
<data name="Yavsc.Models.Booking.Profiles.FormationSettings"><value>Paramètres formation (les partenaires)</value></data>
<data name="Yavsc.Models.Booking.Profiles.GeneralSettings"><value>Paramètres généraux (visibilité et présentation)</value></data>
<data name="Yavsc.Models.Musical.Profiles.Instrumentation"><value>Paramètres musicien (l'instrument)</value></data>
<data name="Yavsc.Models.Musical.Profiles.DjSettings"><value>Paramètres Dj (le compte SoundCloud.com)</value></data>
<data name="Yavsc.Models.Musical.Profiles.FormationSettings"><value>Paramètres formation (les partenaires)</value></data>
<data name="Yavsc.Models.Musical.Profiles.GeneralSettings"><value>Paramètres généraux (visibilité et présentation)</value></data>
<data name="Yes"><value>Oui</value></data>
<data name="YouNeedToBeAuthenticatedIOToContact"><value>Vous devez vous authentifier pour pouvoir demander un devis
à un préstataire.</value></data>

View File

@ -10,6 +10,8 @@ namespace Yavsc
/// Lists Available user profile classes.
/// </summary>
public static Dictionary<string,Type> ProfileTypes = new Dictionary<string,Type>() ;
public static readonly string [] Forms = new string [] { "Profiles" };
private void ConfigureWorkflow(IApplicationBuilder app, SiteSettings settings)
{
System.AppDomain.CurrentDomain.ResourceResolve += OnYavscResourceResolve;

View File

@ -1,11 +1,24 @@
@model IEnumerable<Blog>
@{
ViewData["Title"] = "Index";
}
<h2>Index</h2>
<p class="text-success">@ViewData["StatusMessage"]</p>
@if (User.IsSignedIn()) {
<label>
<input type="checkbox" id="cbv" checked/>Invisibles, posts privés</label>
<script>
$("#cbv").change(function() {
if (this.checked) {
$("tr.ipost").removeClass("hidden");
} else {
$("tr.ipost").addClass("hidden");
}
});
</script>
}
<p>
<a asp-action="Create">@SR["Create a new article"]</a>
</p>
@ -26,12 +39,14 @@
<markdown>@item.Title</markdown></a>
</td>
<td>
<span style="font-size:x-small;"> @item.Author.UserName </span> <br>
<markdown>@item.Content.Substring(0,120)</markdown>
@((item.Content.Length>120)?"...":"")
<span style="font-size:x-small;">(@item.Author.UserName </span>,
<span style="font-size:xx-small;">
posté le @item.DateCreated.ToString("dddd d MMM yyyy à H:mm")
@if ((item.DateModified - item.DateCreated).Minutes > 0){ 
@:- Modifié le @item.DateModified.ToString("dddd d MMM yyyy à H:mm")
}
})
</span>
</td>
<td>

View File

@ -5,6 +5,7 @@
@using Microsoft.AspNet.Mvc.Localization;
@using Microsoft.AspNet.Authorization;
@using Microsoft.Extensions.OptionsModel;
@using System.Security.Claims;
@using System.Web.Optimization;
@using Yavsc;
@using Yavsc.Helpers;

File diff suppressed because one or more lines are too long

View File

@ -1,8 +0,0 @@
namespace YavscLib
{
public static class YavscConstants
{
public static readonly string [] Forms = new string [] { "Book" };
}
}