Files @ 6d9b3ade3051
Branch filter:

Location: kallithea/rhodecode/templates/changeset/diff_block.html

Zachary Auclair
Allowing multiple issue servers to be autolinked in the changeset view;
linking is now contingent on issue_server_link, issue_pat and issue_prefix
being defined; multiple servers can be used by specifying a common suffix on all
the above variables, ie ..

issue_server_link_1
issue_pat_1
issue_prefix_1

.. and ..

issue_server_link_other
issue_pat_other
issue_prefix_other

.. would be treated as two distinct servers, but ..

issue_pat_thing

.. would be ignored (since the other two requisite vars aren't present).

This patch is backwards compatible with existing variables (as a suffix
isn't needed).
## -*- coding: utf-8 -*-
##usage:
## <%namespace name="diff_block" file="/changeset/diff_block.html"/>
## ${diff_block.diff_block(change)}
##
<%def name="diff_block(change)">

%for op,filenode,diff,cs1,cs2,stat in change:
    %if op !='removed':
    <div id="${h.FID(filenode.changeset.raw_id,filenode.path)}_target" style="clear:both;margin-top:25px"></div>
    <div id="${h.FID(filenode.changeset.raw_id,filenode.path)}" class="diffblock  margined comm">
        <div class="code-header">
            <div class="changeset_header">
                <div class="changeset_file">
                    ${h.link_to_if(change!='removed',h.safe_unicode(filenode.path),h.url('files_home',repo_name=c.repo_name,
                    revision=filenode.changeset.raw_id,f_path=h.safe_unicode(filenode.path)))}
                </div>
                <div class="diff-actions">
                  <a href="${h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(filenode.path),diff2=cs2,diff1=cs1,diff='diff',fulldiff=1)}" class="tooltip" title="${h.tooltip(_('diff'))}"><img class="icon" src="${h.url('/images/icons/page_white_go.png')}"/></a>
                  <a href="${h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(filenode.path),diff2=cs2,diff1=cs1,diff='raw')}" class="tooltip" title="${h.tooltip(_('raw diff'))}"><img class="icon" src="${h.url('/images/icons/page_white.png')}"/></a>
                  <a href="${h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(filenode.path),diff2=cs2,diff1=cs1,diff='download')}" class="tooltip" title="${h.tooltip(_('download diff'))}"><img class="icon" src="${h.url('/images/icons/page_white_get.png')}"/></a>
                  ${c.ignorews_url(request.GET, h.FID(filenode.changeset.raw_id,filenode.path))}
                  ${c.context_url(request.GET, h.FID(filenode.changeset.raw_id,filenode.path))}
                </div>
                <span style="float:right;margin-top:-3px">
                  <label>
                  ${_('show inline comments')}
                  ${h.checkbox('',checked="checked",class_="show-inline-comments",id_for=h.FID(filenode.changeset.raw_id,filenode.path))}
                  </label>
                </span>
            </div>
        </div>
        <div class="code-body">
            <div class="full_f_path" path="${h.safe_unicode(filenode.path)}"></div>
            ${diff|n}
        </div>
    </div>
    %endif
%endfor

</%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">
                  <a href="#">${h.safe_unicode(filenode_path)}</a>
              </div>
          </div>
      </div>
        <div class="code-body">
            <div class="full_f_path" path="${h.safe_unicode(filenode_path)}"></div>
            ${diff|n}
        </div>
    </div>
  %endfor
</%def>