1
0
mirror of https://github.com/osmarks/mycorrhiza.git synced 2024-10-30 11:46:16 +00:00

Make user panel a bit prettier

This commit is contained in:
handlerug 2021-06-30 19:56:38 +07:00
parent ea75823656
commit 0052ba0695
No known key found for this signature in database
GPG Key ID: 38009F0605051491
3 changed files with 136 additions and 130 deletions

View File

@ -419,3 +419,19 @@ kbd {
color: #ddd; color: #ddd;
} }
} }
/*
* Tables
*/
.users-table {
width: 100%;
}
.users-table td {
white-space: nowrap;
}
.table-cell--fill {
width: 100%;
}

View File

@ -11,7 +11,7 @@
<li><a href="/about">About this wiki</a></li> <li><a href="/about">About this wiki</a></li>
<li><a href="/user-list">User list</a></li> <li><a href="/user-list">User list</a></li>
<li><a href="/update-header-links">Update header links</a></li> <li><a href="/update-header-links">Update header links</a></li>
<li><a href="/admin/users">Manage users</a></li> <li><a href="/admin/users/">Manage users</a></li>
</ul> </ul>
</section> </section>
<section> <section>
@ -28,12 +28,6 @@
<input type="submit" class="btn"> <input type="submit" class="btn">
</fieldset> </fieldset>
</form> </form>
<form action="/admin/reindex-users" method="POST" style="float:left">
<fieldset>
<legend>Reindex users</legend>
<input type="submit" class="btn">
</fieldset>
</form>
</section> </section>
</main> </main>
</div> </div>
@ -45,28 +39,28 @@
<h1>Manage users</h1> <h1>Manage users</h1>
<form action="/admin/reindex-users" method="post"> <form action="/admin/reindex-users" method="post">
<button class="btn btn_accent" type="submit">Reindex users</button> <button class="btn" type="submit">Reindex users</button>
</form> </form>
<h2>Users list</h2> <h2>Users list</h2>
<table> <table class="users-table">
<thead> <thead>
<tr> <tr>
<th>Name</th> <th>Name</th>
<th>Group</th> <th>Group</th>
<th>Registered at</th> <th>Registered at</th>
<th></th> <th aria-label="Actions"></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for _, u := range userList %} {% for _, u := range userList %}
<tr> <tr>
<td> <td class="table-cell--fill">
<a href="/hypha/{%s cfg.UserHypha %}/{%s u.Name %}">{%s u.Name %}</a> <a href="/hypha/{%u cfg.UserHypha %}/{%u u.Name %}">{%s u.Name %}</a>
</td> </td>
<td>{%s u.Group %}</td> <td>{%s u.Group %}</td>
<td>{%s u.RegisteredAt.Format("2006-01-02 15:04:05-0700") %}</td> <td>{%s u.RegisteredAt.UTC().Format("2006-01-02 15:04") %}</td>
<td> <td>
<a href="/admin/users/{%u u.Name %}/edit">Edit</a> <a href="/admin/users/{%u u.Name %}/edit">Edit</a>
</td> </td>
@ -84,18 +78,19 @@
<h1>{%s u.Name %}</h1> <h1>{%s u.Name %}</h1>
<form action="" method="post"> <form action="" method="post">
<label for="group">Group:</label> <div class="form-field">
<select id="group" name="group"> <label for="group">Group:</label>
<option{% if u.Group == "anon" %} selected{% endif %}>anon</option> <select id="group" name="group">
<option{% if u.Group == "editor" %} selected{% endif %}>editor</option> <option{% if u.Group == "anon" %} selected{% endif %}>anon</option>
<option{% if u.Group == "trusted" %} selected{% endif %}>trusted</option> <option{% if u.Group == "editor" %} selected{% endif %}>editor</option>
<option{% if u.Group == "moderator" %} selected{% endif %}>moderator</option> <option{% if u.Group == "trusted" %} selected{% endif %}>trusted</option>
<option{% if u.Group == "admin" %} selected{% endif %}>admin</option> <option{% if u.Group == "moderator" %} selected{% endif %}>moderator</option>
</select> <option{% if u.Group == "admin" %} selected{% endif %}>admin</option>
<br> </select>
<br> </div>
<button class="btn btn_accent" type="submit">Update</button> <button class="btn" type="submit">Update</button>
<a class="btn btn_weak" href="/admin/users/">Cancel</a>
</form> </form>
</main> </main>
</div> </div>

View File

