From 0052ba069577d8013f11a57bcfd42848ed14fb98 Mon Sep 17 00:00:00 2001 From: handlerug Date: Wed, 30 Jun 2021 19:56:38 +0700 Subject: [PATCH] Make user panel a bit prettier --- static/default.css | 16 ++++ views/admin.qtpl | 43 ++++----- views/admin.qtpl.go | 207 +++++++++++++++++++++----------------------- 3 files changed, 136 insertions(+), 130 deletions(-) diff --git a/static/default.css b/static/default.css index 1968603..bfb855f 100644 --- a/static/default.css +++ b/static/default.css @@ -419,3 +419,19 @@ kbd { color: #ddd; } } + +/* + * Tables + */ + +.users-table { + width: 100%; +} + +.users-table td { + white-space: nowrap; +} + +.table-cell--fill { + width: 100%; +} diff --git a/views/admin.qtpl b/views/admin.qtpl index 9136225..2b77e49 100644 --- a/views/admin.qtpl +++ b/views/admin.qtpl @@ -11,7 +11,7 @@
  • About this wiki
  • User list
  • Update header links
  • -
  • Manage users
  • +
  • Manage users
  • @@ -28,12 +28,6 @@ -
    -
    - Reindex users - -
    -
    @@ -45,28 +39,28 @@

    Manage users

    - +

    Users list

    - +
    - + {% for _, u := range userList %} - - + @@ -84,18 +78,19 @@

    {%s u.Name %}

    - - -
    -
    +
    + + +
    - + + Cancel diff --git a/views/admin.qtpl.go b/views/admin.qtpl.go index dc0a210..17c4c65 100644 --- a/views/admin.qtpl.go +++ b/views/admin.qtpl.go @@ -36,7 +36,7 @@ func StreamAdminPanelHTML(qw422016 *qt422016.Writer) {
  • About this wiki
  • User list
  • Update header links
  • -
  • Manage users
  • +
  • Manage users
  • @@ -53,241 +53,236 @@ func StreamAdminPanelHTML(qw422016 *qt422016.Writer) { -
    -
    - Reindex users - -
    -
    `) -//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) { -//line views/admin.qtpl:40 +//line views/admin.qtpl:34 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/admin.qtpl:40 +//line views/admin.qtpl:34 StreamAdminPanelHTML(qw422016) -//line views/admin.qtpl:40 +//line views/admin.qtpl:34 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 { -//line views/admin.qtpl:40 +//line views/admin.qtpl:34 qb422016 := qt422016.AcquireByteBuffer() -//line views/admin.qtpl:40 +//line views/admin.qtpl:34 WriteAdminPanelHTML(qb422016) -//line views/admin.qtpl:40 +//line views/admin.qtpl:34 qs422016 := string(qb422016.B) -//line views/admin.qtpl:40 +//line views/admin.qtpl:34 qt422016.ReleaseByteBuffer(qb422016) -//line views/admin.qtpl:40 +//line views/admin.qtpl:34 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) { -//line views/admin.qtpl:42 +//line views/admin.qtpl:36 qw422016.N().S(`

    Manage users

    - +

    Users list

    -
    Name Group Registered at
    - {%s u.Name %} + + {%s u.Name %} {%s u.Group %}{%s u.RegisteredAt.Format("2006-01-02 15:04:05-0700") %}{%s u.RegisteredAt.UTC().Format("2006-01-02 15:04") %} Edit
    +
    - + `) -//line views/admin.qtpl:63 +//line views/admin.qtpl:57 for _, u := range userList { -//line views/admin.qtpl:63 +//line views/admin.qtpl:57 qw422016.N().S(` - `) -//line views/admin.qtpl:74 +//line views/admin.qtpl:68 } -//line views/admin.qtpl:74 +//line views/admin.qtpl:68 qw422016.N().S(`
    Name Group Registered at
    + `) -//line views/admin.qtpl:66 +//line views/admin.qtpl:60 qw422016.E().S(u.Name) -//line views/admin.qtpl:66 +//line views/admin.qtpl:60 qw422016.N().S(` `) -//line views/admin.qtpl:68 +//line views/admin.qtpl:62 qw422016.E().S(u.Group) -//line views/admin.qtpl:68 +//line views/admin.qtpl:62 qw422016.N().S(` `) -//line views/admin.qtpl:69 - qw422016.E().S(u.RegisteredAt.Format("2006-01-02 15:04:05-0700")) -//line views/admin.qtpl:69 +//line views/admin.qtpl:63 + qw422016.E().S(u.RegisteredAt.UTC().Format("2006-01-02 15:04")) +//line views/admin.qtpl:63 qw422016.N().S(` Edit
    `) -//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) { -//line views/admin.qtpl:79 +//line views/admin.qtpl:73 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/admin.qtpl:79 +//line views/admin.qtpl:73 StreamAdminUsersPanelHTML(qw422016, userList) -//line views/admin.qtpl:79 +//line views/admin.qtpl:73 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 { -//line views/admin.qtpl:79 +//line views/admin.qtpl:73 qb422016 := qt422016.AcquireByteBuffer() -//line views/admin.qtpl:79 +//line views/admin.qtpl:73 WriteAdminUsersPanelHTML(qb422016, userList) -//line views/admin.qtpl:79 +//line views/admin.qtpl:73 qs422016 := string(qb422016.B) -//line views/admin.qtpl:79 +//line views/admin.qtpl:73 qt422016.ReleaseByteBuffer(qb422016) -//line views/admin.qtpl:79 +//line views/admin.qtpl:73 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) { -//line views/admin.qtpl:81 +//line views/admin.qtpl:75 qw422016.N().S(`

    `) -//line views/admin.qtpl:84 +//line views/admin.qtpl:78 qw422016.E().S(u.Name) -//line views/admin.qtpl:84 +//line views/admin.qtpl:78 qw422016.N().S(`

    - - + anon - editor - trusted - moderator - admin - -
    -
    + +
    - + + Cancel `) -//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) { -//line views/admin.qtpl:102 +//line views/admin.qtpl:97 qw422016 := qt422016.AcquireWriter(qq422016) -//line views/admin.qtpl:102 +//line views/admin.qtpl:97 StreamAdminUsersUserHTML(qw422016, u) -//line views/admin.qtpl:102 +//line views/admin.qtpl:97 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 { -//line views/admin.qtpl:102 +//line views/admin.qtpl:97 qb422016 := qt422016.AcquireByteBuffer() -//line views/admin.qtpl:102 +//line views/admin.qtpl:97 WriteAdminUsersUserHTML(qb422016, u) -//line views/admin.qtpl:102 +//line views/admin.qtpl:97 qs422016 := string(qb422016.B) -//line views/admin.qtpl:102 +//line views/admin.qtpl:97 qt422016.ReleaseByteBuffer(qb422016) -//line views/admin.qtpl:102 +//line views/admin.qtpl:97 return qs422016 -//line views/admin.qtpl:102 +//line views/admin.qtpl:97 }