mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-17 19:20:56 +01:00
refactored breadcrumb management
This commit is contained in:
@@ -11,10 +11,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul class="breadcrumb">
|
{% include 'breadcrumb.twig' with {breadcrumbs: [{dir: 'Blame', path:''}]} %}
|
||||||
<li><a href="{{ path('repository', {repo: repo}) }}">{{ repo }}</a> <span class="divider">/</span></li>
|
|
||||||
<li>Blame</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<div class="source-view">
|
<div class="source-view">
|
||||||
<div class="source-header">
|
<div class="source-header">
|
||||||
|
|||||||
9
views/breadcrumb.twig
Normal file
9
views/breadcrumb.twig
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<ul class="breadcrumb">
|
||||||
|
<li><a href="{{ path('repository', {repo: repo}) }}">{{ repo }}</a></li>
|
||||||
|
{% for breadcrumb in breadcrumbs %}
|
||||||
|
<span class="divider">/</span>
|
||||||
|
<li{% if loop.last %} class="active"{% endif %}>{% if not loop.last %}<a href="{{ path('tree_dir', {repo: repo, branch: branch, tree: breadcrumb.path}) }}">{{ breadcrumb.dir }}</a>{% endif %}{% if loop.last %}{{ breadcrumb.dir }}{% endif %}</li>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% block extra %}{% endblock %}
|
||||||
|
</ul>
|
||||||
@@ -11,10 +11,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul class="breadcrumb">
|
{% include 'breadcrumb.twig' with {breadcrumbs: [{dir: "Commit #{commit.getHash}", path:''}]} %}
|
||||||
<li><a href="{{ path('repository', {repo: repo}) }}">{{ repo }}</a> <span class="divider">/</span></li>
|
|
||||||
<li>Commit {{ commit.getHash}} </li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<div class="commit-view">
|
<div class="commit-view">
|
||||||
<div class="commit-header">
|
<div class="commit-header">
|
||||||
|
|||||||
@@ -12,10 +12,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul class="breadcrumb">
|
{% include 'breadcrumb.twig' with {breadcrumbs: [{dir: 'Commit history', path:''}]} %}
|
||||||
<li><a href="{{ path('repository', {repo: repo}) }}">{{ repo }}</a> <span class="divider">/</span></li>
|
|
||||||
<li>Commit history</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
{% for date, commit in commits %}
|
{% for date, commit in commits %}
|
||||||
<table class="table table-striped table-bordered">
|
<table class="table table-striped table-bordered">
|
||||||
|
|||||||
@@ -12,13 +12,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul class="breadcrumb">
|
{% include 'breadcrumb.twig' with {breadcrumbs: breadcrumbs} %}
|
||||||
<li><a href="{{ path('repository', {repo: repo}) }}">{{ repo }}</a></li>
|
|
||||||
{% for breadcrumb in breadcrumbs %}
|
|
||||||
<span class="divider">/</span>
|
|
||||||
<li{% if loop.last %} class="active"{% endif %}>{% if not loop.last %}<a href="{{ path('tree_dir', {repo: repo, branch: branch, tree: breadcrumb.path}) }}">{{ breadcrumb.dir }}</a>{% endif %}{% if loop.last %}{{ breadcrumb.dir }}{% endif %}</li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<div class="source-view">
|
<div class="source-view">
|
||||||
<div class="source-header">
|
<div class="source-header">
|
||||||
|
|||||||
@@ -12,10 +12,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul class="breadcrumb">
|
{% include 'breadcrumb.twig' with {breadcrumbs: [{dir: 'Statistics', path:''}]} %}
|
||||||
<li><a href="{{ path('repository', {repo: repo}) }}">{{ repo }}</a> <span class="divider">/</span></li>
|
|
||||||
<li>Statistics</li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<table class="table table-striped table-bordered">
|
<table class="table table-striped table-bordered">
|
||||||
<thead>
|
<thead>
|
||||||
|
|||||||
@@ -12,14 +12,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul class="breadcrumb">
|
{% embed 'breadcrumb.twig' with {breadcrumbs: breadcrumbs} %}
|
||||||
<li><a href="{{ path('repository', {repo: repo}) }}">{{ repo }}</a></li>
|
{% block extra %}
|
||||||
{% for breadcrumb in breadcrumbs %}
|
<a href="{{ path('rss', {repo: repo, branch: branch}) }}"><i class="rss pull-right"></i></a>
|
||||||
<span class="divider">/</span>
|
{% endblock %}
|
||||||
<li{% if loop.last %} class="active"{% endif %}>{% if not loop.last %}<a href="{{ path('tree_dir', {repo: repo, branch: branch, tree: breadcrumb.path}) }}">{{ breadcrumb.dir }}</a>{% endif %}{% if loop.last %}{{ breadcrumb.dir }}{% endif %}</li>
|
{% endembed %}
|
||||||
{% endfor %}
|
|
||||||
<a href="{{ path('rss', {repo: repo, branch: branch}) }}"><i class="rss pull-right"></i></a>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<table class="tree">
|
<table class="tree">
|
||||||
<thead>
|
<thead>
|
||||||
|
|||||||
Reference in New Issue
Block a user