Les activités

* BackOfficeController.cs: Impléménte un accès à l'API back office
  pour l'envoi d'une notification aux mobiles des cercles séléctionné
  de l'utilisateur

* NotifyEvent.aspx: Implemente un formulaire d'envoi d'une
  notification mobile

* NotifyEventResponse.aspx: initie une page de resultat à la
  notification mobile

* NpgsqlContentProvider.cs: reccupère la photo activité en base de
  données

* BlogsController.cs: En attendant mieux, les billets de blog sont
  noté par leur auteur, ou un admin.

* CalendarController.cs: Les fontions de notification GCM et de
  declaration d'enregistrement GCM
partent dans le controlleur back office.

* activity.sql: ajoute la photo activité dans la definition du modèle
  de données Npgsql

* style.css: La fonte de caractère "Open Sans" (Google fonts) pour le
  thème "clear"

* style.css: La fonte de caractère "Open Sans" (Google fonts) pour le
  thème "dark" aussi

* style.css: pas de fonte de caractère dans la feuille de style
  basique.

* BackOfficeController.cs: Impléménte un accès web back office pour
  l'envoi d'une notification aux mobiles des cercles séléctionné de
  l'utilisateur

* BlogsController.cs: Fixe la page de garde du blogspot en cas
  d'absence
de billet à publier publiquement.

* FrontOfficeController.cs: la fontion booking est maintenant censée
  conerner uniquement une activité,
dont le code APE est donné en dernière partie de la route de l'Url, ou
  en argument `id`.

* HomeController.cs: La page d'accueil présente maintenant les
  activités mises en oeuvre par au moins un utilisateur enregistré,
  validé et non vérouillé.
Le titre de l'activité est un lien vers la methode de reservation
  simple.

* GoogleHelpers.cs: recoit l'implementation de la methode de
  notification mobile

* SimpleJsonPostMethod.cs: Fixe l'envoi en UTF-8

* App.master: fonte de caractère pour le lien vers "Vos billets"

* parallax.js: fixe la différence de traitement entre l'horizontale et
  la verticale

* Profile.aspx: ajoute le sommaire de la validation

* Index.aspx: initie un index pour le back office

* Activities.aspx: nettoye la console de log javascript

* Booking.aspx: ajoute le champ caché au formulaire de resa

* Index.aspx: affiche les services fournis sur le site, par des
  utilisateur enregistrés validés non bloqué.

* Web.config: rends l'id Google d'enregistrement GCM accessible au
  utilisateurs anonymes,
qui voudraient commander ou interagir avec l'application, sans avoir à
  créer de compte sur le site.

* Web.csproj: ajoute le contrôleur du back office, et le formulaire de
  notification mobile

* EventPub.cs:
* BaseEvent.cs: internationalise l'évennement (la base d'une
  notification)

* YaEvent.cs: les champs fournisseur d'une notification ne sont pas
  requis. On peut en avoir de la part du site lui même, qui ne soient
  pas à l'origine d'un evennement tiers du workflow. Dans tous les
  autres cas, ils devraient être renseignés ... à suivre.

* Circle.cs:
* CircleBase.cs: ajoute une methode de construition des destinataires
  à partir d'un tableau d'identifiants de cercles.

* Activity.cs: implémente la photo activité dans le modèle

* SimpleBookingQuery.cs: refabriqué

* MessageWithPayLoad.cs: accuse aussi le champ `to` en cas d'absence
  de destinataire.

* LocalizedText.resx:
* LocalizedText.fr.resx:
* LocalizedText.Designer.cs:
* LocalizedText.fr.Designer.cs: internationalisation
This commit is contained in:
Paul Schneider 2015-11-26 11:52:06 +01:00
commit 948fc64ce1
40 changed files with 504 additions and 129 deletions

View file

