mirror of
https://github.com/klaussilveira/gitlist.git
synced 2025-11-17 11:10:57 +01:00
Implement #283
This commit is contained in:
@@ -1,15 +1,21 @@
|
|||||||
<div class="btn-group pull-left space-right">
|
<div class="btn-group pull-left space-right" id="branchList">
|
||||||
<button class="btn dropdown-toggle" data-toggle="dropdown">browsing: <strong>{{ branch }}</strong> <span class="caret"></span></button>
|
<button class="btn dropdown-toggle" data-toggle="dropdown">browsing: <strong>{{ branch }}</strong> <span class="caret"></span></button>
|
||||||
<ul class="dropdown-menu">
|
|
||||||
|
<div class="dropdown-menu">
|
||||||
|
<div class="search">
|
||||||
|
<input class="search" placeholder="Filter branch/tags" autofocus>
|
||||||
|
</div>
|
||||||
|
<ul class="unstyled list">
|
||||||
<li class="dropdown-header">Branches</li>
|
<li class="dropdown-header">Branches</li>
|
||||||
{% for item in branches %}
|
{% for item in branches %}
|
||||||
<li><a href="{{ path('branch', {repo: repo, branch: item}) }}">{{ item }}</a></li>
|
<li><a href="{{ path('branch', {repo: repo, branch: item}) }}"><span class="item">{{ item }}</span></a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% if tags %}
|
{% if tags %}
|
||||||
<li class="dropdown-header">Tags</li>
|
<li class="dropdown-header">Tags</li>
|
||||||
{% for item in tags %}
|
{% for item in tags %}
|
||||||
<li><a href="{{ path('branch', {repo: repo, branch: item}) }}">{{ item }}</a></li>
|
<li><a href="{{ path('branch', {repo: repo, branch: item}) }}"><span class="item">{{ item }}</span></a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -42,7 +42,16 @@ $(function () {
|
|||||||
paginate();
|
paginate();
|
||||||
});
|
});
|
||||||
|
|
||||||
var listOptions = {
|
if ($('#repositories').length) {
|
||||||
valueNames: ['name']
|
var listOptions = {
|
||||||
};
|
valueNames: ['name']
|
||||||
var repoList = new List('repositories', listOptions);
|
};
|
||||||
|
var repoList = new List('repositories', listOptions);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($('#branchList').length) {
|
||||||
|
var listBranchOptions = {
|
||||||
|
valueNames: ['item']
|
||||||
|
};
|
||||||
|
var repoList = new List('branchList', listBranchOptions);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user