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
This commit is contained in:
Paul Schneider
2015-10-13 22:53:39 +02:00
parent c962998aaa
commit d04a68db01
41 changed files with 896 additions and 272 deletions

View File

@ -20,7 +20,7 @@
<input type="submit"/>
<% } %></div>
<div class="panel">
<%= Html.ActionLink("S'enregistrer","RegisterForm",new {returnUrl=ViewData["returnUrl"]}, new { @class="actionlink" }) %>
<%= Html.ActionLink("S'enregistrer","GetRegister",new {returnUrl=ViewData["returnUrl"]}, new { @class="actionlink" }) %>
</div>
<div class="panel">
<a href="<%=Request.Url.Scheme + "://" + Request.Url.Authority + "/Google/Login"%>?returnUrl=<%=ViewData["returnUrl"]==null?Request.Url.PathAndQuery:(string)ViewData["returnUrl"]%>" class="actionlink">

View File

@ -197,7 +197,7 @@ var data = new FormData($('#frmajax').get()[0]);
</script>
<form id="frmajax">
<fieldset>
<legend>Fichiers attachés</legend>
<legend>Attacher des fichiers</legend>
<input type="file" name="attached" id="postedfile" multiple>
<input type="button" value="attacher les ficher" onclick="submitFile()">
<input type="button" value="importer les documents" onclick="submitImport()">
@ -214,6 +214,11 @@ var data = new FormData($('#frmajax').get()[0]);
<%= Html.ListBox("AllowedCircles") %>
<%= Html.ValidationMessage("AllowedCircles", "*") %>
</fieldset>
<span id="viewsource">
<i class="fa fa-code menuitem"><%=Html.Translate("View_source")%></i></span>
<span id="hidesource" class="hidden">
<i class="fa fa-code menuitem"><%=Html.Translate("Hide_source")%></i>
</span>
<fieldset id="source" class="hidden">
<%=Html.Hidden("Author")%>
<%=Html.Hidden("Id")%>
@ -226,14 +231,10 @@ var data = new FormData($('#frmajax').get()[0]);
<%=Html.TextArea("Content")%>
<%=Html.ValidationMessage("Content")%>
</fieldset>
<i class="af af-check actionlink"><input type="submit" id="validate" value="Valider"></i>
<input type="submit" id="validate" value="Valider" class="fa fa-check menuitem">
<% } %>
<span id="viewsource" class="actionlink">
<i class="fa fa-code">View Source</i></span>
<span id="hidesource" class="actionlink hidden">
<i class="fa fa-code">Hide Source</i>
</span>
<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") %>

View File

@ -8,16 +8,7 @@
<% foreach (var p in g) { %>
<div class="postpreview">
<p><%= Html.Markdown(p.Intro,"/bfiles/"+p.Id+"/") %></p>
<aside>
(Posté le <%=p.Posted.ToString("D") %>)
<% if (Membership.GetUser()!=null)
if ((Membership.GetUser().UserName==g.Key)
|| (Roles.IsUserInRole ("Admin")))
{ %>
<%= Html.ActionLink("Editer","Edit", new { id = p.Id }, new { @class="actionlink" }) %>
<%= Html.ActionLink("Supprimer","RemovePost", new { id = p.Id }, new { @class="actionlink" } ) %>
<% } %> </aside>
<%= Html.Partial("PostActions",p)%>
</div> <% } %>
<% } %>
</div>

View File

@ -0,0 +1,15 @@
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BasePost>" %>
<aside>
(<%= Model.Posted.ToString("yyyy/MM/dd") %>
- <%= Model.Modified.ToString("yyyy/MM/dd") %> <%= Model.Visible? "":", Invisible!" %>)
<% if (Membership.GetUser()!=null) {
if (Membership.GetUser().UserName==Model.Author || Roles.IsUserInRole("Admin"))
{ %>
<i class="fa fa-tag"><%=Html.Translate("DoTag")%></i>
<a href="<%= Url.RouteUrl("Default", new { action = "Edit", controller = "Blogs", id = Model.Id })%>" class="actionlink">
<i class="fa fa-pencil"><%=Html.Translate("Edit")%></i>
</a>
<a href="<%= Url.RouteUrl("Default", new { action = "RemovePost", controller = "Blogs", id = Model.Id })%>" class="actionlink">
<i class="fa fa-remove"><%=Html.Translate("Remove")%></i></a>
<% }} %>
</aside>

View File

@ -16,30 +16,19 @@
<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>
<%= Html.Partial("PostActions",e)%>
</div>
<% } %>
<aside>
<form runat="server" id="form1" method="GET">
<%
if (((int) ViewData["RecordCount"]) > ((int) ViewData["PageSize"])) {
rp1.ResultCount = (int) ViewData["RecordCount"];
rp1.PageIndex = (int) ViewData["PageIndex"];
rp1.PageSize = (int) ViewData["PageSize"];
%>
%><aside><form runat="server" id="form1">
<yavsc:ResultPages id="rp1" Action = "?pageIndex={0}" runat="server">
<None><i>Pas de contenu</i></None>
</yavsc:ResultPages>
</form>
</aside>
<% } %>
</asp:Content>

View File

@ -35,14 +35,15 @@
<% 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">

View File

@ -25,19 +25,10 @@
<% bool truncated = false; %>
<%= Html.MarkdownToHtmlIntro(out truncated, e.Content,"/bfiles/"+e.Id+"/") %>
<% if (truncated) { %>
<i><%= Html.ActionLink( "lire la suite" ,"UserPost", new { user=e.Author, title=e.Title, id = e.Id }, new { @class = "usertitleref" }) %></i>
<a href="<%= Url.RouteUrl( "View", new { action="Title", title=e.Title}) %>">
<i>Html.Translate("ReadMore")</i></a>
<% } %>
<aside>(<%= 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)
{ %>
<%= Html.ActionLink("Editer","Edit", new { id = e.Id }, new { @class="actionlink" }) %>
<%= Html.ActionLink("Supprimer","RemovePost", new { id = e.Id }, new { @class="actionlink" } ) %>
<% } %>
</aside>
<%= Html.Partial("PostActions",e)%>
</div>
<% } %>
<aside>