forked from zer.ooo/web
add profile page and other stuff
This commit is contained in:
parent
45ee7b2ebc
commit
797c829510
9 changed files with 52 additions and 7 deletions
|
@ -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,4 +26,4 @@
|
|||
@import "vendors/font-awesome.min.css";
|
||||
|
||||
// pages
|
||||
@import "pages/certificates/new";
|
||||
@import "pages/certificates/new";
|
|
@ -26,6 +26,10 @@ button
|
|||
.row input[type=checkbox]
|
||||
margin: 5px
|
||||
|
||||
.row kbd
|
||||
display: inline-block
|
||||
padding: 5px
|
||||
|
||||
.row label
|
||||
width: 200px
|
||||
float: left
|
||||
|
|
15
src/Handler/Panel/Profile/Show.php
Normal file
15
src/Handler/Panel/Profile/Show.php
Normal file
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
15
views/panel/profile.html.twig
Normal file
15
views/panel/profile.html.twig
Normal file
|
@ -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…
Reference in a new issue