| {#- |
| 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/hilite.css') %} |
| {% do g.register_forge_css('css/forge/diff.css') %} |
| |
| {% block title %} |
| {{c.project.name}} / {{c.app.config.options.mount_label}} / Diff of {{h.really_unicode(b.path())}} |
| {% endblock %} |
| |
| {% block header %}Diff of |
| <a href="{{b.url()}}" rel="nofollow">{{b.path()}}</a> |
| {% if a %} |
| <a href="{{a.url()}}" rel="nofollow">{{a.commit.shorthand_id()}}</a> |
| {% else %} |
| [000000] |
| {% endif %} |
| .. |
| <a href="{{b.url()}}" rel="nofollow">{{b.commit.shorthand_id()}}</a> |
| {% endblock %} |
| |
| {% block actions %} |
| {{ lib.maximize_content_button() }} |
| {% endblock %} |
| |
| {% block content %} |
| {% if a.has_image_view and b.has_image_view %} |
| <div class="grid-19"> |
| <img src="{{a.url()}}?format=raw" |
| alt="{{h.text.truncate(a.commit._id, 10)}}" |
| title="{{h.text.truncate(a.commit._id, 10)}}"/> |
| <img src="{{b.url()}}?format=raw" |
| alt="{{h.text.truncate(b.commit._id, 10)}}" |
| title="{{h.text.truncate(b.commit._id, 10)}}"/> |
| </div> |
| {% else %} |
| <div class="clip grid-19 diffbrowser"> |
| <h3> |
| {% if session.diformat == 'sidebyside' %} |
| {% set switch_url = request.url.replace('&diformat=sidebyside', '') + '&diformat=regular' %} |
| {% set switch_text = 'unified' %} |
| {% else %} |
| {% set switch_url = request.url.replace('&diformat=regular', '') + '&diformat=sidebyside' %} |
| {% set switch_text = 'side-by-side' %} |
| {% endif %} |
| <a rel="nofollow" href="{{ switch_url }}">Switch to {{ switch_text }} view</a> |
| </h3> |
| {% if session.diformat == 'sidebyside' %} |
| {{diff|safe}} |
| {% else %} |
| {{g.highlight(diff, lexer='diff')}} |
| {% endif %} |
| </div> |
| {% endif %} |
| {% endblock %} |
| |
| {% block extra_js %} |
| {{ super() }} |
| <script type="text/javascript"> |
| var overflow = $("pre").get(0); |
| var len = overflow.scrollWidth - 30; |
| $(".gi, .gd, .gu").width(len); |
| </script> |
| {% endblock %} |
| |
| {% block extra_css %} |
| {{ super() }} |
| <style type="text/css"> |
| .clip h3 {margin-bottom: 0;} |
| </style> |
| {% endblock %} |