Files
@ ffd45b185016
Branch filter:
Location: kallithea/rhodecode/templates/compare/compare_diff.html
ffd45b185016
7.5 KiB
text/html
Imported some of the GPLv3'd changes from RhodeCode v2.2.5.
This imports changes between changesets 21af6c4eab3d and 6177597791c2 in
RhodeCode's original repository, including only changes to Python files and HTML.
RhodeCode clearly licensed its changes to these files under GPLv3
in their /LICENSE file, which states the following:
The Python code and integrated HTML are licensed under the GPLv3 license.
(See:
https://code.rhodecode.com/rhodecode/files/v2.2.5/LICENSE
or
http://web.archive.org/web/20140512193334/https://code.rhodecode.com/rhodecode/files/f3b123159901f15426d18e3dc395e8369f70ebe0/LICENSE
for an online copy of that LICENSE file)
Conservancy reviewed these changes and confirmed that they can be licensed as
a whole to the Kallithea project under GPLv3-only.
While some of the contents committed herein are clearly licensed
GPLv3-or-later, on the whole we must assume the are GPLv3-only, since the
statement above from RhodeCode indicates that they intend GPLv3-only as their
license, per GPLv3ยง14 and other relevant sections of GPLv3.
This imports changes between changesets 21af6c4eab3d and 6177597791c2 in
RhodeCode's original repository, including only changes to Python files and HTML.
RhodeCode clearly licensed its changes to these files under GPLv3
in their /LICENSE file, which states the following:
The Python code and integrated HTML are licensed under the GPLv3 license.
(See:
https://code.rhodecode.com/rhodecode/files/v2.2.5/LICENSE
or
http://web.archive.org/web/20140512193334/https://code.rhodecode.com/rhodecode/files/f3b123159901f15426d18e3dc395e8369f70ebe0/LICENSE
for an online copy of that LICENSE file)
Conservancy reviewed these changes and confirmed that they can be licensed as
a whole to the Kallithea project under GPLv3-only.
While some of the contents committed herein are clearly licensed
GPLv3-or-later, on the whole we must assume the are GPLv3-only, since the
statement above from RhodeCode indicates that they intend GPLv3-only as their
license, per GPLv3ยง14 and other relevant sections of GPLv3.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 | ## -*- coding: utf-8 -*-
<%inherit file="/base/base.html"/>
<%def name="title()">
%if c.compare_home:
${_('%s Compare') % c.repo_name}
%else:
${_('%s Compare') % c.repo_name} - ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} > ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)}
%endif
%if c.rhodecode_name:
· ${c.rhodecode_name}
%endif
</%def>
<%def name="breadcrumbs_links()">
${_('Compare revisions')}
</%def>
<%def name="page_nav()">
${self.menu('repositories')}
</%def>
<%def name="main()">
${self.repo_context_bar('changelog')}
<div class="box">
<!-- box / title -->
<div class="title">
${self.breadcrumbs()}
</div>
<div class="table">
<div id="body" class="diffblock">
<div class="code-header" style="height: 26px">
<div>
${h.hidden('compare_org')} <i class="icon-ellipsis-horizontal" style="color: #999; vertical-align: -12px; padding: 0px 0px 0px 2px"></i> ${h.hidden('compare_other')}
%if not c.compare_home:
<a class="btn btn-small" href="${c.swap_url}"><i class="icon-refresh"></i> ${_('Swap')}</a>
%endif
<div id="compare_revs" class="btn btn-small"><i class="icon-loop"></i> ${_('Compare Revisions')}</div>
</div>
</div>
</div>
%if c.compare_home:
<div id="changeset_compare_view_content">
<div style="color:#999;font-size: 18px">${_('Compare revisions, branches, bookmarks or tags.')}</div>
</div>
%else:
<div id="changeset_compare_view_content">
##CS
<div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${ungettext('Showing %s commit','Showing %s commits', len(c.cs_ranges)) % len(c.cs_ranges)}</div>
<%include file="compare_cs.html" />
## FILES
<div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
% if c.limited_diff:
${ungettext('%s file changed', '%s files changed', len(c.files)) % len(c.files)}
% else:
${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.files)) % (len(c.files),c.lines_added,c.lines_deleted)}:
%endif
</div>
<div class="cs_files">
%if not c.files:
<span class="empty_data">${_('No files')}</span>
%endif
%for fid, change, f, stat in c.files:
<div class="cs_${change}">
<div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid, **request.GET.mixed()))}</div>
<div class="changes">${h.fancy_file_stats(stat)}</div>
</div>
%endfor
</div>
% if c.limited_diff:
<h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}">${_('Show full diff')}</a></h5>
% endif
</div>
## diff block
<%namespace name="diff_block" file="/changeset/diff_block.html"/>
%for fid, change, f, stat in c.files:
${diff_block.diff_block_simple([c.changes[fid]])}
%endfor
% if c.limited_diff:
<h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}">${_('Show full diff')}</a></h4>
% endif
%endif
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){
var cache = {}
$("#compare_org").select2({
placeholder: "${'%s@%s' % (c.org_repo.repo_name, c.org_ref)}",
formatSelection: function(obj){
return '{0}@{1}'.format("${c.org_repo.repo_name}", obj.text)
},
dropdownAutoWidth: true,
query: function(query){
var key = 'cache';
var cached = cache[key] ;
if(cached) {
var data = {results: []};
//filter results
$.each(cached.results, function(){
var section = this.text;
var children = [];
$.each(this.children, function(){
if(query.term.length == 0 || this.text.toUpperCase().indexOf(query.term.toUpperCase()) >= 0 ){
children.push({'id': this.id, 'text': this.text})
}
})
data.results.push({'text': section, 'children': children})
});
//push the typed in changeset
data.results.push({'text':_TM['specify changeset'],
'children': [{'id': query.term, 'text': query.term, 'type': 'rev'}]})
query.callback(data);
}else{
$.ajax({
url: pyroutes.url('repo_refs_data', {'repo_name': '${c.org_repo.repo_name}'}),
data: {},
dataType: 'json',
type: 'GET',
success: function(data) {
cache[key] = data;
query.callback({results: data.results});
}
})
}
},
});
$("#compare_other").select2({
placeholder: "${'%s@%s' % (c.other_repo.repo_name, c.other_ref)}",
dropdownAutoWidth: true,
formatSelection: function(obj){
return '{0}@{1}'.format("${c.other_repo.repo_name}", obj.text)
},
query: function(query){
var key = 'cache2';
var cached = cache[key] ;
if(cached) {
var data = {results: []};
//filter results
$.each(cached.results, function(){
var section = this.text;
var children = [];
$.each(this.children, function(){
if(query.term.length == 0 || this.text.toUpperCase().indexOf(query.term.toUpperCase()) >= 0 ){
children.push({'id': this.id, 'text': this.text})
}
})
data.results.push({'text': section, 'children': children})
});
//push the typed in changeset
data.results.push({'text':_TM['specify changeset'],
'children': [{'id': query.term, 'text': query.term, 'type': 'rev'}]})
query.callback(data);
}else{
$.ajax({
url: pyroutes.url('repo_refs_data', {'repo_name': '${c.other_repo.repo_name}'}),
data: {},
dataType: 'json',
type: 'GET',
success: function(data) {
cache[key] = data;
query.callback({results: data.results});
}
})
}
},
});
$('#compare_revs').on('click', function(e){
var org = $('#compare_org').select2('data');
var other = $('#compare_other').select2('data');
var compare_url = "${h.url('compare_url',repo_name=c.repo_name,org_ref_type='__other_ref_type__',org_ref='__org__',other_ref_type='__org_ref_type__',other_ref='__other__', other_repo=c.other_repo.repo_name)}";
var u = compare_url.replace('__other_ref_type__',org.type)
.replace('__org__',org.text)
.replace('__org_ref_type__',other.type)
.replace('__other__',other.text);
window.location=u;
})
});
</script>
</%def>
|