File tree 2 files changed +11
-1
lines changed
lib/MetaCPAN/Web/Controller
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,16 @@ sub view : Private {
63
63
$c -> detach( ' /internal_error' , $error );
64
64
} )-> get;
65
65
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
+
66
76
my $release = $data -> {release };
67
77
68
78
$c -> browser_max_age(' 1h' );
Original file line number Diff line number Diff line change 1
1
<div class="nav-header">Authored by: <a href="/author/[% $release.author %]" class="cpan-author">[% $release.author %]</a></div>
2
2
%% if $contributors.size() {
3
3
<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>
5
5
<div id="metacpan_contributors" class="slide-out slide-out-hidden">
6
6
<div>
7
7
<ul>
You can’t perform that action at this time.
0 commit comments