@ -0,0 +1,66 @@
//
// BackOfficeController.cs
//
// Author:
// Paul Schneider <paul@pschneider.fr>
//
// Copyright (c) 2015 GNU GPL
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;
using Yavsc.Model.Google;
using Yavsc.Model.Calendar;
using Yavsc.Helpers;
using Yavsc.Model.Circles;
using System.Collections.Generic;
using System.Web.Profile;
using Yavsc.Helpers.Google;
using System.Web.Security;
namespace Yavsc.ApiControllers
{
/// <summary>
/// Back office controller.
/// </summary>
public class BackOfficeController: YavscController
{
/// <summary>
/// Notifies the event.
/// </summary>
/// <param name="evpub">Evpub.</param>
[Authorize(Roles="BackOffice")]
public MessageWithPayloadResponse NotifyEvent(EventPub evpub) {
return GoogleHelpers.NotifyEvent(evpub);
}
/// <summary>
/// Sets the registration identifier.
/// </summary>
/// <param name="registrationId">Registration identifier.</param>
[Authorize]
public void SetRegistrationId(string registrationId)
{
// TODO set registration id
setRegistrationId (User.Identity.Name, registrationId);
}
private void setRegistrationId(string username, string regid) {
ProfileBase pr = ProfileBase.Create(username);
pr.SetPropertyValue ("gregid", regid);
pr.Save ();
}
}
}

View file

@ -14,9 +14,6 @@ using System.Diagnostics;
using Yavsc.Formatters;
using Yavsc.Model;
namespace Yavsc.ApiControllers
{
/// <summary>
@ -183,6 +180,7 @@ namespace Yavsc.ApiControllers
if (model.Rate < 0 || model.Rate > 100)
ModelState.AddModelError ("Rate", "0<=Rate<=100");
else {
BlogManager.GetForEditing (model.Id);
BlogManager.Rate (model.Id, model.Rate);
}
}
@ -205,6 +203,7 @@ namespace Yavsc.ApiControllers
[Authorize, HttpPost, ValidateAjaxAttribute]
public void SetPhoto(long id, [FromBody] string photo)
{
BlogManager.GetForEditing (id);
BlogManager.UpdatePostPhoto (id, photo);
}

View file

@ -28,6 +28,7 @@ using System.Web.Profile;
using Yavsc.Model.Circles;
using Yavsc.Model.Calendar;
using System.Web.Http.Routing;
using System.Collections.Generic;
namespace Yavsc.ApiControllers
@ -168,36 +169,7 @@ namespace Yavsc.ApiControllers
}
}
/// <summary>
/// Sets the registration identifier.
/// </summary>
/// <param name="registrationId">Registration identifier.</param>
[Authorize]
public void SetRegistrationId(string registrationId)
{
// TODO set registration id
setRegistrationId (Membership.GetUser ().UserName, registrationId);
}
private void setRegistrationId(string username, string regid) {
ProfileBase pr = ProfileBase.Create(username);
pr.SetPropertyValue ("gregid", regid);
}
/// <summary>
/// Notifies the event.
/// </summary>
/// <param name="evpub">Evpub.</param>
public MessageWithPayloadResponse NotifyEvent(EventPub evpub) {
SimpleJsonPostMethod<MessageWithPayload<YaEvent>,MessageWithPayloadResponse> r =
new SimpleJsonPostMethod<MessageWithPayload<YaEvent>,MessageWithPayloadResponse>(
"https://gcm-http.googleapis.com/gcm/send");
using (r) {
var msg = new MessageWithPayload<YaEvent> () { data = new YaEvent[] { (YaEvent)evpub } };
msg.to = string.Join (" ", Circle.Union (evpub.Circles));
return r.Invoke (msg);
}
}
}
}

View file

