yavsc/web/Controllers/BlogsController.cs

373 lines
11 KiB
C#

10 years ago
using System;
using System.Collections.Generic;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Net.Mime;
using System.Runtime.Serialization.Formatters.Binary;
using System.Web;
using System.Web.Configuration;
using System.Web.Profile;
using System.Web.Security;
using Npgsql.Web.Blog;
using Yavsc;
10 years ago
using Yavsc.Model;
using Yavsc.Model.Blogs;
using Yavsc.ApiControllers;
using Yavsc.Model.RolesAndMembers;
using System.Net;
using System.Web.Mvc;
using Yavsc.Model.Circles;
using Yavsc.Helpers;
10 years ago
namespace Yavsc.Controllers
{
/// <summary>
/// Blogs controller.
/// </summary>
10 years ago
public class BlogsController : Controller
{
private string sitename =
WebConfigurationManager.AppSettings ["Name"];
string avatarDir = "~/avatars";
/// <summary>
/// Gets or sets the avatar dir.
/// </summary>
/// <value>The avatar dir.</value>
10 years ago
public string AvatarDir {
get { return avatarDir; }
set { avatarDir = value; }
}
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
/// <summary>
/// Index the specified user, title, pageIndex and pageSize.
/// </summary>
/// <param name="user">User.</param>
/// <param name="title">Title.</param>
/// <param name="pageIndex">Page index.</param>
/// <param name="pageSize">Page size.</param>
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
public ActionResult Index (string user = null, string title = null, int pageIndex = 0, int pageSize = 10)
10 years ago
{
if (string.IsNullOrEmpty (user)) {
return BlogList (pageIndex, pageSize);
} else {
10 years ago
MembershipUser u = null;
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
if (Membership.FindUsersByName (user) != null)
u = Membership.GetUser (user, false);
10 years ago
if (u == null) {
ModelState.AddModelError ("UserName",
string.Format ("Utilisateur inconu : {0}", user));
return BlogList ();
} else {
if (string.IsNullOrEmpty (title))
return UserPosts (user, pageIndex, pageSize);
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
return UserPost (user, title, pageIndex, pageSize);
10 years ago
}
}
}
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
/// <summary>
/// Blogs the list.
/// </summary>
/// <returns>The list.</returns>
/// <param name="pageIndex">Page index.</param>
/// <param name="pageSize">Page size.</param>
10 years ago
public ActionResult BlogList (int pageIndex = 0, int pageSize = 10)
{
ViewData ["SiteName"] = sitename;
int totalRecords;
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
var bs = BlogManager.LastPosts (pageIndex, pageSize, out totalRecords);
10 years ago
ViewData ["RecordCount"] = totalRecords;
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
ViewData ["pageSize"] = pageSize;
10 years ago
ViewData ["PageIndex"] = pageIndex;
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
return View ("Index", new BlogEntryCollection(bs) );
10 years ago
}
/// <summary>
/// Users the posts.
/// </summary>
/// <returns>The posts.</returns>
/// <param name="user">User.</param>
/// <param name="pageIndex">Page index.</param>
/// <param name="pageSize">Page size.</param>
10 years ago
[HttpGet]
public ActionResult UserPosts (string user, int pageIndex = 0, int pageSize = 10)
10 years ago
{
int tr;
MembershipUser u = Membership.GetUser ();
FindBlogEntryFlags sf = FindBlogEntryFlags.MatchUserName;
ViewData ["SiteName"] = sitename;
ViewData ["BlogUser"] = user;
string readersName = null;
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
ViewData ["PageIndex"] = pageIndex;
ViewData ["pageSize"] = pageSize;
// displays invisible items when the logged user is also the author
if (u != null) {
if (u.UserName == user || Roles.IsUserInRole ("Admin"))
sf |= FindBlogEntryFlags.MatchInvisible;
readersName = u.UserName;
}
// find entries
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
BlogEntryCollection c =
BlogManager.FindPost (readersName, user, sf, pageIndex, pageSize, out tr);
// Get author's meta data
Profile bupr = new Profile (ProfileBase.Create (user));
ViewData ["BlogUserProfile"] = bupr;
// Inform of listing meta data
ViewData ["BlogTitle"] = bupr.BlogTitle;
ViewData ["Avatar"] = bupr.avatar;
10 years ago
ViewData ["RecordCount"] = tr;
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
UUBlogEntryCollection uuc = new UUBlogEntryCollection (user, c);
return View ("UserPosts", uuc);
10 years ago
}
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
/// <summary>
/// Removes the comment.
/// </summary>
/// <returns>The comment.</returns>
/// <param name="cmtid">Cmtid.</param>
10 years ago
[Authorize]
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
public ActionResult RemoveComment (long cmtid)
10 years ago
{
long postid = BlogManager.RemoveComment (cmtid);
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
return GetPost (postid);
10 years ago
}
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
/// <summary>
/// Returns the post.
/// </summary>
/// <returns>The post.</returns>
/// <param name="id">Identifier.</param>
public ActionResult GetPost (long id)
10 years ago
{
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
ViewData ["id"] = id;
BlogEntry e = BlogManager.GetForReading (id);
UUTBlogEntryCollection c = new UUTBlogEntryCollection (e.UserName,e.Title);
c.Add (e);
ViewData ["user"] = c.UserName;
ViewData ["title"] = c.Title;
Profile pr = new Profile (ProfileBase.Create (c.UserName));
if (pr == null)
// the owner's profile must exist
// in order to publish its bills
return View ("NotAuthorized");
ViewData ["BlogUserProfile"] = pr;
ViewData ["Avatar"] = pr.avatar;
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
ViewData ["BlogTitle"] = pr.BlogTitle;
return View ("UserPost",c);
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
}
/// <summary>
/// Users the post.
/// Assume that :
/// * bec.Count > O
/// * bec.All(x=>x.UserName == bec[0].UserName) ;
/// </summary>
/// <returns>The post.</returns>
/// <param name="bec">Bec.</param>
private ActionResult UserPost (UUTBlogEntryCollection bec)
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
{
if (ModelState.IsValid)
if (bec.Count > 0) {
Profile pr = new Profile (ProfileBase.Create (bec.UserName));
if (pr == null)
// the owner's profile must exist
// in order to publish its bills
return View ("NotAuthorized");
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
ViewData ["BlogUserProfile"] = pr;
ViewData ["Avatar"] = pr.avatar;
ViewData ["BlogTitle"] = pr.BlogTitle;
MembershipUser u = Membership.GetUser ();
if (u != null)
ViewData ["UserName"] = u.UserName;
if (!pr.BlogVisible) {
// only deliver to admins or owner
if (u == null)
return View ("NotAuthorized");
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
else {
if (u.UserName != bec.UserName)
if (!Roles.IsUserInRole (u.UserName, "Admin"))
return View ("NotAuthorized");
}
}
}
return View ("UserPost",bec);
}
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
/// <summary>
/// Users the post.
/// </summary>
/// <returns>The post.</returns>
/// <param name="user">User.</param>
/// <param name="title">Title.</param>
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
/// <param name="pageIndex">Page index.</param>
/// <param name="pageSize">Page size.</param>
public ActionResult UserPost (string user, string title, int pageIndex = 0, int pageSize = 10)
10 years ago
{
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
ViewData ["user"] = user;
ViewData ["title"] = title;
ViewData ["PageIndex"] = pageIndex;
ViewData ["pageSize"] = pageSize;
var pb = ProfileBase.Create (user);
if (pb == null)
// the owner's profile must exist
// in order to publish its bills
return View ("NotAuthorized");
Profile pr = new Profile (pb);
ViewData ["BlogUserProfile"] = pr;
ViewData ["Avatar"] = pr.avatar;
ViewData ["BlogTitle"] = pr.BlogTitle;
UUTBlogEntryCollection c = new UUTBlogEntryCollection (user, title);
c.AddRange ( BlogManager.FilterOnReadAccess (BlogManager.GetPost (user, title)));
return View ("UserPost",c);
10 years ago
}
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
/// <summary>
/// Post the specified user and title.
/// </summary>
/// <param name="user">User.</param>
/// <param name="title">Title.</param>
* MarkdownHelper.cs: implements MarkdownDeep helper from NuGet * uninstdbws.sql: * jquery-2.1.3.js: * jquery-2.1.4.js: * date.js: * mdd_help.htm: * scorediv-latest.js: * jquery-2.1.4.min.js: * jquery-2.1.3.min.js: * plural.js: * number.js: * jquery-2.1.4.min.map: * message.js: * jquery-2.1.3.min.map: * jquery-2.1.3-vsdoc.js: * currency.js: * jquery-2.1.4-vsdoc.js: * globalize.js: * MarkdownDeepLib.min.js: * relative-time.js: * globalize.cultures.js: * globalize.culture.kn.js: * globalize.culture.or.js: * globalize.culture.pa.js: * globalize.culture.pl.js: * globalize.culture.fo.js: * globalize.culture.ps.js: * globalize.culture.fi.js: * globalize.culture.fa.js: * globalize.culture.fr.js: * globalize.culture.nn.js: * globalize.culture.no.js: * globalize.culture.gl.js: * globalize.culture.gd.js: * globalize.culture.ga.js: * globalize.culture.oc.js: * globalize.culture.fy.js: * globalize.culture.eu.js: * globalize.culture.se.js: * globalize.culture.si.js: * globalize.culture.sk.js: * globalize.culture.sl.js: * globalize.culture.sq.js: * globalize.culture.sr.js: * globalize.culture.sv.js: * globalize.culture.sa.js: * globalize.culture.pt.js: * globalize.culture.et.js: * globalize.culture.es.js: * globalize.culture.rm.js: * globalize.culture.ro.js: * globalize.culture.ru.js: * globalize.culture.rw.js: * globalize.culture.gu.js: * globalize.culture.kk.js: * globalize.culture.ka.js: * globalize.culture.mk.js: * globalize.culture.ja.js: * globalize.culture.iu.js: * globalize.culture.ml.js: * globalize.culture.mn.js: * globalize.culture.mi.js: * globalize.culture.ky.js: * globalize.culture.lo.js: * globalize.culture.ko.js: * globalize.culture.lt.js: * globalize.culture.lv.js: * globalize.culture.km.js: * globalize.culture.kl.js: * globalize.culture.it.js: * globalize.culture.nb.js: * globalize.culture.hr.js: * globalize.culture.ne.js: * globalize.culture.hi.js: * globalize.culture.he.js: * globalize.culture.ha.js: * globalize.culture.nl.js: * globalize.culture.hu.js: * globalize.culture.mr.js: * globalize.culture.is.js: * globalize.culture.ii.js: * globalize.culture.ig.js: * globalize.culture.ms.js: * globalize.culture.id.js: * globalize.culture.hy.js: * globalize.culture.mt.js: * globalize.culture.sw.js: * globalize.culture.bs.js: * globalize.culture.tt.js: * globalize.culture.lb.js: * globalize.culture.ug.js: * globalize.culture.br.js: * globalize.culture.bo.js: * globalize.culture.uk.js: * globalize.culture.ca.js: * globalize.culture.tk.js: * globalize.culture.da.js: * globalize.culture.cy.js: * globalize.culture.tn.js: * globalize.culture.cs.js: * globalize.culture.co.js: * globalize.culture.tr.js: * globalize.culture.bn.js: * globalize.culture.as.js: * globalize.culture.yo.js: * globalize.culture.ar.js: * globalize.culture.zh.js: * globalize.culture.zu.js: * globalize.culture.am.js: * globalize.culture.af.js: * globalize.culture.xh.js: * globalize.culture.ur.js: * globalize.culture.bg.js: * globalize.culture.uz.js: * globalize.culture.be.js: * globalize.culture.ba.js: * globalize.culture.vi.js: * globalize.culture.az.js: * globalize.culture.wo.js: * globalize.culture.dv.js: * globalize.culture.te.js: * globalize.culture.de.js: * globalize.culture.tg.js: * globalize.culture.ta.js: * globalize.culture.el.js: * globalize.culture.th.js: * globalize.culture.arn.js: * globalize.culture.gsw.js: * globalize.culture.nso.js: * globalize.culture.sah.js: * globalize.culture.syr.js: * globalize.culture.tzm.js: * globalize.culture.kok.js: * globalize.culture.dsb.js: * globalize.culture.moh.js: * globalize.culture.sms.js: * globalize.culture.smn.js: * globalize.culture.smj.js: * globalize.culture.sma.js: * globalize.culture.hsb.js: * globalize.culture.quz.js: * globalize.culture.fil.js: * globalize.culture.qut.js: * globalize.culture.prs.js: * globalize.culture.mn-MN.js: * globalize.culture.rm-CH.js: * globalize.culture.ta-IN.js: * globalize.culture.ml-IN.js: * globalize.culture.zh-CN.js: * globalize.culture.zh-HK.js: * globalize.culture.tn-ZA.js: * globalize.culture.ms-BN.js: * globalize.culture.ro-RO.js: * globalize.culture.sq-AL.js: * globalize.culture.mr-IN.js: * globalize.culture.yo-NG.js: * globalize.culture.pt-PT.js: * globalize.culture.sa-IN.js: * globalize.culture.zh-MO.js: * globalize.culture.am-ET.js: * globalize.culture.lt-LT.js: * globalize.culture.tk-TM.js: * globalize.culture.sw-KE.js: * globalize.culture.af-ZA.js: * globalize.culture.lo-LA.js: * globalize.culture.lv-LV.js: * globalize.culture.mk-MK.js: * globalize.culture.zh-SG.js: * globalize.culture.zh-TW.js: * globalize.culture.sv-FI.js: * globalize.culture.mi-NZ.js: * globalize.culture.zu-ZA.js: * globalize.culture.sv-SE.js: * globalize.culture.xh-ZA.js: * globalize.culture.uk-UA.js: * globalize.culture.se-SE.js: * globalize.culture.nn-NO.js: * globalize.culture.si-LK.js: * globalize.culture.nl-NL.js: * globalize.culture.ur-PK.js: * globalize.culture.pl-PL.js: * globalize.culture.or-IN.js: * globalize.culture.tt-RU.js: * globalize.culture.pa-IN.js: * globalize.culture.ug-CN.js: * globalize.culture.rw-RW.js: * globalize.culture.se-FI.js: * globalize.culture.se-NO.js: * globalize.culture.nl-BE.js: * globalize.culture.ru-RU.js: * globalize.culture.mt-MT.js: * globalize.culture.th-TH.js: * globalize.culture.wo-SN.js: * globalize.culture.pt-BR.js: * globalize.culture.ms-MY.js: * globalize.culture.vi-VN.js: * globalize.culture.te-IN.js: * globalize.culture.sk-SK.js: * globalize.culture.ne-NP.js: * globalize.culture.tr-TR.js: * globalize.culture.sl-SI.js: * globalize.culture.ps-AF.js: * globalize.culture.nb-NO.js: * globalize.culture.oc-FR.js: * globalize.culture.en-JM.js: * globalize.culture.en-MY.js: * globalize.culture.en-NZ.js: * globalize.culture.en-PH.js: * globalize.culture.en-SG.js: * globalize.culture.en-TT.js: * globalize.culture.en-US.js: * globalize.culture.en-IN.js: * globalize.culture.dv-MV.js: * globalize.culture.el-GR.js: * globalize.culture.en-AU.js: * globalize.culture.en-BZ.js: * globalize.culture.en-CA.js: * globalize.culture.en-GB.js: * globalize.culture.en-IE.js: * globalize.culture.en-ZA.js: * globalize.culture.es-ES.js: * globalize.culture.es-GT.js: * globalize.culture.es-HN.js: * globalize.culture.es-MX.js: * globalize.culture.es-NI.js: * globalize.culture.es-PA.js: * globalize.culture.es-PE.js: * globalize.culture.es-EC.js: * globalize.culture.en-ZW.js: * globalize.culture.es-AR.js: * globalize.culture.es-BO.js: * globalize.culture.es-CL.js: * globalize.culture.es-CO.js: * globalize.culture.es-CR.js: * globalize.culture.es-DO.js: * globalize.culture.de-LU.js: * globalize.culture.ar-OM.js: * globalize.culture.ar-QA.js: * globalize.culture.ar-SA.js: * globalize.culture.ar-SY.js: * globalize.culture.ar-TN.js: * globalize.culture.ar-YE.js: * globalize.culture.as-IN.js: * globalize.culture.ar-MA.js: * globalize.culture.ar-DZ.js: * globalize.culture.ar-EG.js: * globalize.culture.ar-IQ.js: * globalize.culture.ar-JO.js: * globalize.culture.ar-KW.js: * globalize.culture.ar-LB.js: * globalize.culture.ar-LY.js: * globalize.culture.ba-RU.js: * globalize.culture.cs-CZ.js: * globalize.culture.cy-GB.js: * globalize.culture.da-DK.js: * globalize.culture.de-AT.js: * globalize.culture.de-CH.js: * globalize.culture.de-DE.js: * globalize.culture.de-LI.js: * globalize.culture.co-FR.js: * globalize.culture.be-BY.js: * globalize.culture.bg-BG.js: * globalize.culture.bn-BD.js: * globalize.culture.bn-IN.js: * globalize.culture.bo-CN.js: * globalize.culture.br-FR.js: * globalize.culture.ca-ES.js: * globalize.culture.es-PR.js: * globalize.culture.hi-IN.js: * globalize.culture.hr-BA.js: * globalize.culture.hr-HR.js: * globalize.culture.hu-HU.js: * globalize.culture.hy-AM.js: * globalize.culture.id-ID.js: * globalize.culture.he-IL.js: * globalize.culture.fy-NL.js: * globalize.culture.ga-IE.js: * globalize.culture.gd-GB.js: * globalize.culture.gl-ES.js: * globalize.culture.gu-IN.js: * globalize.culture.ka-GE.js: * globalize.culture.ig-NG.js: * globalize.culture.km-KH.js: * globalize.culture.kn-IN.js: * globalize.culture.ar-BH.js: * globalize.culture.ko-KR.js: * globalize.culture.ky-KG.js: * globalize.culture.lb-LU.js: * globalize.culture.kl-GL.js: * globalize.culture.ii-CN.js: * globalize.culture.is-IS.js: * globalize.culture.it-CH.js: * globalize.culture.it-IT.js: * globalize.culture.ja-JP.js: * globalize.culture.ar-AE.js: * globalize.culture.kk-KZ.js: * globalize.culture.fr-MC.js: * globalize.culture.fr-LU.js: * globalize.culture.fr-FR.js: * globalize.culture.fa-IR.js: * globalize.culture.fr-CH.js: * globalize.culture.et-EE.js: * globalize.culture.fi-FI.js: * globalize.culture.fo-FO.js: * globalize.culture.fr-BE.js: * globalize.culture.fr-CA.js: * globalize.culture.eu-ES.js: * globalize.culture.es-US.js: * globalize.culture.es-PY.js: * globalize.culture.es-UY.js: * globalize.culture.es-VE.js: * globalize.culture.es-SV.js: * globalize.culture.sma-SE.js: * globalize.culture.hsb-DE.js: * globalize.culture.prs-AF.js: * globalize.culture.sma-NO.js: * globalize.culture.qut-GT.js: * globalize.culture.moh-CA.js: * globalize.culture.zh-CHT.js: * globalize.culture.quz-BO.js: * globalize.culture.fil-PH.js: * globalize.culture.zh-CHS.js: * globalize.culture.smj-NO.js: * globalize.culture.gsw-FR.js: * globalize.culture.nso-ZA.js: * globalize.culture.sms-FI.js: * globalize.culture.quz-PE.js: * globalize.culture.sah-RU.js: * globalize.culture.kok-IN.js: * globalize.culture.syr-SY.js: * globalize.culture.smj-SE.js: * globalize.culture.arn-CL.js: * globalize.culture.dsb-DE.js: * globalize.culture.quz-EC.js: * globalize.culture.smn-FI.js: * globalize.culture.en-029.js: * globalize.culture.uz-Latn.js: * globalize.culture.tg-Cyrl.js: * globalize.culture.iu-Cans.js: * globalize.culture.mn-Mong.js: * globalize.culture.az-Latn.js: * globalize.culture.az-Cyrl.js: * globalize.culture.sr-Cyrl.js: * globalize.culture.mn-Cyrl.js: * globalize.culture.bs-Cyrl.js: * globalize.culture.iu-Latn.js: * globalize.culture.ha-Latn.js: * globalize.culture.sr-Latn.js: * globalize.culture.zh-Hant.js: * globalize.culture.bs-Latn.js: * globalize.culture.uz-Cyrl.js: * globalize.culture.zh-Hans.js: * globalize.culture.tzm-Latn.js: * globalize.culture.iu-Latn-CA.js: * globalize.culture.sr-Latn-RS.js: * globalize.culture.sr-Latn-ME.js: * globalize.culture.sr-Latn-CS.js: * globalize.culture.sr-Latn-BA.js: * globalize.culture.sr-Cyrl-RS.js: * globalize.culture.sr-Cyrl-ME.js: * globalize.culture.sr-Cyrl-CS.js: * globalize.culture.sr-Cyrl-BA.js: * globalize.culture.ha-Latn-NG.js: * globalize.culture.mn-Mong-CN.js: * globalize.culture.az-Cyrl-AZ.js: * globalize.culture.az-Latn-AZ.js: * globalize.culture.uz-Latn-UZ.js: * globalize.culture.uz-Cyrl-UZ.js: * globalize.culture.iu-Cans-CA.js: * globalize.culture.bs-Cyrl-BA.js: * globalize.culture.bs-Latn-BA.js: * globalize.culture.tg-Cyrl-TJ.js: * globalize.culture.tzm-Latn-DZ.js: Package update * cldr.js: * globalize.js: * event.js: * unresolved.js: * supplemental.js: * adds Localisation purpose dependency * mdd_styles.css: * mdd_gripper.png: * mdd_toolbar.png: * mdd_ajax_loader.gif: * mdd_modal_background.png: Adds Markdown editor resources * CalendarController.cs: Refactoring : moved Notification and MessagesWithPayLoad into the Google data model (YavscModel) * BlogsController.cs: * Removes input validation, in order to process some Markdown values. * Makes the "Edit" Method the one that do the inital post (makes the "Post" method obsolete) * App.master: * jQuery version updated to 2.1.4 * style.css: Sets a non null padding to the body of html pages. * Edit.aspx: Passes from BBCodes to Markdown at edition time, adds the Markdown editor. * UserPost.aspx: Now displays Markdown content * Web.config: * Modifies the "Thanks" configuration * Removes useless addembly bindings * * Web.csproj: * packages.config: Package updates * instdbws.sql: Adds a GCM registration id in the user's profile data. * LoginModel.cs: Allows numbers in passords and logins * YavscModel.csproj: GCM refactorisation * Post.aspx: Replaced by Edit.aspx
9 years ago
[Authorize,
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
ValidateInput (false)]
10 years ago
public ActionResult Post (string user, string title)
{
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
ViewData ["BlogUser"] = user;
ViewData ["PostTitle"] = title;
10 years ago
ViewData ["SiteName"] = sitename;
string un = Membership.GetUser ().UserName;
if (String.IsNullOrEmpty (user))
user = un;
* MarkdownHelper.cs: implements MarkdownDeep helper from NuGet * uninstdbws.sql: * jquery-2.1.3.js: * jquery-2.1.4.js: * date.js: * mdd_help.htm: * scorediv-latest.js: * jquery-2.1.4.min.js: * jquery-2.1.3.min.js: * plural.js: * number.js: * jquery-2.1.4.min.map: * message.js: * jquery-2.1.3.min.map: * jquery-2.1.3-vsdoc.js: * currency.js: * jquery-2.1.4-vsdoc.js: * globalize.js: * MarkdownDeepLib.min.js: * relative-time.js: * globalize.cultures.js: * globalize.culture.kn.js: * globalize.culture.or.js: * globalize.culture.pa.js: * globalize.culture.pl.js: * globalize.culture.fo.js: * globalize.culture.ps.js: * globalize.culture.fi.js: * globalize.culture.fa.js: * globalize.culture.fr.js: * globalize.culture.nn.js: * globalize.culture.no.js: * globalize.culture.gl.js: * globalize.culture.gd.js: * globalize.culture.ga.js: * globalize.culture.oc.js: * globalize.culture.fy.js: * globalize.culture.eu.js: * globalize.culture.se.js: * globalize.culture.si.js: * globalize.culture.sk.js: * globalize.culture.sl.js: * globalize.culture.sq.js: * globalize.culture.sr.js: * globalize.culture.sv.js: * globalize.culture.sa.js: * globalize.culture.pt.js: * globalize.culture.et.js: * globalize.culture.es.js: * globalize.culture.rm.js: * globalize.culture.ro.js: * globalize.culture.ru.js: * globalize.culture.rw.js: * globalize.culture.gu.js: * globalize.culture.kk.js: * globalize.culture.ka.js: * globalize.culture.mk.js: * globalize.culture.ja.js: * globalize.culture.iu.js: * globalize.culture.ml.js: * globalize.culture.mn.js: * globalize.culture.mi.js: * globalize.culture.ky.js: * globalize.culture.lo.js: * globalize.culture.ko.js: * globalize.culture.lt.js: * globalize.culture.lv.js: * globalize.culture.km.js: * globalize.culture.kl.js: * globalize.culture.it.js: * globalize.culture.nb.js: * globalize.culture.hr.js: * globalize.culture.ne.js: * globalize.culture.hi.js: * globalize.culture.he.js: * globalize.culture.ha.js: * globalize.culture.nl.js: * globalize.culture.hu.js: * globalize.culture.mr.js: * globalize.culture.is.js: * globalize.culture.ii.js: * globalize.culture.ig.js: * globalize.culture.ms.js: * globalize.culture.id.js: * globalize.culture.hy.js: * globalize.culture.mt.js: * globalize.culture.sw.js: * globalize.culture.bs.js: * globalize.culture.tt.js: * globalize.culture.lb.js: * globalize.culture.ug.js: * globalize.culture.br.js: * globalize.culture.bo.js: * globalize.culture.uk.js: * globalize.culture.ca.js: * globalize.culture.tk.js: * globalize.culture.da.js: * globalize.culture.cy.js: * globalize.culture.tn.js: * globalize.culture.cs.js: * globalize.culture.co.js: * globalize.culture.tr.js: * globalize.culture.bn.js: * globalize.culture.as.js: * globalize.culture.yo.js: * globalize.culture.ar.js: * globalize.culture.zh.js: * globalize.culture.zu.js: * globalize.culture.am.js: * globalize.culture.af.js: * globalize.culture.xh.js: * globalize.culture.ur.js: * globalize.culture.bg.js: * globalize.culture.uz.js: * globalize.culture.be.js: * globalize.culture.ba.js: * globalize.culture.vi.js: * globalize.culture.az.js: * globalize.culture.wo.js: * globalize.culture.dv.js: * globalize.culture.te.js: * globalize.culture.de.js: * globalize.culture.tg.js: * globalize.culture.ta.js: * globalize.culture.el.js: * globalize.culture.th.js: * globalize.culture.arn.js: * globalize.culture.gsw.js: * globalize.culture.nso.js: * globalize.culture.sah.js: * globalize.culture.syr.js: * globalize.culture.tzm.js: * globalize.culture.kok.js: * globalize.culture.dsb.js: * globalize.culture.moh.js: * globalize.culture.sms.js: * globalize.culture.smn.js: * globalize.culture.smj.js: * globalize.culture.sma.js: * globalize.culture.hsb.js: * globalize.culture.quz.js: * globalize.culture.fil.js: * globalize.culture.qut.js: * globalize.culture.prs.js: * globalize.culture.mn-MN.js: * globalize.culture.rm-CH.js: * globalize.culture.ta-IN.js: * globalize.culture.ml-IN.js: * globalize.culture.zh-CN.js: * globalize.culture.zh-HK.js: * globalize.culture.tn-ZA.js: * globalize.culture.ms-BN.js: * globalize.culture.ro-RO.js: * globalize.culture.sq-AL.js: * globalize.culture.mr-IN.js: * globalize.culture.yo-NG.js: * globalize.culture.pt-PT.js: * globalize.culture.sa-IN.js: * globalize.culture.zh-MO.js: * globalize.culture.am-ET.js: * globalize.culture.lt-LT.js: * globalize.culture.tk-TM.js: * globalize.culture.sw-KE.js: * globalize.culture.af-ZA.js: * globalize.culture.lo-LA.js: * globalize.culture.lv-LV.js: * globalize.culture.mk-MK.js: * globalize.culture.zh-SG.js: * globalize.culture.zh-TW.js: * globalize.culture.sv-FI.js: * globalize.culture.mi-NZ.js: * globalize.culture.zu-ZA.js: * globalize.culture.sv-SE.js: * globalize.culture.xh-ZA.js: * globalize.culture.uk-UA.js: * globalize.culture.se-SE.js: * globalize.culture.nn-NO.js: * globalize.culture.si-LK.js: * globalize.culture.nl-NL.js: * globalize.culture.ur-PK.js: * globalize.culture.pl-PL.js: * globalize.culture.or-IN.js: * globalize.culture.tt-RU.js: * globalize.culture.pa-IN.js: * globalize.culture.ug-CN.js: * globalize.culture.rw-RW.js: * globalize.culture.se-FI.js: * globalize.culture.se-NO.js: * globalize.culture.nl-BE.js: * globalize.culture.ru-RU.js: * globalize.culture.mt-MT.js: * globalize.culture.th-TH.js: * globalize.culture.wo-SN.js: * globalize.culture.pt-BR.js: * globalize.culture.ms-MY.js: * globalize.culture.vi-VN.js: * globalize.culture.te-IN.js: * globalize.culture.sk-SK.js: * globalize.culture.ne-NP.js: * globalize.culture.tr-TR.js: * globalize.culture.sl-SI.js: * globalize.culture.ps-AF.js: * globalize.culture.nb-NO.js: * globalize.culture.oc-FR.js: * globalize.culture.en-JM.js: * globalize.culture.en-MY.js: * globalize.culture.en-NZ.js: * globalize.culture.en-PH.js: * globalize.culture.en-SG.js: * globalize.culture.en-TT.js: * globalize.culture.en-US.js: * globalize.culture.en-IN.js: * globalize.culture.dv-MV.js: * globalize.culture.el-GR.js: * globalize.culture.en-AU.js: * globalize.culture.en-BZ.js: * globalize.culture.en-CA.js: * globalize.culture.en-GB.js: * globalize.culture.en-IE.js: * globalize.culture.en-ZA.js: * globalize.culture.es-ES.js: * globalize.culture.es-GT.js: * globalize.culture.es-HN.js: * globalize.culture.es-MX.js: * globalize.culture.es-NI.js: * globalize.culture.es-PA.js: * globalize.culture.es-PE.js: * globalize.culture.es-EC.js: * globalize.culture.en-ZW.js: * globalize.culture.es-AR.js: * globalize.culture.es-BO.js: * globalize.culture.es-CL.js: * globalize.culture.es-CO.js: * globalize.culture.es-CR.js: * globalize.culture.es-DO.js: * globalize.culture.de-LU.js: * globalize.culture.ar-OM.js: * globalize.culture.ar-QA.js: * globalize.culture.ar-SA.js: * globalize.culture.ar-SY.js: * globalize.culture.ar-TN.js: * globalize.culture.ar-YE.js: * globalize.culture.as-IN.js: * globalize.culture.ar-MA.js: * globalize.culture.ar-DZ.js: * globalize.culture.ar-EG.js: * globalize.culture.ar-IQ.js: * globalize.culture.ar-JO.js: * globalize.culture.ar-KW.js: * globalize.culture.ar-LB.js: * globalize.culture.ar-LY.js: * globalize.culture.ba-RU.js: * globalize.culture.cs-CZ.js: * globalize.culture.cy-GB.js: * globalize.culture.da-DK.js: * globalize.culture.de-AT.js: * globalize.culture.de-CH.js: * globalize.culture.de-DE.js: * globalize.culture.de-LI.js: * globalize.culture.co-FR.js: * globalize.culture.be-BY.js: * globalize.culture.bg-BG.js: * globalize.culture.bn-BD.js: * globalize.culture.bn-IN.js: * globalize.culture.bo-CN.js: * globalize.culture.br-FR.js: * globalize.culture.ca-ES.js: * globalize.culture.es-PR.js: * globalize.culture.hi-IN.js: * globalize.culture.hr-BA.js: * globalize.culture.hr-HR.js: * globalize.culture.hu-HU.js: * globalize.culture.hy-AM.js: * globalize.culture.id-ID.js: * globalize.culture.he-IL.js: * globalize.culture.fy-NL.js: * globalize.culture.ga-IE.js: * globalize.culture.gd-GB.js: * globalize.culture.gl-ES.js: * globalize.culture.gu-IN.js: * globalize.culture.ka-GE.js: * globalize.culture.ig-NG.js: * globalize.culture.km-KH.js: * globalize.culture.kn-IN.js: * globalize.culture.ar-BH.js: * globalize.culture.ko-KR.js: * globalize.culture.ky-KG.js: * globalize.culture.lb-LU.js: * globalize.culture.kl-GL.js: * globalize.culture.ii-CN.js: * globalize.culture.is-IS.js: * globalize.culture.it-CH.js: * globalize.culture.it-IT.js: * globalize.culture.ja-JP.js: * globalize.culture.ar-AE.js: * globalize.culture.kk-KZ.js: * globalize.culture.fr-MC.js: * globalize.culture.fr-LU.js: * globalize.culture.fr-FR.js: * globalize.culture.fa-IR.js: * globalize.culture.fr-CH.js: * globalize.culture.et-EE.js: * globalize.culture.fi-FI.js: * globalize.culture.fo-FO.js: * globalize.culture.fr-BE.js: * globalize.culture.fr-CA.js: * globalize.culture.eu-ES.js: * globalize.culture.es-US.js: * globalize.culture.es-PY.js: * globalize.culture.es-UY.js: * globalize.culture.es-VE.js: * globalize.culture.es-SV.js: * globalize.culture.sma-SE.js: * globalize.culture.hsb-DE.js: * globalize.culture.prs-AF.js: * globalize.culture.sma-NO.js: * globalize.culture.qut-GT.js: * globalize.culture.moh-CA.js: * globalize.culture.zh-CHT.js: * globalize.culture.quz-BO.js: * globalize.culture.fil-PH.js: * globalize.culture.zh-CHS.js: * globalize.culture.smj-NO.js: * globalize.culture.gsw-FR.js: * globalize.culture.nso-ZA.js: * globalize.culture.sms-FI.js: * globalize.culture.quz-PE.js: * globalize.culture.sah-RU.js: * globalize.culture.kok-IN.js: * globalize.culture.syr-SY.js: * globalize.culture.smj-SE.js: * globalize.culture.arn-CL.js: * globalize.culture.dsb-DE.js: * globalize.culture.quz-EC.js: * globalize.culture.smn-FI.js: * globalize.culture.en-029.js: * globalize.culture.uz-Latn.js: * globalize.culture.tg-Cyrl.js: * globalize.culture.iu-Cans.js: * globalize.culture.mn-Mong.js: * globalize.culture.az-Latn.js: * globalize.culture.az-Cyrl.js: * globalize.culture.sr-Cyrl.js: * globalize.culture.mn-Cyrl.js: * globalize.culture.bs-Cyrl.js: * globalize.culture.iu-Latn.js: * globalize.culture.ha-Latn.js: * globalize.culture.sr-Latn.js: * globalize.culture.zh-Hant.js: * globalize.culture.bs-Latn.js: * globalize.culture.uz-Cyrl.js: * globalize.culture.zh-Hans.js: * globalize.culture.tzm-Latn.js: * globalize.culture.iu-Latn-CA.js: * globalize.culture.sr-Latn-RS.js: * globalize.culture.sr-Latn-ME.js: * globalize.culture.sr-Latn-CS.js: * globalize.culture.sr-Latn-BA.js: * globalize.culture.sr-Cyrl-RS.js: * globalize.culture.sr-Cyrl-ME.js: * globalize.culture.sr-Cyrl-CS.js: * globalize.culture.sr-Cyrl-BA.js: * globalize.culture.ha-Latn-NG.js: * globalize.culture.mn-Mong-CN.js: * globalize.culture.az-Cyrl-AZ.js: * globalize.culture.az-Latn-AZ.js: * globalize.culture.uz-Latn-UZ.js: * globalize.culture.uz-Cyrl-UZ.js: * globalize.culture.iu-Cans-CA.js: * globalize.culture.bs-Cyrl-BA.js: * globalize.culture.bs-Latn-BA.js: * globalize.culture.tg-Cyrl-TJ.js: * globalize.culture.tzm-Latn-DZ.js: Package update * cldr.js: * globalize.js: * event.js: * unresolved.js: * supplemental.js: * adds Localisation purpose dependency * mdd_styles.css: * mdd_gripper.png: * mdd_toolbar.png: * mdd_ajax_loader.gif: * mdd_modal_background.png: Adds Markdown editor resources * CalendarController.cs: Refactoring : moved Notification and MessagesWithPayLoad into the Google data model (YavscModel) * BlogsController.cs: * Removes input validation, in order to process some Markdown values. * Makes the "Edit" Method the one that do the inital post (makes the "Post" method obsolete) * App.master: * jQuery version updated to 2.1.4 * style.css: Sets a non null padding to the body of html pages. * Edit.aspx: Passes from BBCodes to Markdown at edition time, adds the Markdown editor. * UserPost.aspx: Now displays Markdown content * Web.config: * Modifies the "Thanks" configuration * Removes useless addembly bindings * * Web.csproj: * packages.config: Package updates * instdbws.sql: Adds a GCM registration id in the user's profile data. * LoginModel.cs: Allows numbers in passords and logins * YavscModel.csproj: GCM refactorisation * Post.aspx: Replaced by Edit.aspx
9 years ago
if (String.IsNullOrEmpty (title))
title = "";
10 years ago
ViewData ["UserName"] = un;
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
ViewData ["AllowedCircles"] = CircleManager.DefaultProvider.List (Membership.GetUser ().UserName).Select (x => new SelectListItem {
Value = x.Id.ToString(),
Text = x.Title
});
return View ("Edit", new BlogEntry { Title = title });
10 years ago
}
/// <summary>
/// Validates the edit.
/// </summary>
/// <returns>The edit.</returns>
/// <param name="model">Model.</param>
* MarkdownHelper.cs: implements MarkdownDeep helper from NuGet * uninstdbws.sql: * jquery-2.1.3.js: * jquery-2.1.4.js: * date.js: * mdd_help.htm: * scorediv-latest.js: * jquery-2.1.4.min.js: * jquery-2.1.3.min.js: * plural.js: * number.js: * jquery-2.1.4.min.map: * message.js: * jquery-2.1.3.min.map: * jquery-2.1.3-vsdoc.js: * currency.js: * jquery-2.1.4-vsdoc.js: * globalize.js: * MarkdownDeepLib.min.js: * relative-time.js: * globalize.cultures.js: * globalize.culture.kn.js: * globalize.culture.or.js: * globalize.culture.pa.js: * globalize.culture.pl.js: * globalize.culture.fo.js: * globalize.culture.ps.js: * globalize.culture.fi.js: * globalize.culture.fa.js: * globalize.culture.fr.js: * globalize.culture.nn.js: * globalize.culture.no.js: * globalize.culture.gl.js: * globalize.culture.gd.js: * globalize.culture.ga.js: * globalize.culture.oc.js: * globalize.culture.fy.js: * globalize.culture.eu.js: * globalize.culture.se.js: * globalize.culture.si.js: * globalize.culture.sk.js: * globalize.culture.sl.js: * globalize.culture.sq.js: * globalize.culture.sr.js: * globalize.culture.sv.js: * globalize.culture.sa.js: * globalize.culture.pt.js: * globalize.culture.et.js: * globalize.culture.es.js: * globalize.culture.rm.js: * globalize.culture.ro.js: * globalize.culture.ru.js: * globalize.culture.rw.js: * globalize.culture.gu.js: * globalize.culture.kk.js: * globalize.culture.ka.js: * globalize.culture.mk.js: * globalize.culture.ja.js: * globalize.culture.iu.js: * globalize.culture.ml.js: * globalize.culture.mn.js: * globalize.culture.mi.js: * globalize.culture.ky.js: * globalize.culture.lo.js: * globalize.culture.ko.js: * globalize.culture.lt.js: * globalize.culture.lv.js: * globalize.culture.km.js: * globalize.culture.kl.js: * globalize.culture.it.js: * globalize.culture.nb.js: * globalize.culture.hr.js: * globalize.culture.ne.js: * globalize.culture.hi.js: * globalize.culture.he.js: * globalize.culture.ha.js: * globalize.culture.nl.js: * globalize.culture.hu.js: * globalize.culture.mr.js: * globalize.culture.is.js: * globalize.culture.ii.js: * globalize.culture.ig.js: * globalize.culture.ms.js: * globalize.culture.id.js: * globalize.culture.hy.js: * globalize.culture.mt.js: * globalize.culture.sw.js: * globalize.culture.bs.js: * globalize.culture.tt.js: * globalize.culture.lb.js: * globalize.culture.ug.js: * globalize.culture.br.js: * globalize.culture.bo.js: * globalize.culture.uk.js: * globalize.culture.ca.js: * globalize.culture.tk.js: * globalize.culture.da.js: * globalize.culture.cy.js: * globalize.culture.tn.js: * globalize.culture.cs.js: * globalize.culture.co.js: * globalize.culture.tr.js: * globalize.culture.bn.js: * globalize.culture.as.js: * globalize.culture.yo.js: * globalize.culture.ar.js: * globalize.culture.zh.js: * globalize.culture.zu.js: * globalize.culture.am.js: * globalize.culture.af.js: * globalize.culture.xh.js: * globalize.culture.ur.js: * globalize.culture.bg.js: * globalize.culture.uz.js: * globalize.culture.be.js: * globalize.culture.ba.js: * globalize.culture.vi.js: * globalize.culture.az.js: * globalize.culture.wo.js: * globalize.culture.dv.js: * globalize.culture.te.js: * globalize.culture.de.js: * globalize.culture.tg.js: * globalize.culture.ta.js: * globalize.culture.el.js: * globalize.culture.th.js: * globalize.culture.arn.js: * globalize.culture.gsw.js: * globalize.culture.nso.js: * globalize.culture.sah.js: * globalize.culture.syr.js: * globalize.culture.tzm.js: * globalize.culture.kok.js: * globalize.culture.dsb.js: * globalize.culture.moh.js: * globalize.culture.sms.js: * globalize.culture.smn.js: * globalize.culture.smj.js: * globalize.culture.sma.js: * globalize.culture.hsb.js: * globalize.culture.quz.js: * globalize.culture.fil.js: * globalize.culture.qut.js: * globalize.culture.prs.js: * globalize.culture.mn-MN.js: * globalize.culture.rm-CH.js: * globalize.culture.ta-IN.js: * globalize.culture.ml-IN.js: * globalize.culture.zh-CN.js: * globalize.culture.zh-HK.js: * globalize.culture.tn-ZA.js: * globalize.culture.ms-BN.js: * globalize.culture.ro-RO.js: * globalize.culture.sq-AL.js: * globalize.culture.mr-IN.js: * globalize.culture.yo-NG.js: * globalize.culture.pt-PT.js: * globalize.culture.sa-IN.js: * globalize.culture.zh-MO.js: * globalize.culture.am-ET.js: * globalize.culture.lt-LT.js: * globalize.culture.tk-TM.js: * globalize.culture.sw-KE.js: * globalize.culture.af-ZA.js: * globalize.culture.lo-LA.js: * globalize.culture.lv-LV.js: * globalize.culture.mk-MK.js: * globalize.culture.zh-SG.js: * globalize.culture.zh-TW.js: * globalize.culture.sv-FI.js: * globalize.culture.mi-NZ.js: * globalize.culture.zu-ZA.js: * globalize.culture.sv-SE.js: * globalize.culture.xh-ZA.js: * globalize.culture.uk-UA.js: * globalize.culture.se-SE.js: * globalize.culture.nn-NO.js: * globalize.culture.si-LK.js: * globalize.culture.nl-NL.js: * globalize.culture.ur-PK.js: * globalize.culture.pl-PL.js: * globalize.culture.or-IN.js: * globalize.culture.tt-RU.js: * globalize.culture.pa-IN.js: * globalize.culture.ug-CN.js: * globalize.culture.rw-RW.js: * globalize.culture.se-FI.js: * globalize.culture.se-NO.js: * globalize.culture.nl-BE.js: * globalize.culture.ru-RU.js: * globalize.culture.mt-MT.js: * globalize.culture.th-TH.js: * globalize.culture.wo-SN.js: * globalize.culture.pt-BR.js: * globalize.culture.ms-MY.js: * globalize.culture.vi-VN.js: * globalize.culture.te-IN.js: * globalize.culture.sk-SK.js: * globalize.culture.ne-NP.js: * globalize.culture.tr-TR.js: * globalize.culture.sl-SI.js: * globalize.culture.ps-AF.js: * globalize.culture.nb-NO.js: * globalize.culture.oc-FR.js: * globalize.culture.en-JM.js: * globalize.culture.en-MY.js: * globalize.culture.en-NZ.js: * globalize.culture.en-PH.js: * globalize.culture.en-SG.js: * globalize.culture.en-TT.js: * globalize.culture.en-US.js: * globalize.culture.en-IN.js: * globalize.culture.dv-MV.js: * globalize.culture.el-GR.js: * globalize.culture.en-AU.js: * globalize.culture.en-BZ.js: * globalize.culture.en-CA.js: * globalize.culture.en-GB.js: * globalize.culture.en-IE.js: * globalize.culture.en-ZA.js: * globalize.culture.es-ES.js: * globalize.culture.es-GT.js: * globalize.culture.es-HN.js: * globalize.culture.es-MX.js: * globalize.culture.es-NI.js: * globalize.culture.es-PA.js: * globalize.culture.es-PE.js: * globalize.culture.es-EC.js: * globalize.culture.en-ZW.js: * globalize.culture.es-AR.js: * globalize.culture.es-BO.js: * globalize.culture.es-CL.js: * globalize.culture.es-CO.js: * globalize.culture.es-CR.js: * globalize.culture.es-DO.js: * globalize.culture.de-LU.js: * globalize.culture.ar-OM.js: * globalize.culture.ar-QA.js: * globalize.culture.ar-SA.js: * globalize.culture.ar-SY.js: * globalize.culture.ar-TN.js: * globalize.culture.ar-YE.js: * globalize.culture.as-IN.js: * globalize.culture.ar-MA.js: * globalize.culture.ar-DZ.js: * globalize.culture.ar-EG.js: * globalize.culture.ar-IQ.js: * globalize.culture.ar-JO.js: * globalize.culture.ar-KW.js: * globalize.culture.ar-LB.js: * globalize.culture.ar-LY.js: * globalize.culture.ba-RU.js: * globalize.culture.cs-CZ.js: * globalize.culture.cy-GB.js: * globalize.culture.da-DK.js: * globalize.culture.de-AT.js: * globalize.culture.de-CH.js: * globalize.culture.de-DE.js: * globalize.culture.de-LI.js: * globalize.culture.co-FR.js: * globalize.culture.be-BY.js: * globalize.culture.bg-BG.js: * globalize.culture.bn-BD.js: * globalize.culture.bn-IN.js: * globalize.culture.bo-CN.js: * globalize.culture.br-FR.js: * globalize.culture.ca-ES.js: * globalize.culture.es-PR.js: * globalize.culture.hi-IN.js: * globalize.culture.hr-BA.js: * globalize.culture.hr-HR.js: * globalize.culture.hu-HU.js: * globalize.culture.hy-AM.js: * globalize.culture.id-ID.js: * globalize.culture.he-IL.js: * globalize.culture.fy-NL.js: * globalize.culture.ga-IE.js: * globalize.culture.gd-GB.js: * globalize.culture.gl-ES.js: * globalize.culture.gu-IN.js: * globalize.culture.ka-GE.js: * globalize.culture.ig-NG.js: * globalize.culture.km-KH.js: * globalize.culture.kn-IN.js: * globalize.culture.ar-BH.js: * globalize.culture.ko-KR.js: * globalize.culture.ky-KG.js: * globalize.culture.lb-LU.js: * globalize.culture.kl-GL.js: * globalize.culture.ii-CN.js: * globalize.culture.is-IS.js: * globalize.culture.it-CH.js: * globalize.culture.it-IT.js: * globalize.culture.ja-JP.js: * globalize.culture.ar-AE.js: * globalize.culture.kk-KZ.js: * globalize.culture.fr-MC.js: * globalize.culture.fr-LU.js: * globalize.culture.fr-FR.js: * globalize.culture.fa-IR.js: * globalize.culture.fr-CH.js: * globalize.culture.et-EE.js: * globalize.culture.fi-FI.js: * globalize.culture.fo-FO.js: * globalize.culture.fr-BE.js: * globalize.culture.fr-CA.js: * globalize.culture.eu-ES.js: * globalize.culture.es-US.js: * globalize.culture.es-PY.js: * globalize.culture.es-UY.js: * globalize.culture.es-VE.js: * globalize.culture.es-SV.js: * globalize.culture.sma-SE.js: * globalize.culture.hsb-DE.js: * globalize.culture.prs-AF.js: * globalize.culture.sma-NO.js: * globalize.culture.qut-GT.js: * globalize.culture.moh-CA.js: * globalize.culture.zh-CHT.js: * globalize.culture.quz-BO.js: * globalize.culture.fil-PH.js: * globalize.culture.zh-CHS.js: * globalize.culture.smj-NO.js: * globalize.culture.gsw-FR.js: * globalize.culture.nso-ZA.js: * globalize.culture.sms-FI.js: * globalize.culture.quz-PE.js: * globalize.culture.sah-RU.js: * globalize.culture.kok-IN.js: * globalize.culture.syr-SY.js: * globalize.culture.smj-SE.js: * globalize.culture.arn-CL.js: * globalize.culture.dsb-DE.js: * globalize.culture.quz-EC.js: * globalize.culture.smn-FI.js: * globalize.culture.en-029.js: * globalize.culture.uz-Latn.js: * globalize.culture.tg-Cyrl.js: * globalize.culture.iu-Cans.js: * globalize.culture.mn-Mong.js: * globalize.culture.az-Latn.js: * globalize.culture.az-Cyrl.js: * globalize.culture.sr-Cyrl.js: * globalize.culture.mn-Cyrl.js: * globalize.culture.bs-Cyrl.js: * globalize.culture.iu-Latn.js: * globalize.culture.ha-Latn.js: * globalize.culture.sr-Latn.js: * globalize.culture.zh-Hant.js: * globalize.culture.bs-Latn.js: * globalize.culture.uz-Cyrl.js: * globalize.culture.zh-Hans.js: * globalize.culture.tzm-Latn.js: * globalize.culture.iu-Latn-CA.js: * globalize.culture.sr-Latn-RS.js: * globalize.culture.sr-Latn-ME.js: * globalize.culture.sr-Latn-CS.js: * globalize.culture.sr-Latn-BA.js: * globalize.culture.sr-Cyrl-RS.js: * globalize.culture.sr-Cyrl-ME.js: * globalize.culture.sr-Cyrl-CS.js: * globalize.culture.sr-Cyrl-BA.js: * globalize.culture.ha-Latn-NG.js: * globalize.culture.mn-Mong-CN.js: * globalize.culture.az-Cyrl-AZ.js: * globalize.culture.az-Latn-AZ.js: * globalize.culture.uz-Latn-UZ.js: * globalize.culture.uz-Cyrl-UZ.js: * globalize.culture.iu-Cans-CA.js: * globalize.culture.bs-Cyrl-BA.js: * globalize.culture.bs-Latn-BA.js: * globalize.culture.tg-Cyrl-TJ.js: * globalize.culture.tzm-Latn-DZ.js: Package update * cldr.js: * globalize.js: * event.js: * unresolved.js: * supplemental.js: * adds Localisation purpose dependency * mdd_styles.css: * mdd_gripper.png: * mdd_toolbar.png: * mdd_ajax_loader.gif: * mdd_modal_background.png: Adds Markdown editor resources * CalendarController.cs: Refactoring : moved Notification and MessagesWithPayLoad into the Google data model (YavscModel) * BlogsController.cs: * Removes input validation, in order to process some Markdown values. * Makes the "Edit" Method the one that do the inital post (makes the "Post" method obsolete) * App.master: * jQuery version updated to 2.1.4 * style.css: Sets a non null padding to the body of html pages. * Edit.aspx: Passes from BBCodes to Markdown at edition time, adds the Markdown editor. * UserPost.aspx: Now displays Markdown content * Web.config: * Modifies the "Thanks" configuration * Removes useless addembly bindings * * Web.csproj: * packages.config: Package updates * instdbws.sql: Adds a GCM registration id in the user's profile data. * LoginModel.cs: Allows numbers in passords and logins * YavscModel.csproj: GCM refactorisation * Post.aspx: Replaced by Edit.aspx
9 years ago
[Authorize,
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
ValidateInput (false)]
public ActionResult ValidateEdit (BlogEntry model)
10 years ago
{
ViewData ["SiteName"] = sitename;
ViewData ["BlogUser"] = Membership.GetUser ().UserName;
if (ModelState.IsValid) {
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
if (model.Id != 0)
BlogManager.UpdatePost (model.Id, model.Title, model.Content, model.Visible, model.AllowedCircles);
else
model.Id = BlogManager.Post (model.UserName, model.Title, model.Content, model.Visible, model.AllowedCircles);
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
return RedirectToAction ("UserPosts", new { user = model.UserName, title = model.Title });
10 years ago
}
return View ("Edit", model);
}
/// <summary>
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
/// Edit the specified bill
/// </summary>
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
/// <param name="id">Identifier.</param>
[Authorize, ValidateInput (false)]
public ActionResult Edit (long id)
10 years ago
{
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
BlogEntry e = BlogManager.GetForEditing (id);
string user = Membership.GetUser ().UserName;
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
Profile pr = new Profile (ProfileBase.Create(e.UserName));
ViewData ["BlogTitle"] = pr.BlogTitle;
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
ViewData ["LOGIN"] = user;
// Populates the circles combo items
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
if (e.AllowedCircles == null)
e.AllowedCircles = new long[0];
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
ViewData ["AllowedCircles"] = CircleManager.DefaultProvider.List (Membership.GetUser ().UserName).Select (x => new SelectListItem {
Value = x.Id.ToString(),
Text = x.Title,
Selected = e.AllowedCircles.Contains (x.Id)
});
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
return View (e);
10 years ago
}
/// <summary>
/// Comment the specified model.
/// </summary>
/// <param name="model">Model.</param>
[Authorize]
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
public ActionResult Comment (Comment model)
{
10 years ago
string username = Membership.GetUser ().UserName;
ViewData ["SiteName"] = sitename;
if (ModelState.IsValid) {
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
BlogManager.Comment (username, model.PostId, model.CommentText, model.Visible);
return GetPost (model.PostId);
10 years ago
}
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
return GetPost (model.PostId);
10 years ago
}
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
10 years ago
/// <summary>
/// Remove the specified blog entry, by its author and title,
/// using returnUrl as the URL to return to,
/// and confirm as a proof you really know what you do.
/// </summary>
/// <param name="user">User.</param>
/// <param name="title">Title.</param>
/// <param name="returnUrl">Return URL.</param>
/// <param name="confirm">If set to <c>true</c> confirm.</param>
10 years ago
[Authorize]
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
public ActionResult RemoveTitle (string user, string title, string returnUrl, bool confirm = false)
10 years ago
{
if (returnUrl == null)
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
if (Request.UrlReferrer != null)
returnUrl = Request.UrlReferrer.AbsoluteUri;
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
ViewData ["returnUrl"] = returnUrl;
ViewData ["UserName"] = user;
ViewData ["Title"] = title;
BlogManager.CheckAuthCanEdit (user, title);
if (!confirm)
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
return View ("RemoveTitle");
BlogManager.RemoveTitle (user, title);
10 years ago
if (returnUrl == null)
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
RedirectToAction ("Index", new { user = user });
10 years ago
return Redirect (returnUrl);
10 years ago
}
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
/// <summary>
/// Removes the post.
/// </summary>
/// <returns>The post.</returns>
/// <param name="id">Identifier.</param>
/// <param name="returnUrl">Return URL.</param>
/// <param name="confirm">If set to <c>true</c> confirm.</param>
[Authorize]
public ActionResult RemovePost (long id, string returnUrl, bool confirm = false)
10 years ago
{
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
BlogEntry e = BlogManager.GetForEditing (id);
if (e == null)
return new HttpNotFoundResult ("post id "+id.ToString());
ViewData ["id"] = id;
ViewData ["returnUrl"] = string.IsNullOrWhiteSpace(returnUrl)?
Request.UrlReferrer.AbsoluteUri.ToString(): returnUrl;
// TODO: cleaner way to disallow deletion
if (!confirm)
return View ("RemovePost",e);
BlogManager.RemovePost (id);
if (string.IsNullOrWhiteSpace(returnUrl))
10 years ago
return RedirectToAction ("Index");
* bg.gif: * asc.gif: * desc.gif: * style.css: moved to App_Themes * style.css: * bg.gif: * asc.gif: * bg.png: * rect.png: * asc.png: * desc.gif: * jquery-ui.css: * mdd_styles.css: * croix.png: * desc.png: * style.css: * jquery-ui.min.css: * mdd_gripper.png: * mdd_toolbar.png: * jquery.timepicker.css: * mdd_ajax_loader.gif: * mdd_modal_background.png: moved to /App_Themes * NpgsqlBlogProvider.cs: * Remove post by id * Manage collections of entries on a couple (user,title), not a single post * NpgsqlCircleProvider.cs: Fixes the "Match" method. * IDbModule.cs: * Edit.aspx: * Estimates.aspx: * WorkFlowManager.cs: * NpgsqlContentProvider.cs: refactoring * NpgsqlMRPProviders.csproj: new NpgsqlUserName provider * NpgsqlRoleProvider.cs: simpler init method * NpgsqlUserNameProvider.cs: impements a UserNameProvider * MyClass.cs: refactoring from Yavsc.Model * BlogsController.cs: access control simplified * FrontOfficeController.cs: Pdf generation made public ni case of formatting exception * mdd_styles.css: Theme -> App_Themes * style.css: yet another style impact * AccountController.cs: Fixes the user name modification * BlogsController.cs: * Fixes the removal process * On a title and user name, we get collection of posts, not only one. * Implements an Access on circle * FrontOfficeController.cs: * implements a new Get method. * ensure a membership existence before delivering an estimate. * GoogleController.cs: Fixes the user name modification on a Google account * ErrorHtmlFormatter.cs: nice error message in html (using Markdown helper) * FormatterException.cs: formatter exception exposes error and standard output of the process * TexToPdfFormatter.cs: * generates temporary files in the folder returned by Path.GetTempPath() * throws FormatterException * Global.asax.cs: new route map: Blogs/{action}/{user}/{title} Blog/{user}/{title} B/{id} {controller}/{action}/{id} * App.master: * refactoring: Theme moved to App_Themes * a link to the logged user's blog * * NoLogin.master: refactoring: Theme moved to App_Themes * Circles.aspx: refactoring : circles now are given as select items * Login.aspx: fixes the html presentation * Register.aspx: Fixes a Typo * Index.aspx: Implements a blog index, due to M&C changes with this commit * RemovePost.aspx: links to the new route to the "RemovePost" action, giving it a post id * RemoveTitle.aspx: fixes a not yet linked page to remove a post collection under a given title * EventPub.aspx: code refactoring * Writting.ascx: cleans the code * Web.config: fills the config with new names in the space * Web.config: configures the new NpgsqlUserNameProvider * Web.csproj: refactoring and others * BlogEntryCollection.cs: implement the BlogEntryCollection * BlogManager.cs: the manager helps to filter on access * BlogProvider.cs: The title is not unique anymore, and one can modify it, post a lot under it, drop all posts under it. A Post is deleted by id. * UUBlogEntryCollection.cs: implements a collection of post under a given user name. * UUTBlogEntryCollection.cs: implements a collection of post under a given couple (user name, title). * ListItem.cs: ListItem is declared obsolete in this model, helpers can build MVC SelectListItem on data returned by the manager. * LocalizedText.Designer.cs: * LocalizedText.fr.Designer.cs: autogenerated from xml * LocalizedText.resx: * LocalizedText.fr.resx: new labels * ChangeUserNameProvider.cs: xml doc * Profile.cs: the UserName property is read only, and comes from authentication, to change it, we set a Name and validate it agains the "Profile" method * UserManager.cs: simpler code a init time * IContentProvider.cs: implements the new IDataProvider interface * IDataProvider.cs: defines the new IDataProvider interface * YavscModel.csproj: includes new classes * UserPosts.aspx: adds a link to remove a post * UserPost.aspx: now uses the new BlogEntryCollection object
9 years ago
return Redirect (returnUrl);
10 years ago
}
}
}