The Gitalist config is loaded with L<Catalyst::Plugin::ConfigLoader>
and the available config options are:
+=over
+
+=item no_gravatars
+
+If true don't display gravatars. May be desirable if you are worried about
+leaking repo names via the browser referer headers.
+
+=back
+
=head2 Model::CollectionOfRepos
=over
<p class='commit-message'>[% Commit.comment | html %]</p>
[% INCLUDE '_refs.tt2' object = commit %]
</td>
- <td class='author'><a href="mailto:[% Commit.author.email %]" title="Email"><img style="float: left; padding-right: 10px" src="[% uri_for_gravatar(Commit.committer.email, 21) %]">[% Commit.author.name | html %]</a></td>
+ <td class='author'><a href="mailto:[% Commit.author.email %]" title="Email">[% INCLUDE 'inc/gravatar.tt2' email = Commit.author.email %][% Commit.author.name | html %]</a></td>
<td class='action-list'>Author</td>
</tr>
<tr class="invert">
<td></td>
<td class='time-since'>[% time_since(Commit.committed_time) %]</td>
<!-- spanned -->
- <td class='author'><a href="mailto:[% Commit.committer.email %]" title="Email"><img style="float: left; padding-right: 10px" src="[% uri_for_gravatar(Commit.committer.email, 21) %]">[% Commit.committer.name %]</a></td>
+ <td class='author'><a href="mailto:[% Commit.committer.email %]" title="Email">[% INCLUDE 'inc/gravatar.tt2' email = Commit.committer.email %][% Commit.committer.name %]</a></td>
<td class='action-list'>Committer</td>
</tr>
</tbody>
END;
-%]</p>[% INCLUDE '_refs.tt2' object = line %]</td>
- <td class='author'><img src="[% uri_for_gravatar(line.author.email, 21) %]" />[% line.author.name | html %]</td>
+ <td class='author'>[% INCLUDE 'inc/gravatar.tt2' email = line.author.email %][% line.author.name | html %]</td>
<td class='action-list'>
<a href="[% c.uri_for_action("/ref/commit", [Repository.name, line.sha1]) %]" title="Commit details" class="button commit">commit</a>
<a href="[% c.uri_for_action("/ref/diff_fancy", [Repository.name, line.sha1]) %]" title="Commit difference" class="button diff">commitdiff</a>
--- /dev/null
+[% UNLESS c.config.no_gravatars %]<img src="[% uri_for_gravatar(email, 21) %]" class="gravatar">[% END -%]
<td class='sha1' title='[% Commit.sha1 %]'>[% INCLUDE 'inc/chroma_hash.tt2' sha1 = Commit.sha1.substr(0, 7) %]</td>
<td class='time-since' title='[% Commit.authored_time %]'>[% time_since(Commit.authored_time) %]</td>
<td>[% short_cmt(Commit.comment) | html %]</td>
- <td class='author'><img src="[% uri_for_gravatar(Commit.committer.email, 21) %]" />[% Commit.author.name | html %]</td>
+ <td class='author'>[% INCLUDE 'inc/gravatar.tt2' email = Commit.committer.email %][% Commit.author.name | html %]</td>
</tr>
</tbody>
</table>
c.req.param('text'), '<span class="match">' _ c.req.param('text') _ '</span>'
);
%]</td>
- <td class='author'><img src="[% uri_for_gravatar(result.author.email, 21) %]" />[% result.author.name | html %]</td>
+ <td class='author'>[% INCLUDE 'inc/gravatar.tt2' email = result.author.email %][% result.author.name | html %]</td>
<td class='action-list'>
<a href="[% c.uri_for_action("/ref/commit", [Repository.name, result.sha1]) %]" title="Commit details" class="button commit">commit</a>
<a href="[% c.uri_for_action("/ref/diff_fancy", [Repository.name, result.sha1]) %]" title="Commit difference" class="button diff">commitdiff</a>
padding:9px 5px 9px 10px;
}
+.listing .gravatar {
+ float: left;
+ padding-right: 10px;
+}
+
/*
puts the repo description on one line which gets truncated if the repo name is too long