* style.css: * Gives main background a color
* lets small screens keep their font sizes * Catalog.xml: makes it a better * BlogsController.cs: Fixes the access to the Blog * App.master: fixes the quick link to the user's blog * Index.aspx: removes the table * UserPosts.aspx: Mainly links to UserPost
This commit is contained in:
parent
3355f9fed0
commit
c327395b5b
7 changed files with 65 additions and 35 deletions
|
|
@ -3,29 +3,26 @@
|
|||
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||
|
||||
<div>
|
||||
<table>
|
||||
<% foreach (var g in Model.GroupByUser()) { %>
|
||||
<tr><th><%= Html.ActionLink(g.Key, "Index",
|
||||
new { user = g.Key }, new { @class = "userref" } ) %>
|
||||
</th></tr>
|
||||
<h1><a href="<%= Url.Content("~/Blog") %>" class="actionlink userref">
|
||||
<%=g.Key%></a></h1>
|
||||
<% foreach (var p in g) { %>
|
||||
<tr>
|
||||
<td>
|
||||
<div class="blogpost">
|
||||
|
||||
|
||||
<%= Html.ActionLink(p.Title, "UserPost",
|
||||
new { user = g.Key, title = p.Title }, new { @class = "usertitleref" } ) %>
|
||||
le <%=p.Posted.ToString("D") %>
|
||||
</td>
|
||||
|
||||
<% if (Membership.GetUser()!=null)
|
||||
if ((Membership.GetUser().UserName==g.Key)
|
||||
|| (Roles.IsUserInRole ("Admin")))
|
||||
{ %><td>
|
||||
{ %><aside>
|
||||
<%= Html.ActionLink("Editer","Edit", new { id = p.Id }, new { @class="actionlink" }) %>
|
||||
<%= Html.ActionLink("Supprimer","RemovePost", new { id = p.Id }, new { @class="actionlink" } ) %>
|
||||
</td><% } %>
|
||||
</tr> <% } %>
|
||||
</aside><% } %>
|
||||
</div> <% } %>
|
||||
<% } %>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<form runat="server" id="form1" method="GET">
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<%@ Page Title="Billets utilisateurs" Language="C#" Inherits="System.Web.Mvc.ViewPage<BlogEntryCollection>" MasterPageFile="~/Models/App.master"%>
|
||||
<%@ Page Title="Blog" Language="C#" Inherits="System.Web.Mvc.ViewPage<UUBlogEntryCollection>" MasterPageFile="~/Models/App.master"%>
|
||||
<%@ Register Assembly="Yavsc.WebControls" TagPrefix="yavsc" Namespace="Yavsc.WebControls" %>
|
||||
<asp:Content ContentPlaceHolderID="init" ID="init1" runat="server">
|
||||
<% Title = (string) ViewData ["BlogTitle"]; %>
|
||||
<% Title = (string) ViewData ["BlogTitle"] ; %>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="overHeaderOne" ID="header1" runat="server">
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
<% foreach (BlogEntry e in this.Model) { %>
|
||||
<div <% if (!e.Visible) { %> style="background-color:#022;" <% } %>>
|
||||
|
||||
<h2 class="blogtitle" ><%= Html.ActionLink(e.Title,"GetPost", new { id = e.Id }) %></h2>
|
||||
<h2 class="blogtitle" ><%= Html.ActionLink(e.Title,"UserPost", new { user=e.UserName, title=e.Title, id = e.Id }) %></h2>
|
||||
<div class="metablog">(<%= e.Posted.ToString("yyyy/MM/dd") %>
|
||||
- <%= e.Modified.ToString("yyyy/MM/dd") %> <%= e.Visible? "":", Invisible!" %>)
|
||||
<% if (Membership.GetUser()!=null)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue