add profile page and other stuff

master
Corne Oppelaar 8 years ago
parent 45ee7b2ebc
commit 797c829510

@ -18,6 +18,9 @@ routes:
/crl: CRL
/panel:
get: Panel
/profile:
get: Panel\Profile\Show
post: Panel\Profile\Action
/certificates:
get: Panel\Certificates
/new:

@ -371,6 +371,10 @@ button {
.row input[type=checkbox] {
margin: 5px; }
.row kbd {
display: inline-block;
padding: 5px; }
.row label {
width: 200px;
float: left;

File diff suppressed because one or more lines are too long

@ -26,6 +26,10 @@ button
.row input[type=checkbox]
margin: 5px
.row kbd
display: inline-block
padding: 5px
.row label
width: 200px
float: left

@ -0,0 +1,15 @@
<?php
namespace Eater\Glim\Handler\Panel\Profile;
use Eater\Glim\Handler\Panel;
class Show extends Panel
{
public function handle()
{
return $this->render('panel/profile.html.twig');
}
}

@ -23,4 +23,8 @@ class User extends BaseUser
->filterByRevoked(false)
->find();
}
public function getPlainEmailAddress() {
return $this->getEmailAddressRelatedByEmail()->getAddress();
}
}

@ -0,0 +1,15 @@
{% extends "panel.html.twig" %}
{% block panel_contents %}
<h1 class="title">{{ user.getUsername() }}</h1>
<div class="form">
<div class="row">
<label>Email address</label>
<kbd>{{ user.getPlainEmailAddress() }}</kbd>
</div>
<div class="row">
<label>Amount certificates</label>
<kbd>{{ user.getMaxKeys() }}</kbd>
</div>
</div>
{% endblock %}

@ -3,12 +3,12 @@
{% block head %}
{{ parent() }}
<script src="/js/edit_server.js"></script>
<script src="/js/pages/servers/edit.js"></script>
{% endblock %}
{% block panel_contents %}
<h1>Editing server '{{ server.getFqdn() }}'</h1>
<div class="server-form">
<h1 class="title">Editing server '{{ server.getFqdn() }}'</h1>
<div class="server-form" data-fingerprint="{{ server.getFingerprint() }}">
<div class="row">
<label for="fqdn">Hostname</label>
<input name="fqdn" id="fqdn" type="text" value="{{ server.getFqdn() }}">
@ -57,9 +57,9 @@
</div>
<div class="buttons">
<button type="button">Save</button>
<button class="save" type="button">Save</button>
{% if server.getStatus() == 'registered' %}
<button type="button">Sign and save</button>
<button class="save-and-sign" type="button">Sign and save</button>
{% endif %}
</div>
{% endblock %}
Loading…
Cancel
Save