From d842538a2fc19b04c793d45efa736b44de481141 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Fri, 6 Aug 2021 10:00:46 +0200 Subject: [PATCH] create: fix logic error with existing refs The "existing" branch in the template is used on the repo select screen to filter out repositories which already have a wiki created for them. This change adds a short-circuit which avoids the check in other situations. While I'm here I also tweaked the appearance of this page a bit. --- mansrht/templates/select.html | 22 +++++++++++----------- scss/main.scss | 13 +++++++++++++ 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/mansrht/templates/select.html b/mansrht/templates/select.html index e61547e..854cf63 100644 --- a/mansrht/templates/select.html +++ b/mansrht/templates/select.html @@ -45,23 +45,23 @@ {{csrf_token()}}

- {% if item.name not in existing %} - - {% else %} - - {% endif %} {{ item.name }}

+ {% if typename != "repo" or item.name not in existing %} + + {% else %} + + {% endif %} {% endfor %} diff --git a/scss/main.scss b/scss/main.scss index d468ba0..135e634 100644 --- a/scss/main.scss +++ b/scss/main.scss @@ -67,6 +67,19 @@ h5 { } } +.configure { + .event { + display: flex; + flex-direction: row; + align-items: center; + + h4 { + border: none; + flex-grow: 1; + } + } +} + code.grey { background: $gray-200; padding: 0 0.25rem;