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
This commit is contained in:
parent
0e6da27309
commit
b8446c2d3e
26 changed files with 256 additions and 116 deletions
32
yavscModel/Calendar/ICalendarManager.cs
Normal file
32
yavscModel/Calendar/ICalendarManager.cs
Normal file
|
|
@ -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/>.
|
||||
using System;
|
||||
using Yavsc.Model.Google;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Yavsc.Model.Calendar
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Free date.
|
||||
/// </summary>
|
||||
public class FreeDateSet
|
||||
public interface IFreeDateSet
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the reference.
|
||||
/// </summary>
|
||||
/// <value>The reference.</value>
|
||||
public DateTime [] Values { get; set; }
|
||||
IEnumerable<Period> Values { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the duration.
|
||||
/// </summary>
|
||||
/// <value>The duration.</value>
|
||||
public TimeSpan Duration { get; set; }
|
||||
TimeSpan Duration { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the attendees.
|
||||
/// </summary>
|
||||
/// <value>The attendees.</value>
|
||||
public string UserName { get; set; }
|
||||
string UserName { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the location.
|
||||
/// </summary>
|
||||
/// <value>The location.</value>
|
||||
public string Location { get; set; }
|
||||
|
||||
static FreeDateSet CreateFromCalAndQuery(CalendarEventList cal, BookQuery query)
|
||||
{
|
||||
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
string Location { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -26,13 +26,8 @@ using Yavsc.Model;
|
|||
|
||||
namespace Yavsc.Model.Calendar
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// NF event.
|
||||
/// </summary>
|
||||
public class YaEvent
|
||||
public class BaseEvent
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// The title.
|
||||
/// </summary>
|
||||
|
|
@ -45,6 +40,7 @@ namespace Yavsc.Model.Calendar
|
|||
[Required(ErrorMessage="Please, choose a Description.")]
|
||||
[Display(ResourceType=typeof(LocalizedText),Name="Description")]
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The location.
|
||||
/// </summary>
|
||||
|
|
@ -65,6 +61,13 @@ namespace Yavsc.Model.Calendar
|
|||
[Required(ErrorMessage="Please, choose an End Date.")]
|
||||
[Display(ResourceType=typeof(LocalizedText),Name="EndDate")]
|
||||
public DateTime EndDate { get; set; }
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// NF event.
|
||||
/// </summary>
|
||||
public class YaEvent : BaseEvent
|
||||
{
|
||||
/// <summary>
|
||||
/// The name of the NF provider.
|
||||
/// </summary>
|
||||
|
|
@ -90,7 +93,7 @@ namespace Yavsc.Model.Calendar
|
|||
/// <summary>
|
||||
/// The image locator.
|
||||
/// </summary>
|
||||
[Display(ResourceType=typeof(LocalizedText),Name="ImgLocator")]
|
||||
public string ImgLocator { get; set; }
|
||||
[Display(ResourceType=typeof(LocalizedText),Name="Photo")]
|
||||
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>
|
||||
|
||||
* YavscModel.csproj:
|
||||
|
|
|
|||
6
yavscModel/LocalizedText.Designer.cs
generated
6
yavscModel/LocalizedText.Designer.cs
generated
|
|
@ -388,6 +388,12 @@ namespace Yavsc.Model {
|
|||
}
|
||||
}
|
||||
|
||||
public static string ThisSiteUsesCookies {
|
||||
get {
|
||||
return ResourceManager.GetString("ThisSiteUsesCookies", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string ReadMore {
|
||||
get {
|
||||
return ResourceManager.GetString("ReadMore", resourceCulture);
|
||||
|
|
|
|||
22
yavscModel/LocalizedText.fr.Designer.cs
generated
22
yavscModel/LocalizedText.fr.Designer.cs
generated
|
|
@ -64,6 +64,12 @@ namespace Yavsc.Model {
|
|||
}
|
||||
}
|
||||
|
||||
public static string Location {
|
||||
get {
|
||||
return ResourceManager.GetString("Location", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Circles {
|
||||
get {
|
||||
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 {
|
||||
get {
|
||||
return ResourceManager.GetString("Google_error", resourceCulture);
|
||||
|
|
@ -274,9 +274,9 @@ namespace Yavsc.Model {
|
|||
}
|
||||
}
|
||||
|
||||
public static string Location {
|
||||
public static string Tag_name {
|
||||
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 {
|
||||
get {
|
||||
return ResourceManager.GetString("ReadMore", resourceCulture);
|
||||
|
|
|
|||
|
|
@ -75,9 +75,10 @@
|
|||
<data name="role_created"><value>Rôle créé</value></data>
|
||||
<data name="StartDate"><value>Date de démarrage</value></data>
|
||||
<data name="Submit"><value>Soumettre</value></data>
|
||||
<data name="Tex_version"><value>Version LaTeX</value></data>
|
||||
<data name="Title"><value>Titre</value></data>
|
||||
<data name="Tag_name"><value>Nom du tag</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="Unitary_cost"><value>Coût unitaire</value></data>
|
||||
<data name="User_List"><value>Liste des utilisateurs</value><comment></comment></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="StartDate"><value>Start date</value></data>
|
||||
<data name="Submit"><value>Submit</value></data>
|
||||
<data name="Tex_version"><value>LaTeX version</value></data>
|
||||
<data name="Title"><value>Title</value></data>
|
||||
<data name="Tag_name"><value>Tag name</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="Unitary_cost"><value>Unitary_cost</value></data>
|
||||
<data name="User_List"><value>User List</value><comment></comment></data>
|
||||
<data name="User_name"><value>User name</value></data>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//
|
||||
// Message.cs
|
||||
// Notification.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paul@pschneider.fr>
|
||||
|
|
@ -22,31 +22,11 @@ using System;
|
|||
|
||||
namespace Yavsc.Model.Messaging
|
||||
{
|
||||
/// <summary>
|
||||
/// Simple message.
|
||||
/// </summary>
|
||||
public class SimpleMessage
|
||||
public class Notification : Google.Notification
|
||||
{
|
||||
/// <summary>
|
||||
/// 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; }
|
||||
public Notification ()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -155,8 +155,6 @@
|
|||
<Compile Include="RolesAndMembers\ProviderPublicInfo.cs" />
|
||||
<Compile Include="RolesAndMembers\GCMRegister.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="WorkFlow\TaskOutput.cs" />
|
||||
<Compile Include="WorkFlow\FinalStateException.cs" />
|
||||
|
|
@ -178,6 +176,9 @@
|
|||
<Compile Include="Blogs\TagInfo.cs" />
|
||||
<Compile Include="Blogs\MarkdownHelper.cs" />
|
||||
<Compile Include="Calendar\BookQuery.cs" />
|
||||
<Compile Include="Calendar\IFreeDateSet.cs" />
|
||||
<Compile Include="Calendar\ICalendarManager.cs" />
|
||||
<Compile Include="Messaging\Notification.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ItemGroup>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue