- Fixes the french translation
- Css Style changed
This commit is contained in:
12
Makefile
12
Makefile
@ -1,10 +1,10 @@
|
||||
|
||||
|
||||
CONFIG=Release
|
||||
VERSION=1.1
|
||||
CONFIG=Debug
|
||||
DESTDIR=build/web/$(CONFIG)
|
||||
COPYUNCHANGED="false"
|
||||
|
||||
all: build deploy
|
||||
all: deploy
|
||||
|
||||
ddir:
|
||||
mkdir -p $(DESTDIR)
|
||||
@ -12,6 +12,7 @@ ddir:
|
||||
deploy: ddir build
|
||||
xbuild /p:Configuration=$(CONFIG) /p:SkipCopyUnchangedFiles=$(COPYUNCHANGED) /p:DeployDir=../$(DESTDIR) /t:Deploy web/Web.csproj
|
||||
rm -rf $(DESTDIR)/obj
|
||||
mv $(DESTDIR)/Web.config $(DESTDIR)/Web.config.new
|
||||
|
||||
rsync: rsync-preprod rsync-local
|
||||
|
||||
@ -29,5 +30,8 @@ rsync-local:
|
||||
rsync -ravu build/web/$(CONFIG)/ root@localhost:/srv/www/yavsc
|
||||
|
||||
sourcepkg:
|
||||
git archive --format=tar --prefix=yavsc-1.1/ 1.1 | bzip2 > yavsc-1.1.tar.bz2
|
||||
git archive --format=tar --prefix=yavsc-$(CONFIG)/ $(CONFIG) | bzip2 > yavsc-$(CONFIG).tar.bz2
|
||||
|
||||
debug: build
|
||||
(cd web; export MONO_OPTIONS=--debug; xsp4 --port 8080)
|
||||
|
||||
|
61
web/App_GlobalResources/LocalizedText.Designer.cs
generated
61
web/App_GlobalResources/LocalizedText.Designer.cs
generated
@ -1,61 +0,0 @@
|
||||
// ------------------------------------------------------------------------------
|
||||
// <autogenerated>
|
||||
// This code was generated by a tool.
|
||||
// Mono Runtime Version: 4.0.30319.17020
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </autogenerated>
|
||||
// ------------------------------------------------------------------------------
|
||||
|
||||
namespace Yavsc.App_GlobalResources {
|
||||
using System;
|
||||
|
||||
|
||||
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
public class LocalizedText {
|
||||
|
||||
private static System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal LocalizedText() {
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
public static System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.Equals(null, resourceMan)) {
|
||||
System.Resources.ResourceManager temp = new System.Resources.ResourceManager("Yavsc.App_GlobalResources.LocalizedText", typeof(LocalizedText).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
public static System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
public static string Preview {
|
||||
get {
|
||||
return ResourceManager.GetString("Preview", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Welcome {
|
||||
get {
|
||||
return ResourceManager.GetString("Welcome", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -14,4 +14,10 @@
|
||||
</resheader>
|
||||
<data name="Preview"><value>Prévisualiser</value><comment>Prévisualiser le document</comment></data>
|
||||
<data name="Welcome"><value>Bienvenue</value><comment></comment></data>
|
||||
<data name="User List"><value>Liste des utilisateurs</value><comment></comment></data>
|
||||
<data name="Register"><value>Enregistez-vous</value></data>
|
||||
<data name="Online"><value>En ligne</value></data>
|
||||
<data name="Offline"><value>Hors ligne</value></data>
|
||||
<data name="Not Approuved"><value>Non approuvé</value></data>
|
||||
<data name="Remove"><value>Supprimer</value></data>
|
||||
</root>
|
||||
|
@ -14,4 +14,10 @@
|
||||
</resheader>
|
||||
<data name="Preview"><value>Preview</value><comment>comment on preview</comment></data>
|
||||
<data name="Welcome"><value>Welcome</value><comment></comment></data>
|
||||
<data name="User List"><value>User List</value><comment></comment></data>
|
||||
<data name="Register"><value>Register</value></data>
|
||||
<data name="Online"><value>Online</value></data>
|
||||
<data name="Offline"><value>Offline</value></data>
|
||||
<data name="Not Approuved"><value>Not Approuved</value></data>
|
||||
<data name="Remove"><value>Remove</value></data>
|
||||
</root>
|
||||
|
@ -70,8 +70,7 @@ namespace Yavsc.Controllers
|
||||
public ActionResult Index ()
|
||||
{
|
||||
string cn = CultureInfo.CurrentCulture.Name;
|
||||
ViewData ["Message"] =
|
||||
LocalizedText.ResourceManager.GetString("Welcome");
|
||||
ViewData ["Message"] = LocalizedText.Welcome;
|
||||
return View ();
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<asp:ContentPlaceHolder id="init" runat="server">
|
||||
<% Page.Title += " - "+YavscHelpers.SiteName; %>
|
||||
<% Page.Title = Page.Title + " - " + YavscHelpers.SiteName; %>
|
||||
</asp:ContentPlaceHolder>
|
||||
<head runat="server">
|
||||
<asp:ContentPlaceHolder id="head" runat="server">
|
||||
@ -37,21 +37,27 @@
|
||||
<aside>
|
||||
<div id="login">
|
||||
<% if (Membership.GetUser()==null) { %>
|
||||
<%= Html.ActionLink( YavscHelpers.SiteName, "Index", "Home" ) %>
|
||||
<%= Html.ActionLink("Login", "Login", "Account", new { returnUrl=Request.Url.PathAndQuery }, null ) %>
|
||||
<%= Html.ActionLink( YavscHelpers.SiteName, "Index", "Home" ,null, new { @class="actionlink" } ) %>
|
||||
<span class="hidcom"> Page d'accueil </span>
|
||||
<%= Html.ActionLink("Login", "Login", "Account", new { returnUrl=Request.Url.PathAndQuery }, new { @class="actionlink" } ) %>
|
||||
<span class="hidcom">Pour pouvoir poster ou commenter</span>
|
||||
<% } else { %>
|
||||
<%= HttpContext.Current.User.Identity.Name %> @ <%= Html.ActionLink( YavscHelpers.SiteName, "Index", "Home" ) %>
|
||||
<%= Html.ActionLink( "Poster", "Post", "Blogs" ) %>
|
||||
<%= Html.ActionLink( "Profile", "Profile", "Account" ) %>
|
||||
<%= Html.ActionLink( "Logout", "Logout", "Account", new { returnUrl=Request.Url.PathAndQuery }, null) %>
|
||||
<%= Html.ActionLink(HttpContext.Current.User.Identity.Name, "Account", "Profile",null, new { @class="actionlink" }) %>
|
||||
<span class="hidcom"> Édition de votre profile </span>
|
||||
@ <%= Html.ActionLink( YavscHelpers.SiteName, "Index", "Home" ,null, new { @class="actionlink" }) %>
|
||||
<span class="hidcom"> Page d'accueil </span>
|
||||
<a href="/Blogs/Post" class="actionlink">Poster </a>
|
||||
<span class="hidcom"> Édition d'un nouveau billet </span>
|
||||
<%= Html.ActionLink( "Deconnexion", "Logout", "Account", new { returnUrl=Request.Url.PathAndQuery }, new { @class="actionlink" }) %>
|
||||
<% } %>
|
||||
</div>
|
||||
<asp:ContentPlaceHolder ID="MASContent" runat="server">
|
||||
</asp:ContentPlaceHolder>
|
||||
</aside>
|
||||
<footer>
|
||||
<hr/>
|
||||
<%= string.Join("\n",Yavsc.ThanksHelper.Links()) %>
|
||||
<% foreach ( string link in Yavsc.ThanksHelper.Links()) { %>
|
||||
<%= link %>
|
||||
<% } %>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -5,28 +5,33 @@ using System.Collections.Generic;
|
||||
namespace Yavsc
|
||||
{
|
||||
public static class ThanksHelper {
|
||||
static private ThanksConfigurationSection configurationSection=null;
|
||||
static public ThanksConfigurationSection ConfigurationSection {
|
||||
get {
|
||||
if (configurationSection==null)
|
||||
configurationSection = (ThanksConfigurationSection) ConfigurationManager.GetSection ("system.web/thanks");
|
||||
return configurationSection;
|
||||
}
|
||||
}
|
||||
|
||||
public static string[] Links ()
|
||||
{
|
||||
List<string> result = new List<string>() ;
|
||||
ThanksConfigurationSection s = (ThanksConfigurationSection) ConfigurationManager.GetSection ("system.web/thanks");
|
||||
if (s == null) return result.ToArray();
|
||||
if (s.To == null) return result.ToArray();
|
||||
foreach (ThanksConfigurationElement e in s.To) {
|
||||
if (ConfigurationSection == null) return result.ToArray();
|
||||
if (ConfigurationSection.To == null) return result.ToArray();
|
||||
foreach (ThanksConfigurationElement e in ConfigurationSection.To) {
|
||||
string link = "";
|
||||
if (!string.IsNullOrEmpty(e.Url))
|
||||
link = string.Format("<a class=\"athanks\" href=\"{0}\">",e.Url);
|
||||
link += "<div class=\"thanks\">";
|
||||
link = string.Format("<a href=\"{0}\">",e.Url);
|
||||
string dsp = (string.IsNullOrEmpty(e.Display))?e.Name:e.Display;
|
||||
if (!string.IsNullOrEmpty(e.Image)) {
|
||||
string ttl = (string.IsNullOrEmpty(s.TitleFormat))?"Go and see the website ({0})":s.TitleFormat;
|
||||
string ttl = (string.IsNullOrEmpty(ConfigurationSection.TitleFormat))?"Go and see the website ({0})":ConfigurationSection.TitleFormat;
|
||||
ttl = string.Format(ttl,dsp);
|
||||
link += string.Format(
|
||||
"<img src=\"{1}\" alt=\"{0}\" title=\"{2}\"/>",
|
||||
dsp,e.Image,ttl);
|
||||
}
|
||||
else link += dsp;
|
||||
link += "</div>";
|
||||
if (e.Url!=null)
|
||||
link += "</a> ";
|
||||
result.Add (link);
|
||||
|
@ -5,9 +5,12 @@ body {
|
||||
background-repeat: no-repeat;
|
||||
color: #D0FFD0;
|
||||
font-family: 'Arial', cursive;
|
||||
margin-bottom:3em;
|
||||
}
|
||||
|
||||
aside { float: right; }
|
||||
main, aside {
|
||||
background-color: rgba(0,0,0,0.8);
|
||||
}
|
||||
|
||||
video,img {
|
||||
max-width:100%;
|
||||
@ -15,29 +18,22 @@ video,img {
|
||||
position:relative;
|
||||
}
|
||||
|
||||
#login {
|
||||
font-size:x-small;
|
||||
background-color:rgba(0,0,0,0.6);
|
||||
color:rgb(130,254,130);
|
||||
footer {
|
||||
position:fixed;
|
||||
bottom:0;
|
||||
left:0;
|
||||
right:0;
|
||||
background-color:rgba(0,16,0,0.6);
|
||||
text-align:center;
|
||||
z-index:-1;
|
||||
}
|
||||
|
||||
#login a {
|
||||
background-color:rgba(0,0,64,0.8);
|
||||
}
|
||||
footer img { max-height: 2em; }
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: #B0B080;
|
||||
right:2px;
|
||||
padding: 2px;
|
||||
border-radius:5px;
|
||||
border-style: dotted;
|
||||
border-width: .2px;
|
||||
background-color:rgba(0,0,3,0.5);
|
||||
}
|
||||
|
||||
a.athanks {
|
||||
background-color:rgba(0,0,0,0);;
|
||||
background-color:rgba(0,30,0,0.5);
|
||||
}
|
||||
|
||||
a:hover {
|
||||
@ -69,13 +65,6 @@ label {
|
||||
background-color: rgba(64,0,0,0.3);
|
||||
}
|
||||
|
||||
.thanks {
|
||||
display: inline;
|
||||
font-size: small;
|
||||
}
|
||||
.blogpost {
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
}
|
||||
.editblog {
|
||||
width: 95%;
|
||||
height: 95%;
|
||||
@ -104,7 +93,7 @@ padding-left: 20px;
|
||||
right:3px;
|
||||
padding: 4px;
|
||||
border-radius:25px;
|
||||
background-color:rgba(0,0,64,0.7);
|
||||
background-color:rgba(0,0,32,0.8);
|
||||
font-size:x-small;
|
||||
}
|
||||
|
||||
@ -136,20 +125,39 @@ padding-left: 20px;
|
||||
display:block; position:absolute; left:20px; right:20px;
|
||||
background-color: rgb(0,0,40); border: solid rgb(256,256,0);
|
||||
}
|
||||
|
||||
.comment {
|
||||
border-radius:25px;
|
||||
border-width:1px;
|
||||
border-style: solid;
|
||||
border-color:rgb(0,64,0);
|
||||
font-size: smaller;
|
||||
}
|
||||
|
||||
.hidcom {
|
||||
font-size: smaller;
|
||||
display:none;
|
||||
}
|
||||
.actionlink:hover + .hidcom {
|
||||
display:inline; position:relative; left:0x; top:0px; padding:5px; margin:5px;
|
||||
background-color: rgba(0,0,40,.8);
|
||||
}
|
||||
|
||||
|
||||
@media print {
|
||||
body {background-color:white;color:black;}
|
||||
header,footer,.postcomment,.actionlink,.metablog{ display:none;}
|
||||
}
|
||||
|
||||
@media all and (max-width: 440px) {
|
||||
@media all and (max-width: 640px) {
|
||||
aside {
|
||||
float: none;
|
||||
}
|
||||
footer img {
|
||||
max-height: 1em;
|
||||
}
|
||||
footer a {
|
||||
font-size: xx-small;
|
||||
}
|
||||
body { margin-bottom:1em; }
|
||||
}
|
||||
|
@ -1,16 +1,15 @@
|
||||
<%@ Page Title="User List" Language="C#" Inherits="System.Web.Mvc.ViewPage<System.Web.Security.MembershipUserCollection>" MasterPageFile="~/Models/App.master" %>
|
||||
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<System.Web.Security.MembershipUserCollection>" MasterPageFile="~/Models/App.master" %>
|
||||
<asp:Content ContentPlaceHolderID="init" ID="init1" runat="server">
|
||||
<% Page.Title = LocalizedText.User_List; %>
|
||||
</asp:Content>
|
||||
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||
|
||||
<ul>
|
||||
<%foreach (MembershipUser user in Model){ %>
|
||||
|
||||
<li><%=user.UserName%> <%=user.Email%> <%=(!user.IsApproved)?"(Not Approuved)":""%> <%=user.IsOnline?"Online":"Offline"%>
|
||||
<li><%=user.UserName%> <%=user.Email%> <%=(user.IsApproved)?"":"("+LocalizedText.Not_Approuved+")"%> <%=user.IsOnline?LocalizedText.Online:LocalizedText.Offline%>
|
||||
<% if (Roles.IsUserInRole("Admin")) { %>
|
||||
<%= Html.ActionLink("Supprimer","RemoveUserQuery", new { username = user.UserName }, new { @class="actionlink" } ) %>
|
||||
<% } %>
|
||||
</li>
|
||||
|
||||
<%= Html.ActionLink(LocalizedText.Remove,"RemoveUserQuery", new { username = user.UserName }, new { @class="actionlink" } ) %>
|
||||
<% } %>
|
||||
</li><% }%>
|
||||
</ul>
|
||||
|
||||
</asp:Content>
|
||||
|
@ -7,14 +7,14 @@
|
||||
<h3 class="blogtitle">
|
||||
<%= Html.ActionLink(e.Title,"UserPost", new { user=e.UserName, title = e.Title }) %>
|
||||
</h3>
|
||||
<div class="metablog">(<%=Html.Encode(e.UserName)%> <%=e.Modified.ToString("yyyy/MM/dd") %>)</div>
|
||||
<div class="metablog">(<%=Html.Encode(e.UserName)%> <%=e.Modified.ToString("yyyy/MM/dd") %>)
|
||||
<% if (Membership.GetUser()!=null)
|
||||
if (Membership.GetUser().UserName==e.UserName)
|
||||
{ %>
|
||||
<%= Html.ActionLink("Editer","Edit", new { user = e.UserName, title = e.Title }, new { @class="actionlink" }) %>
|
||||
<%= Html.ActionLink("Supprimer","RemovePost", new { user = e.UserName, title = e.Title }, new { @class="actionlink" } ) %>
|
||||
<% } %>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% } %>
|
||||
|
@ -6,6 +6,7 @@
|
||||
<h1 class="blogtitle"><%= Html.ActionLink(Model.Title,"UserPost",new{user=Model.UserName,title=Model.Title}) %> -
|
||||
<a href="/Blog/<%=Model.UserName%>">
|
||||
<img class="avatar" src="/Blogs/Avatar?user=<%=Model.UserName%>" alt="<%=Model.UserName%>"/> <%=ViewData["BlogTitle"]%></a>
|
||||
</h1>
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||
@ -24,7 +25,7 @@
|
||||
<div class="comment" style="min-height:32px;"> <img style="clear:left;float:left;max-width:32px;max-height:32px;margin:.3em;" src="/Blogs/Avatar/<%=c.From%>" alt="<%=c.From%>"/>
|
||||
<%= BBCodeHelper.Parser.ToHtml(c.CommentText) %>
|
||||
<% if ( username == Model.UserName || c.From == username ) { %>
|
||||
<%= Html.ActionLink("Supprimer","RemoveComment", new { cmtid = c.Id } )%>
|
||||
<%= Html.ActionLink("Supprimer","RemoveComment", new { cmtid = c.Id } , new { @class="actionlink" })%>
|
||||
<% } %>
|
||||
</div>
|
||||
<% } %>
|
||||
|
@ -157,12 +157,12 @@
|
||||
<Compile Include="templates\TexEstimInit.cs" />
|
||||
<Compile Include="Formatters\TexFormatter.cs" />
|
||||
<Compile Include="Formatters\EstimToPdfFormatter.cs" />
|
||||
<Compile Include="App_GlobalResources\LocalizedTextfr.Designer.cs">
|
||||
<DependentUpon>LocalizedText.fr.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="App_GlobalResources\LocalizedText.Designer.cs">
|
||||
<DependentUpon>LocalizedText.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="App_GlobalResources\LocalizedText.fr.Designer.cs">
|
||||
<DependentUpon>LocalizedText.fr.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Web.config" />
|
||||
@ -308,7 +308,7 @@
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="App_GlobalResources\LocalizedText.fr.resx">
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>LocalizedTextfr.Designer.cs</LastGenOutput>
|
||||
<LastGenOutput>LocalizedText.fr.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
Reference in New Issue
Block a user