gitweb: Minor visual changes to templates

- Remove cancel button in favor of back button.

- In create/edit form, make the form full width to make it consistent with other
  forms. The styling for all the forms can be changed together, if desired.

- Remove dead HTML code outside block context in inherited template.

- Add missing 'list-group' parent for repository list as suggested by bootstrap.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Sunil Mohan Adapa 2019-10-19 15:29:32 -07:00
parent 8d4614c3e2
commit f581591521
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2
3 changed files with 27 additions and 27 deletions

View File

@ -44,8 +44,6 @@
</a>
{% endblock %}
<h2>{{ title }}</h2>
{% block configuration %}
{{ block.super }}
@ -56,30 +54,35 @@
{% if not repos %}
<p>{% trans 'No repositories available.' %}</p>
{% else %}
{% for repo in repos %}
<div class="list-group-item clearfix">
<a href="{% url 'gitweb:delete' repo.name %}"
class="btn btn-default btn-sm pull-right"
role="button"
title="{% blocktrans %}Delete repository {{ repo.name }}{% endblocktrans %}">
<span class="fa fa-trash-o" aria-hidden="true"></span>
</a>
<a class="repo-edit btn btn-sm btn-default pull-right"
href="{% url 'gitweb:edit' repo.name %}">
<span class="fa fa-pencil-square-o" aria-hidden="true"></span>
</a>
<div class="list-group">
{% for repo in repos %}
<div class="list-group-item clearfix">
<a href="{% url 'gitweb:delete' repo.name %}"
class="btn btn-default btn-sm pull-right"
role="button"
title="{% blocktrans %}Delete repository {{ repo.name }}{% endblocktrans %}">
<span class="fa fa-trash-o" aria-hidden="true"></span>
</a>
<a class="repo-edit btn btn-sm btn-default pull-right"
href="{% url 'gitweb:edit' repo.name %}">
<span class="fa fa-pencil-square-o" aria-hidden="true"></span>
</a>
{% if repo.access == 'private' %}
<span class="repo-private-icon fa fa-lock pull-right" aria-label="private"></span></span>
<span class="repo-private-icon fa fa-lock pull-right"
aria-label="private"></span>
{% endif %}
<a class="repo-label" href="/gitweb/{{ repo.name }}.git"
title="{% blocktrans %}Go to repository {{ repo.name }}{% endblocktrans %}">
{{ repo.name }}
</a>
</div>
{% endfor %}
<a class="repo-label" href="/gitweb/{{ repo.name }}.git"
title="{% blocktrans %}Go to repository {{ repo.name }}{% endblocktrans %}">
{{ repo.name }}
</a>
</div>
{% endfor %}
</div>
{% endif %}
</div>
</div>
</div>
{% endblock %}

View File

@ -25,7 +25,7 @@
{% block content %}
<h3>{{ title }}</h3>
<div class="col-sm-6">
<form class="form" method="post">
{% csrf_token %}
@ -34,5 +34,5 @@
<input type="submit" class="btn btn-primary"
value="{% trans "Submit" %}"/>
</form>
</div>
{% endblock %}

View File

@ -40,9 +40,6 @@
<input type="submit" class="btn btn-md btn-danger"
value="{% blocktrans %}Delete {{ name }}{% endblocktrans %}"/>
<a href="{% url 'gitweb:index' %}" role="button"
class="btn btn-md btn-primary">{% trans "Cancel" %}</a>
</form>
{% endblock %}