From b4fefbce7e47244f4f350216eb52c63ee7584c41 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Wed, 29 Oct 2014 11:29:03 +0100 Subject: [PATCH] - Fixes the french translation - Css Style changed --- Makefile | 12 ++-- .../LocalizedText.Designer.cs | 61 ------------------ web/App_GlobalResources/LocalizedText.fr.resx | 6 ++ web/App_GlobalResources/LocalizedText.resx | 6 ++ web/Controllers/HomeController.cs | 5 +- web/Models/App.master | 26 +++++--- web/Thanks/ThanksHelper.cs | 23 ++++--- web/Theme/style.css | 64 +++++++++++-------- web/Views/Admin/UserList.aspx | 15 ++--- web/Views/Blogs/Index.aspx | 4 +- web/Views/Blogs/UserPost.aspx | 5 +- web/Web.csproj | 8 +-- 12 files changed, 104 insertions(+), 131 deletions(-) delete mode 100644 web/App_GlobalResources/LocalizedText.Designer.cs diff --git a/Makefile b/Makefile index d67d464c..734d5f0a 100644 --- a/Makefile +++ b/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) diff --git a/web/App_GlobalResources/LocalizedText.Designer.cs b/web/App_GlobalResources/LocalizedText.Designer.cs deleted file mode 100644 index 8c1c0ee1..00000000 --- a/web/App_GlobalResources/LocalizedText.Designer.cs +++ /dev/null @@ -1,61 +0,0 @@ -// ------------------------------------------------------------------------------ -// -// 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. -// -// ------------------------------------------------------------------------------ - -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); - } - } - } -} diff --git a/web/App_GlobalResources/LocalizedText.fr.resx b/web/App_GlobalResources/LocalizedText.fr.resx index 2f3f7ca6..cb70d4c8 100644 --- a/web/App_GlobalResources/LocalizedText.fr.resx +++ b/web/App_GlobalResources/LocalizedText.fr.resx @@ -14,4 +14,10 @@ PrévisualiserPrévisualiser le document Bienvenue + Liste des utilisateurs + Enregistez-vous + En ligne + Hors ligne + Non approuvé + Supprimer diff --git a/web/App_GlobalResources/LocalizedText.resx b/web/App_GlobalResources/LocalizedText.resx index 11fda7e5..e1dbb0e8 100644 --- a/web/App_GlobalResources/LocalizedText.resx +++ b/web/App_GlobalResources/LocalizedText.resx @@ -14,4 +14,10 @@ Previewcomment on preview Welcome + User List + Register + Online + Offline + Not Approuved + Remove diff --git a/web/Controllers/HomeController.cs b/web/Controllers/HomeController.cs index 07971e60..e3c56b66 100644 --- a/web/Controllers/HomeController.cs +++ b/web/Controllers/HomeController.cs @@ -70,9 +70,8 @@ namespace Yavsc.Controllers public ActionResult Index () { string cn = CultureInfo.CurrentCulture.Name; - ViewData ["Message"] = - LocalizedText.ResourceManager.GetString("Welcome"); - return View (); + ViewData ["Message"] = LocalizedText.Welcome; + return View (); } public ActionResult AOEMail (string reason, string body) diff --git a/web/Models/App.master b/web/Models/App.master index 37fe850f..c04dde83 100644 --- a/web/Models/App.master +++ b/web/Models/App.master @@ -2,7 +2,7 @@ - <% Page.Title += " - "+YavscHelpers.SiteName; %> + <% Page.Title = Page.Title + " - " + YavscHelpers.SiteName; %> @@ -36,22 +36,28 @@
-
- <%= string.Join("\n",Yavsc.ThanksHelper.Links()) %> + <% foreach ( string link in Yavsc.ThanksHelper.Links()) { %> + <%= link %> + <% } %>
diff --git a/web/Thanks/ThanksHelper.cs b/web/Thanks/ThanksHelper.cs index 3f5bbf72..7d76b66d 100644 --- a/web/Thanks/ThanksHelper.cs +++ b/web/Thanks/ThanksHelper.cs @@ -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 result = new List() ; - 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("",e.Url); - link += ""; if (e.Url!=null) link += " "; result.Add (link); diff --git a/web/Theme/style.css b/web/Theme/style.css index 005115ca..8362fbca 100644 --- a/web/Theme/style.css +++ b/web/Theme/style.css @@ -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,31 +18,24 @@ 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); + background-color:rgba(0,30,0,0.5); } -a.athanks { - background-color:rgba(0,0,0,0);; - } - a:hover { background-color:rgba(30,0,124,0.5); border-color: white; @@ -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-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; } } diff --git a/web/Views/Admin/UserList.aspx b/web/Views/Admin/UserList.aspx index 8bb9da3b..50db2c36 100644 --- a/web/Views/Admin/UserList.aspx +++ b/web/Views/Admin/UserList.aspx @@ -1,16 +1,15 @@ -<%@ Page Title="User List" Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Models/App.master" %> +<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage" MasterPageFile="~/Models/App.master" %> + + <% Page.Title = LocalizedText.User_List; %> + -
    <%foreach (MembershipUser user in Model){ %> - -
  • <%=user.UserName%> <%=user.Email%> <%=(!user.IsApproved)?"(Not Approuved)":""%> <%=user.IsOnline?"Online":"Offline"%> +
  • <%=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" } ) %> + <%= Html.ActionLink(LocalizedText.Remove,"RemoveUserQuery", new { username = user.UserName }, new { @class="actionlink" } ) %> <% } %> -
  • - - <% }%> + <% }%>
diff --git a/web/Views/Blogs/Index.aspx b/web/Views/Blogs/Index.aspx index 92ad7ce2..54aa9e86 100644 --- a/web/Views/Blogs/Index.aspx +++ b/web/Views/Blogs/Index.aspx @@ -7,14 +7,14 @@

<%= Html.ActionLink(e.Title,"UserPost", new { user=e.UserName, title = e.Title }) %>

-
(<%=Html.Encode(e.UserName)%> <%=e.Modified.ToString("yyyy/MM/dd") %>)
+
(<%=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" } ) %> <% } %> - +
<% } %> diff --git a/web/Views/Blogs/UserPost.aspx b/web/Views/Blogs/UserPost.aspx index ceb5967f..40e929be 100644 --- a/web/Views/Blogs/UserPost.aspx +++ b/web/Views/Blogs/UserPost.aspx @@ -6,6 +6,7 @@

<%= Html.ActionLink(Model.Title,"UserPost",new{user=Model.UserName,title=Model.Title}) %> - <%=Model.UserName%> <%=ViewData["BlogTitle"]%> +

@@ -24,7 +25,7 @@
<%=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" })%> <% } %>
<% } %> @@ -47,4 +48,4 @@ <%= Html.ActionLink("Supprimer","RemovePost", new { user = Model.UserName, title = Model.Title }, new { @class="actionlink" } ) %> <% } %> -
\ No newline at end of file + diff --git a/web/Web.csproj b/web/Web.csproj index e27de344..a05ca240 100644 --- a/web/Web.csproj +++ b/web/Web.csproj @@ -157,12 +157,12 @@ - - LocalizedText.fr.resx - LocalizedText.resx + + LocalizedText.fr.resx + @@ -308,7 +308,7 @@ PublicResXFileCodeGenerator - LocalizedTextfr.Designer.cs + LocalizedText.fr.Designer.cs