Fixes the latest merge
This commit is contained in:
parent
2963e2c4a0
commit
d8a5ebd526
11 changed files with 72 additions and 64 deletions
|
|
@ -5,7 +5,18 @@
|
|||
<% if (Membership.GetUser()!=null) {
|
||||
if (Membership.GetUser().UserName==Model.Author || Roles.IsUserInRole("Admin"))
|
||||
{ %>
|
||||
<% if (Model is BlogEntry) { %><%= Html.Partial("TagControl",Model)%><% } %>
|
||||
<% if (Model is BlogEntry) { %><%= Html.Partial("TagControl",Model)%>
|
||||
<i class="fa fa-pencil"><%=Html.Translate("DoComment")%></i>
|
||||
<aside class="control" class="hidden">
|
||||
<% using (Html.BeginForm("Comment","Blogs")) { %>
|
||||
<%=Html.Hidden("Author")%>
|
||||
<%=Html.Hidden("Title")%>
|
||||
<%=Html.TextArea("CommentText","")%>
|
||||
<%=Html.Hidden("PostId",Model.Id)%>
|
||||
<input type="submit" value="Poster un commentaire"/>
|
||||
<% } %>
|
||||
</aside>
|
||||
<% } %>
|
||||
<a href="<%= Url.RouteUrl("Default", new { action = "Edit", postid = Model.Id })%>" class="actionlink">
|
||||
<i class="fa fa-pencil"><%=Html.Translate("Edit")%></i>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<TagInfo>" %>
|
||||
<div class="panel">
|
||||
<i class="fa fa-tag"><%=Model.Name%></i>
|
||||
<ul>
|
||||
<% foreach (BasePostInfo be in Model.Titles) { %>
|
||||
<li><%= be.Title %>
|
||||
<span><%= be.Intro %></span>
|
||||
</li>
|
||||
<% } %></ul>
|
||||
<i class="fa fa-tag"><%=Html.Encode(Model.Name)%></i>
|
||||
<% foreach (var t in Model.Titles) { %>
|
||||
<a href="<%= Url.RouteUrl("Titles", new { title = t.Title }) %>">
|
||||
<img src="<%=Url.Encode(t.Photo)%>" alt="placard" class="photo">
|
||||
<%= Html.Markdown(t.Title,"/bfiles/"+t.Id+"/")%></a>
|
||||
<div class="postpreview">
|
||||
<p><%= Html.Markdown(t.Intro,"/bfiles/"+t.Id+"/") %></p>
|
||||
</div>
|
||||
<% } %>
|
||||
</div>
|
||||
|
|
@ -27,32 +27,15 @@
|
|||
<% } %>
|
||||
|
||||
<%= Html.Markdown(be.Content,"/bfiles/"+be.Id+"/") %>
|
||||
|
||||
<%= Html.Partial("PostActions",be)%>
|
||||
<% 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.RouteUrl("Blogs", new { user = c.From } ) %>" alt="<%=c.From%>"/>
|
||||
<img class="avatar" src="<%= Url.RouteUrl("Default", new { action="Avatar", controller="Account", user = 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><% } %>
|
||||
</div><% } %>
|
||||
</asp:Content>
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
<%= Html.MarkdownToHtmlIntro(out truncated, e.Content,"/bfiles/"+e.Id+"/") %>
|
||||
<% if (truncated) { %>
|
||||
<a href="<%= Url.RouteUrl( "BlogByTitle", new { user=e.Author , title=e.Title, postid = e.Id}) %>">
|
||||
<i>Html.Translate("ReadMore")</i></a>
|
||||
<i><%=Html.Translate("ReadMore")%></i></a>
|
||||
<% } %>
|
||||
<%= Html.Partial("PostActions",e)%>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue