* README.md: a little more
* Yavsc.sln: Adds some solution items * BBCodeHelper.cs: code formatting * Edit.aspx: refactoring * UserPost.aspx: useless statment * Web.csproj: README removal * README: moved to /README.md
This commit is contained in:
parent
60236ba517
commit
a342b744df
7 changed files with 137 additions and 133 deletions
22
README.md
22
README.md
|
|
@ -5,5 +5,25 @@ Yet Another Very Small Company
|
||||||
|
|
||||||
For the moment, overall a little home made blogging system.
|
For the moment, overall a little home made blogging system.
|
||||||
|
|
||||||
See <http://yavsc.pschneider.fr/Blogs/UserPost/paul/Documentation> 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
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "plugins", "plugins", "{ECEC
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "fortune", "plugins\fortune\fortune.csproj", "{B5F49C21-7BB3-4DC0-AE65-F4ED0F6D15BD}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "fortune", "plugins\fortune\fortune.csproj", "{B5F49C21-7BB3-4DC0-AE65-F4ED0F6D15BD}"
|
||||||
EndProject
|
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
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
|
@ -74,7 +82,6 @@ Global
|
||||||
{B5F49C21-7BB3-4DC0-AE65-F4ED0F6D15BD} = {ECEC9074-ACB5-4A74-BE22-FF7B40F25A1A}
|
{B5F49C21-7BB3-4DC0-AE65-F4ED0F6D15BD} = {ECEC9074-ACB5-4A74-BE22-FF7B40F25A1A}
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(MonoDevelopProperties) = preSolution
|
GlobalSection(MonoDevelopProperties) = preSolution
|
||||||
StartupItem = web\Web.csproj
|
|
||||||
Policies = $0
|
Policies = $0
|
||||||
$0.StandardHeader = $1
|
$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 <http://www.gnu.org/licenses/>.
|
$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 <http://www.gnu.org/licenses/>.
|
||||||
|
|
|
||||||
|
|
@ -93,15 +93,102 @@ namespace Yavsc.Helpers
|
||||||
|
|
||||||
}
|
}
|
||||||
private static BBCodeParser parser = null;
|
private static BBCodeParser parser = null;
|
||||||
private static int sect1;
|
private static int sect1=0;
|
||||||
private static int sect2;
|
private static int sect2=0;
|
||||||
private static int sect3;
|
private static int sect3=0;
|
||||||
private static Dictionary<string,string> d = new Dictionary<string,string> ();
|
private static Dictionary<string,string> d = new Dictionary<string,string> ();
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Init this instance.
|
/// Inits the parser.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static void Init ()
|
public static void InitParser ()
|
||||||
{
|
{
|
||||||
|
BBTag urlBBTag = new BBTag ("url", "<a href=\"${href}\">", "</a>", true, true, UrlContentTransformer, new BBAttribute ("href", "",UrlAttributeTransformer), new BBAttribute ("href", "href",UrlAttributeTransformer));
|
||||||
|
|
||||||
|
BBTag bblist =new BBTag ("list", "<ul>", "</ul>");
|
||||||
|
BBTag bbs2=new BBTag ("sect2",
|
||||||
|
"<div class=\"section\">" +
|
||||||
|
"<h2><a name=\"s${para}\" href=\"#${para}\">${para} - ${title}</a></h2>" +
|
||||||
|
"<div>${content}",
|
||||||
|
"</div></div>",
|
||||||
|
false, true,
|
||||||
|
Section2Transformer,
|
||||||
|
new BBAttribute ("title", "",TitleContentTransformer),
|
||||||
|
new BBAttribute ("title", "title", TitleContentTransformer),
|
||||||
|
new BBAttribute ("para", "para", L2ContentTransformer));
|
||||||
|
BBTag bbs1=new BBTag ("sect1",
|
||||||
|
"<div class=\"section\">" +
|
||||||
|
"<h1><a name=\"s${para}\" href=\"#s${para}\">${para} - ${title}</a></h1>" +
|
||||||
|
"<div>${content}",
|
||||||
|
"</div></div>",
|
||||||
|
false, true,
|
||||||
|
Section1Transformer,
|
||||||
|
new BBAttribute ("title", "",TitleContentTransformer),
|
||||||
|
new BBAttribute ("title", "title", TitleContentTransformer),
|
||||||
|
new BBAttribute ("para", "para", L1ContentTransformer));
|
||||||
|
BBTag bbdp=new BBTag ("docpage",
|
||||||
|
"<div class=docpage>${content}", "</div>",
|
||||||
|
false,
|
||||||
|
false,
|
||||||
|
DocPageContentTransformer);
|
||||||
|
|
||||||
|
parser = new BBCodeParser (new[] {
|
||||||
|
new BBTag ("b", "<b>", "</b>"),
|
||||||
|
new BBTag ("i", "<span style=\"font-style:italic;\">", "</span>"),
|
||||||
|
new BBTag ("em", "<em>", "</em>"),
|
||||||
|
new BBTag ("u", "<span style=\"text-decoration:underline;\">", "</span>"),
|
||||||
|
new BBTag ("code", "<span class=\"code\">", "</span>"),
|
||||||
|
new BBTag ("img", "<img src=\"${content}\" alt=\"${alt}\" style=\"${style}\" />", "", false, true, new BBAttribute ("alt", ""), new BBAttribute("alt","alt"), new BBAttribute ("style", "style")),
|
||||||
|
new BBTag ("quote", "<blockquote>", "</blockquote>"),
|
||||||
|
new BBTag ("div", "<div style=\"${style}\">", "</div>", new BBAttribute("style","style")),
|
||||||
|
new BBTag ("p", "<p>", "</p>"),
|
||||||
|
new BBTag ("h", "<h2>", "</h2>"),
|
||||||
|
bblist,
|
||||||
|
new BBTag ("*", "<li>", "</li>", true, false),
|
||||||
|
urlBBTag,
|
||||||
|
new BBTag ("br", "<br/>", "", true, false),
|
||||||
|
new BBTag ("video", "<video style=\"${style}\" controls>" +
|
||||||
|
"<source src=\"${mp4}\" type=\"video/mp4\"/>" +
|
||||||
|
"<source src=\"${ogg}\" type=\"video/ogg\"/>" +
|
||||||
|
"<source src=\"${webm}\" type=\"video/webm\"/>","</video>",
|
||||||
|
new BBAttribute("mp4","mp4"),
|
||||||
|
new BBAttribute("ogg","ogg"),
|
||||||
|
new BBAttribute("webm","webm"),
|
||||||
|
new BBAttribute("style","style")),
|
||||||
|
new BBTag ("tag", "<span class=\"tag\">", "</span>", true, true,
|
||||||
|
TagContentTransformer),
|
||||||
|
bbs1,
|
||||||
|
bbs2,
|
||||||
|
new BBTag ("sect3",
|
||||||
|
"<div class=\"section\">" +
|
||||||
|
"<h3><a name=\"s${para}\" href=\"#${para}\">${para} - ${title}</a></h3>" +
|
||||||
|
"<div>${content}",
|
||||||
|
"</div></div>",
|
||||||
|
false, true,
|
||||||
|
Section3Transformer,
|
||||||
|
new BBAttribute ("title", "",TitleContentTransformer),
|
||||||
|
new BBAttribute ("title", "title", TitleContentTransformer),
|
||||||
|
new BBAttribute ("para", "para", L3ContentTransformer)
|
||||||
|
),
|
||||||
|
bbdp,
|
||||||
|
new BBTag ("f", "<iframe src=\"${src}\">", "</iframe>",
|
||||||
|
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);
|
||||||
|
//
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Inits the document page.
|
||||||
|
/// </summary>
|
||||||
|
public static void InitDocPage ()
|
||||||
|
{
|
||||||
sect1 = 0;
|
sect1 = 0;
|
||||||
sect2 = 0;
|
sect2 = 0;
|
||||||
sect3 = 0;
|
sect3 = 0;
|
||||||
|
|
@ -170,10 +257,23 @@ namespace Yavsc.Helpers
|
||||||
static string DocPageContentTransformer (string instr)
|
static string DocPageContentTransformer (string instr)
|
||||||
{
|
{
|
||||||
string toc = TocContentTransformer(instr);
|
string toc = TocContentTransformer(instr);
|
||||||
Init ();
|
InitDocPage ();
|
||||||
return toc+instr;
|
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)
|
static string TagContentTransformer (string instr)
|
||||||
{
|
{
|
||||||
return instr;
|
return instr;
|
||||||
|
|
@ -284,83 +384,7 @@ namespace Yavsc.Helpers
|
||||||
public static BBCodeParser Parser {
|
public static BBCodeParser Parser {
|
||||||
get {
|
get {
|
||||||
if (parser == null) {
|
if (parser == null) {
|
||||||
Init ();
|
InitParser ();
|
||||||
BBTag bblist =new BBTag ("list", "<ul>", "</ul>");
|
|
||||||
BBTag bbs2=new BBTag ("sect2",
|
|
||||||
"<div class=\"section\">" +
|
|
||||||
"<h2><a name=\"s${para}\" href=\"#${para}\">${para} - ${title}</a></h2>" +
|
|
||||||
"<div>${content}",
|
|
||||||
"</div></div>",
|
|
||||||
false, true,
|
|
||||||
Section2Transformer,
|
|
||||||
new BBAttribute ("title", "",TitleContentTransformer),
|
|
||||||
new BBAttribute ("title", "title", TitleContentTransformer),
|
|
||||||
new BBAttribute ("para", "para", L2ContentTransformer));
|
|
||||||
BBTag bbs1=new BBTag ("sect1",
|
|
||||||
"<div class=\"section\">" +
|
|
||||||
"<h1><a name=\"s${para}\" href=\"#s${para}\">${para} - ${title}</a></h1>" +
|
|
||||||
"<div>${content}",
|
|
||||||
"</div></div>",
|
|
||||||
false, true,
|
|
||||||
Section1Transformer,
|
|
||||||
new BBAttribute ("title", "",TitleContentTransformer),
|
|
||||||
new BBAttribute ("title", "title", TitleContentTransformer),
|
|
||||||
new BBAttribute ("para", "para", L1ContentTransformer));
|
|
||||||
BBTag bbdp=new BBTag ("docpage",
|
|
||||||
"<div class=docpage>${content}", "</div>",
|
|
||||||
false,
|
|
||||||
false,
|
|
||||||
DocPageContentTransformer);
|
|
||||||
|
|
||||||
parser = new BBCodeParser (new[] {
|
|
||||||
new BBTag ("b", "<b>", "</b>"),
|
|
||||||
new BBTag ("i", "<span style=\"font-style:italic;\">", "</span>"),
|
|
||||||
new BBTag ("em", "<em>", "</em>"),
|
|
||||||
new BBTag ("u", "<span style=\"text-decoration:underline;\">", "</span>"),
|
|
||||||
new BBTag ("code", "<span class=\"code\">", "</span>"),
|
|
||||||
new BBTag ("img", "<img src=\"${content}\" alt=\"${alt}\" style=\"${style}\" />", "", false, true, new BBAttribute ("alt", ""), new BBAttribute("alt","alt"), new BBAttribute ("style", "style")),
|
|
||||||
new BBTag ("quote", "<blockquote>", "</blockquote>"),
|
|
||||||
new BBTag ("div", "<div style=\"${style}\">", "</div>", new BBAttribute("style","style")),
|
|
||||||
new BBTag ("p", "<p>", "</p>"),
|
|
||||||
new BBTag ("h", "<h2>", "</h2>"),
|
|
||||||
bblist,
|
|
||||||
new BBTag ("*", "<li>", "</li>", true, false),
|
|
||||||
new BBTag ("url", "<a href=\"${href}\">", " <<i>${href}</i>></a>", true, false, new BBAttribute ("href", ""), new BBAttribute ("href", "href")),
|
|
||||||
new BBTag ("br", "<br/>", "", true, false),
|
|
||||||
new BBTag ("video", "<video style=\"${style}\" controls>" +
|
|
||||||
"<source src=\"${mp4}\" type=\"video/mp4\"/>" +
|
|
||||||
"<source src=\"${ogg}\" type=\"video/ogg\"/>" +
|
|
||||||
"<source src=\"${webm}\" type=\"video/webm\"/>","</video>",
|
|
||||||
new BBAttribute("mp4","mp4"),
|
|
||||||
new BBAttribute("ogg","ogg"),
|
|
||||||
new BBAttribute("webm","webm"),
|
|
||||||
new BBAttribute("style","style")),
|
|
||||||
new BBTag ("tag", "<span class=\"tag\">", "</span>", true, true,
|
|
||||||
TagContentTransformer),
|
|
||||||
bbs1,
|
|
||||||
bbs2,
|
|
||||||
new BBTag ("sect3",
|
|
||||||
"<div class=\"section\">" +
|
|
||||||
"<h3><a name=\"s${para}\" href=\"#${para}\">${para} - ${title}</a></h3>" +
|
|
||||||
"<div>${content}",
|
|
||||||
"</div></div>",
|
|
||||||
false, true,
|
|
||||||
Section3Transformer,
|
|
||||||
new BBAttribute ("title", "",TitleContentTransformer),
|
|
||||||
new BBAttribute ("title", "title", TitleContentTransformer),
|
|
||||||
new BBAttribute ("para", "para", L3ContentTransformer)
|
|
||||||
),
|
|
||||||
bbdp,
|
|
||||||
new BBTag ("f", "<iframe src=\"${src}\">", "</iframe>",
|
|
||||||
new BBAttribute ("src", ""), new BBAttribute ("src", "src")),
|
|
||||||
|
|
||||||
}
|
|
||||||
);
|
|
||||||
parent.Add ("*", bblist);
|
|
||||||
parent.Add ("sect3", bbs2);
|
|
||||||
parent.Add ("sect2", bbs1);
|
|
||||||
parent.Add ("sect1", bbdp);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
return parser;
|
return parser;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
45
web/README
45
web/README
|
|
@ -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 <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
You may contact me at <paulschneider@free.fr>
|
|
||||||
|
|
||||||
-------
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||||
<% if (Model != null ) if (Model.Content != null ) {
|
<% if (Model != null ) if (Model.Content != null ) {
|
||||||
BBCodeHelper.Init (); %>
|
BBCodeHelper.InitParser (); %>
|
||||||
<%= Html.ActionLink(Model.Title,"UserPost",new{user=Model.UserName,title=Model.Title}) %>
|
<%= Html.ActionLink(Model.Title,"UserPost",new{user=Model.UserName,title=Model.Title}) %>
|
||||||
<div class="blogpost">
|
<div class="blogpost">
|
||||||
<%= BBCodeHelper.Parser.ToHtml(Model.Content) %>
|
<%= BBCodeHelper.Parser.ToHtml(Model.Content) %>
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@
|
||||||
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
<asp:Content ContentPlaceHolderID="MainContent" ID="MainContentContent" runat="server">
|
||||||
|
|
||||||
<div class="blogpost">
|
<div class="blogpost">
|
||||||
<% BBCodeHelper.Init(); %>
|
|
||||||
<%= BBCodeHelper.Parser.ToHtml(Model.Content) %>
|
<%= BBCodeHelper.Parser.ToHtml(Model.Content) %>
|
||||||
</div>
|
</div>
|
||||||
<%
|
<%
|
||||||
|
|
|
||||||
|
|
@ -681,7 +681,6 @@
|
||||||
</MonoDevelop>
|
</MonoDevelop>
|
||||||
</ProjectExtensions>
|
</ProjectExtensions>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="README" />
|
|
||||||
<None Include="templates\Estim.tt">
|
<None Include="templates\Estim.tt">
|
||||||
<Generator>TextTemplatingFilePreprocessor</Generator>
|
<Generator>TextTemplatingFilePreprocessor</Generator>
|
||||||
<LastGenOutput>Estim.cs</LastGenOutput>
|
<LastGenOutput>Estim.cs</LastGenOutput>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue