| |
@@ -7,103 +7,103 @@
|
| |
{% block repo %}
|
| |
<div class="row">
|
| |
<div class="col">
|
| |
- {% block overviewtabs %}{{ super() }}{% endblock %}
|
| |
+ {% block overviewtabs %}{{ super() }}{% endblock %}
|
| |
</div>
|
| |
<div class="col-10">
|
| |
<h3 class="font-weight-bold">
|
| |
- Branches <span class="badge badge-secondary">{{g.branches|length}}</span>
|
| |
+ Branches <span class="badge badge-secondary">{{g.branches|length}}</span>
|
| |
</h3>
|
| |
<div class="list-group">
|
| |
- {% if head %}
|
| |
- <div id="branch-{{ head }}" class="list-group-item">
|
| |
- <div class="row align-items-center">
|
| |
- <div class="col">
|
| |
- <span class="fa fa-random fa-fw text-muted"></span>
|
| |
- <a href="{{ url_for('ui_ns.view_tree',
|
| |
- repo=repo.name,
|
| |
- username=username,
|
| |
- namespace=repo.namespace,
|
| |
- identifier=head) }}"
|
| |
- title="{{ head }}" data-toggle="tooltip"
|
| |
- class="font-weight-bold">
|
| |
- {{ head }}
|
| |
- </a>
|
| |
- </div>
|
| |
- <div class="col-xs-auto pl-2">
|
| |
- <button class="btn btn-outline-light bg-white border-white" title="this is the default branch for this project">
|
| |
- <span class="fa fa-star fa-fw text-warning"></span>
|
| |
- </button>
|
| |
- </div>
|
| |
- </div>
|
| |
+ {% if head %}
|
| |
+ <div id="branch-{{ head }}" class="list-group-item">
|
| |
+ <div class="row align-items-center">
|
| |
+ <div class="col">
|
| |
+ <span class="fa fa-random fa-fw text-muted"></span>
|
| |
+ <a href="{{ url_for('ui_ns.view_tree',
|
| |
+ repo=repo.name,
|
| |
+ username=username,
|
| |
+ namespace=repo.namespace,
|
| |
+ identifier=head) }}"
|
| |
+ title="{{ head }}" data-toggle="tooltip"
|
| |
+ class="font-weight-bold">
|
| |
+ {{ head }}
|
| |
+ </a>
|
| |
+ </div>
|
| |
+ <div class="col-xs-auto pl-2">
|
| |
+ <button class="btn btn-outline-light bg-white border-white" title="this is the default branch for this project">
|
| |
+ <span class="fa fa-star fa-fw text-warning"></span>
|
| |
+ </button>
|
| |
+ </div>
|
| |
</div>
|
| |
- {% endif %}
|
| |
+ </div>
|
| |
+ {% endif %}
|
| |
|
| |
- {% for branch in g.branches if branch != head %}
|
| |
- <div id="branch-{{ branch | replace('/', '__')}}" class="list-group-item">
|
| |
- <div class="row align-items-center">
|
| |
- <div class="col">
|
| |
- <span class="fa fa-random fa-fw text-muted"></span>
|
| |
- <a class="font-weight-bold" href="{{ url_for('ui_ns.view_tree',
|
| |
+ {% for branch in g.branches if branch != head %}
|
| |
+ <div id="branch-{{ branch | unicode | replace('/', '__')}}" class="list-group-item">
|
| |
+ <div class="row align-items-center">
|
| |
+ <div class="col">
|
| |
+ <span class="fa fa-random fa-fw text-muted"></span>
|
| |
+ <a class="font-weight-bold" href="{{ url_for('ui_ns.view_tree',
|
| |
+ repo=repo.name,
|
| |
+ username=username,
|
| |
+ namespace=repo.namespace,
|
| |
+ identifier=branch) }}"
|
| |
+ title="{{ branch | unicode }}" data-toggle="tooltip">{{ branch | unicode }}
|
| |
+ </a>
|
| |
+ <small class="text-muted commits_ahead_label"></small>
|
| |
+ </div>
|
| |
+ <div class="col-xs-auto pr-2">
|
| |
+ <div class="branch_del">
|
| |
+ <div class="btn-group">
|
| |
+ <a class="btn btn-outline-primary" href="{{ url_for('ui_ns.view_tree',
|
| |
+ repo=repo.name,
|
| |
+ username=username,
|
| |
+ namespace=repo.namespace,
|
| |
+ identifier=branch) }}"
|
| |
+ title="view code tree for this branch">
|
| |
+ <i class="fa fa-fw fa-file-code-o"></i>
|
| |
+ </a>
|
| |
+ <a class="btn btn-outline-primary" href="{{ url_for('ui_ns.view_commits',
|
| |
+ repo=repo.name,
|
| |
+ username=username,
|
| |
+ namespace=repo.namespace,
|
| |
+ identifier=branch,
|
| |
+ branchname=branch) }}"
|
| |
+ title="view commit list for this branch">
|
| |
+ <i class="fa fa-fw fa-list-alt"></i>
|
| |
+ </a>
|
| |
+ </div>
|
| |
+ {% if g.repo_committer and branch != head
|
| |
+ and (
|
| |
+ config.get('ALLOW_DELETE_BRANCH', True)
|
| |
+ or repo.is_fork) %}
|
| |
+ <form id="delete_branch_form-{{
|
| |
+ branch | unicode | replace('/', '__') | replace('+', '___')
|
| |
+ }}" action="{{
|
| |
+ url_for('ui_ns.delete_branch',
|
| |
repo=repo.name,
|
| |
username=username,
|
| |
namespace=repo.namespace,
|
| |
- identifier=branch) }}"
|
| |
- title="{{ branch }}" data-toggle="tooltip">{{ branch }}
|
| |
- </a>
|
| |
- <small class="text-muted commits_ahead_label"></small>
|
| |
- </div>
|
| |
- <div class="col-xs-auto pr-2">
|
| |
- <div class="branch_del">
|
| |
- <div class="btn-group">
|
| |
- <a class="btn btn-outline-primary" href="{{ url_for('ui_ns.view_tree',
|
| |
- repo=repo.name,
|
| |
- username=username,
|
| |
- namespace=repo.namespace,
|
| |
- identifier=branch) }}"
|
| |
- title="view code tree for this branch">
|
| |
- <i class="fa fa-fw fa-file-code-o"></i>
|
| |
- </a>
|
| |
- <a class="btn btn-outline-primary" href="{{ url_for('ui_ns.view_commits',
|
| |
- repo=repo.name,
|
| |
- username=username,
|
| |
- namespace=repo.namespace,
|
| |
- identifier=branch,
|
| |
- branchname=branch) }}"
|
| |
- title="view commit list for this branch">
|
| |
- <i class="fa fa-fw fa-list-alt"></i>
|
| |
- </a>
|
| |
- </div>
|
| |
- {% if g.repo_committer and branch != head
|
| |
- and (
|
| |
- config.get('ALLOW_DELETE_BRANCH', True)
|
| |
- or repo.is_fork) %}
|
| |
- <form id="delete_branch_form-{{
|
| |
- branch | replace('/', '__') | replace('+', '___')
|
| |
- }}" action="{{
|
| |
- url_for('ui_ns.delete_branch',
|
| |
- repo=repo.name,
|
| |
- username=username,
|
| |
- namespace=repo.namespace,
|
| |
- branchname=branch)
|
| |
- }}" method="post" class="icon d-inline"
|
| |
- onsubmit="return confirm('Are you sure you want to remove the branch: {{ branch }}?\nThis cannot be un-done!');">
|
| |
- {{ g.confirmationform.csrf_token }}
|
| |
- <a title="Remove branch {{ branch }}" href="#"
|
| |
- class="btn btn-outline-danger"
|
| |
- onclick="$('#delete_branch_form-{{
|
| |
- branch | replace('/', '__') | replace('.', '\\\\.')
|
| |
- | replace('+', '___')
|
| |
- }}').submit();">
|
| |
- <i class="fa fa-trash"></i>
|
| |
- </a>
|
| |
- </form>
|
| |
- {% endif %}
|
| |
- </div>
|
| |
- </div>
|
| |
- </div>
|
| |
+ branchname=branch)
|
| |
+ }}" method="post" class="icon d-inline"
|
| |
+ onsubmit="return confirm('Are you sure you want to remove the branch: {{ branch | unicode }}?\nThis cannot be un-done!');">
|
| |
+ {{ g.confirmationform.csrf_token }}
|
| |
+ <a title="Remove branch {{ branch | unicode }}" href="#"
|
| |
+ class="btn btn-outline-danger"
|
| |
+ onclick="$('#delete_branch_form-{{
|
| |
+ branch | unicode | replace('/', '__') | replace('.', '\\\\.')
|
| |
+ | replace('+', '___')
|
| |
+ }}').submit();">
|
| |
+ <i class="fa fa-trash"></i>
|
| |
+ </a>
|
| |
+ </form>
|
| |
+ {% endif %}
|
| |
+ </div>
|
| |
</div>
|
| |
- {% endfor %}
|
| |
+ </div>
|
| |
</div>
|
| |
+ {% endfor %}
|
| |
+ </div>
|
| |
</div>
|
| |
</div>
|
| |
{% endblock %}
|
| |
@@ -130,20 +130,20 @@
|
| |
|
| |
{% if repo.is_fork %}
|
| |
html2 = ' \
|
| |
- <a class="btn btn-outline-primary border-white" data-toggle="tooltip" \
|
| |
- href="' + url + '" title="' + branch +' contains '
|
| |
- + nb_commits + ' commit not in the upstream project '
|
| |
- + nb_target + ' branch. Click to create new PR now.'
|
| |
- + '"><i class="fa fa-fw fa-arrow-circle-down"></i> Open Pull Request</a> \
|
| |
- </div>';
|
| |
+ <a class="btn btn-outline-primary border-white" data-toggle="tooltip" \
|
| |
+ href="' + url + '" title="' + branch +' contains '
|
| |
+ + nb_commits + ' commit not in the upstream project '
|
| |
+ + nb_target + ' branch. Click to create new PR now.'
|
| |
+ + '"><i class="fa fa-fw fa-arrow-circle-down"></i> Open Pull Request</a> \
|
| |
+ </div>';
|
| |
{% else %}
|
| |
html2 = ' \
|
| |
- <a class="btn btn-outline-primary border-white" data-toggle="tooltip" \
|
| |
- href="' + url + '" title="' + branch +' contains '
|
| |
- + nb_commits + ' commit not in the ' + nb_target
|
| |
- + ' branch. Click to create new PR now.'
|
| |
- + '"><i class="fa fa-fw fa-arrow-circle-down"></i> Open Pull Request</a> \
|
| |
- </div>';
|
| |
+ <a class="btn btn-outline-primary border-white" data-toggle="tooltip" \
|
| |
+ href="' + url + '" title="' + branch +' contains '
|
| |
+ + nb_commits + ' commit not in the ' + nb_target
|
| |
+ + ' branch. Click to create new PR now.'
|
| |
+ + '"><i class="fa fa-fw fa-arrow-circle-down"></i> Open Pull Request</a> \
|
| |
+ </div>';
|
| |
{%endif%}
|
| |
var _b = branch.replace(/\./g, '\\.').replace('/', '__').replace('\+', '\\+');
|
| |
$('#branch-' + _b + ' .branch_del').prepend(html2);
|
| |
@@ -154,11 +154,11 @@
|
| |
|
| |
for (branch in res.branch_w_pr){
|
| |
var html = ' \
|
| |
- <a class="btn btn-outline-success border-white" data-toggle="tooltip" '
|
| |
- + 'href="{{ request.url_root }}' + res.branch_w_pr[branch]
|
| |
- + '"title="' + branch +' is already in an opened pull-request">'
|
| |
- + '<i class="fa fa-fw fa-arrow-circle-down"></i> Pull Request #' + res.branch_w_pr[branch].split('/').slice(-1)[0] + ' </a> \
|
| |
- </div>';
|
| |
+ <a class="btn btn-outline-success border-white" data-toggle="tooltip" '
|
| |
+ + 'href="{{ request.url_root }}' + res.branch_w_pr[branch]
|
| |
+ + '"title="' + branch +' is already in an opened pull-request">'
|
| |
+ + '<i class="fa fa-fw fa-arrow-circle-down"></i> Pull Request #' + res.branch_w_pr[branch].split('/').slice(-1)[0] + ' </a> \
|
| |
+ </div>';
|
| |
$('#branch-' + branch.replace(/\./g, '\\.').replace('/', '__')
|
| |
+ ' .branch_del').prepend(html);
|
| |
$('[data-toggle="tooltip"]').tooltip({placement : 'bottom'});
|
| |