Changeset - 6c1bd918a789
[Not reviewed]
default
0 1 0
Mads Kiilerich - 12 years ago 2013-12-10 19:30:37
madski@unity3d.com
compare: don't show broken file links for added and removed files
1 file changed with 14 insertions and 3 deletions:
0 comments (0 inline, 0 general)
kallithea/templates/changeset/diff_block.html
Show inline comments
 
@@ -50,27 +50,38 @@
 
</div>
 
</%def>
 

	
 
<%def name="diff_block_simple(change)">
 

	
 
  %for op,filenode_path,diff in change:
 
    <div id="${h.FID('',filenode_path)}_target" style="clear:both;margin-top:25px"></div>
 
    <div id="${h.FID('',filenode_path)}" class="diffblock  margined comm">
 
      <div class="code-header">
 
          <div class="changeset_header">
 
              <div class="changeset_file">
 
                  ${h.safe_unicode(filenode_path)} |
 
                  <a class="spantag" href="${h.url('files_home', repo_name=c.other_repo.repo_name, f_path=filenode_path, revision=c.org_rev)}" title="${_('Show file at latest version in this repo')}">${c.org_ref_type}@${h.short_id(c.org_ref_name) if c.org_ref_type=='rev' else c.org_ref_name}</a>
 
                  <i class="icon-arrow-right" style="font-size: 12px;color:#577632"></i>
 
                  <a class="spantag" href="${h.url('files_home', repo_name=c.repo_name, f_path=filenode_path, revision=c.other_rev)}" title="${_('Show file at initial version in this repo')}">${c.other_ref_type}@${h.short_id(c.other_ref_name) if c.other_ref_type=='rev' else c.other_ref_name}</a>
 
                  ## TODO: link to ancestor and head of other instead of exactly other
 
                  %if op == 'A':
 
                    ${_('Added')}
 
                    <a class="spantag" href="${h.url('files_home', repo_name=c.org_repo.repo_name, f_path=filenode_path, revision=c.org_rev)}">${h.short_id(c.org_ref_name) if c.org_ref_type=='rev' else c.org_ref_name}</a>
 
                  %elif op == 'M':
 
                    <a class="spantag" href="${h.url('files_home', repo_name=c.org_repo.repo_name, f_path=filenode_path, revision=c.org_rev)}">${h.short_id(c.org_ref_name) if c.org_ref_type=='rev' else c.org_ref_name}</a>
 
                    <i class="icon-arrow-right"></i>
 
                    <a class="spantag" href="${h.url('files_home', repo_name=c.other_repo.repo_name, f_path=filenode_path, revision=c.other_rev)}">${h.short_id(c.other_ref_name) if c.other_ref_type=='rev' else c.other_ref_name}</a>
 
                  %elif op == 'D':
 
                    ${_('Deleted')}
 
                    <a class="spantag" href="${h.url('files_home', repo_name=c.other_repo.repo_name, f_path=filenode_path, revision=c.other_rev)}">${h.short_id(c.other_ref_name) if c.other_ref_type=='rev' else c.other_ref_name}</a>
 
                  %else:
 
                    ${op}???
 
                  %endif
 
              </div>
 
               <div class="diff-actions">
 
                %if c.other_repo.repo_name == c.repo_name:
 
                  <a href="${h.url('files_diff_2way_home',repo_name=c.repo_name,f_path=h.safe_unicode(filenode_path),diff2=c.other_rev,diff1=c.org_rev,diff='diff',fulldiff=1)}" class="tooltip" title="${h.tooltip(_('Show full side-by-side diff for this file'))}">
 
                      <img class="icon" src="${h.url('/images/icons/application_double.png')}"/>
 
                  </a>
 
                %endif
 
                </div>
 
          </div>
 
      </div>
 
        <div class="code-body">
 
            <div class="full_f_path" path="${h.safe_unicode(filenode_path)}"></div>
0 comments (0 inline, 0 general)