* 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
vnext
Paul Schneider 9 years ago
parent c79921ea58
commit 30cebd7751
25 changed files with 349 additions and 165 deletions

@ -0,0 +1,4 @@
2015-10-09 Paul Schneider <paul@pschneider.fr>
* Makefile: reloads config after each rsync call

@ -29,6 +29,7 @@ rsync_% : DESTDIR = $(DESTDIR_$@)
rsync_% : deploy
echo "!Deploying to $(HOST)!"
$(RSYNCCMD) build/web/$(CONFIG)/ root@$(HOST):$(DESTDIR)
ssh root@$(HOST) "service apache2 reload"
build:
xbuild /p:Configuration=$(CONFIG) /t:Build Yavsc.sln

@ -1,3 +1,8 @@
2015-10-09 Paul Schneider <paul@pschneider.fr>
* NpgsqlBlogProvider.cs: - Fixes access on bills
- Fixes usage of bill without photo
2015-10-08 Paul Schneider <paul@pschneider.fr>
* NpgsqlBlogProvider.cs: Fixes last commit in case of DBNull

@ -250,13 +250,16 @@ namespace Npgsql.Web.Blog
be.Modified = rdr.GetDateTime (rdr.GetOrdinal ("modified"));
be.Posted = rdr.GetDateTime (rdr.GetOrdinal ("posted"));
be.Visible = rdr.GetBoolean (rdr.GetOrdinal ("visible"));
be.Photo = rdr.GetString (rdr.GetOrdinal ("photo"));
int oph = rdr.GetOrdinal ("photo");
if (!rdr.IsDBNull(oph))
be.Photo = rdr.GetString (oph);
be.Id = postid;
}
}
}
if (be!=null) SetCirclesOn (be);
return be;
}
/// <summary>
/// Removes the comment.
@ -459,16 +462,16 @@ namespace Npgsql.Web.Blog
using (NpgsqlConnection cnx=new NpgsqlConnection(connectionString))
using (NpgsqlCommand cmd = cnx.CreateCommand()) {
if (readersName != null) {
cmd.CommandText = "select _id, title,bcontent,modified," +
cmd.CommandText = "select _id, title,bcontent, modified," +
"posted,username,visible " +
"from blog b left outer join " +
"(select count(*)>0 acc, a.post_id pid " +
"from blog_access a," +
" circle_members m, users u where m.circle_id = a.circle_id " +
" and m.member = u.pkid and u.username = :uname " +
" and m.member = u.username and u.username = :uname " +
" and u.applicationname = :appname " +
" group by a.post_id) ma on (ma.pid = b._id) " +
"where ( ma.acc IS NULL or ma.acc = TRUE or b.username = :uname) ";
"where ( ((ma.acc IS NULL or ma.acc = TRUE) and b.Visible IS TRUE ) or b.username = :uname) ";
cmd.Parameters.AddWithValue ("uname", readersName);
} else {
cmd.CommandText = "select _id, title,bcontent,modified," +
@ -478,7 +481,8 @@ namespace Npgsql.Web.Blog
"from blog_access a" +
" group by a.post_id) ma on (ma.pid = b._id)" +
" where " +
" ma.acc IS NULL and " +
" ma.acc IS NULL and " +
" b.Visible IS TRUE and " +
" applicationname = :appname";
}
cmd.Parameters.AddWithValue ("@appname", applicationName);

@ -4,10 +4,11 @@ body {
background-color: black;
color: #D0FFD0;
font-family: 'Arial', cursive;
padding: 0em;
padding: 0;
margin: 0;
}
.iconsmall { max-height: 1.3em; max-width: 1.3em; }
input, textarea, checkbox {
@ -15,62 +16,69 @@ input, textarea, checkbox {
background-color: black;
}
.photo { width: 100%; }
.blogbanner { float: left; top:0; }
header {
border-radius:10px;
margin: 1em;
padding: 1em;
padding-top: 5em;
padding: 0;
margin: 0;
margin-top: 0;
padding-top: 201px;
margin-bottom:2em;
display: block;
text-align: center;
background: url("/images/totemprod.png") 50% 0 no-repeat fixed;
background: url("/images/totem-banner.xs.jpg") 0 0 no-repeat fixed;
}
header h1, header a {
background-color: rgba(0,0,0,.5);
}
nav {
border-radius:1em;
margin: 1em;
padding: 1em;
margin: 2em;
padding: 2em;
display: block;
border-radius:1em;
background: url("/images/live-concert-388160_1280.s.jpg") 50% 10em repeat fixed ;
min-height: 10em;
justify-content: space-around;
}
main {
border-radius:1em;
margin: 1em;
padding: 1em;
margin: 2em;
padding: 2em;
display: block;
border-radius:1em;
background: url("/images/musician-923526_1280.s.jpg") 50% 20em repeat fixed ;
min-height: 10em;
}
footer {
background: url("/images/drummer-652345_1280.s.jpg") 50% 30em repeat fixed ;
border-radius:1em;
margin: 1em;
padding: 1em;
margin: 0;
margin-top: 2em;
padding: 2em;
display: block;
min-height: 10em;
clear: both;
font-size: smaller;
justify-content: center;
justify-content: space-around;
}
footer a {
border-radius:5px;
margin:.5em;
padding:1em;
}
#copyr { text-align: center; display: block; background-color: rgba(20,20,20,.5); }
legend {
border-radius:5px;
margin:.5em;
padding:1.5em;
background-color: rgba(0,0,32,.5);
}
#copyr { text-align: center; display: block; background-color: rgba(20,20,20,.8); }
footer p { display:inline-block; }
footer img { max-height: 2em; vertical-align: middle; }
a.actionlink img, h1 img, .menuitem img { vertical-align: middle; }
#gspacer {
background-color: rgba(0,0,40,.8);
background-color: rgba(20,20,20,.8);
border-radius:5px;
margin:.5em; padding:1em; display: inline-block }
fieldset {
@ -78,7 +86,7 @@ fieldset {
border-radius:5px; border: solid 1px #000060;
}
video, img {
main video, main img {
max-width:100%;
max-height:75%;
padding: .5em;
@ -124,12 +132,26 @@ textarea.fullwidth { min-height:10em; }
}
.panel,.bshpanel, aside {
background-color: rgba(0,0,128,.5);
border-radius:5px;
margin:.5em;
padding: .5em;
background-color: rgba(20,20,20,.8);
border-radius:5px;
margin:.5em;
padding: .5em;
}
.spanel {
max-width:24em;
display: inline-block;
margin:.3em;
}
.xspanel {
max-width:13em;
display: inline-block;
margin:.2em;
}
.xxspanel {
max-width:7em;
display: inline-block;
margin:.1em;
}
.hint {
display: inline;
font-style: italic;
@ -143,12 +165,6 @@ content: ")";
}
a {
text-decoration: none;
color: #B0B080;
background-color:rgba(20,20,20,0.5);
text-decoration: none;
}
.usertitleref {
color: #B0B080;
border-radius: 5px;
@ -156,16 +172,18 @@ a {
font-family: 'Arial', cursive;
padding: 1em;
}
a:hover {
text-decoration: underline;
}
a:visited {
color: #90B090;
}
label {
font-size: medium;
}
.editable {
margin 1em;
min-height:1em;
border-radius: 1em;
border: dashed rgb(020,20,256) 2px;
}
#notifications {
padding: .5em;
}
@ -203,27 +221,33 @@ ul.preview li:nth-child(n) {
color: #f88;
}
.actionlink {
a {
text-decoration: none;
}
.actionlink, .menuitem, a {
color: #B0B080;
border-radius: 5px;
background-color:rgba(0,0,32,0.5);
border-radius:1em;
border: solid black 1px;
background-color: rgba(20,20,20,.8);
cursor: pointer;
font-family: 'Arial', cursive;
padding: .2em;
display: inline-block;
}
input, select {
color: #B0B080;
border: solid 1px rgb(128,128,128);
border-radius:5px;
border-radius:1em;
background-color:rgba(0,0,32,0.8);
font-family: 'Arial', cursive;
}
.actionlink:hover {
.actionlink:hover, fa:hover, .menuitem:hover, a:hover, input:hover {
background-color:rgba(30,0,124,0.9);
text-decoration: underline;
border: solid green 1px;
}
.code {
@ -237,8 +261,10 @@ input, select {
max-width: 64px;
max-height: 64px;
}
#avatar {
float: left;
margin:1em;
}
.comment {
@ -246,15 +272,6 @@ input, select {
font-size: smaller;
}
.menuitem {
background-color: rgba(0,0,40,.8);
border-radius:5px;
margin:.5em;
padding:.5em;
display: inline-block;
}
.onhover {
display:none;
position: absolute;
@ -285,28 +302,24 @@ input, select {
}
@media all and (max-width: 640px) {
header {
margin: .5em;
padding: .5em;
padding-top: 5em;
}
header {
margin-bottom:1em;
background: url("/images/totem-banner.xs.jpg") 0 0 no-repeat fixed;
}
nav {
margin: .5em;
padding: .5em;
min-height: 3em;
margin: 1em;
padding: 1em;
background: url("/images/live-concert-388160_1280.xxs.jpg") 50% 10% repeat fixed ;
}
main {
margin: .5em;
padding: .5em;
min-height: 7em;
margin: 1em;
padding: 1em;
background: url("/images/musician-923526_1280.xxs.jpg") 50% 20em repeat fixed ;
}
footer {
margin: .5em;
padding: .5em;
min-height: 3em;
background: url("/images/drummer-652345_1280.xxs.jpg") 50% 90% repeat fixed ;
padding: 1em;
}
.menuitem {
display: block;
@ -328,6 +341,20 @@ input, select {
}
@media all and (max-width: 350px) {
header {
padding-top: 101px;
background: url("/images/totem-banner.xxs.jpg") 0 0 no-repeat fixed;
}
nav {
margin: 0.3em;
padding: 0.3em;
}
main {
margin: 0.3em;
padding: 0.3em;}
padding: 0em;
margin: 0em;
.c2 { display:none; }
.c2-alt { display:initial; }
}

@ -1,3 +1,35 @@
2015-10-09 Paul Schneider <paul@pschneider.fr>
* totem-banner.png:
* totem-banner.xs.jpg:
* totem-banner.xxs.jpg: totem custo
* 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)
2015-10-08 Paul Schneider <paul@pschneider.fr>
* Contact.aspx: a form background color

@ -290,6 +290,8 @@ namespace Yavsc.Controllers
// ASSERT("Membership.GetUser ().UserName is made of simple characters, no slash nor backslash"
string logdu = Membership.GetUser ().UserName;
if (string.IsNullOrWhiteSpace (id))
id = logdu;
ViewData ["UserName"] = id;
bool editsMyName = (string.Compare(id,logdu)==0);
if (!editsMyName)
@ -297,15 +299,17 @@ namespace Yavsc.Controllers
if (!Roles.IsUserInRole ("FrontOffice"))
throw new UnauthorizedAccessException ("Your are not authorized to modify this profile");
if (AvatarFile != null) {
// if said valid, move as avatar file
// else invalidate the model
if (AvatarFile.ContentType == "image/png") {
string avdir = Server.MapPath (AvatarDir);
var di = new DirectoryInfo (avdir);
if (!di.Exists)
di.Create ();
string avpath = Path.Combine (avdir, id + ".png");
AvatarFile.SaveAs (avpath);
model.avatar = Request.Url.Scheme + "://" + Request.Url.Authority + AvatarDir.Substring (1) + "/" + id + ".png";
model.avatar = Url.Content( AvatarDir + "/" + id + ".png");
} else
ModelState.AddModelError ("Avatar",
string.Format ("Image type {0} is not supported (suported formats : {1})",
@ -323,7 +327,9 @@ namespace Yavsc.Controllers
if (AvatarFile != null) {
prf.SetPropertyValue ("Avatar", model.avatar);
} else {
model.avatar = (string) prf.GetPropertyValue ("Avatar");
var av = prf.GetPropertyValue ("Avatar");
if (av != null)
model.avatar = av as string;
}
prf.SetPropertyValue ("Address", model.Address);
prf.SetPropertyValue ("CityAndState", model.CityAndState);

@ -230,28 +230,24 @@ namespace Yavsc.Controllers
}
/// <summary>
/// Post the specified user and title.
/// Post the specified title.
/// </summary>
/// <param name="user">User.</param>
/// <param name="title">Title.</param>
[Authorize]
public ActionResult Post (string user, string title)
public ActionResult Post ( string title)
{
ViewData ["BlogUser"] = user;
ViewData ["PostTitle"] = title;
ViewData ["SiteName"] = sitename;
string un = Membership.GetUser ().UserName;
if (String.IsNullOrEmpty (user))
user = un;
if (String.IsNullOrEmpty (title))
title = "";
ViewData ["SiteName"] = sitename;
ViewData ["Author"] = un;
ViewData ["AllowedCircles"] = CircleManager.DefaultProvider.List (Membership.GetUser ().UserName).Select (x => new SelectListItem {
ViewData ["AllowedCircles"] = CircleManager.DefaultProvider.List (un)
.Select (x => new SelectListItem {
Value = x.Id.ToString(),
Text = x.Title
});
return View ("Edit", new BlogEntry { Title = title });
return View ("Edit", new BlogEntry { Title = title, Author = un });
}
/// <summary>

@ -176,23 +176,92 @@ namespace Yavsc.Helpers
if (a == null || a is DBNull) return "/avatars/" + helper.Encode(username)+".png";
return helper.Encode ((string)a);
}
/// <summary>
/// Javas the script.
/// </summary>
/// <returns>The script.</returns>
/// <param name="html">Html.</param>
/// <param name="obj">Object.</param>
public static string JavaScript(this HtmlHelper html, object obj)
{
return JavaScript (obj);
}
/// <summary>
/// Javas the script.
/// </summary>
/// <returns>The script.</returns>
/// <param name="obj">Object.</param>
public static string JavaScript(object obj)
{
JavaScriptSerializer serializer = new JavaScriptSerializer();
return serializer.Serialize(obj);
}
/// <summary>
/// Notice the specified ViewData with message.
/// </summary>
/// <param name="ViewData">View data.</param>
/// <param name="message">Message.</param>
public static void Notice (ViewDataDictionary ViewData, string message) {
if (ViewData ["Notifications"] == null)
ViewData ["Notifications"] = new List<string> ();
(ViewData ["Notifications"] as List<string>).Add (message.Replace("\'","\\\'"));
}
/// <summary>
/// Files the list.
/// </summary>
/// <returns>The list.</returns>
/// <param name="html">Html.</param>
/// <param name="path">Path.</param>
/// <param name="patterns">Patterns.</param>
public static IHtmlString FileList(this HtmlHelper html, string path, string [] patterns = null) {
StringWriter str = new StringWriter();
HtmlTextWriter writter = new HtmlTextWriter (str);
DirectoryInfo di = new DirectoryInfo (HttpContext.Current.Server.MapPath(path));
if (!di.Exists)
return new MvcHtmlString ("");
var files = new List<FileInfo> ();
if (patterns == null)
patterns = new string[] { "*" };
var url = new UrlHelper(html.ViewContext.RequestContext,
html.RouteCollection);
foreach (string pattern in patterns)
files.AddRange(
di.EnumerateFiles (
pattern,
SearchOption.TopDirectoryOnly));
writter.RenderBeginTag ("table");
writter.RenderBeginTag ("tr");
writter.RenderBeginTag ("td");
writter.Write (html.Translate ("Name"));
writter.RenderEndTag ();
writter.RenderBeginTag ("td");
writter.Write (html.Translate ("Created"));
writter.RenderEndTag ();
writter.RenderBeginTag ("td");
writter.Write (html.Translate ("Modified"));
writter.RenderEndTag ();
writter.RenderEndTag ();
foreach (FileInfo fi in files) {
writter.RenderBeginTag ("tr");
writter.RenderBeginTag ("td");
writter.AddAttribute ("href", url.Content(path+"/"+fi.Name));
writter.RenderBeginTag ("a");
writter.Write (fi.Name);
writter.RenderEndTag ();
writter.RenderEndTag ();
writter.RenderBeginTag ("td");
writter.Write (fi.LastWriteTime.ToString ("U"));
writter.RenderEndTag ();
writter.RenderBeginTag ("td");
writter.Write (fi.CreationTime.ToString("U"));
writter.RenderEndTag ();
writter.RenderEndTag ();
}
writter.RenderEndTag ();
return new MvcHtmlString (str.ToString ());
}
}
}

@ -33,9 +33,7 @@ var apiBaseUrl = '<%=Url.Content(Yavsc.WebApiConfig.UrlPrefixRelative)%>';
</span></h1>
</asp:ContentPlaceHolder>
<asp:ContentPlaceHolder ID="header" runat="server"></asp:ContentPlaceHolder>
<div id="notifications">
</div>
<div id="notifications"></div>
<%if (ViewData ["Notifications"]!=null) { %>
<script>
$(document).ready(function(){
@ -71,10 +69,8 @@ Yavsc.notice('<%=notice%>');
<% } %>
</nav>
<main data-type="background" data-speed="10" data-emheight="10" data-posx="0" data-posy="22" >
<div>
<asp:ContentPlaceHolder ID="MainContent" runat="server">
</asp:ContentPlaceHolder>
</div>
</main>
<asp:ContentPlaceHolder ID="MASContent" runat="server">
</asp:ContentPlaceHolder>
@ -82,8 +78,8 @@ Yavsc.notice('<%=notice%>');
<div id="copyr">
© 2012 Totem Production. Tous droits réservés.
</div>
<div class="control">
<p>
<div >
<p class="control">
<%= Html.ActionLink("Formulaire de contact","Contact","Home") %>
</p>
<p>
@ -93,7 +89,7 @@ Yavsc.notice('<%=notice%>');
<script src="https://apis.google.com/js/platform.js" defer>
{lang: 'fr'}
</script>
<div id="gspacer"><div class="g-plusone" data-annotation="inline" data-width="170"></div>
<div id="gspacer" class="control"><div class="g-plusone" data-annotation="inline" data-width="170"></div>
</div>
</div>
</footer>

@ -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>

@ -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>

@ -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"/>
<% if (!string.IsNullOrEmpty((string)ViewData["Avatar"])) { %>
<a href="<%= Url.Action("UserPosts", new{user=Model.Author}) %>" id="avatar">
<img src="<%=ViewData["Avatar"]%>" />
</a>
<% } %>
<%= 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>
<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+"/") %>

@ -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>

@ -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>

@ -418,6 +418,10 @@
<Content Include="images\drummer-652345_1280.xxs.jpg" />
<Content Include="images\live-concert-388160_1280.xxs.jpg" />
<Content Include="Scripts\parralax.js" />
<Content Include="images\totem.jpg" />
<Content Include="images\totem-banner.png" />
<Content Include="images\totem-banner.xxs.jpg" />
<Content Include="images\totem-banner.xs.jpg" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

@ -97,31 +97,31 @@ WITH (
CREATE TABLE profiledata
(
uniqueid integer,
"address.zipcode" character varying(10),
"address.cityandstate" character varying(255),
uniqueid integer,
zipcode character varying(10),
cityandstate character varying(255),
blogtitle character varying(255), -- Blog Title
"address.address" character varying(2048), -- Postal address
"address.country" character varying(100),
address character varying(2048), -- Postal address
country character varying(100),
website character varying(256),
blogvisible boolean,
name character varying(1024),
phone character varying(15),
mobile character varying(15),
"bank.accountnumber" character varying(15), -- Numero de compte
"bank.key" integer, -- clé RIB
"bank.code" character varying(5), -- Code banque
"bank.wicketcode" character varying(5),
"bank.iban" character varying(33),
"bank.bic" character varying(15),
"google.token" character varying(512), -- Google authentification token
"google.refreshtoken" character varying(512), -- Google refresh token
"google.tokentype" character varying(256), -- Google access token type
"google.calid" character varying(255), -- Google calendar identifier
"google.tokenexpir" timestamp with time zone, -- Google access token expiration date
accountnumber character varying(15), -- Numero de compte
bankedkey integer, -- clé RIB
bankcode character varying(5), -- Code banque
wicketcode character varying(5),
iban character varying(33),
bic character varying(15),
gtoken character varying(512), -- Google authentification token
grefreshtoken character varying(512), -- Google refresh token
gtokentype character varying(256), -- Google access token type
gcalid character varying(255), -- Google calendar identifier
gtokenexpir timestamp with time zone, -- Google access token expiration date
avatar character varying(512), -- url for an avatar
"google.calapi" boolean NOT NULL DEFAULT false,
"google.regid" character varying(1024), -- Google Cloud Message registration identifier
gcalapi boolean NOT NULL DEFAULT false,
gregid character varying(1024), -- Google Cloud Message registration identifier
CONSTRAINT fkprofiles2 FOREIGN KEY (uniqueid)
REFERENCES profiles (uniqueid) MATCH SIMPLE
ON UPDATE CASCADE ON DELETE CASCADE

@ -1,3 +1,10 @@
2015-10-09 Paul Schneider <paul@pschneider.fr>
* LocalizedText.resx:
* LocalizedText.fr.resx:
* LocalizedText.Designer.cs:
* LocalizedText.fr.Designer.cs: a new translation
2015-10-08 Paul Schneider <paul@pschneider.fr>
* BlogEntry.cs: defines the photo in the model

@ -88,6 +88,12 @@ namespace Yavsc.Model {
}
}
public static string Profile_edition {
get {
return ResourceManager.GetString("Profile_edition", resourceCulture);
}
}
public static string Title {
get {
return ResourceManager.GetString("Title", resourceCulture);

@ -88,6 +88,12 @@ namespace Yavsc.Model {
}
}
public static string Profile_edition {
get {
return ResourceManager.GetString("Profile_edition", resourceCulture);
}
}
public static string Title {
get {
return ResourceManager.GetString("Title", resourceCulture);

@ -50,6 +50,7 @@
<data name="Online"><value>En ligne</value></data>
<data name="Pdf_version"><value>Version Pdf</value></data>
<data name="Preview"><value>Prévisualiser</value><comment>Prévisualiser le document</comment></data>
<data name="Profile_edition"><value>Édition du profile</value></data>
<data name="Product_reference"><value>Référence produit</value></data>
<data name="ProviderId"><value>Identifiant du fournisseur</value></data>
<data name="ProviderName"><value>Nom du fournisseur</value></data>

@ -53,7 +53,7 @@
<data name="Pdf_version"><value>Pdf version</value></data>
<data name="Preview"><value>Preview</value><comment>comment on preview</comment></data>
<data name="Private_circle"><value>Private circle</value></data>
<data name="Profile_edition"><value>Profile edition</value></data>
<data name="ProviderId"><value>Provider identifier</value></data>
<data name="ProviderName"><value>Provider name</value></data>
<data name="Product_reference"><value>Product_reference</value></data>

Loading…