* totem-banner.png:
* totem-banner.xs.jpg:
* totem-banner.xxs.jpg: totem custo

* Makefile: reloads config after each rsync call

* NpgsqlBlogProvider.cs: - Fixes access on bills
- Fixes usage of bill without photo

* style.css: yastyle

* AccountController.cs: - Fixes route usage with n ovalue for `id`
- better code at getting the avatar url

* BlogsController.cs: Fixes a Post request without user name in the
  route

* YavscHelpers.cs: Implements a file list html rendering

* App.master:
* UserPost.aspx:
* Profile.aspx:
* AssemblyInfo.aspx: yahtmlstructure

* Edit.aspx: Displays a list a attached files

* UserPosts.aspx: yahtmlstrucure

* Web.csproj: new images

* instdbws.sql: returns to the flat list of properies (groups are not
  working)

* LocalizedText.resx:
* LocalizedText.fr.resx:
* LocalizedText.Designer.cs:
* LocalizedText.fr.Designer.cs: a new translation
This commit is contained in:
Paul Schneider 2015-10-09 16:31:04 +02:00
commit 30cebd7751
25 changed files with 349 additions and 165 deletions

View file

@ -290,6 +290,8 @@ namespace Yavsc.Controllers
// ASSERT("Membership.GetUser ().UserName is made of simple characters, no slash nor backslash"
string logdu = Membership.GetUser ().UserName;
if (string.IsNullOrWhiteSpace (id))
id = logdu;
ViewData ["UserName"] = id;
bool editsMyName = (string.Compare(id,logdu)==0);
if (!editsMyName)
@ -297,15 +299,17 @@ namespace Yavsc.Controllers
if (!Roles.IsUserInRole ("FrontOffice"))
throw new UnauthorizedAccessException ("Your are not authorized to modify this profile");
if (AvatarFile != null) {
// if said valid, move as avatar file
// else invalidate the model
if (AvatarFile.ContentType == "image/png") {
string avdir = Server.MapPath (AvatarDir);
var di = new DirectoryInfo (avdir);
if (!di.Exists)
di.Create ();
string avpath = Path.Combine (avdir, id + ".png");
AvatarFile.SaveAs (avpath);
model.avatar = Request.Url.Scheme + "://" + Request.Url.Authority + AvatarDir.Substring (1) + "/" + id + ".png";
model.avatar = Url.Content( AvatarDir + "/" + id + ".png");
} else
ModelState.AddModelError ("Avatar",
string.Format ("Image type {0} is not supported (suported formats : {1})",
@ -323,7 +327,9 @@ namespace Yavsc.Controllers
if (AvatarFile != null) {
prf.SetPropertyValue ("Avatar", model.avatar);
} else {
model.avatar = (string) prf.GetPropertyValue ("Avatar");
var av = prf.GetPropertyValue ("Avatar");
if (av != null)
model.avatar = av as string;
}
prf.SetPropertyValue ("Address", model.Address);
prf.SetPropertyValue ("CityAndState", model.CityAndState);