{#- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -#} {% extends 'allura:templates/repo/repo_master.html' %} {% import 'allura:templates/jinja_master/lib.html' as lib with context %} {% do g.register_forge_css('css/forge/diff.css') %} {% block title %} {{c.project.name}} / {{c.app.config.options.mount_label}} / Commit {{commit.shorthand_id()}} {% endblock %} {% block header -%} Commit {{commit.shorthand_id()}} {{commit_labels(commit)}} {%- endblock %} {% block actions %} {{ lib.maximize_content_button() }} {{ g.icons['history'].render(href='{}log/'.format(commit.url()), show_title=True) }} {% endblock %} {% block body_top_js %} {{ super() }} {% endblock %} {% block extra_js %} {{ super() }} {% endblock %} {% block content %} {{c.revision_widget.display(value=commit, prev=prev, next=next)}} {{c.page_list.display(page=page, limit=limit, count=count)}} {% for type, file, _, _ in artifacts %} {% endfor %}
{{ type }} {% if type in ('copied', 'renamed') and file.ratio != 1 %}(with changes){% endif %} {% if type == 'copied' %} {{ '%s -> %s' % (h.really_unicode(file.old), h.really_unicode(file.new)) }} {% elif type == 'renamed' %} {{ '%s -> %s' % (h.really_unicode(file.old), h.really_unicode(file.new)) }} {% else %} {{h.really_unicode(file)}} {% endif %}
{% for type, file, obj_type, is_text in artifacts %}
{% if type in ('added', 'changed') %} {% set file_url = commit.url() + 'tree/' + h.urlquote(h.really_unicode(file)) %} {{h.really_unicode(file)}} {% if obj_type != 'tree' and is_text %} {% set diff_url = file_url + '?barediff=' + (prev[0]._id if prev else '') %} Diff Switch to {{'unified' if session.diformat == 'sidebyside' else 'side-by-side'}} view {% endif %} {% elif type == 'removed' %} {% set file_url = prev[0].url() + 'tree/' + h.urlquote(h.really_unicode(file)) %} {{h.really_unicode(file)}} {% elif type in ('copied', 'renamed') %} {{h.really_unicode(file.old)}} to {% set new_file_url = commit.url() + 'tree/' + h.urlquote(h.really_unicode(file.new)) %} {{h.really_unicode(file.new)}} {% if file.ratio != 1 %} {% set diff_url = new_file_url + '?barediff=' + (prev[0]._id if prev else '') + '&prev_file=' + h.urlquote(h.really_unicode(file['old'])) %} Diff Switch to {{'unified' if session.diformat == 'sidebyside' else 'side-by-side'}} view {% endif %} {% endif %}
{% if type == 'removed' %} File was removed. {% elif type in ('copied', 'renamed') %} {% if file.ratio == 1 %} File was {{ type }}. {% else %} Loading... {% endif %} {% elif obj_type == 'tree' %} Directory. {% elif not is_text %} Binary file was {{ type }}. {% else %} Loading... {% endif %}
{% endfor %} {{ c.page_list.display(page=page, limit=limit, count=count) }} {% endblock %}