@ -4,19 +4,19 @@
CREATE TABLE activity
(
meacode character varying(512) NOT NULL, -- Identifiant de l'activité, à terme, il faudrait ajouter un champ à cette id: le code pays....
title character varying(2048) NOT NULL, -- Description textuelle du code APE
applicationname character varying(255) NOT NULL,
cmnt character varying, -- a long description for this activity
CONSTRAINT activity_pkey PRIMARY KEY (meacode, applicationname)
meacode character varying(512) NOT NULL, -- Identifiant de l'activité, à terme, il faudrait ajouter un champ à cette id: le code pays....
photo character varying(512) -- a photo url, as a front image for this activity
)
WITH (
OIDS=FALSE
);
ALTER TABLE activity
OWNER TO yavscdev;
COMMENT ON TABLE activity
IS 'Activités prises en charge par l''application désignée';
COMMENT ON COLUMN activity.title IS 'Description textuelle du code APE';
COMMENT ON COLUMN activity.cmnt IS 'a long description for this activity';
COMMENT ON COLUMN activity.meacode IS 'Identifiant de l''activité, à terme, il faudrait ajouter un champ à cette id: le code pays.
Definition francaise:
@ -25,6 +25,5 @@ une lettre en cinquième position.
Exemple: ''71.12B'' => "Ingénierie, études techniques"
';
COMMENT ON COLUMN activity.title IS 'Description textuelle du code APE';
COMMENT ON COLUMN activity.cmnt IS 'a long description for this activity';
COMMENT ON COLUMN activity.photo IS 'a photo url, as a front image for this activity';

View file

@ -1,7 +1,9 @@
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,600,700);
body {
background-color: grey;
color: #303030;
font-family: 'Open Sans', sans-serif;
}
.tagname { color: #D0FFD0; }
.tagname:hover { background-color: red; }

View file

@ -6,7 +6,7 @@
}
body {
font-family: 'Arial', cursive;
font-family: 'Open Sans', sans-serif;
background-color: black;
color: #D0FFD0;
}

View file

@ -1,6 +1,5 @@
body {
font-family: 'Arial', cursive;
padding: 0;
margin: 0;
}
@ -175,7 +174,6 @@ content: ")";
.usertitleref {
border-radius: 1em;
font-family: 'Arial', cursive;
padding: 1em;
}
.editable {
@ -239,7 +237,6 @@ legend {
border-style: solid;
border-width:1px;
cursor: pointer;
font-family: 'Arial', cursive;
padding: 1em;
}
@ -247,7 +244,6 @@ input, select, textarea {
border-radius:1em;
border-style: solid;
border-width:1px;
font-family: 'Arial', cursive;
}
.code {

View file

@ -1,3 +1,84 @@
2015-11-26 Paul Schneider <paul@pschneider.fr>
* BackOfficeController.cs: Impléménte un accès à l'API back
office pour l'envoi d'une notification aux mobiles des cercles
séléctionné de l'utilisateur
* NotifyEvent.aspx: Implemente un formulaire d'envoi d'une
notification mobile
* NotifyEventResponse.aspx: initie une page de resultat à la
notification mobile
* BlogsController.cs: En attendant mieux, les billets de blog
sont noté par leur auteur, ou un admin.
* CalendarController.cs: Les fontions de notification GCM et
de declaration d'enregistrement GCM
partent dans le controlleur back office.
* activity.sql: ajoute la photo activité dans la definition du
modèle de données Npgsql
* style.css: La fonte de caractère "Open Sans" (Google fonts)
pour le thème "clear"
* style.css: La fonte de caractère "Open Sans" (Google fonts)
pour le thème "dark" aussi
* style.css: pas de fonte de caractère dans la feuille de
style basique.
* BackOfficeController.cs: Impléménte un accès web back office
pour l'envoi d'une notification aux mobiles des cercles
séléctionné de l'utilisateur
* BlogsController.cs: Fixe la page de garde du blogspot en cas
d'absence
de billet à publier publiquement.
* FrontOfficeController.cs: la fontion booking est maintenant
censée conerner uniquement une activité,
dont le code APE est donné en dernière partie de la route de
l'Url, ou en argument `id`.
* HomeController.cs: La page d'accueil présente maintenant les
activités mises en oeuvre par au moins un utilisateur
enregistré, validé et non vérouillé.
Le titre de l'activité est un lien vers la methode de
reservation simple.
* GoogleHelpers.cs: recoit l'implementation de la methode de
notification mobile
* SimpleJsonPostMethod.cs: Fixe l'envoi en UTF-8
* App.master: fonte de caractère pour le lien vers "Vos
billets"
* parallax.js: fixe la différence de traitement entre
l'horizontale et la verticale
* Profile.aspx: ajoute le sommaire de la validation
* Index.aspx: initie un index pour le back office
* Activities.aspx: nettoye la console de log javascript
* Booking.aspx: ajoute le champ caché au formulaire de resa
* Index.aspx: affiche les services fournis sur le site, par
des utilisateur enregistrés validés non bloqué.
* Web.config: rends l'id Google d'enregistrement GCM
accessible au utilisateurs anonymes,
qui voudraient commander ou interagir avec l'application, sans
avoir à créer de compte sur le site.
* Web.csproj: ajoute le contrôleur du back office, et le
formulaire de notification mobile
2015-11-25 Paul Schneider <paul@pschneider.fr>
* Activities.aspx: implémente la vue Html de la liste éditable

View file

@ -4,6 +4,10 @@ using System.Linq;
using System.Web;
using System.Web.Mvc;
using Yavsc.Admin;
using Yavsc.Model.Calendar;
using Yavsc.Helpers.Google;
using Yavsc.Model.Circles;
using System.Web.Security;
namespace Yavsc.Controllers
@ -21,5 +25,26 @@ namespace Yavsc.Controllers
{
return View ();
}
/// <summary>
/// Notifies the event.
/// </summary>
/// <returns>The event.</returns>
/// <param name="evpub">Evpub.</param>
public ActionResult NotifyEvent(EventPub evpub)
{
if (ModelState.IsValid) {
ViewData ["NotifyEvent"] = evpub;
return View ("NotifyEventResponse", GoogleHelpers.NotifyEvent (evpub));
}
ViewData["CircleIds"] = CircleManager.DefaultProvider.List (
Membership.GetUser ().UserName).Select (x => new SelectListItem {
Value = x.Id.ToString(),
Text = x.Title,
Selected = (evpub.CircleIds==null) ? false : evpub.CircleIds.Contains (x.Id)
});
return View (evpub);
}
}
}

