#4234 Fix the total number of members on the repo info page
Merged 2 years ago by pingou. Opened 2 years ago by pingou.

@@ -237,7 +237,15 @@ 

                      <i class="fa fa-users fa-fw"></i>



-                   <span class="btn btn-sm btn-primary font-weight-bold">{{ repo.contributors|length+1 }}</span>

+                   {# the +1 here is for the main admin that is not listed in repo.contributors #}

+                   {% set memberstotal = repo.contributors['admin']|length +

+                                         repo.contributors['commit']|length +

+                                         repo.contributors['ticket']|length +

+                                         repo.contributor_groups['admin']|length +

+                                         repo.contributor_groups['commit']|length +

+                                         repo.contributor_groups['ticket']|length + 1 %}

+                   <span class="btn btn-sm btn-primary font-weight-bold">{{ memberstotal }}</span>


                    <div class="dropdown-menu dropdown-menu-right" style="width:500px">


                        <div class="media p-2">

This commit basically ports the fix from Ryan Lerch in
56c765f to the srcfpo theme
so both themes show the correct number of members on a project.

Fixes https://pagure.io/pagure/issue/4225

Signed-off-by: Pierre-Yves Chibon pingou@pingoured.fr

Shouldn't this be fixed in all themes?

Shouldn't this be fixed in all themes?

It's already in the default one and the pagure and chameleon themes aren't affected by it :)

Thanks for the review :)

rebased onto 68fd2d8

2 years ago

Pull-Request has been merged by pingou

2 years ago