diff --git a/web/App_Themes/style.css b/web/App_Themes/style.css index 2b885508..fa073845 100644 --- a/web/App_Themes/style.css +++ b/web/App_Themes/style.css @@ -17,10 +17,12 @@ input, textarea, checkbox { header { border-radius:10px; margin: .5em; - padding: .5em; + padding: 3em; + padding-top: 5em; display: block; - background: url("/images/helix-nebula-1400x1400.s.jpg") 50% 0 repeat fixed; - min-height: 25em; + background: url("/images/totemprod.png") 50% 0 no-repeat fixed; + min-height: 10em; + text-align: center; } nav { @@ -28,8 +30,8 @@ nav { margin: .5em; padding: .5em; display: block; - background: url("/images/live-concert-388160_1280.s.jpg") 50% 0 repeat fixed ; - min-height: 25em; + background: url("/images/live-concert-388160_1280.s.jpg") 50% 10em repeat fixed ; + min-height: 10em; } main { @@ -37,22 +39,26 @@ main { margin: .5em; padding: .5em; display: block; - background: url("/images/musician-923526_1280.s.jpg") 50% 0 repeat fixed ; - min-height: 25em; + background: url("/images/musician-923526_1280.s.jpg") 50% 20em repeat fixed ; + min-height: 10em; } footer { border-radius:10px; - margin: .5em; - padding: .5em; + margin: 1em; + padding: 1em; display: block; - background: url("/images/drummer-652345_1280.s.jpg") 50% 0 repeat fixed ; - min-height: 25em; + background: url("/images/drummer-652345_1280.s.jpg") 50% 30em repeat fixed ; + min-height: 10em; clear: both; display: flex; font-size: smaller; + justify-content: center; } +#copyr { text-align: center; } +footer p { background-color: rgba(20,20,20,.5); } + fieldset { background-color: rgba(32,16,16,0.8); border-radius:5px; border: solid 1px #000060; @@ -248,7 +254,6 @@ a.actionlink img { top:4px; } .c2 { font-size: small; font-style: italic; } .c3 { font-size: x-small; font-style: italic; } - @media print { body {background-color:white;color:black;} header,footer,.postcomment,.actionlink,nav diff --git a/web/ChangeLog b/web/ChangeLog index 9a416b43..89ae0c70 100644 --- a/web/ChangeLog +++ b/web/ChangeLog @@ -1,3 +1,27 @@ +2015-10-01 Paul Schneider + + * Web.config: + * YavscHelpers.cs: + * GoogleController.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 + 2015-10-01 Paul Schneider * UserPost.aspx: Fixes the anonymous access ! diff --git a/web/Controllers/AccountController.cs b/web/Controllers/AccountController.cs index 3de7da21..cf588c3a 100644 --- a/web/Controllers/AccountController.cs +++ b/web/Controllers/AccountController.cs @@ -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); } diff --git a/web/Controllers/GoogleController.cs b/web/Controllers/GoogleController.cs index ef84deb5..aa3b33a5 100644 --- a/web/Controllers/GoogleController.cs +++ b/web/Controllers/GoogleController.cs @@ -118,7 +118,7 @@ namespace Yavsc.Controllers /// /// Gat. 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 (); diff --git a/web/Helpers/Google/OAuth2.cs b/web/Helpers/Google/OAuth2.cs index 40d4d1e4..559b7d2d 100644 --- a/web/Helpers/Google/OAuth2.cs +++ b/web/Helpers/Google/OAuth2.cs @@ -243,7 +243,7 @@ namespace Yavsc.Helpers.Google } pr.SetPropertyValue ("gtoken", token); pr.Save (); - // ASSERT gat.token_type == pr.GetPropertyValue("token_type") + // ASSERT gat.token_type == pr.GetPropertyValue("gtokentype") } return token_type + " " + token; } diff --git a/web/Helpers/YavscHelpers.cs b/web/Helpers/YavscHelpers.cs index faa356ff..d504ad86 100644 --- a/web/Helpers/YavscHelpers.cs +++ b/web/Helpers/YavscHelpers.cs @@ -163,10 +163,15 @@ namespace Yavsc.Helpers foreach (MembershipUser u in users) YavscHelpers.SendActivationMessage (u); } - + /// + /// Avatars the URL. + /// + /// The URL. + /// Helper. + /// Username. public static string AvatarUrl (this HtmlHelper helper, string username) { ProfileBase pr = ProfileBase.Create (username); - string avpath = (string ) pr.GetPropertyValue("avatar") ; + var avpath = pr.GetPropertyValue("Avatar") ; if (avpath != null) return helper.Encode (avpath); return "/avatars/" + helper.Encode(username)+".png"; diff --git a/web/Models/App.master b/web/Models/App.master index 9aa43b44..8c84d34a 100644 --- a/web/Models/App.master +++ b/web/Models/App.master @@ -17,14 +17,55 @@
+<% #else %> +

(Version de développement, G+1 desactivé)

<% #endif %> + diff --git a/web/Views/Account/Profile.aspx b/web/Views/Account/Profile.aspx index f04f9791..33f2d8ea 100644 --- a/web/Views/Account/Profile.aspx +++ b/web/Views/Account/Profile.aspx @@ -28,7 +28,8 @@ table.layout TR TD { max-width:40%; } <%= Html.ValidationMessage("WebSite", "*") %>
-Avatar : +Avatar : avatar + <%= Html.ValidationMessage("AvatarFile", "*") %> diff --git a/web/Web.config b/web/Web.config index a44a2544..e35251c4 100644 --- a/web/Web.config +++ b/web/Web.config @@ -120,36 +120,31 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx - + - - - - - - + + + + - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - @@ -260,15 +255,15 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx - + - - + + diff --git a/web/Web.csproj b/web/Web.csproj index 80ba679b..97fca1d3 100644 --- a/web/Web.csproj +++ b/web/Web.csproj @@ -377,7 +377,6 @@ - @@ -387,6 +386,10 @@ + + + + diff --git a/web/instdbws.sql b/web/instdbws.sql index 60ff98df..176da1ad 100644 --- a/web/instdbws.sql +++ b/web/instdbws.sql @@ -129,12 +129,9 @@ CREATE TABLE profiledata WITH ( OIDS=FALSE ); -ALTER TABLE profiledata - OWNER TO yavscdev; COMMENT ON COLUMN profiledata."address.address" IS 'Postal address'; COMMENT ON COLUMN profiledata.blogtitle IS 'Blog Title'; COMMENT ON COLUMN profiledata.avatar IS 'url for an avatar'; -COMMENT ON COLUMN profiledata.hasavatar IS 'True when user has specified an image for avatar'; COMMENT ON COLUMN profiledata."bank.accountnumber" IS 'Numero de compte'; COMMENT ON COLUMN profiledata."bank.key" IS 'clé RIB'; COMMENT ON COLUMN profiledata."bank.code" IS 'Code banque'; @@ -183,23 +180,20 @@ WITH ( OIDS=FALSE ); - -- Table: blfiles + CREATE TABLE blfiles ( _id bigserial NOT NULL, -- Identifier name character varying(2048), -- File Name, relative to the user home directory, must not begin with a slash. - blid bigint, -- Blog entry identifier (foreign key) - CONSTRAINT blfiles_pkey PRIMARY KEY (_id), - CONSTRAINT blfiles_blid_fkey FOREIGN KEY (blid) - REFERENCES blog (_id) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE CASCADE + alt_text character varying(512), + CONSTRAINT bltags_pkey PRIMARY KEY (_id) ) WITH ( OIDS=FALSE ); COMMENT ON COLUMN blfiles._id IS 'Identifier'; COMMENT ON COLUMN blfiles.name IS 'File Name, relative to the user home directory, must not begin with a slash.'; -COMMENT ON COLUMN blfiles.blid IS 'Blog entry identifier (foreign key)'; + -- Table: commandes @@ -259,7 +253,7 @@ CREATE TABLE comment CONSTRAINT comment_pkey PRIMARY KEY (_id), CONSTRAINT fkey_blog FOREIGN KEY (postid) REFERENCES blog (_id) MATCH SIMPLE - ON UPDATE CASCADE ON DELETE , + ON UPDATE CASCADE ON DELETE CASCADE, CONSTRAINT fkey_users FOREIGN KEY (username, applicationname) REFERENCES users (username, applicationname) MATCH SIMPLE ON UPDATE CASCADE ON DELETE CASCADE @@ -670,8 +664,7 @@ CREATE TABLE circle WITH ( OIDS=FALSE ); -ALTER TABLE circle - OWNER TO yavscdev; + COMMENT ON COLUMN circle._id IS 'Circle identifier'; COMMENT ON COLUMN circle.owner IS 'creator of this circle'; COMMENT ON COLUMN circle.applicationname IS 'Application name'; diff --git a/yavscModel/ChangeLog b/yavscModel/ChangeLog index a6134a6b..c459a9b4 100644 --- a/yavscModel/ChangeLog +++ b/yavscModel/ChangeLog @@ -1,3 +1,7 @@ +2015-10-01 Paul Schneider + + * Profile.cs: refactoring + 2015-09-30 Paul Schneider * Profile.cs: Groups profile properties diff --git a/yavscModel/RolesAndMembers/Profile.cs b/yavscModel/RolesAndMembers/Profile.cs index 88b0f9b0..f907ffb2 100644 --- a/yavscModel/RolesAndMembers/Profile.cs +++ b/yavscModel/RolesAndMembers/Profile.cs @@ -243,21 +243,20 @@ namespace Yavsc.Model.RolesAndMembers object s = profile.GetPropertyValue ("BlogTitle"); BlogTitle = (s is DBNull) ? null : (string)s; - s = profile.GetPropertyValue ("avatar"); + s = profile.GetPropertyValue ("Avatar"); avatar = (s is DBNull) ? null : (string)s; - var address = profile.GetProfileGroup ("address"); - s = address.GetPropertyValue ("address"); + s = profile.GetPropertyValue ("Address"); Address = (s is DBNull) ? null : (string)s; - s = address.GetPropertyValue ("cityandstate"); + s = profile.GetPropertyValue ("CityAndState"); CityAndState = (s is DBNull) ? null : (string)s; - s = address.GetPropertyValue ("country"); + s = profile.GetPropertyValue ("Country"); Country = (s is DBNull) ? null : (string)s; - s = address.GetPropertyValue ("zipcode"); + s = profile.GetPropertyValue ("ZipCode"); ZipCode = (s is DBNull) ? null : (string)s; s = profile.GetPropertyValue ("WebSite"); @@ -274,28 +273,26 @@ namespace Yavsc.Model.RolesAndMembers userName = profile.UserName; - var bank = profile.GetProfileGroup ("bank"); - s = bank.GetPropertyValue ("Code"); + s = profile.GetPropertyValue ("BankCode"); BankCode = (s is DBNull) ? null : (string)s; - s = bank.GetPropertyValue ("IBAN"); + s = profile.GetPropertyValue ("IBAN"); IBAN = (s is DBNull) ? null : (string)s; - s = bank.GetPropertyValue ("BIC"); + s = profile.GetPropertyValue ("BIC"); BIC = (s is DBNull) ? null : (string)s; - s = bank.GetPropertyValue ("WicketCode"); + s = profile.GetPropertyValue ("WicketCode"); WicketCode = (s is DBNull) ? null : (string)s; - s = bank.GetPropertyValue ("AccountNumber"); + s = profile.GetPropertyValue ("AccountNumber"); this.AccountNumber = (s is DBNull) ? null : (string)s; - s = bank.GetPropertyValue ("Key"); + s = profile.GetPropertyValue ("BankedKey"); BankedKey = (s == null) ? 0 : (s is DBNull)? 0 : (int)s; - var google = profile.GetProfileGroup ("google"); - s = google.GetPropertyValue ("calid"); + s = profile.GetPropertyValue ("gcalid"); GoogleCalendar = (s is DBNull)? null : (string) s; } }