* totem-banner.png:
* totem-banner.xs.jpg:
* totem-banner.xxs.jpg: totem custo

* Makefile: reloads config after each rsync call

* NpgsqlBlogProvider.cs: - Fixes access on bills
- Fixes usage of bill without photo

* style.css: yastyle

* AccountController.cs: - Fixes route usage with n ovalue for `id`
- better code at getting the avatar url

* BlogsController.cs: Fixes a Post request without user name in the
  route

* YavscHelpers.cs: Implements a file list html rendering

* App.master:
* UserPost.aspx:
* Profile.aspx:
* AssemblyInfo.aspx: yahtmlstructure

* Edit.aspx: Displays a list a attached files

* UserPosts.aspx: yahtmlstrucure

* Web.csproj: new images

* instdbws.sql: returns to the flat list of properies (groups are not
  working)

* LocalizedText.resx:
* LocalizedText.fr.resx:
* LocalizedText.Designer.cs:
* LocalizedText.fr.Designer.cs: a new translation
This commit is contained in:
Paul Schneider 2015-10-09 16:31:04 +02:00
commit 30cebd7751
25 changed files with 349 additions and 165 deletions

View file

@ -1,7 +1,7 @@
<%@ Page Title="Profile" Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage<Profile>" %>
<%@ Page Title="Profile_edition" Language="C#" MasterPageFile="~/Models/App.master" Inherits="System.Web.Mvc.ViewPage<Profile>" %>
<asp:Content ContentPlaceHolderID="init" ID="init1" runat="server">
<% Title = ViewData["UserName"]+" at "+ YavscHelpers.SiteName +" - profile edition" ; %>
<% Title = ViewData["UserName"] + " : " +Html.Translate("Profile_edition"); %>
</asp:Content>
<asp:Content ID="MainContentContent" ContentPlaceHolderID="MainContent" runat="server">
@ -36,77 +36,81 @@ Avatar : <img src="<%=Html.AvatarUrl(HttpContext.Current.User.Identity.Name)%>"
</fieldset>
<fieldset><legend>Blog</legend>
<div class="spanel">
<%= Html.LabelFor(model => model.BlogVisible) %> :
<%= Html.CheckBox("BlogVisible") %>
<%= Html.ValidationMessage("BlogVisible", "*") %>
<br>
</div><div class="spanel">
<%= Html.LabelFor(model => model.BlogTitle) %> :
<%= Html.TextBox("BlogTitle") %>
<%= Html.ValidationMessage("BlogTitle", "*") %>
</div>
</fieldset>
<fieldset><legend>Contact</legend>
<div class="spanel">
<%= Html.LabelFor(model => model.Phone) %>
<%= Html.TextBox("Phone") %>
<%= Html.ValidationMessage("Phone", "*") %>
</div><div class="spanel">
<%= Html.LabelFor(model => model.Mobile) %>
<%= Html.TextBox("Mobile") %>
<%= Html.ValidationMessage("Mobile", "*") %>
</div><div class="spanel">
<%= Html.LabelFor(model => model.Address) %>
<%= Html.TextBox("Address") %>
<%= Html.ValidationMessage("Address", "*") %>
</div><div class="spanel">
<%= Html.LabelFor(model => model.CityAndState) %>
<%= Html.TextBox("CityAndState") %>
<%= Html.ValidationMessage("CityAndState", "*") %>
</div><div class="spanel">
<%= Html.LabelFor(model => model.ZipCode) %>
<%= Html.TextBox("ZipCode") %>
<%= Html.ValidationMessage("ZipCode", "*") %>
</div><div class="spanel">
<%= Html.LabelFor(model => model.Country) %>
<%= Html.TextBox("Country") %>
<%= Html.ValidationMessage("Country", "*") %>
</div>
</fieldset>
<fieldset><legend>Disponibilité</legend>
<div class="spanel">
<%= Html.LabelFor(model => model.GoogleCalendar) %> :
<%= Html.Encode(Model.GoogleCalendar) %>
<%= Html.ActionLink("Choisir l'agenda","ChooseCalendar","Google",new { returnUrl= Request.Url.AbsolutePath }, new { @class="actionlink" }) %>
</fieldset>
</div></fieldset>
<fieldset><legend>Informations de facturation</legend>
<div class="spanel">
<%= Html.LabelFor(model => model.BankCode) %> :
<%= Html.TextBox("BankCode") %>
<%= Html.ValidationMessage("BankCode", "*") %>
<br>
</div><div class="spanel">
<%= Html.LabelFor(model => model.WicketCode) %> :
<%= Html.TextBox("WicketCode") %>
<%= Html.ValidationMessage("WicketCode", "*") %>
<br>
</div><div class="spanel">
<%= Html.LabelFor(model => model.AccountNumber) %> :
<%= Html.TextBox("AccountNumber") %>
<%= Html.ValidationMessage("AccountNumber", "*") %>
<br>
</div><div class="spanel">
<%= Html.LabelFor(model => model.BankedKey) %> :
<%= Html.TextBox("BankedKey") %>
<%= Html.ValidationMessage("BankedKey", "*") %>
<br>
</div><div class="spanel">
<%= Html.LabelFor(model => model.BIC) %> :
<%= Html.TextBox("BIC") %>
<%= Html.ValidationMessage("BIC", "*") %>
<br>
</div><div class="spanel">
<%= Html.LabelFor(model => model.IBAN) %> :
<%= Html.TextBox("IBAN") %>
<%= Html.ValidationMessage("IBAN", "*") %>
</div>
</fieldset>
<input type="submit"/>
@ -119,13 +123,13 @@ Avatar : <img src="<%=Html.AvatarUrl(HttpContext.Current.User.Identity.Name)%>"
<% if (Roles.IsUserInRole((string)ViewData ["UserName"],"Admin")) { %>
This user is Admin.
<% } %>
HasBankAccount:<%= Model.HasBankAccount %>
<% if (!Model.HasBankAccount) { %>
(IBAN+BIC ou Codes banque, guichet, compte et clé RIB)
<% } %>, IsBillable:<%=Model.IsBillable%>
<code>HasBankAccount:<%= Model.HasBankAccount %></code>
<% if (!Model.HasBankAccount) { %><span class="hint">
IBAN+BIC ou Codes banque, guichet, compte et clé RIB</span>
<% } %>, <code>IsBillable:<%=Model.IsBillable%></code>
<% if (!Model.IsBillable) { %>
(un nom et au choix, une adresse postale valide,
ou un téléphone, ou un email, ou un Mobile) <% } %>
<span class="hint">un nom et au choix, une adresse postale valide,
ou un téléphone, ou un email, ou un Mobile</span> <% } %>
</aside>
</asp:Content>

