WIP booking

* CalAuth.aspx: A view ... still unused

* style.css: css overflow-y auto, the container making it modal has no
  margin.

* GoogleController.cs: Fixes again the calendar usage,
uses Google API key and client credentials found in configuration file

* ApiClient.cs: Google API key and client credentials are now found in
  configuration file

* CalendarApi.cs: Let the controller build the credential string from
  thr profile object.

* OAuth2.cs: The OAuth2 Client only needs a client id and secret

* yavsc.js: Fixes some css flipping

* ValidateAjaxAttribute.cs: A FIXME

* Web.config: Google key, client id and secret come from application
  settings

* Web.csproj: a page in more

* YavscModel.csproj:
* PostInfoByUser.cs:
* PostInfoByTitle.cs:
* BlogEntryCollection.cs: refactoring
This commit is contained in:
2015-11-01 23:05:17 +01:00
parent d9d5bb308e
commit e6c65019b0
16 changed files with 117 additions and 147 deletions

View File

@ -27,7 +27,7 @@ body {
url('/images/FhHRx.gif') url('/images/FhHRx.gif')
50% 50% 50% 50%
no-repeat; no-repeat;
overflow: scroll; overflow: auto;
} }
.dispmodal { .dispmodal {
position: fixed; position: fixed;
@ -35,7 +35,9 @@ body {
top: 0; top: 0;
left: 0; left: 0;
right: 0; right: 0;
overflow: scroll; width: 100%;
overflow-y: auto;
overflow-x: hidden;
} }
body.loading { body.loading {
@ -218,9 +220,6 @@ label {
border-radius: 1em; border-radius: 1em;
border: dashed rgb(020,20,256) 2px; border: dashed rgb(020,20,256) 2px;
} }
#notifications {
padding: 1em;
}
.notification { .notification {
font-size: large; font-size: large;
@ -368,7 +367,8 @@ header h1, header a , .actionlink, .menuitem, a { padding:.5em;}
margin:.5em; margin:.5em;
padding:.5em; padding:.5em;
} }
#notifications {
.notification {
padding: .5em; padding: .5em;
border-radius:.5em; border-radius:.5em;
margin:.5em; margin:.5em;
@ -398,6 +398,7 @@ header {
padding-bottom:.5em; padding-bottom:.5em;
background: url("/images/star-939235_1280.xxs.jpg") 0 0 no-repeat fixed; background: url("/images/star-939235_1280.xxs.jpg") 0 0 no-repeat fixed;
} }
header h1, header a { padding:.2em;} header h1, header a { padding:.2em;}
nav { nav {

View File

@ -1,3 +1,32 @@
2015-11-01 Paul Schneider <paul@pschneider.fr>
* CalAuth.aspx: A view ... still unused
* style.css: css overflow-y auto, the container making it
modal has no margin.
* GoogleController.cs: Fixes again the calendar usage,
uses Google API key and client credentials found in
configuration file
* ApiClient.cs: Google API key and client credentials are now
found in configuration file
* CalendarApi.cs: Let the controller build the credential
string from thr profile object.
* OAuth2.cs: The OAuth2 Client only needs a client id and
secret
* yavsc.js: Fixes some css flipping
* ValidateAjaxAttribute.cs: A FIXME
* Web.config: Google key, client id and secret come from
application settings
* Web.csproj: a page in more
2015-11-01 Paul Schneider <paul@pschneider.fr> 2015-11-01 Paul Schneider <paul@pschneider.fr>
* Book-next.aspx: pollution * Book-next.aspx: pollution

View File

@ -78,10 +78,12 @@ namespace Yavsc.Controllers
if (string.IsNullOrWhiteSpace (returnUrl)) if (string.IsNullOrWhiteSpace (returnUrl))
returnUrl = "/"; returnUrl = "/";
Session ["returnUrl"] = returnUrl; Session ["returnUrl"] = returnUrl;
OAuth2 oa = new OAuth2 (AuthGRU); OAuth2 oa = new OAuth2 (AuthGRU,clientId,clientSecret);
oa.Login (Response, SetSessionSate ()); oa.Login (Response, SetSessionSate ());
} }
private string clientId = ConfigurationManager.AppSettings ["GOOGLE_CLIENT_ID"];
private string clientSecret = ConfigurationManager.AppSettings ["GOOGLE_CLIENT_SECRET"];
private string clientApiKey = ConfigurationManager.AppSettings ["GOOGLE_API_KEY"];
/// <summary> /// <summary>
/// Gets the cal auth. /// Gets the cal auth.
/// </summary> /// </summary>
@ -91,8 +93,8 @@ namespace Yavsc.Controllers
if (string.IsNullOrWhiteSpace (returnUrl)) if (string.IsNullOrWhiteSpace (returnUrl))
returnUrl = "/"; returnUrl = "/";
Session ["returnUrl"] = returnUrl; Session ["returnUrl"] = returnUrl;
OAuth2 oa = new OAuth2 (CalendarGRU); OAuth2 oa = new OAuth2 (CalendarGRU,clientId,clientSecret);
oa.GetCalAuth (Response, SetSessionSate ()); oa.GetCalendarScope (Response, SetSessionSate ());
} }
/// <summary> /// <summary>
@ -105,16 +107,16 @@ namespace Yavsc.Controllers
public ActionResult CalAuth () public ActionResult CalAuth ()
{ {
string msg; string msg;
OAuth2 oa = new OAuth2 (CalendarGRU); OAuth2 oa = new OAuth2 (CalendarGRU,clientId,clientSecret);
AuthToken gat = oa.GetToken (Request, (string)Session ["state"], out msg); AuthToken gat = oa.GetToken (Request, (string) Session ["state"], out msg);
if (gat == null) { if (gat == null) {
YavscHelpers.Notify(ViewData, msg); YavscHelpers.Notify(ViewData, msg);
return View ("Auth"); return View ("Auth");
} }
SaveToken (HttpContext.Profile,gat); SaveToken (HttpContext.Profile,gat);
HttpContext.Profile.SetPropertyValue ("gcalapi", true); HttpContext.Profile.SetPropertyValue ("gcalapi", true);
string returnUrl = (string)Session ["returnUrl"]; string returnUrl = (string) Session ["returnUrl"];
Session ["returnUrl"] = null; Session ["returnUrl"] = null;
return Redirect (returnUrl); return Redirect (returnUrl);
} }
@ -143,7 +145,7 @@ namespace Yavsc.Controllers
public ActionResult Auth () public ActionResult Auth ()
{ {
string msg; string msg;
OAuth2 oa = new OAuth2 (AuthGRU); OAuth2 oa = new OAuth2 (AuthGRU,clientId,clientSecret);
AuthToken gat = oa.GetToken (Request, (string)Session ["state"], out msg); AuthToken gat = oa.GetToken (Request, (string)Session ["state"], out msg);
if (gat == null) { if (gat == null) {
YavscHelpers.Notify(ViewData, msg); YavscHelpers.Notify(ViewData, msg);
@ -188,8 +190,8 @@ namespace Yavsc.Controllers
ModelState.AddModelError ("UserName", "This user name already is in use"); ModelState.AddModelError ("UserName", "This user name already is in use");
return View (); return View ();
} }
string returnUrl = (string)Session ["returnUrl"]; string returnUrl = (string) Session ["returnUrl"];
AuthToken gat = (AuthToken)Session ["GoogleAuthToken"]; AuthToken gat = (AuthToken) Session ["GoogleAuthToken"];
People me = (People)Session ["me"]; People me = (People)Session ["me"];
if (gat == null || me == null) if (gat == null || me == null)
throw new InvalidDataException (); throw new InvalidDataException ();
@ -232,8 +234,9 @@ namespace Yavsc.Controllers
} }
if (me.url != null) if (me.url != null)
HttpContext.Profile.SetPropertyValue ("WebSite", me.url); HttpContext.Profile.SetPropertyValue ("WebSite", me.url);
SaveToken (HttpContext.Profile,gat); // Will be done in SaveToken: HttpContext.Profile.Save ();
// already done in SaveToken: HttpContext.Profile.Save (); SaveToken (HttpContext.Profile, gat);
Session ["returnUrl"] = null;
return Redirect (returnUrl); return Redirect (returnUrl);
} }
ViewData ["returnUrl"] = returnUrl; ViewData ["returnUrl"] = returnUrl;
@ -258,19 +261,17 @@ namespace Yavsc.Controllers
[HttpGet] [HttpGet]
public ActionResult ChooseCalendar (string returnUrl) public ActionResult ChooseCalendar (string returnUrl)
{ {
bool hasCalAuth = (bool)HttpContext.Profile.GetPropertyValue ("gcalapi"); if (returnUrl != null) {
if (!hasCalAuth) { Session ["chooseCalReturnUrl"] = returnUrl;
Session ["returnUrl"] = Request.Url.Scheme + "://" + Request.Url.Authority + "/Google/ChooseCalendar";
return RedirectToAction ("GetCalAuth", return RedirectToAction ("GetCalAuth",
new { new {
returnUrl = "ChooseCalendar?returnUrl="+HttpUtility.UrlEncode(returnUrl) returnUrl = Url.Action ("ChooseCalendar") // "ChooseCalendar?returnUrl="+HttpUtility.UrlEncode(returnUrl)
}); });
} }
string cred = OAuth2.GetFreshGoogleCredential (HttpContext.Profile); string cred = OAuth2.GetFreshGoogleCredential (HttpContext.Profile);
CalendarApi c = new CalendarApi (clientApiKey);
CalendarApi c = new CalendarApi ();
CalendarList cl = c.GetCalendars (cred); CalendarList cl = c.GetCalendars (cred);
ViewData ["returnUrl"] = returnUrl; ViewData ["returnUrl"] = Session ["chooseCalReturnUrl"];
return View (cl); return View (cl);
} }
@ -300,7 +301,12 @@ namespace Yavsc.Controllers
[Authorize,HttpGet] [Authorize,HttpGet]
public ActionResult Book () public ActionResult Book ()
{ {
return View (new BookQuery ()); var model = new BookQuery ();
model.StartDate = DateTime.Now;
model.EndDate = model.StartDate.AddDays(2);
model.StartHour = DateTime.Now.ToString("HH:mm");
model.EndHour = DateTime.Now.AddHours(1).ToString("HH:mm");
return View (model);
} }
/// <summary> /// <summary>
@ -313,7 +319,7 @@ namespace Yavsc.Controllers
{ {
if (ModelState.IsValid) { if (ModelState.IsValid) {
DateTime mindate = DateTime.Now; DateTime mindate = DateTime.Now;
if (model.StartDate < mindate){ if (model.StartDate.Date < mindate.Date){
ModelState.AddModelError ("StartDate", LocalizedText.FillInAFutureDate); ModelState.AddModelError ("StartDate", LocalizedText.FillInAFutureDate);
} }
if (model.EndDate < model.StartDate) if (model.EndDate < model.StartDate)
@ -333,10 +339,11 @@ namespace Yavsc.Controllers
if (ModelState.IsValid) { if (ModelState.IsValid) {
string calid = (string) gcalid; string calid = (string) gcalid;
DateTime maxdate = model.EndDate; DateTime maxdate = model.EndDate;
CalendarApi c = new CalendarApi (); CalendarApi c = new CalendarApi (clientApiKey);
CalendarEventList events; CalendarEventList events;
try { try {
events = c.GetCalendar (calid, mindate, maxdate, upr); string creds = OAuth2.GetFreshGoogleCredential (upr);
events = c.GetCalendar (calid, mindate, maxdate, creds);
YavscHelpers.Notify (ViewData, "Google calendar API call success"); YavscHelpers.Notify (ViewData, "Google calendar API call success");
} catch (WebException ex) { } catch (WebException ex) {
string response; string response;

View File

@ -40,16 +40,17 @@ namespace Yavsc.Helpers.Google
/// <summary> /// <summary>
/// The CLIENT Id. /// The CLIENT Id.
/// </summary> /// </summary>
protected static string CLIENT_ID = "325408689282-6bekh7p3guj4k0f3301a6frf025cnrk1.apps.googleusercontent.com"; public static string CLIENT_ID { get ; set ; }
/// <summary> /// <summary>
/// The CLIENt SECREt /// The CLIENt SECREt
/// </summary> /// </summary>
protected static string CLIENT_SECRET = "MaxYcvJJCs2gDGvaELZbzwfL"; public static string CLIENT_SECRET { get ; set ; }
/// <summary> /// <summary>
/// The API KEY. /// The API KEY.
/// </summary> /// </summary>
protected static string API_KEY="AIzaSyBV_LQHb22nGgjNvFzZwnQHjao3Q7IewRw"; public static string API_KEY { get ; set ; }
/* // to use in descendence /* // to use in descendence
* *
protected static string getPeopleUri = "https://www.googleapis.com/plus/v1/people"; protected static string getPeopleUri = "https://www.googleapis.com/plus/v1/people";

View File

@ -36,8 +36,12 @@ namespace Yavsc.Helpers.Google
/// <summary> /// <summary>
/// Google Calendar API client. /// Google Calendar API client.
/// </summary> /// </summary>
public class CalendarApi: ApiClient public class CalendarApi : ApiClient
{ {
public CalendarApi(string apiKey)
{
API_KEY = apiKey;
}
/// <summary> /// <summary>
/// The get cal list URI. /// The get cal list URI.
/// </summary> /// </summary>
@ -87,8 +91,11 @@ namespace Yavsc.Helpers.Google
/// <param name="mindate">Mindate.</param> /// <param name="mindate">Mindate.</param>
/// <param name="maxdate">Maxdate.</param> /// <param name="maxdate">Maxdate.</param>
/// <param name="upr">Upr.</param> /// <param name="upr">Upr.</param>
public CalendarEventList GetCalendar (string calid, DateTime mindate, DateTime maxdate, ProfileBase upr) public CalendarEventList GetCalendar (string calid, DateTime mindate, DateTime maxdate,string cred)
{ {
if (string.IsNullOrWhiteSpace (calid))
throw new Exception ("the calendar identifier is not specified");
string uri = string.Format ( string uri = string.Format (
getCalEntriesUri, HttpUtility.UrlEncode (calid)) + getCalEntriesUri, HttpUtility.UrlEncode (calid)) +
string.Format ("?orderBy=startTime&singleEvents=true&timeMin={0}&timeMax={1}&key=" + API_KEY, string.Format ("?orderBy=startTime&singleEvents=true&timeMin={0}&timeMax={1}&key=" + API_KEY,
@ -96,7 +103,7 @@ namespace Yavsc.Helpers.Google
HttpUtility.UrlEncode (maxdate.ToString (dateFormat) + timeZone)); HttpUtility.UrlEncode (maxdate.ToString (dateFormat) + timeZone));
HttpWebRequest webreq = WebRequest.CreateHttp (uri); HttpWebRequest webreq = WebRequest.CreateHttp (uri);
string cred = OAuth2.GetFreshGoogleCredential (upr);
webreq.Headers.Add (HttpRequestHeader.Authorization, cred); webreq.Headers.Add (HttpRequestHeader.Authorization, cred);
webreq.Method = "GET"; webreq.Method = "GET";
webreq.ContentType = "application/http"; webreq.ContentType = "application/http";

View File

@ -36,7 +36,7 @@ namespace Yavsc.Helpers.Google
/// <summary> /// <summary>
/// Google O auth2 client. /// Google O auth2 client.
/// </summary> /// </summary>
public class OAuth2:ApiClient public class OAuth2 : ApiClient
{ {
/// <summary> /// <summary>
/// The URI used to get tokens. /// The URI used to get tokens.
@ -58,9 +58,11 @@ namespace Yavsc.Helpers.Google
/// Initializes a new instance of the <see cref="Yavsc.Helpers.Google.OAuth2"/> class. /// Initializes a new instance of the <see cref="Yavsc.Helpers.Google.OAuth2"/> class.
/// </summary> /// </summary>
/// <param name="redirectUri">Redirect URI.</param> /// <param name="redirectUri">Redirect URI.</param>
public OAuth2 (string redirectUri) public OAuth2 (string redirectUri, string clientId, string clientSecret)
{ {
RedirectUri = redirectUri; RedirectUri = redirectUri;
CLIENT_ID = clientId;
CLIENT_SECRET = clientSecret;
} }
/// <summary> /// <summary>
@ -84,12 +86,10 @@ namespace Yavsc.Helpers.Google
/// </summary> /// </summary>
/// <param name="bresp">Bresp.</param> /// <param name="bresp">Bresp.</param>
/// <param name="state">State.</param> /// <param name="state">State.</param>
public void GetCalAuth (HttpResponseBase bresp, string state) public void GetCalendarScope (HttpResponseBase bresp, string state)
{ {
string scope = string.Join ("%20", scopeOpenid); string prms = String.Format ("response_type=code&client_id={0}&redirect_uri={1}&scope={2}&state={3}&include_granted_scopes=true&access_type=offline&approval_prompt=force",
scope = string.Join ("%20", scopeCalendar); CLIENT_ID, RedirectUri, scopeCalendar, state);
string prms = String.Format ("response_type=code&client_id={0}&redirect_uri={1}&scope={2}&state={3}&include_granted_scopes=false&access_type=offline",
CLIENT_ID, RedirectUri, scope, state);
GetAuthResponse (bresp, prms); GetAuthResponse (bresp, prms);
} }
@ -230,16 +230,14 @@ namespace Yavsc.Helpers.Google
DateTime token_exp = (DateTime) pr.GetPropertyValue ("gtokenexpir"); DateTime token_exp = (DateTime) pr.GetPropertyValue ("gtokenexpir");
if (token_exp < DateTime.Now) { if (token_exp < DateTime.Now) {
object ort = pr.GetPropertyValue ("grefreshtoken"); object ort = pr.GetPropertyValue ("grefreshtoken");
if (ort == null || ort is DBNull) { if (ort is DBNull || string.IsNullOrWhiteSpace((string)ort)) {
throw new InvalidOAuth2RefreshToken ("Google"); throw new InvalidOAuth2RefreshToken ("Google");
} }
else { string refresh_token = ort as string;
string refresh_token = ort as string; AuthToken gat = OAuth2.GetTokenPosting (
AuthToken gat = OAuth2.GetTokenPosting ( string.Format ("grant_type=refresh_token&client_id={0}&client_secret={1}&refresh_token={2}",
string.Format ("grant_type=refresh_token&client_id={0}&client_secret={1}&refresh_token={2}", CLIENT_ID, CLIENT_SECRET, refresh_token));
CLIENT_ID, CLIENT_SECRET, refresh_token)); token = gat.access_token;
token = gat.access_token;
}
pr.SetPropertyValue ("gtoken", token); pr.SetPropertyValue ("gtoken", token);
pr.Save (); pr.Save ();
// ASSERT gat.token_type == pr.GetPropertyValue("gtokentype") // ASSERT gat.token_type == pr.GetPropertyValue("gtokentype")

View File

@ -47,7 +47,7 @@ self.ajax = function (method,data,callback) {
self.onScroll = function() { self.onScroll = function() {
var $notifications = $('#notifications'); var $notifications = $('#notifications');
if ($notifications.has('*').length>0) { if ($notifications.has('*').length>0) {
if ($(window).scrollTop()>100) { if ($(window).scrollTop()>0) {
$notifications.addClass("dispmodal"); $notifications.addClass("dispmodal");
} }
else { else {

View File

@ -43,7 +43,7 @@ namespace Yavsc
where modelState[x].Errors.Count > 0 where modelState[x].Errors.Count > 0
select new select new
{ {
// FIXME why? // FIXME why not directly underscores?
key = x.Replace(".","_"), key = x.Replace(".","_"),
errors = modelState[x].Errors. errors = modelState[x].Errors.
Select(y => y.ErrorMessage). Select(y => y.ErrorMessage).

View File

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

View File

@ -267,5 +267,8 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
<add key="ClientValidationEnabled" value="true" /> <add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" /> <add key="UnobtrusiveJavaScriptEnabled" value="true" />
<add key="PayPalLogger" value="PayPal.Log.Log4netLogger" /> <add key="PayPalLogger" value="PayPal.Log.Log4netLogger" />
</appSettings> <add key="GOOGLE_API_KEY" value="AIzaSyCF7Bgz-W_p26bbMzxp1ukdgg3LMDHzAo0" />
<add key="GOOGLE_CLIENT_ID" value="325408689282-6bekh7p3guj4k0f3301a6frf025cnrk1.apps.googleusercontent.com" />
<add key="GOOGLE_CLIENT_SECRET" value="MaxYcvJJCs2gDGvaELZbzwfL" />
</appSettings>
</configuration> </configuration>

View File

@ -468,6 +468,7 @@
<Content Include="Scripts\jquery.datepair.js" /> <Content Include="Scripts\jquery.datepair.js" />
<Content Include="Scripts\jquery.datepair.min.js" /> <Content Include="Scripts\jquery.datepair.min.js" />
<Content Include="Scripts\jquery-1.11.3.min.js" /> <Content Include="Scripts\jquery-1.11.3.min.js" />
<Content Include="Views\Google\CalAuth.aspx" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" /> <Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />

View File

@ -82,13 +82,13 @@ namespace Yavsc.Model.Blogs
/// <summary> /// <summary>
/// Groups by title. /// Groups by title.
/// </summary> /// </summary>
public IEnumerable<IGrouping<string,PostInfoByTitle>> GroupByTitle () public IEnumerable<IGrouping<string,BasePostInfo>> GroupByTitle ()
{ {
bool truncated; bool truncated;
return from be in this return from be in this
orderby be.Posted descending orderby be.Posted descending
group group
new PostInfoByTitle { Author = be.Author, Id = be.Id, new BasePostInfo { Author = be.Author, Id = be.Id,
Posted = be.Posted, Modified = be.Modified, Posted = be.Posted, Modified = be.Modified,
Intro = MarkdownHelper.MarkdownIntro (be.Content, out truncated), Intro = MarkdownHelper.MarkdownIntro (be.Content, out truncated),
Visible = be.Visible, Visible = be.Visible,
@ -103,13 +103,13 @@ namespace Yavsc.Model.Blogs
/// Groups by user. /// Groups by user.
/// </summary> /// </summary>
/// <returns>The by user.</returns> /// <returns>The by user.</returns>
public IEnumerable<IGrouping<string,PostInfoByUser>> GroupByUser () public IEnumerable<IGrouping<string,BasePostInfo>> GroupByUser ()
{ {
bool truncated; bool truncated;
return from be in this return from be in this
orderby be.Posted descending orderby be.Posted descending
group group
new PostInfoByUser { new BasePostInfo {
Title = be.Title, Title = be.Title,
Id = be.Id, Id = be.Id,
Posted = be.Posted, Posted = be.Posted,

View File

@ -1,44 +0,0 @@
//
// PostInfoByTitle.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 System.Configuration;
using System.Collections.Generic;
using Yavsc.Model.Blogs;
using System.Linq;
using Yavsc.Model.Circles;
namespace Yavsc.Model.Blogs
{
/// <summary>
/// Post info.
/// </summary>
public class PostInfoByTitle : BasePostInfo {
/// <summary>
/// The name of the user.
/// </summary>
public string Author;
}
}

View File

@ -1,43 +0,0 @@
//
// PostInfoByUser.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 System.Configuration;
using System.Collections.Generic;
using Yavsc.Model.Blogs;
using System.Linq;
using Yavsc.Model.Circles;
namespace Yavsc.Model.Blogs
{
/// <summary>
/// Post info by user.
/// </summary>
public class PostInfoByUser : BasePostInfo {
/// <summary>
/// The name of the user.
/// </summary>
public string Title;
}
}

View File

@ -1,3 +1,10 @@
2015-11-01 Paul Schneider <paul@pschneider.fr>
* YavscModel.csproj:
* PostInfoByUser.cs:
* PostInfoByTitle.cs:
* BlogEntryCollection.cs: refactoring
2015-11-01 Paul Schneider <paul@pschneider.fr> 2015-11-01 Paul Schneider <paul@pschneider.fr>
* ProfileEdition.cs: Fixes the username modification * ProfileEdition.cs: Fixes the username modification

View File

@ -170,8 +170,6 @@
<Compile Include="Blogs\BasePost.cs" /> <Compile Include="Blogs\BasePost.cs" />
<Compile Include="Blogs\PostTag.cs" /> <Compile Include="Blogs\PostTag.cs" />
<Compile Include="Blogs\BasePostInfo.cs" /> <Compile Include="Blogs\BasePostInfo.cs" />
<Compile Include="Blogs\PostInfoByTitle.cs" />
<Compile Include="Blogs\PostInfoByUser.cs" />
<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" />