Fix admin css

This commit is contained in:
Markus Wang Halvorsen 2018-02-10 16:13:18 +01:00
parent 32aa9e077c
commit c4c5389fe8
9 changed files with 360 additions and 363 deletions

View File

@ -54,17 +54,25 @@ if($new == 0){
} }
?> ?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../../css/normalize.css"> <link rel="stylesheet" href="../../css/normalize.css">
<link rel="stylesheet" href="../../css/style.css"> <link rel="stylesheet" href="../../css/style.css">
<link rel="stylesheet" href="../../css/nav.css">
<link rel="stylesheet" href="../../css/events.css"> <link rel="stylesheet" href="../../css/events.css">
<link rel="stylesheet" href="../../css/admin.css"> <link rel="stylesheet" href="../../css/admin.css">
</head>
<header class="admin">Aktivitets&shy;administrasjon</header> <body>
<nav>
<?php echo navbar(3, 'admin'); ?>
<?php echo loginbar(); ?>
</nav>
<main> <main>
<h2>Aktivietsadministrasjon</h2>
<hr class="ruler">
<article>
<h2><?= ($new == 1 ? "Ny hendelse" : "Rediger hendelse"); ?></h2> <h2><?= ($new == 1 ? "Ny hendelse" : "Rediger hendelse"); ?></h2>
<form action="update.php", method="post" class="gridsplit5050"> <form action="update.php", method="post" class="gridsplit5050">
@ -102,11 +110,5 @@ if($new == 0){
<p> <p>
</article>
</main> </main>
</body>
<nav>
<?= navbar(2); ?>
<?= loginbar(); ?>
</nav>

View File

@ -47,18 +47,26 @@ $events = array_values(array_filter(
)); ));
?> ?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../../css/normalize.css"> <link rel="stylesheet" href="../../css/normalize.css">
<link rel="stylesheet" href="../../css/style.css"> <link rel="stylesheet" href="../../css/style.css">
<link rel="stylesheet" href="../css/nav.css"> <link rel="stylesheet" href="../../css/nav.css">
<link rel="stylesheet" href="../../css/events.css"> <link rel="stylesheet" href="../../css/events.css">
<link rel="stylesheet" href="../../css/admin.css"> <link rel="stylesheet" href="../../css/admin.css">
</head>
<header class="admin">Aktivitets&shy;administrasjon</header> <body>
<nav>
<?php echo navbar(2, 'admin'); ?>
<?php echo loginbar(); ?>
</nav>
<main> <main>
<h2>Aktivitetsadministrasjon</h2>
<hr class="ruler">
<article class="gridsplit"> <div class="gridsplit">
<div class="gridl"> <div class="gridl">
<h2 class="no-chin">Aktive aktiviteter</h2> <h2 class="no-chin">Aktive aktiviteter</h2>
<p class="subnote">Gjentagende aktiviteter vises ikke</p> <p class="subnote">Gjentagende aktiviteter vises ikke</p>
@ -127,11 +135,6 @@ $events = array_values(array_filter(
</div> </div>
</form> </form>
</div> </div>
</article> </div>
</main> </main>
</body>
<nav>
<?= navbar(2); ?>
<?= loginbar(); ?>
</nav>

View File

@ -3,6 +3,7 @@ ini_set('display_errors', '1');
date_default_timezone_set('Europe/Oslo'); date_default_timezone_set('Europe/Oslo');
setlocale(LC_ALL, 'no_NO'); setlocale(LC_ALL, 'no_NO');
error_reporting(E_ALL); error_reporting(E_ALL);
require __DIR__ . '/../../../inc/navbar.php';
require __DIR__ . '/../../../src/_autoload.php'; require __DIR__ . '/../../../src/_autoload.php';
require __DIR__ . '/../../../sql_config.php'; require __DIR__ . '/../../../sql_config.php';
require_once(__DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php'); require_once(__DIR__ . '/../../../vendor/simplesamlphp/simplesamlphp/lib/_autoload.php');
@ -27,37 +28,26 @@ if(!$userManager->isAdmin($uname)){
$users = $userManager->getAllUserData(); $users = $userManager->getAllUserData();
?> ?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../../css/normalize.css"> <link rel="stylesheet" href="../../css/normalize.css">
<link rel="stylesheet" href="../../css/style.css"> <link rel="stylesheet" href="../../css/style.css">
<link rel="stylesheet" href="../css/nav.css"> <link rel="stylesheet" href="../../css/nav.css">
<link rel="stylesheet" href="../../css/events.css"> <link rel="stylesheet" href="../../css/events.css">
<link rel="stylesheet" href="../../css/admin.css"> <link rel="stylesheet" href="../../css/admin.css">
<nav> <header class="admin">Bruker&shy;administrasjon</header>
<ul> </head>
<li class="active"><a href="index.php">hjem</a></li>
<li><a href="aktiviteter/">aktiviteter</a></li>
<li><a href="../prosjekt/">prosjekter</a></li>
<li><a href="kontakt">kontakt</a></li>
<li><a href="pvv/">wiki</a></li>
</ul>
<?php <body>
$attr = $as->getAttributes(); <nav>
if($attr){ <?php echo navbar(2, 'admin'); ?>
$uname = $attr["uid"][0]; <?php echo loginbar(); ?>
echo '<p class="login">logget inn som: ' . $uname . '</p>';
}else{
echo '<a class="login" href="' . $as->getLoginURL() . '">logg inn</a>';
}
?>
</nav> </nav>
<header class="admin">Bruker&shy;administrasjon</header>
<main> <main>
<article> <h2>Brukeradministrasjon</h2>
<hr class="ruler">
<form action="./update.php" method="post"> <form action="./update.php" method="post">
<table class="userlist"> <table class="userlist">
@ -101,6 +91,5 @@ $users = $userManager->getAllUserData();
</table> </table>
<input type="submit" class="btn" value="Lagre"> <input type="submit" class="btn" value="Lagre">
</form> </form>
</article>
</main> </main>
</body>

View File

@ -23,37 +23,37 @@ if(!($isAdmin | $projectGroup | $activityGroup)){
} }
?> ?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../css/normalize.css"> <link rel="stylesheet" href="../css/normalize.css">
<link rel="stylesheet" href="../css/style.css"> <link rel="stylesheet" href="../css/style.css">
<link rel="stylesheet" href="../css/nav.css"> <link rel="stylesheet" href="../css/nav.css">
<link rel="stylesheet" href="../css/events.css"> <link rel="stylesheet" href="../css/events.css">
<link rel="stylesheet" href="../css/admin.css"> <link rel="stylesheet" href="../css/admin.css">
</head>
<header class="admin">Stor-&shy;gutt-&shy;leketøy</header> <body>
<nav id="navbar">
<?php echo navbar(1, 'admin'); ?>
<?php echo loginbar(); ?>
</nav>
<main> <main>
<h2>Stor-gutt-leketøy</h2>
<article> <ul class="tools">
<h2>Verktøy</h2>
<?php <?php
if($isAdmin | $activityGroup){ if($isAdmin | $activityGroup){
echo '<a class="btn adminbtn" href="aktiviteter/?page=1">Aktiviteter/Hendelser</a>'; echo '<li><a class="btn" href="aktiviteter/?page=1">Aktiviteter/Hendelser</a></li>';
} }
if($isAdmin | $projectGroup){ if($isAdmin | $projectGroup){
echo '<a class="btn adminbtn" href="prosjekter/">Prosjekter</a>'; echo '<li><a class="btn" href="prosjekter/">Prosjekter</a></li>';
} }
if($isAdmin){ if($isAdmin){
echo '<a class="btn adminbtn" href="brukere/">Brukere</a>'; echo '<li><a class="btn" href="brukere/">Brukere</a></li>';
} }
?> ?>
</article> <ul>
</main> </main>
</body>
<nav>
<?= navbar(1); ?>
<?= loginbar(); ?>
</nav>

View File

@ -49,17 +49,25 @@ if($new == 0){
} }
?> ?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../../css/normalize.css"> <link rel="stylesheet" href="../../css/normalize.css">
<link rel="stylesheet" href="../../css/style.css"> <link rel="stylesheet" href="../../css/style.css">
<link rel="stylesheet" href="../../css/nav.css">
<link rel="stylesheet" href="../../css/events.css"> <link rel="stylesheet" href="../../css/events.css">
<link rel="stylesheet" href="../../css/admin.css"> <link rel="stylesheet" href="../../css/admin.css">
</head>
<header class="admin">Prosjekt&shy;administrasjon</header> <body>
<nav>
<?php echo navbar(3, 'admin'); ?>
<?php echo loginbar(); ?>
</nav>
<main> <main>
<h2>Prosjektadministrasjon</h2>
<hr class="ruler">
<article>
<h2><?= ($new == 1 ? "Nytt prosjekt" : "Rediger prosjekt"); ?></h2> <h2><?= ($new == 1 ? "Nytt prosjekt" : "Rediger prosjekt"); ?></h2>
<form action="update.php", method="post" class="gridsplit5050"> <form action="update.php", method="post" class="gridsplit5050">
@ -72,10 +80,10 @@ if($new == 0){
</div> </div>
<div class="gridr noborder"> <div class="gridr noborder">
<p class="subtitle">Prosjekteier (Brukernavn)</p> <p class="subtitle">Prosjektleder (Brukernavn)</p>
<?= '<input type="text" name="organiser" value="' . $project->getOwnerUName(). '" class="boxinput">' ?><br> <?= '<input type="text" name="organiser" value="' . $project->getOwnerUName(). '" class="boxinput">' ?><br>
<p class="subtitle">Prosjekteier (Navn)</p> <p class="subtitle">Prosjektleder (Navn)</p>
<?= '<input type="text" name="organisername" value="' . $project->getOwner(). '" class="boxinput">' ?> <?= '<input type="text" name="organisername" value="' . $project->getOwner(). '" class="boxinput">' ?>
<p class="subtitle">Aktiv</p> <p class="subtitle">Aktiv</p>
@ -91,11 +99,5 @@ if($new == 0){
</div> </div>
</form> </form>
<p> <p>
</article>
</main> </main>
</body>
<nav>
<?= navbar(2); ?>
<?= loginbar(); ?>
</nav>

View File

@ -47,18 +47,26 @@ $projects = array_values(array_filter(
)); ));
?> ?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" href="../../css/normalize.css"> <link rel="stylesheet" href="../../css/normalize.css">
<link rel="stylesheet" href="../../css/style.css"> <link rel="stylesheet" href="../../css/style.css">
<link rel="stylesheet" href="../css/nav.css"> <link rel="stylesheet" href="../../css/nav.css">
<link rel="stylesheet" href="../../css/events.css"> <link rel="stylesheet" href="../../css/events.css">
<link rel="stylesheet" href="../../css/admin.css"> <link rel="stylesheet" href="../../css/admin.css">
</head>
<header class="admin">Prosjekt&shy;administrasjon</header> <body>
<nav>
<?php echo navbar(2, 'admin'); ?>
<?php echo loginbar(); ?>
</nav>
<main> <main>
<h2>Prosjektadministrasjon</h2>
<hr class="ruler">
<article class="gridsplit"> <div class="gridsplit">
<div class="gridl"> <div class="gridl">
<h2 class="no-chin">Prosjekter</h2> <h2 class="no-chin">Prosjekter</h2>
@ -113,9 +121,9 @@ $projects = array_values(array_filter(
<a class="btn adminbtn" href="edit.php?new=1">Legg inn nytt prosjekt</a> <a class="btn adminbtn" href="edit.php?new=1">Legg inn nytt prosjekt</a>
<h2>Filter</h2> <h2>Filter</h2>
<form action="." method="post"> <form action="." method="post">
<p class="no-chin">Navn</p> <p class="no-chin">Prosjektnavn</p>
<?= '<input type="text" name="title" class="boxinput" value="' . $filterTitle . '">' ?><br> <?= '<input type="text" name="title" class="boxinput" value="' . $filterTitle . '">' ?><br>
<p class="no-chin">Organisator</p> <p class="no-chin">Leders brukernavn</p>
<?= '<input type="text" name="organiser" class="boxinput" value="' . $filterOrganiser . '">' ?><br> <?= '<input type="text" name="organiser" class="boxinput" value="' . $filterOrganiser . '">' ?><br>
<div style="margin-top: 2em;"> <div style="margin-top: 2em;">
@ -123,11 +131,7 @@ $projects = array_values(array_filter(
</div> </div>
</form> </form>
</div> </div>
</article> </div>
</main> </main>
<nav> </body>
<?= navbar(2); ?>
<?= loginbar(); ?>
</nav>

View File

@ -1,14 +1,12 @@
header.admin { .tools {
margin-top: 3rem; width: 100%;
height: 16rem; margin: 0;
overflow: hidden; padding: 0;
text-align: right; list-style: none;
color: #fff; }
font-family: monospace;
padding: 1rem; .tools li {
font-size: 4em; margin: 1.5em 0;
background: url('ja.png') no-repeat 1% 50% #024;
background-size: contain;
} }
.event-list { .event-list {
@ -101,27 +99,6 @@ header.admin {
float: left; float: left;
} }
.btn {
text-decoration: none;
border: 1px solid #048;
color: #048;
padding: .2em 1em;
border-radius: .2em;
white-space: nowrap;
display: inline-block;
margin-bottom: .25em;
}
.btn:hover {
border-color: #084;
background: #eee;
color: #084;
}
.btn:active {
border-color: #084;
background: #084;
color: white;
}
.userlist { .userlist {
table-layout: fixed; table-layout: fixed;
width: 100%; width: 100%;
@ -154,3 +131,19 @@ header.admin {
border: none; border: none;
background-color: #ddd; background-color: #ddd;
} }
.subnote {
margin-top: 0;
color: gray;
font-size: .7em;
font-style: italic;
}
.no-chin {
margin-bottom: 0;
}
.ruler {
border: none;
border-bottom: 1px dotted rgba(0,0,0,.5);
}

View File

@ -49,7 +49,7 @@ nav li {
line-height: 50px; line-height: 50px;
} }
nav a { nav a, nav p {
display: inline-block; display: inline-block;
height: 40px; height: 40px;
margin: 0 .7em; margin: 0 .7em;
@ -83,6 +83,10 @@ nav .login {
line-height: 55px; line-height: 55px;
} }
nav p.login {
right: .5em;
}
#navopen { #navopen {
display: none; display: none;
} }

View File

@ -10,7 +10,7 @@ body {
main { main {
padding: 1em 15vw; padding: 1em 15vw;
height: 100vh; height: 100vh;
margin-top: 5vh; margin-top: 7vh;
background-color: #fff; background-color: #fff;
} }