View file

@ -15,16 +15,15 @@
<img src="<%=Model.Photo%>" alt="photo" id="vphoto" >
</span>
<!-- TODO? Model.Photo.(Legend|Date|Location|ref) -->
<h1 id="vtitle" for="Title" class="editable"><%=Html.Markdown(Model.Title)%></h1>
<h1 id="vtitle" for="Title" class="editable" ><%=Html.Markdown(Model.Title)%></h1>
<div id="vcontent" for="Content" class="editable">
<%=Html.Markdown(Model.Content,"/bfiles/"+Model.Id+"/")%>
</div>
<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>
<hr><h2>Fichiers attachées</h2>
<%= Html.FileList("~/bfiles/"+Model.Id) %>
<hr>
<script>
function dumpprops(obj) {
var str = "";
@ -94,6 +93,7 @@ jQuery('#vcontent').hallo({
});
var markdownize = function(content) {
if (!content) return '';
var html = content.split("\n").map($.trim).filter(function(line) {
return line != "";
}).join("\n");
@ -107,16 +107,17 @@ var converter = new showdown.Converter(),
// Method that converts the HTML contents to Markdown
var showSource = function(id,content) {
if (!content) content = '';
var markdown = markdownize(content);
if (jQuery('#'+id).get(0).value == markdown) {
if (jQuery('#'+id).val() === markdown) {
return;
}
jQuery('#'+id).get(0).value = markdown;
jQuery('#'+id).val( markdown );
};
var updateHtml = function(id,content) {
var jView = jQuery('div[for="'+id+'"]');
if (markdownize(jView.html()) == content) {
var jView = jQuery('*[for="'+id+'"]');
if (markdownize(jView.html()) === content) {
return;
}
var html = htmlize(content);
@ -228,10 +229,15 @@ var data = new FormData($('#frmajax').get()[0]);
<i class="af af-check actionlink"><input type="submit" id="validate" value="Valider"></i>
<% } %>
<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") %>
Visible: <%= Model.Visible? "oui":"non" %> <%= Html.ActionLink("Supprimer","RemovePost", new { user=Model.Author, title = Model.Title }, new { @class="actionlink" } ) %>
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

@ -3,15 +3,19 @@
<% Title = Model.Title+ " - " + ViewData ["BlogTitle"] ; %>
</asp:Content>
<asp:Content ContentPlaceHolderID="overHeaderOne" ID="header1" runat="server">
<h1 class="blogtitle"><% if (ViewData["Avatar"]!=null) { %>
<img src="<%=ViewData["Avatar"]%>" alt="avatar" id="avatar"/>
<% } %>
<%= Html.ActionLink(Model.Title,"UserPost", new{user=Model.Author, title = Model.Title}, null) %>
<span> - <%= Html.ActionLink((string)ViewData ["BlogTitle"] ,"UserPosts",new{user=Model.Author}, null) %>
</span>
<span> -
<a href="<%=Request.Url.Scheme + "://" + Request.Url.Authority%>"><%= YavscHelpers.SiteName %></a>
</span>
<% 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>
@ -19,8 +23,7 @@
<% foreach (var be in Model) { %>
<div class="post">
<% if (be.Photo != null) { %>
<img src="<%=Url.Content(be.Photo)%>" alt="<%=be.Title%>">
<img src="<%=Url.Content(be.Photo)%>" alt="<%=be.Title%>" class="photo">
<% } %>
<%= Html.Markdown(be.Content,"/bfiles/"+be.Id+"/") %>

View file

@ -5,11 +5,14 @@
</asp:Content>
<asp:Content ContentPlaceHolderID="overHeaderOne" ID="header1" runat="server">
<h1 class="blogtitle">
<a href="/Blog/<%=ViewData["BlogUser"]%>">
<% if ((bool)ViewData["Avatar"]!=null) { %>
<img class="avatar" src="<%=ViewData["Avatar"]%>" alt=""/>
<% if (!string.IsNullOrEmpty((string)ViewData["Avatar"])) { %>
<a href="<%=Url.Content("~/Blog/"+Model.Author)%>" id="avatar">
<img src="<%=ViewData["Avatar"]%>" />
</a>
<% } %>
<h1 class="blogtitle">
<a href="<%=Url.Content("~/Blog/"+Model.Author)%>">
<%=Html.Encode(ViewData["BlogTitle"])%></a>
-
<a href="<%=Request.Url.Scheme + "://" + Request.Url.Authority%>"><%= YavscHelpers.SiteName %></a>

View file

@ -1,8 +1,11 @@
<%@ Page Title="Assemblies" Language="C#" Inherits="System.Web.Mvc.ViewPage<IEnumerable<System.Reflection.AssemblyName>>" MasterPageFile="~/Models/App.master"%>
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
<div class="panel">
<p>
Running assembly :
<%= GetType().Assembly.FullName %></p>
</div>
<div class="panel">
<p>
Assemblies referenced in this application :
</p>
@ -11,5 +14,6 @@ Assemblies referenced in this application :
<li><%= item.FullName %></li>
<% } %>
</ul>
</div>
</asp:Content>