View file

@ -104,6 +104,8 @@ namespace Yavsc.Controllers
[HttpGet]
public ActionResult UserPosts (string user, string title=null, int pageIndex = 0, int pageSize = 10)
{
if (user == null)
return Index (title, pageSize, pageIndex);
if (title != null) return UserPost (user, title, pageIndex, pageSize);
int recordcount=0;
MembershipUser u = Membership.GetUser ();
@ -118,8 +120,6 @@ namespace Yavsc.Controllers
if (u.UserName == user || Roles.IsUserInRole ("Admin"))
sf |= FindBlogEntryFlags.MatchInvisible;
readersName = u.UserName;
if (user == null)
user = u.UserName;
}
// find entries
BlogEntryCollection c =
@ -128,11 +128,10 @@ namespace Yavsc.Controllers
var pr = ProfileBase.Create (user);
if (pr != null) {
Profile bupr = new Profile (pr);
// listing meta data
ViewData ["BlogUserProfile"] = bupr;
// Inform of listing meta data
ViewData ["BlogTitle"] = bupr.BlogTitle;
ViewData ["Avatar"] = bupr.avatar;
ViewData ["BlogTitle"] = bupr.BlogTitle;
ViewData ["Avatar"] = bupr.avatar;
}
UUBlogEntryCollection uuc = new UUBlogEntryCollection (user, c);
ViewData ["ResultCount"] = recordcount;

View file

@ -43,7 +43,7 @@ namespace Yavsc.Controllers
return View (model);
}
/// <summary>
/// Estimates this instance.
/// Estimates released to this client
/// </summary>
[Authorize]
public ActionResult Estimates (string client)
@ -68,15 +68,15 @@ namespace Yavsc.Controllers
/// <summary>
/// Estimate the specified id.
/// Estimate wearing the specified id.
/// </summary>
/// <param name="id">Identifier.</param>
public ActionResult Get (long estimid)
/// <param name="id">Estim Identifier.</param>
public ActionResult Get (long id)
{
Estimate f = WorkFlowManager.GetEstimate (estimid);
Estimate f = WorkFlowManager.GetEstimate (id);
if (f == null) {
ModelState.AddModelError ("Id", "Wrong Id");
return View (new Estimate () { Id=estimid } );
return View (new Estimate () { Id=id } );
}
return View (f);
}
@ -182,14 +182,14 @@ namespace Yavsc.Controllers
/// <summary>
/// Product the specified id, pc and pref.
/// </summary>
/// <param name="id">Identifier.</param>
/// <param name="pc">Pc.</param>
/// <param name="id">Brand Identifier.</param>
/// <param name="pc">Production catalog reference.</param>
/// <param name="pref">Preference.</param>
[AcceptVerbs ("GET")]
public ActionResult Product (string brandid, string pc, string pref)
public ActionResult Product (string id, string pc, string pref)
{
Product p = null;
ViewData ["BrandName"] = brandid;
ViewData ["BrandName"] = id;
ViewData ["ProdCatRef"] = pc;
ViewData ["ProdRef"] = pref;
Catalog cat = CatalogManager.GetCatalog ();
@ -198,7 +198,7 @@ namespace Yavsc.Controllers
ViewData ["RefType"] = "Catalog";
return View ("ReferenceNotFound");
}
Brand b = cat.GetBrand (brandid);
Brand b = cat.GetBrand (id);
if (b == null) {
ViewData ["RefType"] = "Brand";
return View ("ReferenceNotFound");
@ -266,6 +266,11 @@ namespace Yavsc.Controllers
return View (skills);
}
/// <summary>
/// Activities the specified search and toPower.
/// </summary>
/// <param name="search">Search.</param>
/// <param name="toPower">If set to <c>true</c> to power.</param>
public ActionResult Activities (string search, bool toPower = false)
{
if (search == null)
@ -274,6 +279,10 @@ namespace Yavsc.Controllers
return View (activities);
}
/// <summary>
/// Activity at the specified id.
/// </summary>
/// <param name="id">Identifier.</param>
public ActionResult Activity(string id)
{
return View(WorkFlowManager.GetActivity (id));
@ -283,7 +292,7 @@ namespace Yavsc.Controllers
/// offer Ajax edition of
/// user's skills.
/// </summary>
/// <param name="usp">the User Skills Profile.</param>
/// <param name="id">the User name.</param>
[Authorize()]
public ActionResult UserSkills (string id)
{
@ -302,10 +311,11 @@ namespace Yavsc.Controllers
/// Booking the specified model.
/// </summary>
/// <param name="model">Model.</param>
public ActionResult Booking (SimpleBookingQuery model)
public ActionResult Booking (string id, SimpleBookingQuery model)
{
if (model.Needs == null)
model.Needs = SkillManager.FindSkill ("%");
model.MAECode = id;
return View (model);
}
}

View file

@ -14,6 +14,7 @@ using Yavsc.Helpers;
using Yavsc;
using System.Web.Mvc;
using Yavsc.Model.Blogs;
using Yavsc.Model.WorkFlow;
namespace Yavsc.Controllers
{
@ -83,7 +84,7 @@ namespace Yavsc.Controllers
/// <summary>
/// Index this instance.
/// </summary>
public ActionResult Index ()
public ActionResult Index (string id)
{
foreach (string tagname in new string[] {"Accueil","Yavsc","Événements","Mentions légales"})
{
@ -91,7 +92,9 @@ namespace Yavsc.Controllers
// TODO specialyze BlogEntry creating a PhotoEntry
ViewData [tagname] = ti;
}
if (id == null)
id = "%";
ViewData["Activities"] = WorkFlowManager.FindActivity(id,true);
return View ();
}
/// <summary>

View file

@ -23,6 +23,10 @@ using Yavsc.Model.Google;
using System.Web.Profile;
using System.Configuration;
using System.Web;
using Yavsc.Model.Calendar;
using Yavsc.Model.Circles;
using System.Collections.Generic;
using System.Web.Security;
namespace Yavsc.Helpers.Google
{
@ -93,6 +97,41 @@ namespace Yavsc.Helpers.Google
{
return new OAuth2 (callBack,clientId,clientSecret);
}
/// <summary>
/// Notifies the event.
/// </summary>
/// <returns>The event.</returns>
/// <param name="evpub">Evpub.</param>
public static MessageWithPayloadResponse NotifyEvent(EventPub evpub) {
using (SimpleJsonPostMethod<MessageWithPayload<YaEvent>,MessageWithPayloadResponse> r =
new SimpleJsonPostMethod<MessageWithPayload<YaEvent>,MessageWithPayloadResponse>(
"https://gcm-http.googleapis.com/gcm/send")) {
var users = Circle.Union (evpub.CircleIds);
var regids = new List<string> ();
var to = new List<string> ();
foreach (var u in users) {
var p = ProfileBase.Create (u);
if (p != null) {
var regid = p.GetPropertyValue("gregid");
if (regid == null) {
var muser = Membership.GetUser (u);
to.Add (muser.Email);
}
else regids.Add ((string)regid);
}
}
if (regids.Count == 0)
throw new InvalidOperationException
("No recipient where found for this circle list");
var msg = new MessageWithPayload<YaEvent> () {
notification = new Notification() { title = evpub.Title, body = evpub.Description, icon = "event" },
data = new YaEvent[] { (YaEvent)evpub }, registration_ids = regids.ToArray() };
return r.Invoke (msg);
}
}
}
}

View file

@ -66,6 +66,7 @@ namespace Yavsc.Helpers
Request.Method = "POST";
Request.Accept = "application/json";
Request.ContentType = "application/json";
Request.SendChunked = true;
Request.TransferEncoding = "UTF-8";
}
/// <summary>

View file

@ -61,9 +61,9 @@ else {%> Yavsc.notice(<%=note.body%>, <%=note.click_action%>, <%=note.click_acti
<i class="fa fa-sign-in">Connexion</i>
</a>
<% } else { %>
<a href="<%=Url.RouteUrl("Blogs", new { user = HttpContext.Current.User.Identity.Name } )%>" accesskey = "B" class="menuitem" >
<img src="<%=Url.AvatarUrl(HttpContext.Current.User.Identity.Name)%>" alt="vos billets" class="iconsmall" />
<span class="hint">Vos billets</span>
<a href="<%=Url.RouteUrl("Blogs", new { user = HttpContext.Current.User.Identity.Name } )%>" accesskey = "B" class="menuitem fa" >
<img src="<%=Url.AvatarUrl(HttpContext.Current.User.Identity.Name)%>" alt="" class="iconsmall" />
Vos billets
</a>
<a href="<%= Url.RouteUrl("Default", new { controller = "Account", action = "Profile", id = HttpContext.Current.User.Identity.Name} ) %>" accesskey="P" class="menuitem fa fa-user">
<%= HttpContext.Current.User.Identity.Name %>
@ -83,16 +83,14 @@ else {%> Yavsc.notice(<%=note.body%>, <%=note.click_action%>, <%=note.click_acti
</asp:ContentPlaceHolder>
</main>
<footer data-type="background" data-speed="5" >
<%= Html.ActionLink("Formulaire de contact","Contact","Home",null, new { @class="thanks" }) %>
<div id="copyr">
<a href="http://yavsc.pschneider.fr/Blogs/UserPost/paul/License">© 2015 GNU GENERAL PUBLIC LICENSE <i>Version 3, 29 June 2007</i></a>
<a href="http://yavsc.pschneider.fr/Blogs/UserPost/paul/License">
<%=Html.Encode("© 2015 GNU GENERAL PUBLIC LICENSE")%> <i>Version 3, 29 June 2007</i></a>
</div>
<%= Html.ActionLink("Formulaire de contact","Contact","Home",null, new { @class="thanks" }) %>
<% foreach ( Link link in Html.Thanks()) { %>
<a class="thanks" href="<%=link.Url%>"><% if (link.Image !=null) {
%><img src="<%= link.Image %>" alt="<%= link.Text %>"/></a>
<% } else { %>
<a class="thanks" href="<%=link.Url%>"><%= link.Text %></a>
<% }} %>
</footer><div class="modal"></div>
</body>
</html>

View file

@ -23,7 +23,7 @@
$(document).ready(function(){
var $window = $(window);
var $stwidth = $(window).width();
var $stheight = $(window).width();
var $stheight = $(window).height();
var onPos = function (bgobj,ax,ay) {
var speed = bgobj.data('speed');

View file

@ -26,7 +26,7 @@
<%= Html.ValidationSummary() %>
<% using(Html.BeginForm("Profile", "Account", FormMethod.Post, new { enctype = "multipart/form-data" })) %>
<% { %>
<%= Html.ValidationSummary() %>
<%= Html.Hidden("UserName",ViewData["ProfileUserName"]) %>
<fieldset><legend>Informations publiques</legend>

View file

@ -1,9 +1,7 @@
<%@ Page Title="Back office" Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
<ul><li>
<%= Html.ActionLink("Catalog","Catalog","FrontOffice" ) %>
</li>
<li><%= Html.ActionLink(LocalizedText.Skill,"Skills","FrontOffice" ) %></li>
<ul>
<li><%= Html.ActionLink("Notifier des cercles d'un évennement","NotifyEvent","BackOffice" ) %></li>
</ul>
</asp:Content>

View file

@ -0,0 +1,22 @@
<%@ Page Title="Notify" Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage<EventPub>" %>
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
<% using( Html.BeginForm("NotifyEvent")) { %>
<%= Html.ValidationSummary() %>
<%= Html.LabelFor(model => model.Title) %>
<%= Html.TextBox("Title") %>
<%= Html.ValidationMessage("Title", "*") %><br>
<%= Html.LabelFor(model => model.Description) %>
<%= Html.TextArea("Description") %>
<%= Html.ValidationMessage("Description", "*") %><br>
<%= Html.LabelFor(model => model.CircleIds) %>
<%= Html.ListBox("CircleIds") %>
<%= Html.ValidationMessage("CircleIds", "*") %>
<input type="submit">
<% } %>
</asp:Content>

View file

@ -0,0 +1,4 @@
<%@ Page Title="Notify response" Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
</asp:Content>

View file

@ -25,7 +25,6 @@
Id: $('#meacode').val(),
Comment: $('#comment').val(),
};
console.log(Yavsc.dumpprops(activity));
Yavsc.ajax( 'FrontOffice/RegisterActivity', activity,
function() {
var na = $('<p></p>').addClass('activity');

View file

@ -11,7 +11,7 @@
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<% using ( Html.BeginForm("Booking") ) { %>
<%= Html.Hidden("MAECode") %>
<fieldset>
<legend>Préferences musicales</legend>
<%= Html.LabelFor(model=>model.Needs) %>:

View file

@ -8,6 +8,18 @@
</asp:Content>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<div id="activities">
<% foreach (var a in ((Activity[])(ViewData["Activities"]))) { %>
<div>
<div data-type="background" data-speed="10" style="width:100%; height:10em; background: url(<%=Ajax.JString(a.Photo)%>) 50% 50% repeat fixed;" >
</div>
<h1><a href="<%= Url.RouteUrl("Default", new { controller="FrontOffice", action="Booking", id=a.Id }) %>"><%=Html.Encode(a.Title)%></a></h1>
<i>(<%=Html.Encode(a.Id)%>)</i>
<p>
<%=Html.Markdown(a.Comment)%>
</p></div>
<% } %>
</div>
<%= Html.Partial("TagPanel",ViewData["Accueil"]) %>
</asp:Content>

View file

@ -147,7 +147,7 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
<add name="gtokenexpir" type="System.DateTime" defaultValue="2008-01-01 1:00:00Z" />
<add name="gcalapi" type="System.Boolean" defaultValue="false" />
<add name="gcalid" />
<add name="gregid" />
<add name="gregid" allowAnonymous="true" />
<add name="allowcookies" type="System.Boolean" allowAnonymous="true" defaultValue="false" />
<add name="UITheme" allowAnonymous="true" defaultValue="dark" />
</properties>

View file

@ -215,6 +215,7 @@
<Compile Include="AuthorizeAttribute.cs" />
<Compile Include="ApiControllers\SkillController.cs" />
<Compile Include="Controllers\PayPalController.cs" />
<Compile Include="ApiControllers\BackOfficeController.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="Views\Web.config" />
@ -518,6 +519,8 @@
<Content Include="App_Themes\clear\style.css" />
<Content Include="Views\FrontOffice\Activities.aspx" />
<Content Include="Views\FrontOffice\Activity.ascx" />
<Content Include="Views\BackOffice\NotifyEventResponse.aspx" />
<Content Include="Views\BackOffice\NotifyEvent.aspx" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />