diff --git a/web/Controllers/BasketController.cs b/web/ApiControllers/BasketController.cs similarity index 100% rename from web/Controllers/BasketController.cs rename to web/ApiControllers/BasketController.cs diff --git a/web/Controllers/BlogsApiController.cs b/web/ApiControllers/BlogsApiController.cs similarity index 100% rename from web/Controllers/BlogsApiController.cs rename to web/ApiControllers/BlogsApiController.cs diff --git a/web/Controllers/FrontOfficeApiController.cs b/web/ApiControllers/FrontOfficeApiController.cs similarity index 100% rename from web/Controllers/FrontOfficeApiController.cs rename to web/ApiControllers/FrontOfficeApiController.cs diff --git a/web/Controllers/PaypalApiController.cs b/web/ApiControllers/PaypalApiController.cs similarity index 100% rename from web/Controllers/PaypalApiController.cs rename to web/ApiControllers/PaypalApiController.cs diff --git a/web/Controllers/WorkFlowController.cs b/web/ApiControllers/WorkFlowController.cs similarity index 100% rename from web/Controllers/WorkFlowController.cs rename to web/ApiControllers/WorkFlowController.cs diff --git a/web/Controllers/AccountController.cs b/web/Controllers/AccountController.cs index 5d0bdfed..923f2e1b 100644 --- a/web/Controllers/AccountController.cs +++ b/web/Controllers/AccountController.cs @@ -43,35 +43,15 @@ namespace Yavsc.Controllers { return View (); } - /// - /// Login the specified returnUrl. - /// - /// Return URL. - public ActionResult Login (string returnUrl) - { - ViewData ["returnUrl"] = returnUrl; - return View (); - } - - /// - /// Gets the profile. - /// - /// The profile. - /// User. - public static Profile GetProfile (string user) - { - return new Profile (ProfileBase.Create (user)); - } - // TODO [ValidateAntiForgeryToken] /// - /// Dos the login. + /// Does login. /// /// The login. /// Model. /// Return URL. - public ActionResult DoLogin (LoginModel model, string returnUrl) + public ActionResult Login (LoginModel model, string returnUrl) { if (ModelState.IsValid) { if (Membership.ValidateUser (model.UserName, model.Password)) { @@ -88,7 +68,7 @@ namespace Yavsc.Controllers ViewData ["returnUrl"] = returnUrl; // If we got this far, something failed, redisplay form - return View ("Login", model); + return View (model); } /// /// Register the specified model and returnUrl. @@ -255,11 +235,11 @@ namespace Yavsc.Controllers /// Model. [Authorize] [HttpGet] - public ActionResult MyProfile (Profile model) + public ActionResult Profile (Profile model) { string username = Membership.GetUser ().UserName; ViewData ["UserName"] = username; - model = GetProfile (username); + model = new Profile (ProfileBase.Create (username)); model.RememberMe = FormsAuthentication.GetAuthCookie (username, true) == null; return View (model); } @@ -272,7 +252,7 @@ namespace Yavsc.Controllers [Authorize] [HttpPost] // ASSERT("Membership.GetUser ().UserName is made of simple characters, no slash nor backslash" - public ActionResult MyProfile (Profile model, HttpPostedFileBase AvatarFile) + public ActionResult Profile (Profile model, HttpPostedFileBase AvatarFile) { string username = Membership.GetUser ().UserName; ViewData ["UserName"] = username; diff --git a/web/Controllers/BlogsController.cs b/web/Controllers/BlogsController.cs index 92c6c375..63d69fd0 100644 --- a/web/Controllers/BlogsController.cs +++ b/web/Controllers/BlogsController.cs @@ -121,7 +121,7 @@ namespace Yavsc.Controllers // find entries BlogEntryCollection c = BlogManager.FindPost (user, sf, pageIndex, pageSize, out tr); // Get author's meta data - Profile bupr = AccountController.GetProfile (user); + Profile bupr = new Profile (ProfileBase.Create (user)); ViewData ["BlogUserProfile"] = bupr; // Inform of listing meta data ViewData ["BlogTitle"] = bupr.BlogTitle; @@ -155,7 +155,7 @@ namespace Yavsc.Controllers { if (e == null) return View ("TitleNotFound"); - Profile pr = AccountController.GetProfile (e.UserName); + Profile pr = new Profile (ProfileBase.Create (e.UserName)); if (pr==null) return View ("TitleNotFound"); ViewData ["BlogUserProfile"] = pr; diff --git a/web/Controllers/ModuleController.cs b/web/Controllers/ModuleController.cs index 79c75063..4aae72c1 100644 --- a/web/Controllers/ModuleController.cs +++ b/web/Controllers/ModuleController.cs @@ -1,36 +1,36 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Web.Mvc; -using Yavsc.Model; -using System.Configuration; - -namespace Yavsc.Controllers -{ - /// - /// Module controller. - /// - public class ModuleController : Controller - { - /// - /// Initialize the specified requestContext. - /// - /// Request context. - protected override void Initialize (System.Web.Routing.RequestContext requestContext) - { - base.Initialize (requestContext); - ConfigurationManager.GetSection ("ymodules"); - - } - - // List modules = new List (); - /// - /// Index this instance. - /// - public ActionResult Index() - { - return View (); - } - } -} +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.Mvc; +using Yavsc.Model; +using System.Configuration; + +namespace Yavsc.Controllers +{ + /// + /// Module controller. + /// + public class ModuleController : Controller + { + /// + /// Initialize the specified requestContext. + /// + /// Request context. + protected override void Initialize (System.Web.Routing.RequestContext requestContext) + { + base.Initialize (requestContext); + ConfigurationManager.GetSection ("ymodules"); + + } + + // List modules = new List (); + /// + /// Index this instance. + /// + public ActionResult Index() + { + return View (); + } + } +} diff --git a/web/Controllers/IValueProvider.cs b/web/IValueProvider.cs similarity index 100% rename from web/Controllers/IValueProvider.cs rename to web/IValueProvider.cs diff --git a/web/Models/App.master b/web/Models/App.master index 5d3dde4d..249a99b1 100644 --- a/web/Models/App.master +++ b/web/Models/App.master @@ -48,12 +48,11 @@ - -