mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Add admin index.
This commit is contained in:
41
cicm_web/Areas/Admin/Controllers/HomeController.cs
Normal file
41
cicm_web/Areas/Admin/Controllers/HomeController.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
/******************************************************************************
|
||||
// Canary Islands Computer Museum Website
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : HomeController.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Admin controller
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// 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/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2018 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace cicm_web.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
public class HomeController : Controller
|
||||
{
|
||||
// GET
|
||||
public IActionResult Index() => View();
|
||||
}
|
||||
}
|
||||
59
cicm_web/Areas/Admin/Views/Home/Index.cshtml
Normal file
59
cicm_web/Areas/Admin/Views/Home/Index.cshtml
Normal file
@@ -0,0 +1,59 @@
|
||||
@{
|
||||
/******************************************************************************
|
||||
// Canary Islands Computer Museum Website
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Index.cshtml
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Admin page
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// 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/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2018 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
ViewData["Title"] = "Admin";
|
||||
}
|
||||
|
||||
<h2>Administration</h2>
|
||||
|
||||
<div class="content">
|
||||
<h3>Database administrative pages</h3>
|
||||
<a asp-controller="BrowserTests">Browser tests</a><br />
|
||||
<a asp-controller="Companies">Companies</a><br />
|
||||
<a asp-controller="CompanyDescriptions">Company descriptions</a><br />
|
||||
<a asp-controller="Gpus">GPUs</a><br />
|
||||
<a asp-controller="InstructionSets">Instruction sets</a><br />
|
||||
<a asp-controller="InstructionSetExtensions">Instruction set extensions</a><br />
|
||||
<a asp-controller="MachineFamilies">Machine families</a><br />
|
||||
<a asp-controller="Machines">Machines</a><br />
|
||||
<a asp-controller="MemoryByMachines">Memory by machines</a><br />
|
||||
<a asp-controller="News">News</a><br />
|
||||
<a asp-controller="ProcessorsByMachines">Processors by machines</a><br />
|
||||
<a asp-controller="Processors">Processors</a><br />
|
||||
<a asp-controller="Resolutions">Resolutions</a><br />
|
||||
<a asp-controller="SoundSynths">Sound synthetizers</a><br />
|
||||
<a asp-controller="StorageByMachines">Storage by machines</a><br />
|
||||
</div>
|
||||
|
||||
<div class="content">
|
||||
<h3>User administrative pages</h3>
|
||||
@* TODO *@ To be implemented
|
||||
</div>
|
||||
@@ -1,4 +1,7 @@
|
||||
@using Microsoft.AspNetCore.Identity
|
||||
@using Microsoft.Extensions.PlatformAbstractions
|
||||
@inject SignInManager<IdentityUser> SignInManager
|
||||
@inject UserManager<IdentityUser> UserManager
|
||||
@{
|
||||
/******************************************************************************
|
||||
// Canary Islands Computer Museum Website
|
||||
@@ -33,106 +36,119 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=utf-8 />
|
||||
<meta charset="utf-8" />
|
||||
<meta content="width=device-width, initial-scale=1.0"
|
||||
name=viewport />
|
||||
name="viewport" />
|
||||
<title>Canary Islands Computer Museum - @ViewData["Title"]</title>
|
||||
|
||||
<environment include=Development>
|
||||
<link href=~/lib/bootstrap/dist/css/bootstrap.css
|
||||
rel=stylesheet />
|
||||
<link href=~/css/site.css
|
||||
rel=stylesheet />
|
||||
<environment include="Development">
|
||||
<link href="~/lib/bootstrap/dist/css/bootstrap.css"
|
||||
rel="stylesheet" />
|
||||
<link href="~/css/site.css"
|
||||
rel="stylesheet" />
|
||||
</environment>
|
||||
<environment exclude=Development>
|
||||
<link asp-fallback-href=~/lib/bootstrap/dist/css/bootstrap.min.css
|
||||
asp-fallback-test-class=sr-only
|
||||
asp-fallback-test-property=position
|
||||
asp-fallback-test-value=absolute
|
||||
href=https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css
|
||||
rel=stylesheet />
|
||||
<link asp-append-version=true
|
||||
href=~/css/site.min.css
|
||||
rel=stylesheet />
|
||||
<environment exclude="Development">
|
||||
<link asp-fallback-href="~/lib/bootstrap/dist/css/bootstrap.min.css"
|
||||
asp-fallback-test-class="sr-only"
|
||||
asp-fallback-test-property="position"
|
||||
asp-fallback-test-value="absolute"
|
||||
href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css"
|
||||
rel="stylesheet" />
|
||||
<link asp-append-version="true"
|
||||
href="~/css/site.min.css"
|
||||
rel="stylesheet" />
|
||||
</environment>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="bg-dark navbar navbar-dark navbar-expand-lg">
|
||||
<a class=navbar-brand
|
||||
href=#>
|
||||
<a class="navbar-brand"
|
||||
href="#">
|
||||
CICM
|
||||
</a>
|
||||
<button aria-controls=navbarSupportedContent
|
||||
aria-expanded=false
|
||||
<button aria-controls="navbarSupportedContent"
|
||||
aria-expanded="false"
|
||||
aria-label="Toggle navigation"
|
||||
class=navbar-toggler
|
||||
data-target=#navbarSupportedContent
|
||||
data-toggle=collapse
|
||||
type=button>
|
||||
<span class=navbar-toggler-icon>
|
||||
class="navbar-toggler"
|
||||
data-target="#navbarSupportedContent"
|
||||
data-toggle="collapse"
|
||||
type="button">
|
||||
<span class="navbar-toggler-icon">
|
||||
</span>
|
||||
</button>
|
||||
|
||||
<div class="collapse navbar-collapse"
|
||||
id=navbarSupportedContent>
|
||||
id="navbarSupportedContent">
|
||||
<ul class="mr-auto navbar-nav">
|
||||
<li class=nav-item>
|
||||
<a asp-action=Index
|
||||
<li class="nav-item">
|
||||
<a asp-action="Index"
|
||||
asp-area=""
|
||||
asp-controller=Home
|
||||
class=nav-link>
|
||||
asp-controller="Home"
|
||||
class="nav-link">
|
||||
Home
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown nav-item">
|
||||
<a aria-expanded=false
|
||||
aria-haspopup=true
|
||||
<a aria-expanded="false"
|
||||
aria-haspopup="true"
|
||||
class="dropdown-toggle nav-link"
|
||||
data-toggle=dropdown
|
||||
href=#
|
||||
id=navbarDropdown
|
||||
role=button>
|
||||
data-toggle="dropdown"
|
||||
href="#"
|
||||
id="navbarDropdown"
|
||||
role="button">
|
||||
Database
|
||||
</a>
|
||||
<div aria-labelledby=navbarDropdown
|
||||
class=dropdown-menu>
|
||||
<a asp-action=Index
|
||||
asp-controller=Company
|
||||
class=dropdown-item>
|
||||
<div aria-labelledby="navbarDropdown"
|
||||
class="dropdown-menu">
|
||||
<a asp-action="Index"
|
||||
asp-controller="Company"
|
||||
class="dropdown-item">
|
||||
Companies
|
||||
</a>
|
||||
<div class=dropdown-divider>
|
||||
<div class="dropdown-divider">
|
||||
</div>
|
||||
<a asp-action=Index
|
||||
asp-controller=Computer
|
||||
class=dropdown-item>
|
||||
<a asp-action="Index"
|
||||
asp-controller="Computer"
|
||||
class="dropdown-item">
|
||||
Computers
|
||||
</a>
|
||||
<div class=dropdown-divider>
|
||||
<div class="dropdown-divider">
|
||||
</div>
|
||||
<a asp-action=Index
|
||||
asp-controller=Console
|
||||
class=dropdown-item>
|
||||
<a asp-action="Index"
|
||||
asp-controller="Console"
|
||||
class="dropdown-item">
|
||||
Consoles
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
<li class=nav-item>
|
||||
<a asp-action=About
|
||||
<li class="nav-item">
|
||||
<a asp-action="About"
|
||||
asp-area=""
|
||||
asp-controller=Home
|
||||
class=nav-link>
|
||||
asp-controller="Home"
|
||||
class="nav-link">
|
||||
About
|
||||
</a>
|
||||
</li>
|
||||
<li class=nav-item>
|
||||
<a asp-action=Contact
|
||||
<li class="nav-item">
|
||||
<a asp-action="Contact"
|
||||
asp-area=""
|
||||
asp-controller=Home
|
||||
class=nav-link>
|
||||
asp-controller="Home"
|
||||
class="nav-link">
|
||||
Contact
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@if(SignInManager.IsSignedIn(User))
|
||||
{
|
||||
<li class=nav-item>
|
||||
<a asp-action=Index
|
||||
asp-area="Admin"
|
||||
class=nav-link>
|
||||
Admin
|
||||
</a>
|
||||
</li>
|
||||
}
|
||||
|
||||
|
||||
</ul>
|
||||
<partial name="_LoginPartial" />
|
||||
</div>
|
||||
@@ -145,25 +161,25 @@
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<environment include=Development>
|
||||
<script src=~/lib/jquery/dist/jquery.js></script>
|
||||
<script src=~/lib/bootstrap/dist/js/bootstrap.js></script>
|
||||
<script asp-append-version=true
|
||||
src=~/js/site.js></script>
|
||||
<environment include="Development">
|
||||
<script src="~/lib/jquery/dist/jquery.js"></script>
|
||||
<script src="~/lib/bootstrap/dist/js/bootstrap.js"></script>
|
||||
<script asp-append-version="true"
|
||||
src="~/js/site.js"></script>
|
||||
</environment>
|
||||
<environment exclude=Development>
|
||||
<script asp-fallback-src=~/lib/jquery/dist/jquery.min.js
|
||||
asp-fallback-test=window.jQuery
|
||||
crossorigin=anonymous
|
||||
src=https://ajax.aspnetcdn.com/ajax/jquery/jquery-3.3.1.min.js>
|
||||
<environment exclude="Development">
|
||||
<script asp-fallback-src="~/lib/jquery/dist/jquery.min.js"
|
||||
asp-fallback-test="window.jQuery"
|
||||
crossorigin="anonymous"
|
||||
src="https://ajax.aspnetcdn.com/ajax/jquery/jquery-3.3.1.min.js">
|
||||
</script>
|
||||
<script asp-fallback-src=~/lib/bootstrap/dist/js/bootstrap.min.js
|
||||
<script asp-fallback-src="~/lib/bootstrap/dist/js/bootstrap.min.js"
|
||||
asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal"
|
||||
crossorigin=anonymous
|
||||
src=https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/bootstrap.min.js>
|
||||
crossorigin="anonymous"
|
||||
src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/bootstrap.min.js">
|
||||
</script>
|
||||
<script asp-append-version=true
|
||||
src=~/js/site.min.js></script>
|
||||
<script asp-append-version="true"
|
||||
src="~/js/site.min.js"></script>
|
||||
</environment>
|
||||
|
||||
@RenderSection("Scripts", false)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.2</TargetFramework>
|
||||
<Version>3.0.99.392</Version>
|
||||
<Version>3.0.99.394</Version>
|
||||
<Company>Canary Islands Computer Museum</Company>
|
||||
<Copyright>Copyright © 2003-2018 Natalia Portillo</Copyright>
|
||||
<Product>Canary Islands Computer Museum Website</Product>
|
||||
|
||||
Reference in New Issue
Block a user