Commit 38f769f2 authored by Michal Čihař's avatar Michal Čihař

Nicer display of git information

parent 0a2e41e3
{% load i18n %}
{% load translations %}
<span class="git-details">
{% load i18n %}{% load translations %}
<span class="git-commit ui-corner-all">{{ commit.hexsha|slice:":8" }}<span class="git-details">
{% blocktrans with commit.hexsha as hash %}Commit {{ hash }}{% endblocktrans %}<br />
{% blocktrans with commit.author.name as author and commit.authored_date|gitdate as date %}Authored by {{ author }} on {{ date }}{% endblocktrans %}
</span>
</span></span>
......@@ -36,10 +36,7 @@
{% with object.get_last_remote_commit as commit %}
<p>
{% trans "Last remote commit:" %}
<span class="git-commit">
{{ commit.hexsha|slice:":7" }}
{% include "git-commit-info.html" %}
</span>
</p>
{% endwith %}
{% endif %}
......
......@@ -4,17 +4,14 @@
{% include "project_info.html" %}
{% endwith %}
<p>{% trans "Git repository:" %}
<code>{% if object.is_repo_link %}{{ object.linked_subproject.repo }}{% else %}{{ object.repo }}{% endif %}</code> (
<code class="git-repo ui-corner-all">{% if object.is_repo_link %}{{ object.linked_subproject.repo }}{% else %}{{ object.repo }}{% endif %}</code> (
{% if object.is_repo_link %}
{% blocktrans with object.linked_subproject.branch as branch %}{{ branch }} branch{% endblocktrans %}
{% else %}
{% blocktrans with object.branch as branch %}{{ branch }} branch{% endblocktrans %}
@
{% with object.get_last_remote_commit as commit %}
<span class="git-commit">
{{ commit.hexsha|slice:":7" }}
{% include "git-commit-info.html" %}
</span>
{% endwith %}
)
{% endif %}
......
......@@ -272,3 +272,9 @@ img.engage-icon {
padding: 5px;
border: 1px solid gray;
}
.git-commit, .git-repo {
font-family: monospace;
border: 1px solid gray;
background-color: #eee;
padding: 0.2em;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment