Totem Prod customisation
* Web.config: * YavscHelpers.cs: * GoogleController.cs: * Profile.cs: refactoring * OAuth2.cs: refactoring * AccountController.cs: * refactoring profile properties * fixes profile edition auth * instdbws.sql: remove some ownership attribution * Web.csproj: totem prod custo * App.master: Totem prod custo nice and simple parralax effect, quiet working on my android browser ... * Profile.aspx: a smaller avatar * style.css: Totem prod custo
This commit is contained in:
parent
82de63a0ba
commit
e8ccc67bb1
13 changed files with 170 additions and 99 deletions
|
|
@ -38,7 +38,7 @@ namespace Yavsc.Controllers
|
|||
public ActionResult Avatar (string user)
|
||||
{
|
||||
ProfileBase pr = ProfileBase.Create (user);
|
||||
string avpath = (string ) pr.GetPropertyValue("avatar") ;
|
||||
string avpath = (string ) pr.GetPropertyValue("Avatar") ;
|
||||
if (avpath == null) {
|
||||
FileInfo fia = new FileInfo (Server.MapPath (defaultAvatar));
|
||||
return File (fia.OpenRead (), defaultAvatarMimetype);
|
||||
|
|
@ -291,7 +291,7 @@ namespace Yavsc.Controllers
|
|||
|
||||
string logdu = Membership.GetUser ().UserName;
|
||||
ViewData ["UserName"] = id;
|
||||
bool editsMyName = (string.Compare(id,model.Name)==0);
|
||||
bool editsMyName = (string.Compare(id,logdu)==0);
|
||||
if (!editsMyName)
|
||||
if (!Roles.IsUserInRole ("Admin"))
|
||||
if (!Roles.IsUserInRole ("FrontOffice"))
|
||||
|
|
@ -321,9 +321,9 @@ namespace Yavsc.Controllers
|
|||
prf.SetPropertyValue ("BlogVisible", model.BlogVisible);
|
||||
prf.SetPropertyValue ("BlogTitle", model.BlogTitle);
|
||||
if (AvatarFile != null) {
|
||||
prf.SetPropertyValue ("avatar", model.avatar);
|
||||
prf.SetPropertyValue ("Avatar", model.avatar);
|
||||
} else {
|
||||
model.avatar = (string) prf.GetPropertyValue ("avatar");
|
||||
model.avatar = (string) prf.GetPropertyValue ("Avatar");
|
||||
}
|
||||
prf.SetPropertyValue ("Address", model.Address);
|
||||
prf.SetPropertyValue ("CityAndState", model.CityAndState);
|
||||
|
|
@ -346,7 +346,7 @@ namespace Yavsc.Controllers
|
|||
UserManager.ChangeName (id, model.Name);
|
||||
FormsAuthentication.SetAuthCookie (model.Name, model.RememberMe);
|
||||
}
|
||||
ViewData ["Message"] = "Profile enregistré"+((editsMyName)?", nom public inclus.":"");
|
||||
ViewData ["Message"] = "Profile enregistré"+((editsMyName)?", nom public inclu.":"");
|
||||
}
|
||||
return View (model);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ namespace Yavsc.Controllers
|
|||
/// </summary>
|
||||
/// <param name="gat">Gat.</param>
|
||||
private void SaveToken (AuthToken gat)
|
||||
{
|
||||
{
|
||||
HttpContext.Profile.SetPropertyValue ("gtoken", gat.access_token);
|
||||
if (gat.refresh_token != null)
|
||||
HttpContext.Profile.SetPropertyValue ("grefreshtoken", gat.refresh_token);
|
||||
|
|
@ -212,7 +212,7 @@ namespace Yavsc.Controllers
|
|||
HttpContext.Profile.SetPropertyValue ("Name", me.displayName);
|
||||
// TODO use image
|
||||
if (me.image != null) {
|
||||
HttpContext.Profile.SetPropertyValue ("avatar", me.image.url);
|
||||
HttpContext.Profile.SetPropertyValue ("Avatar", me.image.url);
|
||||
}
|
||||
if (me.placesLived != null) {
|
||||
People.Place pplace = me.placesLived.Where (x => x.primary).First ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue