totem custo: new routes

This commit is contained in:
Paul Schneider 2015-10-10 23:23:04 +02:00
commit c962998aaa
23 changed files with 335 additions and 167 deletions

View file

@ -28,7 +28,7 @@ table.layout TR TD { max-width:40%; }
<%= Html.ValidationMessage("WebSite", "*") %>
<br>
Avatar : <img src="<%=Html.AvatarUrl(HttpContext.Current.User.Identity.Name)%>" alt="avatar" class="iconsmall" />
Avatar : <img src="<%=Url.AvatarUrl(HttpContext.Current.User.Identity.Name)%>" alt="avatar" class="iconsmall" />
<input type="file" id="AvatarFile" name="AvatarFile"/>
<%= Html.ValidationMessage("AvatarFile", "*") %>

View file

@ -1,15 +1,12 @@
<%@ Page Title="Blogs - Index" Language="C#" Inherits="System.Web.Mvc.ViewPage<BlogEntryCollection>" MasterPageFile="~/Models/App.master" EnableTheming="True" StylesheetTheme="dark" %>
<%@ Page Title="Articles" Language="C#" Inherits="System.Web.Mvc.ViewPage<BlogEntryCollection>" MasterPageFile="~/Models/App.master" EnableTheming="True" StylesheetTheme="dark" %>
<%@ Register Assembly="Yavsc.WebControls" TagPrefix="yavsc" Namespace="Yavsc.WebControls" %>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<div>
<% foreach (var g in Model.GroupByUser()) { %>
<h2><a href="<%= Url.Content("~/Blog/"+g.Key) %>" class="actionlink userref">
<%=g.Key%></a></h2>
<% foreach (var g in Model.GroupByTitle()) { %>
<h2><%=Html.ActionLink(g.Key, "Title", "Blogs", new { id = g.Key } , new { @class="userref" } )%></h2>
<% foreach (var p in g) { %>
<div class="postpreview">
<%= Html.ActionLink(p.Title, "UserPost",
new { user = g.Key, title = p.Title }, new { @class = "usertitleref" } ) %>
<p><%= Html.Markdown(p.Intro,"/bfiles/"+p.Id+"/") %></p>
<aside>
(Posté le <%=p.Posted.ToString("D") %>)
@ -25,7 +22,8 @@
<% } %>
</div>
<form runat="server" id="form1" method="GET">
<% rp1.ResultCount = (int) ViewData["ResultCount"];
<%
rp1.ResultCount = (int) ViewData["ResultCount"];
rp1.PageSize = (int) ViewData ["PageSize"];
rp1.PageIndex = (int) ViewData["PageIndex"];
rp1.None = Html.Translate("no content");

View file

@ -0,0 +1,45 @@
<%@ Page Title="Titre" Language="C#" Inherits="System.Web.Mvc.ViewPage<UTBlogEntryCollection>" MasterPageFile="~/Models/App.master"%>
<%@ Register Assembly="Yavsc.WebControls" TagPrefix="yavsc" Namespace="Yavsc.WebControls" %>
<asp:Content ContentPlaceHolderID="init" ID="init1" runat="server">
<% Title = Model.Title + " - " + YavscHelpers.SiteName; %>
</asp:Content>
<asp:Content ContentPlaceHolderID="overHeaderOne" ID="header1" runat="server">
<h1 class="post">
<%=Html.ActionLink(Model.Title, "Title", new{id=Model.Title}, null)%>
- <a href="<%= Url.Content("~/") %>"><%= YavscHelpers.SiteName %></a>
</h1>
</asp:Content>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<% foreach (BlogEntry e in this.Model) { %>
<div class="post<% if (!e.Visible) { %> hiddenpost<% } %>" >
<% if (e.Photo!=null) { %><img src="<%=e.Photo%>" alt="" class="photo"><% } %>
<%= Html.Markdown(e.Content,"/bfiles/"+e.Id+"/") %>
<aside class="hidden">(<%= e.Posted.ToString("yyyy/MM/dd") %>
- <%= e.Modified.ToString("yyyy/MM/dd") %> <%= e.Visible? "":", Invisible!" %>)
<% if (Membership.GetUser()!=null)
if (Membership.GetUser().UserName==e.Author || Roles.IsUserInRole("Admin") )
{ %>
<%= Html.ActionLink("Editer","Edit", new { id = e.Id }, new { @class="actionlink" }) %>
<%= Html.ActionLink("Supprimer","RemovePost", new { id = e.Id }, new { @class="actionlink" } ) %>
<% } %>
</aside>
</div>
<% } %>
<aside>
<form runat="server" id="form1" method="GET">
<%
rp1.ResultCount = (int) ViewData["RecordCount"];
rp1.PageIndex = (int) ViewData["PageIndex"];
rp1.PageSize = (int) ViewData["PageSize"];
%>
<yavsc:ResultPages id="rp1" Action = "?pageIndex={0}" runat="server">
<None><i>Pas de contenu</i></None>
</yavsc:ResultPages>
</form>
</aside>
</asp:Content>

View file

@ -14,8 +14,7 @@
<h1 class="blogtitle">
<a href="<%=Url.Content("~/Blog/"+Model.Author)%>">
<%=Html.Encode(ViewData["BlogTitle"])%></a>
-
<a href="<%=Request.Url.Scheme + "://" + Request.Url.Authority%>"><%= YavscHelpers.SiteName %></a>
- <a href="<%= Url.Content("~/") %>"><%= YavscHelpers.SiteName %></a>
</h1>
</asp:Content>

View file

@ -1,7 +1,7 @@
<%@ Page Title="Home" Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Models/App.master"%>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<div>
<%= Html.ActionLink("Les blogs", "Index", "Blogs",null, new { @class="actionlink" }) %>
<%= Html.ActionLink("Les articles", "Index", "Blogs", null, new { @class="actionlink" }) %>
<%= Html.ActionLink("Contact", "Contact", "Home", null, new { @class="actionlink" }) %>
<%= Html.ActionLink("Credits", "Credits", "Home", null, new { @class="actionlink" }) %>
<%= Html.ActionLink("Version des librairies", "AssemblyInfo", "Home", null, new { @class="actionlink" }) %>