Showing 1 changed files with 7 additions and 2 deletions
+7 -2
templates/commits.html.ep
... ...
@@ -28,6 +28,10 @@
28 28
     'id',
29 29
     where => {email => $commit_author_email}
30 30
   )->value;
31
+
32
+  # Authors
33
+  my %author_id_of = map { $_->{email} => $_->{id} }
34
+    @{ app->dbi->model('user')->select( [ 'id', 'email' ] )->all };
31 35
     
32 36
   # Commits
33 37
   my $page_count = 30;
... ...
@@ -145,8 +149,9 @@
145 149
                   </div>
146 150
                   <div class="commit-left-author">
147 151
                     <span title="<%= $commit->{author_email} %>">
148
-                      % if (defined $commit_author_id) {
149
-                        <a href="<%= url_for("/$commit_author_id") %>"><%= $commit_author_id %></a>
152
+                      % my $author_id = $author_id_of{ $commit->{author_email} };
153
+                      % if ($author_id) {
154
+                        <a href="<%= url_for("/$author_id") %>"><%= $author_id %></a>
150 155
                       % } else {
151 156
                         <%= $commit->{author_name} %>
152 157
                       % }