@ -36,7 +36,7 @@ func StreamAdminPanelHTML(qw422016 *qt422016.Writer) {
<li><a href="/about">About this wiki</a></li> <li><a href="/about">About this wiki</a></li>
<li><a href="/user-list">User list</a></li> <li><a href="/user-list">User list</a></li>
<li><a href="/update-header-links">Update header links</a></li> <li><a href="/update-header-links">Update header links</a></li>
<li><a href="/admin/users">Manage users</a></li> <li><a href="/admin/users/">Manage users</a></li>
</ul> </ul>
</section> </section>
<section> <section>
@ -53,241 +53,236 @@ func StreamAdminPanelHTML(qw422016 *qt422016.Writer) {
<input type="submit" class="btn"> <input type="submit" class="btn">
</fieldset> </fieldset>
</form> </form>
<form action="/admin/reindex-users" method="POST" style="float:left">
<fieldset>
<legend>Reindex users</legend>
<input type="submit" class="btn">
</fieldset>
</form>
</section> </section>
</main> </main>
</div> </div>
`) `)
//line views/admin.qtpl:40 //line views/admin.qtpl:34
} }
//line views/admin.qtpl:40 //line views/admin.qtpl:34
func WriteAdminPanelHTML(qq422016 qtio422016.Writer) { func WriteAdminPanelHTML(qq422016 qtio422016.Writer) {
//line views/admin.qtpl:40 //line views/admin.qtpl:34
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/admin.qtpl:40 //line views/admin.qtpl:34
StreamAdminPanelHTML(qw422016) StreamAdminPanelHTML(qw422016)
//line views/admin.qtpl:40 //line views/admin.qtpl:34
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/admin.qtpl:40 //line views/admin.qtpl:34
} }
//line views/admin.qtpl:40 //line views/admin.qtpl:34
func AdminPanelHTML() string { func AdminPanelHTML() string {
//line views/admin.qtpl:40 //line views/admin.qtpl:34
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/admin.qtpl:40 //line views/admin.qtpl:34
WriteAdminPanelHTML(qb422016) WriteAdminPanelHTML(qb422016)
//line views/admin.qtpl:40 //line views/admin.qtpl:34
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/admin.qtpl:40 //line views/admin.qtpl:34
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/admin.qtpl:40 //line views/admin.qtpl:34
return qs422016 return qs422016
//line views/admin.qtpl:40 //line views/admin.qtpl:34
} }
//line views/admin.qtpl:42 //line views/admin.qtpl:36
func StreamAdminUsersPanelHTML(qw422016 *qt422016.Writer, userList []*user.User) { func StreamAdminUsersPanelHTML(qw422016 *qt422016.Writer, userList []*user.User) {
//line views/admin.qtpl:42 //line views/admin.qtpl:36
qw422016.N().S(` qw422016.N().S(`
<div class="layout"> <div class="layout">
<main class="main-width"> <main class="main-width">
<h1>Manage users</h1> <h1>Manage users</h1>
<form action="/admin/reindex-users" method="post"> <form action="/admin/reindex-users" method="post">
<button class="btn btn_accent" type="submit">Reindex users</button> <button class="btn" type="submit">Reindex users</button>
</form> </form>
<h2>Users list</h2> <h2>Users list</h2>
<table> <table class="users-table">
<thead> <thead>
<tr> <tr>
<th>Name</th> <th>Name</th>
<th>Group</th> <th>Group</th>
<th>Registered at</th> <th>Registered at</th>
<th></th> <th aria-label="Actions"></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
`) `)
//line views/admin.qtpl:63 //line views/admin.qtpl:57
for _, u := range userList { for _, u := range userList {
//line views/admin.qtpl:63 //line views/admin.qtpl:57
qw422016.N().S(` qw422016.N().S(`
<tr> <tr>
<td> <td class="table-cell--fill">
<a href="/hypha/`) <a href="/hypha/`)
//line views/admin.qtpl:66 //line views/admin.qtpl:60
qw422016.E().S(cfg.UserHypha) qw422016.N().U(cfg.UserHypha)
//line views/admin.qtpl:66 //line views/admin.qtpl:60
qw422016.N().S(`/`) qw422016.N().S(`/`)
//line views/admin.qtpl:66 //line views/admin.qtpl:60
qw422016.E().S(u.Name) qw422016.N().U(u.Name)
//line views/admin.qtpl:66 //line views/admin.qtpl:60
qw422016.N().S(`">`) qw422016.N().S(`">`)
//line views/admin.qtpl:66 //line views/admin.qtpl:60
qw422016.E().S(u.Name) qw422016.E().S(u.Name)
//line views/admin.qtpl:66 //line views/admin.qtpl:60
qw422016.N().S(`</a> qw422016.N().S(`</a>
</td> </td>
<td>`) <td>`)
//line views/admin.qtpl:68 //line views/admin.qtpl:62
qw422016.E().S(u.Group) qw422016.E().S(u.Group)
//line views/admin.qtpl:68 //line views/admin.qtpl:62
qw422016.N().S(`</td> qw422016.N().S(`</td>
<td>`) <td>`)
//line views/admin.qtpl:69 //line views/admin.qtpl:63
qw422016.E().S(u.RegisteredAt.Format("2006-01-02 15:04:05-0700")) qw422016.E().S(u.RegisteredAt.UTC().Format("2006-01-02 15:04"))
//line views/admin.qtpl:69 //line views/admin.qtpl:63
qw422016.N().S(`</td> qw422016.N().S(`</td>
<td> <td>
<a href="/admin/users/`) <a href="/admin/users/`)
//line views/admin.qtpl:71 //line views/admin.qtpl:65
qw422016.N().U(u.Name) qw422016.N().U(u.Name)
//line views/admin.qtpl:71 //line views/admin.qtpl:65
qw422016.N().S(`/edit">Edit</a> qw422016.N().S(`/edit">Edit</a>
</td> </td>
</tr> </tr>
`) `)
//line views/admin.qtpl:74 //line views/admin.qtpl:68
} }
//line views/admin.qtpl:74 //line views/admin.qtpl:68
qw422016.N().S(` qw422016.N().S(`
</tbody> </tbody>
</table> </table>
</main> </main>
</div> </div>
`) `)
//line views/admin.qtpl:79 //line views/admin.qtpl:73
} }
//line views/admin.qtpl:79 //line views/admin.qtpl:73
func WriteAdminUsersPanelHTML(qq422016 qtio422016.Writer, userList []*user.User) { func WriteAdminUsersPanelHTML(qq422016 qtio422016.Writer, userList []*user.User) {
//line views/admin.qtpl:79 //line views/admin.qtpl:73
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/admin.qtpl:79 //line views/admin.qtpl:73
StreamAdminUsersPanelHTML(qw422016, userList) StreamAdminUsersPanelHTML(qw422016, userList)
//line views/admin.qtpl:79 //line views/admin.qtpl:73
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/admin.qtpl:79 //line views/admin.qtpl:73
} }
//line views/admin.qtpl:79 //line views/admin.qtpl:73
func AdminUsersPanelHTML(userList []*user.User) string { func AdminUsersPanelHTML(userList []*user.User) string {
//line views/admin.qtpl:79 //line views/admin.qtpl:73
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/admin.qtpl:79 //line views/admin.qtpl:73
WriteAdminUsersPanelHTML(qb422016, userList) WriteAdminUsersPanelHTML(qb422016, userList)
//line views/admin.qtpl:79 //line views/admin.qtpl:73
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/admin.qtpl:79 //line views/admin.qtpl:73
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/admin.qtpl:79 //line views/admin.qtpl:73
return qs422016 return qs422016
//line views/admin.qtpl:79 //line views/admin.qtpl:73
} }
//line views/admin.qtpl:81 //line views/admin.qtpl:75
func StreamAdminUsersUserHTML(qw422016 *qt422016.Writer, u *user.User) { func StreamAdminUsersUserHTML(qw422016 *qt422016.Writer, u *user.User) {
//line views/admin.qtpl:81 //line views/admin.qtpl:75
qw422016.N().S(` qw422016.N().S(`
<div class="layout"> <div class="layout">
<main class="main-width"> <main class="main-width">
<h1>`) <h1>`)
//line views/admin.qtpl:84 //line views/admin.qtpl:78
qw422016.E().S(u.Name) qw422016.E().S(u.Name)
//line views/admin.qtpl:84 //line views/admin.qtpl:78
qw422016.N().S(`</h1> qw422016.N().S(`</h1>
<form action="" method="post"> <form action="" method="post">
<label for="group">Group:</label> <div class="form-field">
<select id="group" name="group"> <label for="group">Group:</label>
<option`) <select id="group" name="group">
//line views/admin.qtpl:89 <option`)
//line views/admin.qtpl:84
if u.Group == "anon" { if u.Group == "anon" {
//line views/admin.qtpl:89 //line views/admin.qtpl:84
qw422016.N().S(` selected`) qw422016.N().S(` selected`)
//line views/admin.qtpl:89 //line views/admin.qtpl:84
} }
//line views/admin.qtpl:89 //line views/admin.qtpl:84
qw422016.N().S(`>anon</option> qw422016.N().S(`>anon</option>
<option`) <option`)
//line views/admin.qtpl:90 //line views/admin.qtpl:85
if u.Group == "editor" { if u.Group == "editor" {
//line views/admin.qtpl:90 //line views/admin.qtpl:85
qw422016.N().S(` selected`) qw422016.N().S(` selected`)
//line views/admin.qtpl:90 //line views/admin.qtpl:85
} }
//line views/admin.qtpl:90 //line views/admin.qtpl:85
qw422016.N().S(`>editor</option> qw422016.N().S(`>editor</option>
<option`) <option`)
//line views/admin.qtpl:91 //line views/admin.qtpl:86
if u.Group == "trusted" { if u.Group == "trusted" {
//line views/admin.qtpl:91 //line views/admin.qtpl:86
qw422016.N().S(` selected`) qw422016.N().S(` selected`)
//line views/admin.qtpl:91 //line views/admin.qtpl:86
} }
//line views/admin.qtpl:91 //line views/admin.qtpl:86
qw422016.N().S(`>trusted</option> qw422016.N().S(`>trusted</option>
<option`) <option`)
//line views/admin.qtpl:92 //line views/admin.qtpl:87
if u.Group == "moderator" { if u.Group == "moderator" {
//line views/admin.qtpl:92 //line views/admin.qtpl:87
qw422016.N().S(` selected`) qw422016.N().S(` selected`)
//line views/admin.qtpl:92 //line views/admin.qtpl:87
} }
//line views/admin.qtpl:92 //line views/admin.qtpl:87
qw422016.N().S(`>moderator</option> qw422016.N().S(`>moderator</option>
<option`) <option`)
//line views/admin.qtpl:93 //line views/admin.qtpl:88
if u.Group == "admin" { if u.Group == "admin" {
//line views/admin.qtpl:93 //line views/admin.qtpl:88
qw422016.N().S(` selected`) qw422016.N().S(` selected`)
//line views/admin.qtpl:93 //line views/admin.qtpl:88
} }
//line views/admin.qtpl:93 //line views/admin.qtpl:88
qw422016.N().S(`>admin</option> qw422016.N().S(`>admin</option>
</select> </select>
<br> </div>
<br>
<button class="btn btn_accent" type="submit">Update</button> <button class="btn" type="submit">Update</button>
<a class="btn btn_weak" href="/admin/users/">Cancel</a>
</form> </form>
</main> </main>
</div> </div>
`) `)
//line views/admin.qtpl:102 //line views/admin.qtpl:97
} }
//line views/admin.qtpl:102 //line views/admin.qtpl:97
func WriteAdminUsersUserHTML(qq422016 qtio422016.Writer, u *user.User) { func WriteAdminUsersUserHTML(qq422016 qtio422016.Writer, u *user.User) {
//line views/admin.qtpl:102 //line views/admin.qtpl:97
qw422016 := qt422016.AcquireWriter(qq422016) qw422016 := qt422016.AcquireWriter(qq422016)
//line views/admin.qtpl:102 //line views/admin.qtpl:97
StreamAdminUsersUserHTML(qw422016, u) StreamAdminUsersUserHTML(qw422016, u)
//line views/admin.qtpl:102 //line views/admin.qtpl:97
qt422016.ReleaseWriter(qw422016) qt422016.ReleaseWriter(qw422016)
//line views/admin.qtpl:102 //line views/admin.qtpl:97
} }
//line views/admin.qtpl:102 //line views/admin.qtpl:97
func AdminUsersUserHTML(u *user.User) string { func AdminUsersUserHTML(u *user.User) string {
//line views/admin.qtpl:102 //line views/admin.qtpl:97
qb422016 := qt422016.AcquireByteBuffer() qb422016 := qt422016.AcquireByteBuffer()
//line views/admin.qtpl:102 //line views/admin.qtpl:97
WriteAdminUsersUserHTML(qb422016, u) WriteAdminUsersUserHTML(qb422016, u)
//line views/admin.qtpl:102 //line views/admin.qtpl:97
qs422016 := string(qb422016.B) qs422016 := string(qb422016.B)
//line views/admin.qtpl:102 //line views/admin.qtpl:97
qt422016.ReleaseByteBuffer(qb422016) qt422016.ReleaseByteBuffer(qb422016)
//line views/admin.qtpl:102 //line views/admin.qtpl:97
return qs422016 return qs422016
//line views/admin.qtpl:102 //line views/admin.qtpl:97
} }