File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
lib/MetaCPAN/Web/Controller Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,16 @@ sub view : Private {
6363 $c -> detach( ' /internal_error' , $error );
6464 } )-> get;
6565
66+ # # Remove author from contributors list
67+ my $author_name = $data -> {author }-> {name };
68+ my $contributors = [];
69+ foreach my $contributor (@{$data -> {contributors }}) {
70+ if ($contributor -> {name } !~ / \b $author_name \b / ) {
71+ push @$contributors , $contributor ;
72+ }
73+ }
74+ $data -> {contributors } = $contributors ;
75+
6676 my $release = $data -> {release };
6777
6878 $c -> browser_max_age(' 1h' );
Original file line number Diff line number Diff line change 11<div class="nav-header">Authored by: <a href="/author/[% $release.author %]" class="cpan-author">[% $release.author %]</a></div>
22%% if $contributors.size() {
33<div>
4- <button class="contributors-show-button btn-link">and [% $contributors.size() %] contributors</button>
4+ <button class="contributors-show-button btn-link">and [% $contributors.size() %] [% $ contributors.size() > 1 ? 'contributors' : 'contributor' %] </button>
55 <div id="metacpan_contributors" class="slide-out slide-out-hidden">
66 <div>
77 <ul>
You can’t perform that action at this time.
0 commit comments