From fc4bfad0441f2a7d26b5907a18d1d86dee697fd1 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Sat, 29 Dec 2018 13:29:44 +0000 Subject: [PATCH] Add missing documentation. --- .../.idea/contentModel.xml | 6 ++ .../Controllers/HomeController.cs | 68 +++++++++++++ .../DiscImageChef.Server.csproj | 6 ++ .../Views/Home/CODE_OF_CONDUCT.cshtml | 97 +++++++++++++++++++ .../Views/Home/CONTRIBUTING.cshtml | 97 +++++++++++++++++++ .../Views/Home/ISSUE_TEMPLATE.cshtml | 97 +++++++++++++++++++ .../Views/Home/PULL_REQUEST_TEMPLATE.cshtml | 97 +++++++++++++++++++ DiscImageChef.Server/docs/CONTRIBUTING.md | 1 + DiscImageChef.Server/docs/NEEDINFO.md | 1 + 9 files changed, 470 insertions(+) create mode 100644 DiscImageChef.Server/Views/Home/CODE_OF_CONDUCT.cshtml create mode 100644 DiscImageChef.Server/Views/Home/CONTRIBUTING.cshtml create mode 100644 DiscImageChef.Server/Views/Home/ISSUE_TEMPLATE.cshtml create mode 100644 DiscImageChef.Server/Views/Home/PULL_REQUEST_TEMPLATE.cshtml create mode 120000 DiscImageChef.Server/docs/CONTRIBUTING.md create mode 120000 DiscImageChef.Server/docs/NEEDINFO.md diff --git a/.idea/.idea.DiscImageChef/.idea/contentModel.xml b/.idea/.idea.DiscImageChef/.idea/contentModel.xml index eb975c516..1c62ea11c 100644 --- a/.idea/.idea.DiscImageChef/.idea/contentModel.xml +++ b/.idea/.idea.DiscImageChef/.idea/contentModel.xml @@ -1862,9 +1862,13 @@ + + + + @@ -1880,8 +1884,10 @@ + + diff --git a/DiscImageChef.Server/Controllers/HomeController.cs b/DiscImageChef.Server/Controllers/HomeController.cs index 45445ebd1..fcc46b9e4 100644 --- a/DiscImageChef.Server/Controllers/HomeController.cs +++ b/DiscImageChef.Server/Controllers/HomeController.cs @@ -43,6 +43,74 @@ namespace DiscImageChef.Server.Controllers return View(); } + public ActionResult CODE_OF_CONDUCT() + { + StreamReader sr = + new StreamReader(Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(), + "docs", "CODE_OF_CONDUCT.md")); + string mdcontent = sr.ReadToEnd(); + sr.Close(); + + mdcontent = mdcontent.Replace(".md)", ")").Replace("(.github/", "("); + + ViewBag.Markdown = Markdown.ToHtml(mdcontent); + + ViewBag.lblVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); + + return View(); + } + + public ActionResult PULL_REQUEST_TEMPLATE() + { + StreamReader sr = + new StreamReader(Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(), + "docs", "PULL_REQUEST_TEMPLATE.md")); + string mdcontent = sr.ReadToEnd(); + sr.Close(); + + mdcontent = mdcontent.Replace(".md)", ")").Replace("(.github/", "("); + + ViewBag.Markdown = Markdown.ToHtml(mdcontent); + + ViewBag.lblVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); + + return View(); + } + + public ActionResult ISSUE_TEMPLATE() + { + StreamReader sr = + new StreamReader(Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(), + "docs", "ISSUE_TEMPLATE.md")); + string mdcontent = sr.ReadToEnd(); + sr.Close(); + + mdcontent = mdcontent.Replace(".md)", ")").Replace("(.github/", "("); + + ViewBag.Markdown = Markdown.ToHtml(mdcontent); + + ViewBag.lblVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); + + return View(); + } + + public ActionResult CONTRIBUTING() + { + StreamReader sr = + new StreamReader(Path.Combine(HostingEnvironment.MapPath("~") ?? throw new InvalidOperationException(), + "docs", "CONTRIBUTING.md")); + string mdcontent = sr.ReadToEnd(); + sr.Close(); + + mdcontent = mdcontent.Replace(".md)", ")").Replace("(.github/", "("); + + ViewBag.Markdown = Markdown.ToHtml(mdcontent); + + ViewBag.lblVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); + + return View(); + } + public ActionResult DONATING() { StreamReader sr = diff --git a/DiscImageChef.Server/DiscImageChef.Server.csproj b/DiscImageChef.Server/DiscImageChef.Server.csproj index 05224afec..f0c33f041 100644 --- a/DiscImageChef.Server/DiscImageChef.Server.csproj +++ b/DiscImageChef.Server/DiscImageChef.Server.csproj @@ -276,7 +276,9 @@ + + @@ -297,7 +299,11 @@ + + + + diff --git a/DiscImageChef.Server/Views/Home/CODE_OF_CONDUCT.cshtml b/DiscImageChef.Server/Views/Home/CODE_OF_CONDUCT.cshtml new file mode 100644 index 000000000..24a500931 --- /dev/null +++ b/DiscImageChef.Server/Views/Home/CODE_OF_CONDUCT.cshtml @@ -0,0 +1,97 @@ +@{ + ViewBag.Title = "DiscImageChef"; +} +@{ + /*************************************************************************** + The Disc Image Chef +---------------------------------------------------------------------------- + + Filename : DONATING.aspx + Author(s) : Natalia Portillo + + Component : DiscImageChef Server. + +--[ Description ] ---------------------------------------------------------- + + Renders DONATING.md. + +--[ License ] -------------------------------------------------------------- + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, see . + +---------------------------------------------------------------------------- + Copyright © 2011-2018 Natalia Portillo +****************************************************************************/ +} + + + + + + + @ViewBag.Title + + + + + + +

+ @Html.ActionLink("Return to main page.", "Index")
+ DiscImageChef's code of conduct: +

+
@Html.Raw(ViewBag.Markdown)
+ + + + + + \ No newline at end of file diff --git a/DiscImageChef.Server/Views/Home/CONTRIBUTING.cshtml b/DiscImageChef.Server/Views/Home/CONTRIBUTING.cshtml new file mode 100644 index 000000000..6b245cdff --- /dev/null +++ b/DiscImageChef.Server/Views/Home/CONTRIBUTING.cshtml @@ -0,0 +1,97 @@ +@{ + ViewBag.Title = "DiscImageChef"; +} +@{ + /*************************************************************************** + The Disc Image Chef +---------------------------------------------------------------------------- + + Filename : DONATING.aspx + Author(s) : Natalia Portillo + + Component : DiscImageChef Server. + +--[ Description ] ---------------------------------------------------------- + + Renders DONATING.md. + +--[ License ] -------------------------------------------------------------- + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, see . + +---------------------------------------------------------------------------- + Copyright © 2011-2018 Natalia Portillo +****************************************************************************/ +} + + + + + + + @ViewBag.Title + + + + + + +

+ @Html.ActionLink("Return to main page.", "Index")
+ How to contribute to DiscImageChef: +

+
@Html.Raw(ViewBag.Markdown)
+ + + + + + \ No newline at end of file diff --git a/DiscImageChef.Server/Views/Home/ISSUE_TEMPLATE.cshtml b/DiscImageChef.Server/Views/Home/ISSUE_TEMPLATE.cshtml new file mode 100644 index 000000000..f655a589e --- /dev/null +++ b/DiscImageChef.Server/Views/Home/ISSUE_TEMPLATE.cshtml @@ -0,0 +1,97 @@ +@{ + ViewBag.Title = "DiscImageChef"; +} +@{ + /*************************************************************************** + The Disc Image Chef +---------------------------------------------------------------------------- + + Filename : DONATING.aspx + Author(s) : Natalia Portillo + + Component : DiscImageChef Server. + +--[ Description ] ---------------------------------------------------------- + + Renders DONATING.md. + +--[ License ] -------------------------------------------------------------- + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, see . + +---------------------------------------------------------------------------- + Copyright © 2011-2018 Natalia Portillo +****************************************************************************/ +} + + + + + + + @ViewBag.Title + + + + + + +

+ @Html.ActionLink("Return to main page.", "Index")
+ DiscImageChef's template for issue reports: +

+
@Html.Raw(ViewBag.Markdown)
+ + + + + + \ No newline at end of file diff --git a/DiscImageChef.Server/Views/Home/PULL_REQUEST_TEMPLATE.cshtml b/DiscImageChef.Server/Views/Home/PULL_REQUEST_TEMPLATE.cshtml new file mode 100644 index 000000000..4491ec7f6 --- /dev/null +++ b/DiscImageChef.Server/Views/Home/PULL_REQUEST_TEMPLATE.cshtml @@ -0,0 +1,97 @@ +@{ + ViewBag.Title = "DiscImageChef"; +} +@{ + /*************************************************************************** + The Disc Image Chef +---------------------------------------------------------------------------- + + Filename : DONATING.aspx + Author(s) : Natalia Portillo + + Component : DiscImageChef Server. + +--[ Description ] ---------------------------------------------------------- + + Renders DONATING.md. + +--[ License ] -------------------------------------------------------------- + + This library is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as + published by the Free Software Foundation; either version 2.1 of the + License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, see . + +---------------------------------------------------------------------------- + Copyright © 2011-2018 Natalia Portillo +****************************************************************************/ +} + + + + + + + @ViewBag.Title + + + + + + +

+ @Html.ActionLink("Return to main page.", "Index")
+ DiscImageChef's template for pull requests: +

+
@Html.Raw(ViewBag.Markdown)
+ + + + + + \ No newline at end of file diff --git a/DiscImageChef.Server/docs/CONTRIBUTING.md b/DiscImageChef.Server/docs/CONTRIBUTING.md new file mode 120000 index 000000000..f939e75f2 --- /dev/null +++ b/DiscImageChef.Server/docs/CONTRIBUTING.md @@ -0,0 +1 @@ +../../CONTRIBUTING.md \ No newline at end of file diff --git a/DiscImageChef.Server/docs/NEEDINFO.md b/DiscImageChef.Server/docs/NEEDINFO.md new file mode 120000 index 000000000..2765be7e2 --- /dev/null +++ b/DiscImageChef.Server/docs/NEEDINFO.md @@ -0,0 +1 @@ +../../NEEDINFO.md \ No newline at end of file