* AccountController.cs: Fixes the canonical login

* App.master: Cleans the code

* NoLogin.master: Fixes the canonical login (broken with last master
  changes)

* style.css: yet another footer style

* UserPost.aspx: puts links in a "aside" block
vnext
Paul Schneider 9 years ago
parent ccc3b2ffff
commit 9da7064791
6 changed files with 49 additions and 21 deletions

@ -1,3 +1,16 @@
2015-06-28 Paul Schneider <paul@pschneider.fr>
* AccountController.cs: Fixes the canonical login
* App.master: Cleans the code
* NoLogin.master: Fixes the canonical login (broken with last
master changes)
* style.css: yet another footer style
* UserPost.aspx: puts links in a "aside" block
2015-06-26 Paul Schneider <paul@pschneider.fr>
* Web.csproj:

@ -51,6 +51,7 @@ namespace Yavsc.Controllers
/// <returns>The login.</returns>
/// <param name="model">Model.</param>
/// <param name="returnUrl">Return URL.</param>
[HttpPost]
public ActionResult Login (LoginModel model, string returnUrl)
{
if (ModelState.IsValid) {
@ -64,13 +65,22 @@ namespace Yavsc.Controllers
ModelState.AddModelError ("UserName", "The user name or password provided is incorrect.");
}
}
ViewData ["returnUrl"] = returnUrl;
// If we got this far, something failed, redisplay form
return View (model);
}
/// <summary>
/// Login the specified returnUrl.
/// </summary>
/// <param name="returnUrl">Return URL.</param>
[HttpGet]
public ActionResult Login (string returnUrl)
{
ViewData ["returnUrl"] = returnUrl;
return View ();
}
/// <summary>
/// Register the specified model and returnUrl.
/// </summary>

@ -1,7 +1,8 @@
<%@ Master Language="C#" Inherits="System.Web.Mvc.ViewMasterPage" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<asp:ContentPlaceHolder id="init" runat="server"></asp:ContentPlaceHolder><%
<asp:ContentPlaceHolder id="init" runat="server">
</asp:ContentPlaceHolder><%
ViewState["orgtitle"] = T.GetString(Page.Title);
Page.Title = ViewState["orgtitle"] + " - " + YavscHelpers.SiteName;
%><head runat="server">
@ -57,8 +58,7 @@ ViewState["orgtitle"] = T.GetString(Page.Title);
<% } %>
</div>
</aside>
<div style="float:right; height:5em; z-index:-1;"></div>
<footer>
<footer>
<script src="https://apis.google.com/js/platform.js" async defer>
{lang: 'fr'}
</script>
@ -83,3 +83,4 @@ $( ".bshd" ).on("click",function(e) {
</script>
</body>
</html>

@ -6,13 +6,13 @@
ViewState["orgtitle"] = T.GetString(Page.Title);
Page.Title = ViewState["orgtitle"] + " - " + YavscHelpers.SiteName;
%><head runat="server">
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" href="/Theme/style.css"/>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="/Theme/style.css" />
<link rel="icon" type="image/png" href="/favicon.png?v=2" />
<script type="text/javascript" src="<%=Url.Content("~/Scripts/jquery-2.1.3.js")%>"></script>
<asp:ContentPlaceHolder id="head" runat="server">
<script type="text/javascript" src="<%=Url.Content("~/Scripts/jquery-2.1.4.js")%>"></script>
<asp:ContentPlaceHolder id="head" runat="server">
</asp:ContentPlaceHolder>
<link href='http://fonts.googleapis.com/css?family=Dancing+Script:400,700' rel='stylesheet' type='text/css'/>
</head>
@ -41,11 +41,12 @@ ViewState["orgtitle"] = T.GetString(Page.Title);
<script src="https://apis.google.com/js/platform.js" async defer>
{lang: 'fr'}
</script>
<%= Html.ActionLink("Contact","Contact","Home",null, new { @class="footerlink" }) %> <br/>
<% foreach ( string link in Yavsc.ThanksHelper.Links()) { %>
<%= link %>
<% } %>
<div class="g-plusone" data-annotation="inline" data-width="230"></div>
<%= Html.ActionLink("Contact","Contact","Home",null, new { @class="thanks" }) %>
<% foreach ( Link link in Html.Thanks()) { %>
<a class="thanks" href="<%=link.Url%>"><% if (link.Image !=null) {
%><img src="<%= link.Image %>" alt="<%= link.Text %>"/></a><%
} else { %><a class="thanks" href="<%=link.Url%>"><%= link.Text %></a><% }} %>
<div class="g-plusone" data-annotation="inline" data-width="230"></div>
</footer>
<script type="text/javascript">
var apiBaseUrl = '<%=Url.Content(Yavsc.WebApiConfig.UrlPrefixRelative)%>';

@ -48,10 +48,12 @@ footer {
}
.thanks {
max-width: 12%;
width: 100%;
max-width: 10%;
text-align: center;
vertical-align: text-bottom;
font-size:smaller;
display:block;
bottom:0;
}

@ -49,8 +49,9 @@
<% if (Membership.GetUser()!=null)
if (Membership.GetUser().UserName==Model.UserName)
{ %>
<aside>
<%= Html.ActionLink("Editer","Edit", new { user = Model.UserName, title = Model.Title }, new { @class="actionlink" }) %>
<%= Html.ActionLink("Supprimer","RemovePost", new { user = Model.UserName, title = Model.Title }, new { @class="actionlink" } ) %>
<% } %>
</aside>
</asp:Content>

Loading…