yavsc/web/Views/Blogs/UserPost.aspx
Paul Schneider d04a68db01 Bug & layout fixes
* Index.aspx:
* Title.aspx:
* YavscModel.csproj:
* BlogEntry.cs:
* yavsc.scrollnotif.js:
* AccountController.cs:
* BlogEntryCollection.cs: refactoring

* yavsc.tags.js: Implements a js call
to the tag & untag methods

* PostActions.ascx: a better html structure

* BasePost.cs: refactoring:
allows the "PostActions" user control to use a common base object as
  post reference

* NpgsqlBlogProvider.cs: implements the tag methods on db

* ResultPages.cs: A multi-pages result meta info when one page only

* yavsc.circles.js:
* AccountController.cs: code formatting

* BlogsController.cs: Untag a post

* style.css: yastyle, yet a better one.

* BlogsController.cs: View the Title after edition

* App.master:
* UserPosts.aspx: a nicer html structure

* yavsc.js: Fixes notice & dimiss js

* Login.aspx: refactoring

* Edit.aspx: better html

* UserPost.aspx: A promess to be allowed to tag.

* Web.csproj: Adds yavsc.tags.js and yavsc.scrollnotifs.js to the
  project decription.

* BlogManager.cs: Makes the blog manager expose of the new `UnTag`
  method

* BlogProvider.cs: introduces a method to `untag`

* FindBlogEntryFlags.cs: Find post entry by tag

* LocalizedText.resx:
* LocalizedText.Designer.cs: new translations: - "Tag"
- "Edit"

* LocalizedText.fr.resx:
* LocalizedText.fr.Designer.cs: nouvelles traductions: - "Tag"
- "Edit"

* Profile.cs: a nicer stack trace at buggy usage
2015-10-13 22:53:39 +02:00

59 lines
2.4 KiB
Text

<%@ Page Title="Billet" Language="C#" Inherits="System.Web.Mvc.ViewPage<UUTBlogEntryCollection>" MasterPageFile="~/Models/App.master"%>
<asp:Content ContentPlaceHolderID="init" ID="init1" runat="server">
<% Title = Model.Title+ " - " + ViewData ["BlogTitle"] ; %>
</asp:Content>
<asp:Content ContentPlaceHolderID="overHeaderOne" ID="header1" runat="server">
<% if (!string.IsNullOrEmpty((string)ViewData["Avatar"])) { %>
<a href="<%= Url.Action("UserPosts", new{user=Model.Author}) %>" id="avatar">
<img src="<%=ViewData["Avatar"]%>" />
</a>
<% } %>
<h1 class="blogtitle">
<a href="<%= Url.Action("UserPost", new{user=Model.Author, title = Model.Title}) %>">
<%=Model.Title%>
</a>
- <%= Html.ActionLink((string)ViewData ["BlogTitle"] ,"UserPosts",new{user=Model.Author}, null) %>
-
<a href="<%=Url.Content("~/")%>"><%= YavscHelpers.SiteName %></a>
</h1>
</asp:Content>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<% foreach (var be in Model) { %>
<div class="post">
<% if (be.Photo != null) { %>
<img src="<%=Url.Content(be.Photo)%>" alt="<%=be.Title%>" class="photo">
<% } %>
<%= Html.Markdown(be.Content,"/bfiles/"+be.Id+"/") %>
<% string username = Membership.GetUser()==null ? null : Membership.GetUser().UserName; %>
<% foreach (var c in (Comment[]) BlogManager.GetComments(be.Id)) { %>
<div class="comment" style="min-height:32px;"> <img style="clear:left;float:left;max-width:32px;max-height:32px;margin:.3em;" src="<%= Url.Content("~/Account/Avatar/"+c.From) %>" alt="<%=c.From%>"/>
<%= Html.Markdown(c.CommentText) %>
<% if (Model.Author == username || c.From == username ) { %>
<%= Html.ActionLink("Supprimer","RemoveComment", new { cmtid = c.Id } , new { @class="actionlink" })%>
<% } %>
</div><% } %>
<% if (Membership.GetUser()!=null) {
if (Membership.GetUser().UserName==be.Author)
{ %> <div class="control">
<%= Html.ActionLink("Editer","Edit", new { id = be.Id }, new { @class="actionlink" }) %>
<%= Html.ActionLink("Supprimer","RemovePost", new { id = be.Id }, new { @class="actionlink" } ) %>
<i class="fa fa-tag">Tagger</i>
</div> <% } %>
<aside class="control">
<% using (Html.BeginForm("Comment","Blogs")) { %>
<%=Html.Hidden("Author")%>
<%=Html.Hidden("Title")%>
<%=Html.TextArea("CommentText","")%>
<%=Html.Hidden("PostId",be.Id)%>
<input type="submit" value="Poster un commentaire"/>
<% } %>
</aside>
<% } %></div><% } %>
</asp:Content>