Merge from booking branch

This commit is contained in:
Paul Schneider 2015-11-17 22:22:59 +01:00
commit 9a2652739b
266 changed files with 12833 additions and 2337 deletions

View file

@ -1,14 +0,0 @@
<%@ Page Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage" %>
<asp:Content ID="initContent" ContentPlaceHolderID="init" runat="server">
</asp:Content>
<asp:Content ID="headContent" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="overHeaderOneContent" ContentPlaceHolderID="overHeaderOne" runat="server">
</asp:Content>
<asp:Content ID="headerContent" ContentPlaceHolderID="header" runat="server">
</asp:Content>
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
kjgftkgt
</asp:Content>
<asp:Content ID="MASContentContent" ContentPlaceHolderID="MASContent" runat="server">
</asp:Content>

View file

@ -12,8 +12,13 @@
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<aside>
Id:<%= Html.ActionLink( Model.Id.ToString() , "UserPost", new { user= Model.Author, title=Model.Title, id = Model.Id }, new { @class = "usertitleref actionlink" }) %>
, Posted: <%= Model.Posted.ToString("yyyy/MM/dd") %> - Modified: <%= Model.Modified.ToString("yyyy/MM/dd") %>
Visible: <%= Model.Visible? "oui":"non" %> <%= Html.ActionLink("Supprimer","RemovePost", new { user=Model.Author, title = Model.Title, id = Model.Id }, new { @class="actionlink" } ) %>
</aside>
<% using(Html.BeginForm("ValidateEdit","Blogs")) { %>
<% using(Html.BeginForm("Edit","Blogs")) { %>
<fieldset>
<legend>Contrôle d'accès au Billet</legend>
<%= Html.LabelFor(model => model.Visible) %> : <%= Html.CheckBox( "Visible" ) %>
@ -234,10 +239,5 @@ var data = new FormData($('#frmajax').get()[0]);
<aside>
Id:<%= Html.ActionLink( Model.Id.ToString() , "UserPost", new { user= Model.Author, title=Model.Title, id = Model.Id }, new { @class = "usertitleref actionlink" }) %>
, Posted: <%= Model.Posted.ToString("yyyy/MM/dd") %> - Modified: <%= Model.Modified.ToString("yyyy/MM/dd") %>
Visible: <%= Model.Visible? "oui":"non" %> <%= Html.ActionLink("Supprimer","RemovePost", new { user=Model.Author, title = Model.Title, id = Model.Id }, new { @class="actionlink" } ) %>
</aside>
</asp:Content>

View file

@ -8,6 +8,9 @@
<h2><a href="<%= Url.RouteUrl("Titles", new { title = g.Key }) %>" class="usertitleref"><%=Html.Encode(g.Key)%></a></h2>
<% foreach (var p in g) { %>
<div class="postpreview">
<% if (p.Photo != null ) { %>
<img src="<%=p.Photo%>" alt="<%=p.Photo%>" class="photo">
<% } %>
<p><%= Html.Markdown(p.Intro,"/bfiles/"+p.Id+"/") %></p>
<%= Html.Partial("PostActions",p)%>
</div> <% } %>

View file

@ -1,4 +0,0 @@
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<BlogEntryCollection>" MasterPageFile="~/Models/App.master"%>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
Ce contenu est d'accès restreint : &lt;<%= Html.Encode(ViewData["BlogUser"]) %>/<%= Html.Encode(ViewData["PostTitle"]) %>&gt;
</asp:Content>

View file

@ -1,11 +1,14 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BasePost>" %>
<aside>
<% if (Membership.GetUser()!=null) { %>
<aside>
(<%= Model.Posted.ToString("D") %>
- <%= Model.Modified.ToString("D") %> <%= Model.Visible? "":", Invisible!" %>)
<% if (Membership.GetUser()!=null) {
<%= Html.Partial("RateControl",Model)%>
<%
if (Membership.GetUser().UserName==Model.Author || Roles.IsUserInRole("Admin"))
{ %>
<% if (Model is BlogEntry) { %><%= Html.Partial("TagControl",Model)%>
<%= Html.Partial("TagControl",Model)%>
<% if (Model is BlogEntry) { %>
<i class="fa fa-pencil"><%=Html.Translate("DoComment")%></i>
<aside class="control" class="hidden">
<% using (Html.BeginForm("Comment","Blogs")) { %>
@ -17,10 +20,11 @@
<% } %>
</aside>
<% } %>
<a href="<%= Url.RouteUrl("Default", new { action = "Edit", postid = Model.Id })%>" class="actionlink">
<a href="<%= Url.RouteUrl("Default", new { action = "EditId", postid = Model.Id })%>" class="actionlink">
<i class="fa fa-pencil"><%=Html.Translate("Edit")%></i>
</a>
<a href="<%= Url.RouteUrl("Default", new { action = "RemovePost", postid = Model.Id })%>" class="actionlink">
<i class="fa fa-remove"><%=Html.Translate("Remove")%></i></a>
<% }} %>
<% } %>
</aside>
<% } %>

View file

@ -1,4 +1,4 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BlogEntry>" %>
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BasePost>" %>
<p id="tags<%=Model.Id%>" data-postid="<%=Model.Id%>" class="fa fa-tag">
<% if (Model.Tags != null) {
foreach ( var tagname in Model.Tags) { %>
@ -8,6 +8,7 @@ foreach ( var tagname in Model.Tags) { %>
<% if (Membership.GetUser()!=null) { %>
<% if (Membership.GetUser().UserName==Model.Author || Roles.IsUserInRole("Admin"))
{ // grant all permissions: to choose a given set of tags, also create some new tags %>
<span id="viewtagger<%=Model.Id%>">
<i class="fa fa-tag menuitem" id="viewtaggerbtn<%=Model.Id%>"><%=Html.Translate("DoTag")%></i></span>
<span id="hidetagger<%=Model.Id%>" class="hidden">

View file

@ -1,12 +1,14 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<TagInfo>" %>
<h2><%=Html.Encode(Model.Name)%></h2>
<% foreach (var g in Model.Titles) { %>
<div class="panel">
<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>
<h3><%= Html.Markdown(g.Key)%></h3>
<% foreach (var p in g) { %>
<a href="<%= Url.RouteUrl("Titles", new { title = g.Key, postid = p.Id }) %>">
<% if (p.Photo != null) { %> <img src="<%=p.Photo%>" alt="placard" class="photo"> <% } %>
<div class="postpreview">
<p><%= Html.Markdown(t.Intro,"/bfiles/"+t.Id+"/") %></p>
</div>
<p><%= Html.Markdown(p.Intro,"/bfiles/"+p.Id+"/") %></p>
</div> </a>
<% } %>
</div>
</div>
<% } %>

View file

@ -12,16 +12,9 @@
</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+"/") %>
<%= Html.Partial("PostActions",e)%>
</div>
<% } %>
<%
if (((int) ViewData["RecordCount"]) > ((int) ViewData["PageSize"])) {
rp1.ResultCount = (int) ViewData["RecordCount"];
if (((int) ViewData["ResultCount"]) > ((int) ViewData["PageSize"])) {
rp1.ResultCount = (int) ViewData["ResultCount"];
rp1.PageIndex = (int) ViewData["PageIndex"];
rp1.PageSize = (int) ViewData["PageSize"];
%><aside><form runat="server" id="form1">
@ -31,4 +24,11 @@ if (((int) ViewData["RecordCount"]) > ((int) ViewData["PageSize"])) {
</form>
</aside>
<% } %>
<% 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+"/") %>
<%= Html.Partial("PostActions",e)%>
</div>
<% } %>
</asp:Content>

View file

@ -19,30 +19,18 @@
</asp:Content>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<% foreach (BlogEntry e in this.Model) { %>
<div class="postpreview<% if (!e.Visible) { %> hiddenpost<% } %>" >
<h2><a href="<%= Url.RouteUrl("BlogByTitle", new { user=e.Author, title=e.Title, postid = e.Id })%>" class="usertitleref">
<%=Html.Markdown(e.Title)%></a></h2>
<% bool truncated = false; %>
<%= 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>
<% } %>
<%= Html.Partial("PostActions",e)%>
</div>
<% } %>
<aside>
<form runat="server" id="form1" method="GET">
<%
rp1.ResultCount = (int) ViewData["RecordCount"];
rp1.PageIndex = (int) ViewData["PageIndex"];
%>
<yavsc:ResultPages id="rp1" Action = "?pageIndex={0}" runat="server">
<None><i>Pas de contenu</i></None>
</yavsc:ResultPages>
</form>
</aside>
<% foreach (var g in Model.GroupByTitle()) { %>
<div class="panel">
<h2><a href="<%= Url.RouteUrl("Titles", new { title = g.Key }) %>" class="usertitleref"><%=Html.Encode(g.Key)%></a></h2>
<% foreach (var p in g) { %>
<div class="postpreview">
<% if (p.Photo!=null) { %>
<img src="<%=p.Photo%>" alt="photo" class="photo"><% } %>
<%= Html.Markdown(p.Intro,"/bfiles/"+p.Id+"/") %>
<%= Html.Partial("PostActions",p)%>
</div> <% } %>
</div>
<% } %>
<%= Html.RenderPageLinks((int)ViewData["PageIndex"],(int)ViewData["PageSize"],(int)ViewData["ResultCount"])%>
</asp:Content>