Improves notification system

* ICalendarManager.cs: WIP booking TODO a calendar provider

* NpgsqlProfileProvider.cs: Fixes the defaultValue specification from
  config file

* BlogsController.cs:
* AccountController.cs:
* CalendarController.cs: refactoring : the Yavsc controller name

* instdbws.sql: a new profile value : a boolean, `AllowCookies` :'{

* style.css: a class to display notification

* HomeController.cs: Notifies users this site uses cookies (what for
  an information!)
If authenticated, at dimissing this notification, the user's profile
  is updated,
and he'll not mess up anymore with the info.

* App.master:
* YavscHelpers.cs: adds usage of click_action value at
displaying a notification.

* yavsc.js: Implements the notification `click_action`

* Web.config: * enables anonymous profiles
* adds a new `allowcookies` profile property

* Web.csproj: Yavsc controller refactoring

* YaEvent.cs:
* IFreeDateSet.cs: WIP booking

* LocalizedText.resx:
* LocalizedText.fr.resx:
* LocalizedText.Designer.cs:
* LocalizedText.fr.Designer.cs: implements the message "uses cookies"

* YavscModel.csproj: refactoring

* Notification.cs: The Yavsc otification will start as a Google one
  ...
many properties are not yet used, but all seems usefull.

* Web.config: code prettying

* YavscController.cs: Gives Yavsc a concrete base controller
main
Paul Schneider 10 years ago
parent 0e6da27309
commit b8446c2d3e
26 changed files with 256 additions and 116 deletions

@ -0,0 +1,5 @@
2015-10-28 Paul Schneider <paul@pschneider.fr>
* NpgsqlProfileProvider.cs: Fixes the defaultValue
specification from config file

@ -221,7 +221,7 @@ namespace Npgsql.Web
} else { } else {
foreach (SettingsProperty p in collection) { foreach (SettingsProperty p in collection) {
SettingsPropertyValue v = new SettingsPropertyValue (p); SettingsPropertyValue v = new SettingsPropertyValue (p);
v.PropertyValue = null; v.PropertyValue = p.DefaultValue;
c.Add (v); c.Add (v);
} }
} }

@ -32,7 +32,7 @@ namespace Yavsc.ApiControllers
/// <summary> /// <summary>
/// Account controller. /// Account controller.
/// </summary> /// </summary>
public class AccountController : YavscApiController public class AccountController : YavscController
{ {
/// <summary> /// <summary>

@ -19,7 +19,7 @@ namespace Yavsc.ApiControllers
/// <summary> /// <summary>
/// Blogs API controller. /// Blogs API controller.
/// </summary> /// </summary>
public class BlogsController : YavscApiController public class BlogsController : YavscController
{ {
/// <summary> /// <summary>
/// Tag the specified model. /// Tag the specified model.

@ -50,7 +50,7 @@ namespace Yavsc.ApiControllers
}, },
new YaEvent () { new YaEvent () {
Title = "Test2", Title = "Test2",
ImgLocator = "http://bla/im.png", Photo = "http://bla/im.png",
Location = new Position () { Location = new Position () {
Longitude = 0, Longitude = 0,
Latitude = 0 Latitude = 0
@ -66,7 +66,7 @@ namespace Yavsc.ApiControllers
}, },
new YaEvent () { new YaEvent () {
Title = "Test2", Title = "Test2",
ImgLocator = "http://bla/im.png", Photo = "http://bla/im.png",
Location = new Position () { Location = new Position () {
Longitude = 0, Longitude = 0,
Latitude = 0 Latitude = 0

@ -21,14 +21,26 @@
using System; using System;
using System.Web.Http; using System.Web.Http;
using System.Net.Http; using System.Net.Http;
using System.Web.Profile;
namespace Yavsc.ApiControllers namespace Yavsc.ApiControllers
{ {
public abstract class YavscApiController : ApiController public class YavscController : ApiController
{ {
public YavscApiController () public YavscController ()
{ {
} }
public class Auth {
public string Id { get; set; }
}
public void AllowCookies (Auth model)
{
if (model.Id != null) {
ProfileBase anonymousProfile = ProfileBase.Create (model.Id);
anonymousProfile.SetPropertyValue ("allowcookies", true);
}
}
protected HttpResponseMessage DefaultResponse() protected HttpResponseMessage DefaultResponse()
{ {

@ -122,6 +122,7 @@ CREATE TABLE profiledata
avatar character varying(512), -- url for an avatar avatar character varying(512), -- url for an avatar
gcalapi boolean NOT NULL DEFAULT false, gcalapi boolean NOT NULL DEFAULT false,
gregid character varying(1024), -- Google Cloud Message registration identifier gregid character varying(1024), -- Google Cloud Message registration identifier
allowcookies boolean NOT NULL DEFAULT false,
CONSTRAINT fkprofiles2 FOREIGN KEY (uniqueid) CONSTRAINT fkprofiles2 FOREIGN KEY (uniqueid)
REFERENCES profiles (uniqueid) MATCH SIMPLE REFERENCES profiles (uniqueid) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE CASCADE ON UPDATE CASCADE ON DELETE CASCADE
@ -129,18 +130,18 @@ CREATE TABLE profiledata
WITH ( WITH (
OIDS=FALSE OIDS=FALSE
); );
COMMENT ON COLUMN profiledata."address.address" IS 'Postal address';
COMMENT ON COLUMN profiledata.blogtitle IS 'Blog Title'; COMMENT ON COLUMN profiledata.blogtitle IS 'Blog Title';
COMMENT ON COLUMN profiledata.address IS 'Postal address';
COMMENT ON COLUMN profiledata.accountnumber IS 'Numero de compte';
COMMENT ON COLUMN profiledata.bankedkey IS 'clé RIB';
COMMENT ON COLUMN profiledata.bankcode IS 'Code banque';
COMMENT ON COLUMN profiledata.gtoken IS 'Google authentification token';
COMMENT ON COLUMN profiledata.grefreshtoken IS 'Google refresh token';
COMMENT ON COLUMN profiledata.gtokentype IS 'Google access token type';
COMMENT ON COLUMN profiledata.gcalid IS 'Google calendar identifier';
COMMENT ON COLUMN profiledata.gtokenexpir IS 'Google access token expiration date';
COMMENT ON COLUMN profiledata.avatar IS 'url for an avatar'; COMMENT ON COLUMN profiledata.avatar IS 'url for an avatar';
COMMENT ON COLUMN profiledata."bank.accountnumber" IS 'Numero de compte'; COMMENT ON COLUMN profiledata.gregid IS 'Google Cloud Message registration identifier';
COMMENT ON COLUMN profiledata."bank.key" IS 'clé RIB';
COMMENT ON COLUMN profiledata."bank.code" IS 'Code banque';
COMMENT ON COLUMN profiledata."google.token" IS 'Google authentification token';
COMMENT ON COLUMN profiledata."google.refreshtoken" IS 'Google refresh token';
COMMENT ON COLUMN profiledata."google.tokentype" IS 'Google access token type';
COMMENT ON COLUMN profiledata."google.calid" IS 'Google calendar identifier';
COMMENT ON COLUMN profiledata."google.tokenexpir" IS 'Google access token expiration date';
COMMENT ON COLUMN profiledata."google.regid" IS 'Google Cloud Message registration identifier';
-- Index: fki_fkprofiles2 -- Index: fki_fkprofiles2
@ -154,6 +155,9 @@ CREATE INDEX fki_fkprofiles2
-- Table: profiles -- Table: profiles

@ -27,6 +27,16 @@ body {
url('/images/FhHRx.gif') url('/images/FhHRx.gif')
50% 50% 50% 50%
no-repeat; no-repeat;
overflow: scroll;
}
.dispmodal {
position: fixed;
z-index: 1000;
top: 0;
left: 0;
height: 100%;
width: 100%;
overflow: scroll;
} }
body.loading { body.loading {
@ -217,6 +227,10 @@ label {
font-size: large; font-size: large;
background-color: rgba(64,64,0,0.5); background-color: rgba(64,64,0,0.5);
border: solid green 1px; border: solid green 1px;
padding: 1em;
border-radius:1em;
margin:1em;
padding:1em;
} }
.dirty { .dirty {
background-color: rgba(128,128,0,0.5); background-color: rgba(128,128,0,0.5);
@ -356,6 +370,9 @@ header h1, header a , .actionlink, .menuitem, a { padding:.5em;}
} }
#notifications { #notifications {
padding: .5em; padding: .5em;
border-radius:.5em;
margin:.5em;
padding:.5em;
} }
.menuitem { .menuitem {
display: block; display: block;

@ -1,3 +1,38 @@
2015-10-28 Paul Schneider <paul@pschneider.fr>
* BlogsController.cs:
* AccountController.cs:
* CalendarController.cs: refactoring : the Yavsc controller
name
* instdbws.sql: a new profile value : a boolean,
`AllowCookies` :'{
* style.css: a class to display notification
* HomeController.cs: Notifies users this site uses cookies
(what for an information!)
If authenticated, at dimissing this notification, the user's
profile is updated,
and he'll not mess up anymore with the info.
* App.master:
* YavscHelpers.cs: adds usage of click_action value at
displaying a notification.
* yavsc.js: Implements the notification `click_action`
* Web.config: * enables anonymous profiles
* adds a new `allowcookies` profile property
* Web.csproj: Yavsc controller refactoring
* Web.config: code prettying
* YavscController.cs: Gives Yavsc a concrete base controller
2015-10-27 Paul Schneider <paul@pschneider.fr> 2015-10-27 Paul Schneider <paul@pschneider.fr>
* AppAdmin.master: A new master page for Administration * AppAdmin.master: A new master page for Administration

@ -14,6 +14,8 @@ using Yavsc.Helpers;
using Yavsc; using Yavsc;
using System.Web.Mvc; using System.Web.Mvc;
using Yavsc.Model.Blogs; using Yavsc.Model.Blogs;
using System.Web.Security;
using System.Web.Profile;
namespace Yavsc.Controllers namespace Yavsc.Controllers
{ {
@ -85,6 +87,17 @@ namespace Yavsc.Controllers
/// </summary> /// </summary>
public ActionResult Index () public ActionResult Index ()
{ {
var anonid = Request.AnonymousID;
if (Session.IsNewSession) {
if (!Request.IsAuthenticated) {
ProfileBase anonymousProfile = ProfileBase.Create(anonid);
object ac = anonymousProfile.GetPropertyValue ("allowcookies");
if (ac is string && ac!="true")
YavscHelpers.Notify (ViewData, LocalizedText.ThisSiteUsesCookies,
"function(){Yavsc.ajax(\"/Yavsc/AllowCookies\", { id:'"+anonid+"' });}");
}
}
foreach (string tagname in new string[] {"Accueil","Événements","Mentions légales"}) foreach (string tagname in new string[] {"Accueil","Événements","Mentions légales"})
{ {
TagInfo ti = BlogManager.GetTagInfo (tagname); TagInfo ti = BlogManager.GetTagInfo (tagname);

@ -15,10 +15,12 @@ using System.Web.Profile;
using System.Web.Script.Serialization; using System.Web.Script.Serialization;
using System.Web.Mvc; using System.Web.Mvc;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using Yavsc.Model.Messaging;
namespace Yavsc.Helpers namespace Yavsc.Helpers
{ {
/// <summary> /// <summary>
/// Yavsc helpers. /// Yavsc helpers.
/// </summary> /// </summary>
@ -219,10 +221,11 @@ namespace Yavsc.Helpers
JavaScriptSerializer serializer = new JavaScriptSerializer(); JavaScriptSerializer serializer = new JavaScriptSerializer();
return serializer.Serialize(obj); return serializer.Serialize(obj);
} }
/// <summary> /// <summary>
/// Notifies /// Notify the specified helper and message.
/// </summary> /// </summary>
/// <param name="ViewData">View data.</param> /// <param name="helper">Helper.</param>
/// <param name="message">Message.</param> /// <param name="message">Message.</param>
public static void Notify (this HtmlHelper helper, string message) { public static void Notify (this HtmlHelper helper, string message) {
Notify (helper.ViewData, message); Notify (helper.ViewData, message);
@ -232,10 +235,12 @@ namespace Yavsc.Helpers
/// </summary> /// </summary>
/// <param name="viewData">View data.</param> /// <param name="viewData">View data.</param>
/// <param name="message">Message.</param> /// <param name="message">Message.</param>
public static void Notify(ViewDataDictionary viewData, string message) { public static void Notify(ViewDataDictionary viewData, string message, string click_action=null) {
if (viewData ["Notifications"] == null) if (viewData ["Notifications"] == null)
viewData ["Notifications"] = new List<string> (); viewData ["Notifications"] = new List<Notification> ();
(viewData ["Notifications"] as List<string>).Add (message.Replace("\'","\\\'")); (viewData ["Notifications"] as List<Notification>).Add (
new Notification { body = message.Replace("\'","\\\'"),
click_action = click_action } ) ;
} }
/// <summary> /// <summary>
/// Files the list. /// Files the list.

@ -39,8 +39,9 @@ var apiBaseUrl = '<%=Url.Content(Yavsc.WebApiConfig.UrlPrefixRelative)%>';
<% if (ViewData ["Notifications"]!=null) { %> <% if (ViewData ["Notifications"]!=null) { %>
<script> <script>
$(document).ready(function(){ $(document).ready(function(){
<% foreach (string note in (IEnumerable<string>) ViewData ["Notifications"] ) { %> <% foreach (Notification note in (IEnumerable<Notification>) ViewData ["Notifications"] ) {
Yavsc.notice('<%=note%>'); if (note.click_action == null) {%> Yavsc.notice('<%=note.body%>'); <% }
else {%> Yavsc.notice('<%=note.body%>', <%=note.click_action%>); <% } %>
<% } %> <% } %>
}); });
</script> </script>

@ -1,8 +1,8 @@
var Yavsc = (function(apiBaseUrl){ var Yavsc = (function(apiBaseUrl){
var self = {}; var self = {};
var $notifications = $('#notifications');
function dumpprops(obj) { self.dumpprops = function (obj) {
var str = ""; var str = "";
for(var k in obj) for(var k in obj)
if (obj.hasOwnProperty(k)) if (obj.hasOwnProperty(k))
@ -30,31 +30,41 @@ self.dimiss = function () {
$(this).parent().remove(); $(this).parent().remove();
}; };
self.ajax = function (method,data,callback) {
$.ajax({
url: self.apiBaseUrl+method,
type: "POST",
data: data,
success: function (response) {
if (callback) callback(response);
},
statusCode: {
400: Yavsc.onAjaxBadInput
},
error: Yavsc.onAjaxError});
};
self.onScroll = function() { self.onScroll = function() {
var $notifications = $('#notifications');
if ($notifications.has('*').length>0) { if ($notifications.has('*').length>0) {
if ($(window).scrollTop()>375) { if ($(window).scrollTop()>100) {
console.log('fixit'); $notifications.addClass("dispmodal");
$notifications.css('position','fixed');
$notifications.css('z-index',2);
$notifications.css('top',0);
} }
else { else {
$notifications.css('position','static'); $notifications.removeClass("dispmodal");
$notifications.css('z-index',1);
}} }}
}; };
self.notice = function (msg, msgok) { self.notice = function (msg, callback, msgok) {
if (!msgok) msgok='Ok'; if (!msgok) msgok='Ok';
if (msg) {
var note = $('<div class="notification">'+msg+'<br></div>'); var note = $('<div class="notification">'+msg+'<br></div>');
$('<a class="actionlink"><i class="fa fa-check">'+msgok+'</i></a>').click(self.dimiss).appendTo(note); var btn = $('<a class="actionlink"><i class="fa fa-check">'+msgok+'</i></a>');
if (callback) btn.click(callback);
btn.click(self.dimiss).appendTo(note);
note.appendTo("#notifications"); note.appendTo("#notifications");
self.onScroll(); self.onScroll();
}
}; };
self.onAjaxBadInput = function (data) self.onAjaxBadInput = function (data)
{ {
if (!data) { Yavsc.notice('no data'); return; } if (!data) { Yavsc.notice('no data'); return; }
@ -68,7 +78,6 @@ self.notice = function (msg, msgok) {
else else
errspan.innerHTML=value.errors.join("<br/>"); errspan.innerHTML=value.errors.join("<br/>");
}); });
}; };
self.onAjaxError = function (xhr, ajaxOptions, thrownError) { self.onAjaxError = function (xhr, ajaxOptions, thrownError) {
@ -95,14 +104,9 @@ $btnshow.addClass('hidden');
$btnhide.removeClass('hidden'); $btnhide.removeClass('hidden');
}); });
}); });
}); });
$(document).ready(function(){ $(document).ready(function(){
$body = $("body"); $body = $("body");
$(document).on({ $(document).on({
ajaxStart: function() { $body.addClass("loading"); }, ajaxStart: function() { $body.addClass("loading"); },
@ -110,9 +114,6 @@ $(document).on({
}); });
$(window).scroll(self.onScroll); $(window).scroll(self.onScroll);
}); });
return self; return self;
})(); })();

@ -29,7 +29,6 @@
<add namespace="Yavsc.Model.Circles" /> <add namespace="Yavsc.Model.Circles" />
<add namespace="Yavsc.Model.Calendar" /> <add namespace="Yavsc.Model.Calendar" />
<add namespace="System.Collections.Generic" /> <add namespace="System.Collections.Generic" />
</namespaces> </namespaces>
</pages> </pages>
</system.web> </system.web>

@ -68,11 +68,13 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
<add namespace="System.Collections.Generic" /> <add namespace="System.Collections.Generic" />
<add namespace="Yavsc.Helpers" /> <add namespace="Yavsc.Helpers" />
<add namespace="Yavsc.Model" /> <add namespace="Yavsc.Model" />
<add namespace="Yavsc.Model.Messaging" />
</namespaces> </namespaces>
</pages> </pages>
<authorization> <authorization>
<allow users="*" /> <allow users="*" />
</authorization> </authorization>
<anonymousIdentification enabled="true" />
<httpHandlers> <httpHandlers>
<remove verb="*" path="*.asmx" /> <remove verb="*" path="*.asmx" />
<add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
@ -139,6 +141,7 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
<add name="gcalapi" /> <add name="gcalapi" />
<add name="gcalid" /> <add name="gcalid" />
<add name="gregid" /> <add name="gregid" />
<add name="allowcookies" type="System.Boolean" allowAnonymous="true" defaultValue="false"/>
</properties> </properties>
</profile> </profile>
<blog defaultProvider="NpgsqlBlogProvider"> <blog defaultProvider="NpgsqlBlogProvider">

@ -205,7 +205,7 @@
<Compile Include="Helpers\Google\PeopleApi.cs" /> <Compile Include="Helpers\Google\PeopleApi.cs" />
<Compile Include="ApiControllers\PaypalController.cs" /> <Compile Include="ApiControllers\PaypalController.cs" />
<Compile Include="ApiControllers\AuthorizationDenied.cs" /> <Compile Include="ApiControllers\AuthorizationDenied.cs" />
<Compile Include="ApiControllers\YavscApiController.cs" /> <Compile Include="ApiControllers\YavscController.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="Views\Web.config" /> <Content Include="Views\Web.config" />

@ -0,0 +1,32 @@
//
// ICalendarManager.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 System.Collections.Generic;
namespace Yavsc.Model.Calendar
{
public interface ICalendarManager {
IFreeDateSet GetFreeDates(string username, BookQuery req);
bool Book(string username, YaEvent ev);
}
}

@ -19,40 +19,36 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
using System; using System;
using Yavsc.Model.Google; using Yavsc.Model.Google;
using System.Collections.Generic;
namespace Yavsc.Model.Calendar namespace Yavsc.Model.Calendar
{ {
/// <summary> /// <summary>
/// Free date. /// Free date.
/// </summary> /// </summary>
public class FreeDateSet public interface IFreeDateSet
{ {
/// <summary> /// <summary>
/// Gets or sets the reference. /// Gets or sets the reference.
/// </summary> /// </summary>
/// <value>The reference.</value> /// <value>The reference.</value>
public DateTime [] Values { get; set; } IEnumerable<Period> Values { get; set; }
/// <summary> /// <summary>
/// Gets or sets the duration. /// Gets or sets the duration.
/// </summary> /// </summary>
/// <value>The duration.</value> /// <value>The duration.</value>
public TimeSpan Duration { get; set; } TimeSpan Duration { get; set; }
/// <summary> /// <summary>
/// Gets or sets the attendees. /// Gets or sets the attendees.
/// </summary> /// </summary>
/// <value>The attendees.</value> /// <value>The attendees.</value>
public string UserName { get; set; } string UserName { get; set; }
/// <summary> /// <summary>
/// Gets or sets the location. /// Gets or sets the location.
/// </summary> /// </summary>
/// <value>The location.</value> /// <value>The location.</value>
public string Location { get; set; } string Location { get; set; }
static FreeDateSet CreateFromCalAndQuery(CalendarEventList cal, BookQuery query)
{
throw new NotImplementedException ();
}
} }
} }

@ -26,13 +26,8 @@ using Yavsc.Model;
namespace Yavsc.Model.Calendar namespace Yavsc.Model.Calendar
{ {
public class BaseEvent
/// <summary>
/// NF event.
/// </summary>
public class YaEvent
{ {
/// <summary> /// <summary>
/// The title. /// The title.
/// </summary> /// </summary>
@ -45,6 +40,7 @@ namespace Yavsc.Model.Calendar
[Required(ErrorMessage="Please, choose a Description.")] [Required(ErrorMessage="Please, choose a Description.")]
[Display(ResourceType=typeof(LocalizedText),Name="Description")] [Display(ResourceType=typeof(LocalizedText),Name="Description")]
public string Description { get; set; } public string Description { get; set; }
/// <summary> /// <summary>
/// The location. /// The location.
/// </summary> /// </summary>
@ -65,6 +61,13 @@ namespace Yavsc.Model.Calendar
[Required(ErrorMessage="Please, choose an End Date.")] [Required(ErrorMessage="Please, choose an End Date.")]
[Display(ResourceType=typeof(LocalizedText),Name="EndDate")] [Display(ResourceType=typeof(LocalizedText),Name="EndDate")]
public DateTime EndDate { get; set; } public DateTime EndDate { get; set; }
}
/// <summary>
/// NF event.
/// </summary>
public class YaEvent : BaseEvent
{
/// <summary> /// <summary>
/// The name of the NF provider. /// The name of the NF provider.
/// </summary> /// </summary>
@ -90,7 +93,7 @@ namespace Yavsc.Model.Calendar
/// <summary> /// <summary>
/// The image locator. /// The image locator.
/// </summary> /// </summary>
[Display(ResourceType=typeof(LocalizedText),Name="ImgLocator")] [Display(ResourceType=typeof(LocalizedText),Name="Photo")]
public string ImgLocator { get; set; } public string Photo { get; set; }
} }
} }

@ -1,3 +1,22 @@
2015-10-28 Paul Schneider <paul@pschneider.fr>
* ICalendarManager.cs: WIP booking TODO a calendar provider
* YaEvent.cs:
* IFreeDateSet.cs: WIP booking
* LocalizedText.resx:
* LocalizedText.fr.resx:
* LocalizedText.Designer.cs:
* LocalizedText.fr.Designer.cs: implements the message "uses
cookies"
* YavscModel.csproj: refactoring
* Notification.cs: The Yavsc otification will start as a
Google one ...
many properties are not yet used, but all seems usefull.
2015-10-27 Paul Schneider <paul@pschneider.fr> 2015-10-27 Paul Schneider <paul@pschneider.fr>
* YavscModel.csproj: * YavscModel.csproj:

@ -388,6 +388,12 @@ namespace Yavsc.Model {
} }
} }
public static string ThisSiteUsesCookies {
get {
return ResourceManager.GetString("ThisSiteUsesCookies", resourceCulture);
}
}
public static string ReadMore { public static string ReadMore {
get { get {
return ResourceManager.GetString("ReadMore", resourceCulture); return ResourceManager.GetString("ReadMore", resourceCulture);

@ -64,6 +64,12 @@ namespace Yavsc.Model {
} }
} }
public static string Location {
get {
return ResourceManager.GetString("Location", resourceCulture);
}
}
public static string Circles { public static string Circles {
get { get {
return ResourceManager.GetString("Circles", resourceCulture); return ResourceManager.GetString("Circles", resourceCulture);
@ -208,12 +214,6 @@ namespace Yavsc.Model {
} }
} }
public static string Tag_name {
get {
return ResourceManager.GetString("Tag_name", resourceCulture);
}
}
public static string Google_error { public static string Google_error {
get { get {
return ResourceManager.GetString("Google_error", resourceCulture); return ResourceManager.GetString("Google_error", resourceCulture);
@ -274,9 +274,9 @@ namespace Yavsc.Model {
} }
} }
public static string Location { public static string Tag_name {
get { get {
return ResourceManager.GetString("Location", resourceCulture); return ResourceManager.GetString("Tag_name", resourceCulture);
} }
} }
@ -376,6 +376,12 @@ namespace Yavsc.Model {
} }
} }
public static string ThisSiteUsesCookies {
get {
return ResourceManager.GetString("ThisSiteUsesCookies", resourceCulture);
}
}
public static string ReadMore { public static string ReadMore {
get { get {
return ResourceManager.GetString("ReadMore", resourceCulture); return ResourceManager.GetString("ReadMore", resourceCulture);

@ -75,9 +75,10 @@
<data name="role_created"><value>Rôle créé</value></data> <data name="role_created"><value>Rôle créé</value></data>
<data name="StartDate"><value>Date de démarrage</value></data> <data name="StartDate"><value>Date de démarrage</value></data>
<data name="Submit"><value>Soumettre</value></data> <data name="Submit"><value>Soumettre</value></data>
<data name="Tag_name"><value>Nom du tag</value></data>
<data name="Tex_version"><value>Version LaTeX</value></data> <data name="Tex_version"><value>Version LaTeX</value></data>
<data name="ThisSiteUsesCookies"><value>Ce site utilise les cookies</value></data>
<data name="Title"><value>Titre</value></data> <data name="Title"><value>Titre</value></data>
<data name="Tag_name"><value>Nom du tag</value></data>
<data name="Unitary_cost"><value>Coût unitaire</value></data> <data name="Unitary_cost"><value>Coût unitaire</value></data>
<data name="User_List"><value>Liste des utilisateurs</value><comment></comment></data> <data name="User_List"><value>Liste des utilisateurs</value><comment></comment></data>
<data name="User_name"><value>Nom d'utilisateur</value></data> <data name="User_name"><value>Nom d'utilisateur</value></data>

@ -77,9 +77,10 @@
<data name="role_created"><value>role created</value></data> <data name="role_created"><value>role created</value></data>
<data name="StartDate"><value>Start date</value></data> <data name="StartDate"><value>Start date</value></data>
<data name="Submit"><value>Submit</value></data> <data name="Submit"><value>Submit</value></data>
<data name="Tag_name"><value>Tag name</value></data>
<data name="Tex_version"><value>LaTeX version</value></data> <data name="Tex_version"><value>LaTeX version</value></data>
<data name="ThisSiteUsesCookies"><value>This site uses cookies</value></data>
<data name="Title"><value>Title</value></data> <data name="Title"><value>Title</value></data>
<data name="Tag_name"><value>Tag name</value></data>
<data name="Unitary_cost"><value>Unitary_cost</value></data> <data name="Unitary_cost"><value>Unitary_cost</value></data>
<data name="User_List"><value>User List</value><comment></comment></data> <data name="User_List"><value>User List</value><comment></comment></data>
<data name="User_name"><value>User name</value></data> <data name="User_name"><value>User name</value></data>

@ -1,5 +1,5 @@
// //
// Message.cs // Notification.cs
// //
// Author: // Author:
// Paul Schneider <paul@pschneider.fr> // Paul Schneider <paul@pschneider.fr>
@ -22,31 +22,11 @@ using System;
namespace Yavsc.Model.Messaging namespace Yavsc.Model.Messaging
{ {
/// <summary> public class Notification : Google.Notification
/// Simple message.
/// </summary>
public class SimpleMessage
{ {
/// <summary> public Notification ()
/// Gets or sets the user name this message is comming from. {
/// </summary> }
/// <value>From.</value>
public string From { get; set; }
/// <summary>
/// Gets or sets the user names, separted by semilicon to which this message will be sent.
/// </summary>
/// <value>To.</value>
public string To { get; set; }
/// <summary>
/// Gets or sets the subject.
/// </summary>
/// <value>The subject.</value>
public string Subject { get; set; }
/// <summary>
/// Gets or sets the body.
/// </summary>
/// <value>The body.</value>
public string Body { get; set; }
} }
} }

@ -155,8 +155,6 @@
<Compile Include="RolesAndMembers\ProviderPublicInfo.cs" /> <Compile Include="RolesAndMembers\ProviderPublicInfo.cs" />
<Compile Include="RolesAndMembers\GCMRegister.cs" /> <Compile Include="RolesAndMembers\GCMRegister.cs" />
<Compile Include="RolesAndMembers\LostPasswordModel.cs" /> <Compile Include="RolesAndMembers\LostPasswordModel.cs" />
<Compile Include="Messaging\SimpleMessage.cs" />
<Compile Include="Calendar\FreeDate.cs" />
<Compile Include="FrontOffice\Catalog\Billing\PriceOnItemCount.cs" /> <Compile Include="FrontOffice\Catalog\Billing\PriceOnItemCount.cs" />
<Compile Include="WorkFlow\TaskOutput.cs" /> <Compile Include="WorkFlow\TaskOutput.cs" />
<Compile Include="WorkFlow\FinalStateException.cs" /> <Compile Include="WorkFlow\FinalStateException.cs" />
@ -178,6 +176,9 @@
<Compile Include="Blogs\TagInfo.cs" /> <Compile Include="Blogs\TagInfo.cs" />
<Compile Include="Blogs\MarkdownHelper.cs" /> <Compile Include="Blogs\MarkdownHelper.cs" />
<Compile Include="Calendar\BookQuery.cs" /> <Compile Include="Calendar\BookQuery.cs" />
<Compile Include="Calendar\IFreeDateSet.cs" />
<Compile Include="Calendar\ICalendarManager.cs" />
<Compile Include="Messaging\Notification.cs" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ItemGroup> <ItemGroup>

Loading…