From 0d7bba371420a6623cb60461b73c4d0ad5b6f7f6 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Nov 23 2018 13:47:21 +0000 Subject: [PATCH 1/3] Import the group_info template in the srcfpo theme Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/themes/srcfpo/templates/group_info.html b/pagure/themes/srcfpo/templates/group_info.html new file mode 100644 index 0000000..d3bf4f8 --- /dev/null +++ b/pagure/themes/srcfpo/templates/group_info.html @@ -0,0 +1,203 @@ +{% extends "master.html" %} +{% from "userprofile_macros.html" import render_repo_listing %} +{% from "_projectstring.html" import projectstring, projecticon %} + +{% block title %}Group {{ group.group_name }}{% endblock %} +{% set tag = "groups" %} + +{% block header %} + +{% endblock %} + +{% block content %} +
+
+
+
+ +
+
+

{{group.display_name }}

+ {% if group.description %}
{{ group.description }}
{% endif %} +
+ formed {{ group.created |humanize }} + by {{ group.creator.user }} +
+
+ {% if g.authenticated and (member or g.admin) + and config.get('ENABLE_GROUP_MNGT') %} +
+
+ +  Edit + + +
+ {{ form.csrf_token }} +
+ {% endif %} +
+
+
+
+
+
+
+

Group {{projectstring(plural=True)}}

+ {{ group.projects | length }} {{projectstring(plural=True)}} +
+ {% if group.projects | length > 0 %} + {{render_repo_listing(group.projects)}} + {% else %} +
+ no {{projectstring(plural=True)}} +
+ {% endif %} + +
+
+
+
+
+
{{group.users|count}} Members
+ {% if g.authenticated and (member or admin) + and config.get('ENABLE_GROUP_MNGT') %} +
+ +
+ {% endif %} +
+
+
+ + {% if g.authenticated and (member or g.admin) + and config.get('ENABLE_GROUP_MNGT') %} + + {% endif %} + + {% for user in group.users %} +
+ + {{ user.default_email | avatar(28) | safe }} + {{ user.user }} + + {% if g.authenticated and user != group.creator + and (member or g.admin) + and config.get('ENABLE_GROUP_MNGT') %} +
+ {{ form.csrf_token }} + +
+ {% endif %} +
+ {% endfor %} +
+
+
+
+
+ +{% endblock %} + +{% block jscripts %} + {{ super() }} + + +{% endblock %} From ec4bc2e3b9efe2e1cd7b8be9c638a8f1b9f8ca3e Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Nov 23 2018 13:47:21 +0000 Subject: [PATCH 2/3] On the srcfpo theme link the add-user button to FAS Fixes https://pagure.io/fedora-infrastructure/issue/7275 Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/themes/srcfpo/templates/group_info.html b/pagure/themes/srcfpo/templates/group_info.html index d3bf4f8..bd4e732 100644 --- a/pagure/themes/srcfpo/templates/group_info.html +++ b/pagure/themes/srcfpo/templates/group_info.html @@ -68,10 +68,12 @@
{{group.users|count}} Members
- {% if g.authenticated and (member or admin) - and config.get('ENABLE_GROUP_MNGT') %} + {% if g.authenticated and (member or admin) %}
- + + +
{% endif %}
From 890991bcae4600d66bf6cedf57ddb0819e3dca47 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Nov 23 2018 13:47:21 +0000 Subject: [PATCH 3/3] Inform on group page that members are synced upon login on the srcfpo theme Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/themes/srcfpo/templates/group_info.html b/pagure/themes/srcfpo/templates/group_info.html index bd4e732..8302e06 100644 --- a/pagure/themes/srcfpo/templates/group_info.html +++ b/pagure/themes/srcfpo/templates/group_info.html @@ -54,6 +54,10 @@

Group {{projectstring(plural=True)}}

{{ group.projects | length }} {{projectstring(plural=True)}}
+
+ Group members are refreshed upon log in, users added will have + to log out and log back in for their membership to be synced. +
{% if group.projects | length > 0 %} {{render_repo_listing(group.projects)}} {% else %}