diff --git a/README.md b/README.md index d245af76..1c1117ca 100644 --- a/README.md +++ b/README.md @@ -5,5 +5,25 @@ Yet Another Very Small Company For the moment, overall a little home made blogging system. -See for more information +Le but serait un SI gérant différents type de services, par exemple : + +- Dépannage informatique +- Développement logiciel +- Developpement Web +- Audit de sécurité +- Dématérialisation des documents + +Les livrables : + +- Un site web ASP.Net propulsé par Mono et Apache, et une application mobile pour + * demander un devis + * demander une intervention / saisir un ticket + * avoir un status des projets des clients + * avoir un status des ticket du client + +Les commandes : c'est une notion liée à celles +- de catalogue, d'article, d'options +- d'acteurs, de ressources humaines +- d'étapes inter dépendantes, de leurs attributs, de leurs états +- des dates butoires diff --git a/Yavsc.sln b/Yavsc.sln index a84dc8f2..1947183f 100644 --- a/Yavsc.sln +++ b/Yavsc.sln @@ -23,6 +23,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "plugins", "plugins", "{ECEC EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "fortune", "plugins\fortune\fortune.csproj", "{B5F49C21-7BB3-4DC0-AE65-F4ED0F6D15BD}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{7E3CF14D-91B6-4088-8630-7655C749130E}" + ProjectSection(SolutionItems) = preProject + LICENSE = LICENSE + Makefile = Makefile + noavatar.xcf = noavatar.xcf + README.md = README.md + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -74,7 +82,6 @@ Global {B5F49C21-7BB3-4DC0-AE65-F4ED0F6D15BD} = {ECEC9074-ACB5-4A74-BE22-FF7B40F25A1A} EndGlobalSection GlobalSection(MonoDevelopProperties) = preSolution - StartupItem = web\Web.csproj Policies = $0 $0.StandardHeader = $1 $1.Text = @\n ${FileName}\n \n Author:\n ${AuthorName} <${AuthorEmail}>\n \n Copyright (c) ${Year} ${CopyrightHolder}\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU Lesser General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public License\n along with this program. If not, see . diff --git a/web/Helpers/BBCodeHelper.cs b/web/Helpers/BBCodeHelper.cs index 5f0f4758..d6d093c6 100644 --- a/web/Helpers/BBCodeHelper.cs +++ b/web/Helpers/BBCodeHelper.cs @@ -93,15 +93,102 @@ namespace Yavsc.Helpers } private static BBCodeParser parser = null; - private static int sect1; - private static int sect2; - private static int sect3; + private static int sect1=0; + private static int sect2=0; + private static int sect3=0; private static Dictionary d = new Dictionary (); + /// - /// Init this instance. + /// Inits the parser. /// - public static void Init () + public static void InitParser () { + BBTag urlBBTag = new BBTag ("url", "", "", true, true, UrlContentTransformer, new BBAttribute ("href", "",UrlAttributeTransformer), new BBAttribute ("href", "href",UrlAttributeTransformer)); + + BBTag bblist =new BBTag ("list", "
    ", "
"); + BBTag bbs2=new BBTag ("sect2", + "
" + + "

${para} - ${title}

" + + "
${content}", + "
", + false, true, + Section2Transformer, + new BBAttribute ("title", "",TitleContentTransformer), + new BBAttribute ("title", "title", TitleContentTransformer), + new BBAttribute ("para", "para", L2ContentTransformer)); + BBTag bbs1=new BBTag ("sect1", + "
" + + "

${para} - ${title}

" + + "
${content}", + "
", + false, true, + Section1Transformer, + new BBAttribute ("title", "",TitleContentTransformer), + new BBAttribute ("title", "title", TitleContentTransformer), + new BBAttribute ("para", "para", L1ContentTransformer)); + BBTag bbdp=new BBTag ("docpage", + "
${content}", "
", + false, + false, + DocPageContentTransformer); + + parser = new BBCodeParser (new[] { + new BBTag ("b", "", ""), + new BBTag ("i", "", ""), + new BBTag ("em", "", ""), + new BBTag ("u", "", ""), + new BBTag ("code", "", ""), + new BBTag ("img", "\"${alt}\"", "", false, true, new BBAttribute ("alt", ""), new BBAttribute("alt","alt"), new BBAttribute ("style", "style")), + new BBTag ("quote", "
", "
"), + new BBTag ("div", "
", "
", new BBAttribute("style","style")), + new BBTag ("p", "

", "

"), + new BBTag ("h", "

", "

"), + bblist, + new BBTag ("*", "
  • ", "
  • ", true, false), + urlBBTag, + new BBTag ("br", "
    ", "", true, false), + new BBTag ("video", "", + new BBAttribute("mp4","mp4"), + new BBAttribute("ogg","ogg"), + new BBAttribute("webm","webm"), + new BBAttribute("style","style")), + new BBTag ("tag", "", "", true, true, + TagContentTransformer), + bbs1, + bbs2, + new BBTag ("sect3", + "
    " + + "

    ${para} - ${title}

    " + + "
    ${content}", + "
    ", + false, true, + Section3Transformer, + new BBAttribute ("title", "",TitleContentTransformer), + new BBAttribute ("title", "title", TitleContentTransformer), + new BBAttribute ("para", "para", L3ContentTransformer) + ), + bbdp, + new BBTag ("f", "", + new BBAttribute ("src", ""), new BBAttribute ("src", "src")), + + } + ); + // used to build the doc toc + parent.Clear (); + parent.Add ("*", bblist); + parent.Add ("sect3", bbs2); + parent.Add ("sect2", bbs1); + parent.Add ("sect1", bbdp); + // + } + /// + /// Inits the document page. + /// + public static void InitDocPage () + { sect1 = 0; sect2 = 0; sect3 = 0; @@ -170,10 +257,23 @@ namespace Yavsc.Helpers static string DocPageContentTransformer (string instr) { string toc = TocContentTransformer(instr); - Init (); + InitDocPage (); return toc+instr; } + static string urlValue = null; + static string UrlAttributeTransformer (IAttributeRenderingContext arg) + { + urlValue = arg.AttributeValue; + return webm; + } + static string UrlContentTransformer (string instr) + { + if (string.IsNullOrWhiteSpace (instr)) { + return urlValue; + } else + return instr; + } static string TagContentTransformer (string instr) { return instr; @@ -284,83 +384,7 @@ namespace Yavsc.Helpers public static BBCodeParser Parser { get { if (parser == null) { - Init (); - BBTag bblist =new BBTag ("list", "
      ", "
    "); - BBTag bbs2=new BBTag ("sect2", - "
    " + - "

    ${para} - ${title}

    " + - "
    ${content}", - "
    ", - false, true, - Section2Transformer, - new BBAttribute ("title", "",TitleContentTransformer), - new BBAttribute ("title", "title", TitleContentTransformer), - new BBAttribute ("para", "para", L2ContentTransformer)); - BBTag bbs1=new BBTag ("sect1", - "
    " + - "

    ${para} - ${title}

    " + - "
    ${content}", - "
    ", - false, true, - Section1Transformer, - new BBAttribute ("title", "",TitleContentTransformer), - new BBAttribute ("title", "title", TitleContentTransformer), - new BBAttribute ("para", "para", L1ContentTransformer)); - BBTag bbdp=new BBTag ("docpage", - "
    ${content}", "
    ", - false, - false, - DocPageContentTransformer); - - parser = new BBCodeParser (new[] { - new BBTag ("b", "", ""), - new BBTag ("i", "", ""), - new BBTag ("em", "", ""), - new BBTag ("u", "", ""), - new BBTag ("code", "", ""), - new BBTag ("img", "\"${alt}\"", "", false, true, new BBAttribute ("alt", ""), new BBAttribute("alt","alt"), new BBAttribute ("style", "style")), - new BBTag ("quote", "
    ", "
    "), - new BBTag ("div", "
    ", "
    ", new BBAttribute("style","style")), - new BBTag ("p", "

    ", "

    "), - new BBTag ("h", "

    ", "

    "), - bblist, - new BBTag ("*", "
  • ", "
  • ", true, false), - new BBTag ("url", "", " <${href}>", true, false, new BBAttribute ("href", ""), new BBAttribute ("href", "href")), - new BBTag ("br", "
    ", "", true, false), - new BBTag ("video", "", - new BBAttribute("mp4","mp4"), - new BBAttribute("ogg","ogg"), - new BBAttribute("webm","webm"), - new BBAttribute("style","style")), - new BBTag ("tag", "", "", true, true, - TagContentTransformer), - bbs1, - bbs2, - new BBTag ("sect3", - "
    " + - "

    ${para} - ${title}

    " + - "
    ${content}", - "
    ", - false, true, - Section3Transformer, - new BBAttribute ("title", "",TitleContentTransformer), - new BBAttribute ("title", "title", TitleContentTransformer), - new BBAttribute ("para", "para", L3ContentTransformer) - ), - bbdp, - new BBTag ("f", "", - new BBAttribute ("src", ""), new BBAttribute ("src", "src")), - - } - ); - parent.Add ("*", bblist); - parent.Add ("sect3", bbs2); - parent.Add ("sect2", bbs1); - parent.Add ("sect1", bbdp); - + InitParser (); } return parser; } diff --git a/web/README b/web/README deleted file mode 100644 index ff3a63f8..00000000 --- a/web/README +++ /dev/null @@ -1,45 +0,0 @@ - Yavsc is a point of sales, implemented in a dot Net Web application - Copyright (C) 2014 Paul Schneider - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -You may contact me at - -------- - -Yavsc ("Yet Another Very Small Company") - -Les services : - -- Dépannage informatique -- Développement logiciel -- Developpement Web -- Audit de sécurité -- Dématérialisation des documents -- ... - -Les livrables : - -- Un site web ASP.Net propulsé par Mono et Apache, et une application mobile pour - * demander un devis - * avoir un status des projets des clients - * demander une intervention / saisir un ticket - * avoir un status des ticket du client - -Les projets : - -- des acteurs / des ressources humaines -- des etapes inter dépendantes, leurs attributs, leurs états -- des dates butoires - diff --git a/web/Views/Blogs/Edit.aspx b/web/Views/Blogs/Edit.aspx index e492ae44..393daffc 100644 --- a/web/Views/Blogs/Edit.aspx +++ b/web/Views/Blogs/Edit.aspx @@ -20,7 +20,7 @@ <% if (Model != null ) if (Model.Content != null ) { - BBCodeHelper.Init (); %> + BBCodeHelper.InitParser (); %> <%= Html.ActionLink(Model.Title,"UserPost",new{user=Model.UserName,title=Model.Title}) %>
    <%= BBCodeHelper.Parser.ToHtml(Model.Content) %> diff --git a/web/Views/Blogs/UserPost.aspx b/web/Views/Blogs/UserPost.aspx index 1b45b324..1f00583e 100644 --- a/web/Views/Blogs/UserPost.aspx +++ b/web/Views/Blogs/UserPost.aspx @@ -18,7 +18,6 @@
    - <% BBCodeHelper.Init(); %> <%= BBCodeHelper.Parser.ToHtml(Model.Content) %>
    <% diff --git a/web/Web.csproj b/web/Web.csproj index 383a78b1..8b266c26 100644 --- a/web/Web.csproj +++ b/web/Web.csproj @@ -681,7 +681,6 @@ - TextTemplatingFilePreprocessor Estim.cs