From cd8225a534ca6308903c9dfefa1b9b390de148d8 Mon Sep 17 00:00:00 2001 From: Adnan Maolood Date: Thu, 24 Feb 2022 16:57:43 -0500 Subject: [PATCH] gitsrht: Add missing templates --- gitsrht/templates/settings.html | 20 ++++++ gitsrht/templates/settings_access.html | 99 ++++++++++++++++++++++++++ gitsrht/templates/settings_delete.html | 23 ++++++ gitsrht/templates/settings_rename.html | 32 +++++++++ gitsrht/templates/settingstabs.html | 30 ++++++++ gitsrht/templates/user.html | 84 ++++++++++++++++++++++ 6 files changed, 288 insertions(+) create mode 100644 gitsrht/templates/settings.html create mode 100644 gitsrht/templates/settings_access.html create mode 100644 gitsrht/templates/settings_delete.html create mode 100644 gitsrht/templates/settings_rename.html create mode 100644 gitsrht/templates/settingstabs.html create mode 100644 gitsrht/templates/user.html diff --git a/gitsrht/templates/settings.html b/gitsrht/templates/settings.html new file mode 100644 index 0000000..b9bd98d --- /dev/null +++ b/gitsrht/templates/settings.html @@ -0,0 +1,20 @@ +{% extends "layout.html" %} + +{% block body %} +
+
+

+ {{ owner.canonical_name }}/{{ repo.name }} +

+
+
+ +
+ {% block content %}{% endblock %} +
+{% endblock %} diff --git a/gitsrht/templates/settings_access.html b/gitsrht/templates/settings_access.html new file mode 100644 index 0000000..99dc5dd --- /dev/null +++ b/gitsrht/templates/settings_access.html @@ -0,0 +1,99 @@ +{% extends "settings.html" %} + +{% block content %} +
+
+ {% if len(repo.access_grants) > 0 %} + + + + + + + + + + + + {% for grant in repo.access_grants %} + + + + + + + + {% endfor %} + +
usergrantedlast usedaccess
+ ~{{grant.user.username}} + {{ grant.created | date }}{{ grant.updated | date }}{{ grant.mode.value }} +
+ {{csrf_token()}} + +
+
+ {% endif %} +
+
+
+
+

Grant Access

+
+ {{csrf_token()}} +
+ + + {{valid.summary("user")}} +
+
+ Access + + +
+ +
+
+ +
+
+
+
+
+{% endblock %} diff --git a/gitsrht/templates/settings_delete.html b/gitsrht/templates/settings_delete.html new file mode 100644 index 0000000..f7d6162 --- /dev/null +++ b/gitsrht/templates/settings_delete.html @@ -0,0 +1,23 @@ +{% extends "settings.html" %} + +{% block content %} +
+
+

+ This will permanently delete your repository, + {{ owner.canonical_name }}/{{ repo.name }}. + This cannot be undone. +

+
+ {{csrf_token()}} + + Nevermind +
+
+
+{% endblock %} diff --git a/gitsrht/templates/settings_rename.html b/gitsrht/templates/settings_rename.html new file mode 100644 index 0000000..6ecd05b --- /dev/null +++ b/gitsrht/templates/settings_rename.html @@ -0,0 +1,32 @@ +{% extends "settings.html" %} + +{% block content %} +
+
+

Rename Repository

+
+ {{csrf_token()}} +
+ + + {{valid.summary('name')}} +
+

+ This will change the canonical URL of your repository. A redirect from + the old URL to the new one will be in place until you create another + repository with the same name. +

+ +
+
+
+{% endblock %} diff --git a/gitsrht/templates/settingstabs.html b/gitsrht/templates/settingstabs.html new file mode 100644 index 0000000..2b04be0 --- /dev/null +++ b/gitsrht/templates/settingstabs.html @@ -0,0 +1,30 @@ +{% macro link(path, title) %} +{{ title }} +{% endmacro %} + + +{% if request.path.endswith("/rename") %} + +{% endif %} + + +{% block extratabs %}{% endblock %} + diff --git a/gitsrht/templates/user.html b/gitsrht/templates/user.html new file mode 100644 index 0000000..d09377c --- /dev/null +++ b/gitsrht/templates/user.html @@ -0,0 +1,84 @@ +{% extends "base.html" %} + +{% block content %} +
+
+
+

+ ~{{ user.username }} +

+ {% if user.location %} +

{{user.location}}

+ {% endif %} + {% if user.url %} +

+ {{user.url}} +

+ {% endif %} + {% if user.bio %} + {{user.bio | md}} + {% endif %} + {% if notice %} +
+ {{ notice }} +
+ {% endif %} +
+
+ {% if len(repos) == 0 %} + {% if search %} +
+ +
+

Nothing found.

+ {% else %} +

This user has no repositories.

+ {% endif %} + {% else %} +
+ + {% if search_error %} +
{{ search_error }}
+ {% endif %} +
+
+ {% for repo in repos %} +
+

+ + ~{{user.username}}/{{repo.name}} + + {% if repo.visibility.value != 'public' %} + + {{ repo.visibility.value }} + + {% endif %} +

+ {% if repo.description %} +

{{ repo.description }}

+ {% endif %} +

+

+
+ {% endfor %} +
+ {% endif %} + {{ pagination() }} +
+
+
+{% endblock %} -- 2.38.4