123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- {% extends "repo_master.html" %}
- {% block title %}File history - {{ repo.fullname }}{% endblock %}
- {% set tag = "home" %}
- {% block header %}
- <link nonce="{{ g.nonce }}" rel="stylesheet" href="{{
- url_for('static', filename='vendor/highlight.js/styles/github.css') }}?version={{ g.version}}"/>
- <style nonce="{{ g.nonce }}">
- .hljs {
- background: #fff;
- }
- </style>
- {% endblock %}
- {% block repo %}
- <div class="row m-b-1">
- <div class="col-sm-6">
- <h3>
- History {{ filename }}
- </h3>
- </div>
- <div class="col-sm-6">
- <div class="float-right">
- {% if branchname %}
- <div class="btn-group">
- <button type="button" class="btn btn-outline-light border-secondary text-dark btn-sm dropdown-toggle"
- data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
- <span class="fa fa-random fa-fw"></span> Branch: <span class="font-weight-bold">{{ branchname }}</span>
- </button>
- <div class="dropdown-menu dropdown-menu-right">
- {% for branch in g.branches %}
- {% if origin == 'view_tree' %}
- <a class="dropdown-item" href="{{ url_for(
- 'ui_ns.view_tree',
- repo=repo.name,
- username=username,
- namespace=repo.namespace,
- identifier=branch) }}">
- {{ branch }}
- </a>
- {% elif origin == 'view_file' %}
- <a class="dropdown-item" href="{{ url_for(
- 'ui_ns.view_file',
- repo=repo.name,
- username=username,
- namespace=repo.namespace,
- identifier=branch,
- filename=filename | unicode ) }}">
- {{ branch }}
- </a>
- {% endif %}
- {% endfor %}
- </div>
- </div>
- {% endif %}
- </div>
- </div>
- </div>
- <div class="card">
- <div class="card-header">
- <ol class="breadcrumb p-0 bg-transparent mb-0">
- <li class="breadcrumb-item">
- <a href="{{ url_for('ui_ns.view_tree',
- repo=repo.name,
- username=username,
- namespace=repo.namespace,
- identifier=branchname)
- }}">
- <span class="fa fa-random">
- </span> {{ branchname }}
- </a>
- </li>
- {% set path = '' %}
- {% for file in filename.split('/') %}
- {% if loop.first %}
- {% set path = file %}
- {% else %}
- {% set path = path + '/' + file %}
- {% endif %}
- {% if loop.index != loop.length %}<li class="breadcrumb-item"><a
- href="{{ url_for('ui_ns.view_file',
- repo=repo.name,
- username=username,
- namespace=repo.namespace,
- identifier=branchname,
- filename=path | unicode)}}">
- <span class="fa fa-folder"></span> {{ file }}</a>
- </li>
- {% elif file %}
- <li class="breadcrumb-item active">
- <span class="fa {% if output_type == 'tree' %}fa-folder{% else %}fa-file{% endif %}">
- </span> {{ file }}
- </li>
- {% endif %}
- {% endfor %}
- </ol>
- </div>
- {% if log %}
- <div class="card-block p-a-0">
- <div class="bg-light border pr-2">
- <div class="list-group my-2">
- {% for line in log %}
- {% set commit = g.repo_obj[line[0]] %}
- <div class="list-group-item " id="c_{{ commit.hex }}">
- <div class="row align-items-center">
- <div class="col">
- <a href="{{ url_for('ui_ns.view_commit',
- repo=repo.name,
- username=username,
- namespace=repo.namespace,
- commitid=commit.hex, branch=branchname) }}"
- class="notblue">
- <strong>{{ commit.message.split('\n')[0] }}</strong>
- </a>
- <div>
- {{commit.author|author2user_commits(
- link=url_for('ui_ns.view_commits',
- repo=repo.name,
- branchname=branchname,
- username=username,
- namespace=repo.namespace,
- author=commit.author.email),
- cssclass="notblue")|safe}}
- <span class="commitdate"
- title="{{ commit.commit_time|format_ts }}"> •
- {{ commit.commit_time|humanize }}</span>
- <span id="commit-actions"></span>
- </div>
- </div>
- <div class="col-xs-auto pr-3 text-right">
- <div class="btn-group">
- <a href="{{ url_for('ui_ns.view_commit',
- repo=repo.name,
- username=username,
- namespace=repo.namespace,
- commitid=commit.hex, branch=branchname) }}"
- class="btn btn-outline-primary font-weight-bold commithash" id="c_{{ commit.hex }}">
- <code>{{ commit.hex|short }}</code>
- </a>
- <a class="btn btn-outline-primary font-weight-bold" href="{{ url_for(
- 'ui_ns.view_tree', username=username, namespace=repo.namespace,
- repo=repo.name, identifier=commit.hex) }}"><span class="fa fa-file-code-o fa-fw"></span></a>
- </div>
- </div>
- </div>
- </div>
- {% endfor %}
- </div>
- </div>
- </div>
- {% else %}
- No history found for this file in this repository
- {% endif %}
- </div> <!-- end .card-->
- {% endblock %}
- {% block jscripts %}
- {{ super() }}
- <script type="text/javascript" nonce="{{ g.nonce }}">
- $(document).ready(function () {
- $('.fork_project_btn').click($("[name=fork_project]").submit);
- });
- </script>
- {% endblock %}
|