Changeset - 1a659a59be4a
[Not reviewed]
kallithea/controllers/files.py
Show inline comments
 
@@ -758,48 +758,48 @@ class FilesController(BaseRepoController
 
        get changesets history for given node
 

	
 
        :param cs: changeset to calculate history
 
        :param f_path: path for node to calculate history for
 
        :param changesets: if passed don't calculate history and take
 
            changesets defined in this list
 
        """
 
        # calculate history based on tip
 
        tip_cs = c.db_repo_scm_instance.get_changeset()
 
        if changesets is None:
 
            try:
 
                changesets = tip_cs.get_file_history(f_path)
 
            except (NodeDoesNotExistError, ChangesetError):
 
                #this node is not present at tip !
 
                changesets = cs.get_file_history(f_path)
 
        hist_l = []
 

	
 
        changesets_group = ([], _("Changesets"))
 
        branches_group = ([], _("Branches"))
 
        tags_group = ([], _("Tags"))
 
        _hg = cs.repository.alias == 'hg'
 
        for chs in changesets:
 
            #_branch = '(%s)' % chs.branch if _hg else ''
 
            _branch = chs.branch
 
            n_desc = 'r%s:%s (%s)' % (chs.revision, chs.short_id, _branch)
 
            n_desc = '%s (%s)' % (h.show_id(chs), _branch)
 
            changesets_group[0].append((chs.raw_id, n_desc,))
 
        hist_l.append(changesets_group)
 

	
 
        for name, chs in c.db_repo_scm_instance.branches.items():
 
            branches_group[0].append((chs, name),)
 
        hist_l.append(branches_group)
 

	
 
        for name, chs in c.db_repo_scm_instance.tags.items():
 
            tags_group[0].append((chs, name),)
 
        hist_l.append(tags_group)
 

	
 
        return hist_l, changesets
 

	
 
    @LoginRequired()
 
    @HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
 
                                   'repository.admin')
 
    @jsonify
 
    def nodelist(self, repo_name, revision, f_path):
 
        if request.environ.get('HTTP_X_PARTIAL_XHR'):
 
            cs = self.__get_cs_or_redirect(revision, repo_name)
 
            _d, _f = ScmModel().get_nodes(repo_name, cs.raw_id, f_path,
 
                                          flat=False)
 
            return {'nodes': _d + _f}
kallithea/lib/helpers.py
Show inline comments
 
@@ -337,50 +337,49 @@ def pygmentize_annotation(repo_name, fil
 
            RGB_tuple = hsv_to_rgb(*HSV_tuple)
 
            yield map(lambda x: str(int(x * 256)), RGB_tuple)
 

	
 
    cgenerator = gen_color()
 

	
 
    def get_color_string(cs):
 
        if cs in color_dict:
 
            col = color_dict[cs]
 
        else:
 
            col = color_dict[cs] = cgenerator.next()
 
        return "color: rgb(%s)! important;" % (', '.join(col))
 

	
 
    def url_func(repo_name):
 

	
 
        def _url_func(changeset):
 
            author = changeset.author
 
            date = changeset.date
 
            message = tooltip(changeset.message)
 

	
 
            tooltip_html = ("<div style='font-size:0.8em'><b>Author:</b>"
 
                            " %s<br/><b>Date:</b> %s</b><br/><b>Message:"
 
                            "</b> %s<br/></div>")
 

	
 
            tooltip_html = tooltip_html % (author, date, message)
 
            lnk_format = '%5s:%s' % ('r%s' % changeset.revision,
 
                                     short_id(changeset.raw_id))
 
            lnk_format = show_id(changeset)
 
            uri = link_to(
 
                    lnk_format,
 
                    url('changeset_home', repo_name=repo_name,
 
                        revision=changeset.raw_id),
 
                    style=get_color_string(changeset.raw_id),
 
                    class_='tooltip',
 
                    title=tooltip_html
 
                  )
 

	
 
            uri += '\n'
 
            return uri
 
        return _url_func
 

	
 
    return literal(markup_whitespace(annotate_highlight(filenode, url_func(repo_name), **kwargs)))
 

	
 

	
 
def is_following_repo(repo_name, user_id):
 
    from kallithea.model.scm import ScmModel
 
    return ScmModel().is_following_repo(repo_name, user_id)
 

	
 
class _Message(object):
 
    """A message returned by ``Flash.pop_messages()``.
 

	
 
    Converting the message to a string returns the message text. Instances
kallithea/templates/bookmarks/bookmarks_data.html
Show inline comments
 
@@ -7,38 +7,38 @@
 
            <th class="left">${_('Name')}</th>
 
            <th class="left">Raw date</th> ##notranslation
 
            <th class="left">${_('Date')}</th>
 
            <th class="left">${_('Author')}</th>
 
            <th class="left">Raw rev</th> ##notranslation
 
            <th class="left">${_('Revision')}</th>
 
            <th class="left">${_('Compare')}</th>
 
        </tr>
 
    </thead>
 
    %for cnt,book in enumerate(c.repo_bookmarks.items()):
 
        <tr class="parity${cnt%2}">
 
            <td>${book[0]}</td>
 
            <td>
 
                <span class="logbooks">
 
                    <span class="booktag">${h.link_to(book[0],
 
                    h.url('changeset_home',repo_name=c.repo_name,revision=book[1].raw_id))}</span>
 
                </span>
 
            </td>
 
            <td>${book[1]._timestamp}</td>
 
            <td><span class="tooltip" title="${h.tooltip(h.age(book[1].date))}">${h.fmt_date(book[1].date)}</span></td>
 
            <td title="${book[1].author}">${h.person(book[1].author)}</td>
 
            <td>${book[1].revision}</td>
 
            <td>
 
              <div>
 
                  <pre><a href="${h.url('changeset_home',repo_name=c.repo_name,revision=book[1].raw_id)}">r${book[1].revision}:${h.short_id(book[1].raw_id)}</a></pre>
 
                  <pre><a href="${h.url('changeset_home',repo_name=c.repo_name,revision=book[1].raw_id)}">${h.show_id(book[1])}</a></pre>
 
              </div>
 
            </td>
 
            <td>
 
                <input class="branch-compare" type="radio" name="compare_org" value="${book[0]}"/>
 
                <input class="branch-compare" type="radio" name="compare_other" value="${book[0]}"/>
 
            </td>
 
        </tr>
 
    %endfor
 
    </table>
 
    </div>
 
%else:
 
    ${_('There are no bookmarks yet')}
 
%endif
kallithea/templates/branches/branches_data.html
Show inline comments
 
@@ -8,63 +8,63 @@
 
            <th class="left">Raw date</th> ##notranslation
 
            <th class="left">${_('Date')}</th>
 
            <th class="left">${_('Author')}</th>
 
            <th class="left">Raw rev</th> ##notranslation
 
            <th class="left">${_('Revision')}</th>
 
            <th class="left">${_('Compare')}</th>
 
        </tr>
 
      </thead>
 
        %for cnt,branch in enumerate(c.repo_branches.items()):
 
        <tr class="parity${cnt%2}">
 
            <td>${branch[0]}</td>
 
            <td>
 
                <span class="logtags">
 
                    <span class="branchtag">
 
                    ${h.link_to(branch[0],h.url('changelog_home',repo_name=c.repo_name,branch=branch[0]))}
 
                    </span>
 
                </span>
 
            </td>
 
            <td>${branch[1]._timestamp}</td>
 
            <td><span class="tooltip" title="${h.tooltip(h.age(branch[1].date))}">${h.fmt_date(branch[1].date)}</span></td>
 
            <td title="${branch[1].author}">${h.person(branch[1].author)}</td>
 
            <td>${branch[1].revision}</td>
 
            <td>
 
                <div>
 
                    <pre><a href="${h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].raw_id)}">r${branch[1].revision}:${h.short_id(branch[1].raw_id)}</a></pre>
 
                    <pre><a href="${h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].raw_id)}">${h.show_id(branch[1])}</a></pre>
 
                </div>
 
            </td>
 
            <td>
 
                <input class="branch-compare" type="radio" name="compare_org" value="${branch[0]}"/>
 
                <input class="branch-compare" type="radio" name="compare_other" value="${branch[0]}"/>
 
            </td>
 
        </tr>
 
        %endfor
 
        ## closed branches if any
 
        % if hasattr(c,'repo_closed_branches') and c.repo_closed_branches:
 
          %for cnt,branch in enumerate(c.repo_closed_branches.items()):
 
          <tr class="parity${cnt%2}">
 
              <td>${branch[0]}</td>
 
              <td>
 
                  <span class="logtags">
 
                      <span class="branchtag">
 
                      ${h.link_to(branch[0]+' [closed]',h.url('changelog_home',repo_name=c.repo_name,branch=branch[0]))}
 
                      </span>
 
                  </span>
 
              </td>
 
              <td>${branch[1]._timestamp}</td>
 
              <td><span class="tooltip" title="${h.tooltip(h.age(branch[1].date))}">${h.fmt_date(branch[1].date)}</span></td>
 
              <td title="${branch[1].author}">${h.person(branch[1].author)}</td>
 
              <td>${branch[1].revision}</td>
 
              <td>
 
                <div>
 
                    <pre><a href="${h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].raw_id)}">r${branch[1].revision}:${h.short_id(branch[1].raw_id)}</a></pre>
 
                    <pre><a href="${h.url('changeset_home',repo_name=c.repo_name,revision=branch[1].raw_id)}">${h.show_id(branch[1])}</a></pre>
 
                </div>
 
              </td>
 
              <td></td>
 
          </tr>
 
          %endfor
 
        %endif
 
    </table>
 
    </div>
 
%else:
 
    ${_('There are no branches yet')}
 
%endif
kallithea/templates/changeset/changeset.html
Show inline comments
 
## -*- coding: utf-8 -*-
 

	
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('%s Changeset') % c.repo_name} - ${h.show_id(c.changeset)}
 
    %if c.site_name:
 
        &middot; ${c.site_name}
 
    %endif
 
</%def>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('Changeset')} - <span class='hash'>r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}</span>
 
    ${_('Changeset')} - <span class='hash'>${h.show_id(c.changeset)}</span>
 
</%def>
 

	
 
<%def name="page_nav()">
 
    ${self.menu('repositories')}
 
</%def>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('changelog', c.changeset.raw_id)}
 
<div class="box">
 
    <!-- box / title -->
 
    <div class="title">
 
        ${self.breadcrumbs()}
 
    </div>
 
    <script>
 
    var _USERS_AC_DATA = ${c.users_array|n};
 
    var _GROUPS_AC_DATA = ${c.user_groups_array|n};
 
    AJAX_COMMENT_URL = "${url('changeset_comment',repo_name=c.repo_name,revision=c.changeset.raw_id)}";
 
    AJAX_COMMENT_DELETE_URL = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}";
 
    </script>
 
    <div class="table">
 
        <div class="diffblock">
 
            <div class="parents">
 
                <div id="parent_link" class="changeset_hash">
 
                    <i style="color:#036185" class="icon-chevron-left"></i> <a href="#">${_('parent rev.')}</a>
kallithea/templates/changeset/changeset_range.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('%s Changesets') % c.repo_name} - r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)} &gt; r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)}
 
    ${_('%s Changesets') % c.repo_name} - ${h.show_id(c.cs_ranges[0])} &gt; ${h.show_id(c.cs_ranges[-1])}
 
    %if c.site_name:
 
        &middot; ${c.site_name}
 
    %endif
 
</%def>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('Changesets')} -
 
    r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)}
 
    ${h.link_to(h.show_id(c.cs_ranges[0]),h.url('changeset_home',repo_name=c.repo_name,revision=c.cs_ranges[0]))}</td>
 
    <i class="icon-arrow-right"></i>
 
    r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)}
 
    ${h.link_to(h.show_id(c.cs_ranges[-1]),h.url('changeset_home',repo_name=c.repo_name,revision=c.cs_ranges[-1]))}</td>
 
</%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">
 
                <div>
 
                    r${c.cs_ranges[0].revision}:${h.short_id(c.cs_ranges[0].raw_id)}
 
                    ${h.show_id(c.cs_ranges[0])}
 
                    <i class="icon-arrow-right"></i>
 
                    r${c.cs_ranges[-1].revision}:${h.short_id(c.cs_ranges[-1].raw_id)}
 
                    ${h.show_id(c.cs_ranges[-1])}
 
                    <a style="font-weight: bold" href="${h.url('compare_url',repo_name=c.repo_name,org_ref_type='rev',org_ref_name=getattr(c.cs_ranges[0].parents[0] if c.cs_ranges[0].parents else h.EmptyChangeset(),'raw_id'),other_ref_type='rev',other_ref_name=c.cs_ranges[-1].raw_id)}" class="btn btn-small"><i class="icon-loop"></i> Compare Revisions</a>
 
                </div>
 
            </div>
 
        </div>
 
        <div id="changeset_compare_view_content">
 
            <div class="container">
 
            <table class="compare_view_commits noborder">
 
            %for cnt,cs in enumerate(c.cs_ranges):
 
                <tr>
 
                <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),14)}"/></div></td>
 
                <td>${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</td>
 
                <td><div class="author">${h.person(cs.author)}</div></td>
 
                <td><span class="tooltip" title="${h.age(cs.date)}">${cs.date}</span></td>
 
                <td>
 
                  %if c.statuses:
 
                    <div title="${h.tooltip(_('Changeset status'))}" class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[cnt])}" /></div>
 
                  %endif
 
                </td>
 
                <td><div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name)}</div></td>
 
                </tr>
 
            %endfor
 
            </table>
 
            </div>
 
            <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div>
 
            <div class="cs_files">
 
                   %for cs in c.cs_ranges:
 
                       <div class="cur_cs">${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
 
                    <div class="cur_cs">${h.link_to(h.show_id(cs),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
 
                      %for FID, (cs1, cs2, change, path, diff, stats) in c.changes[cs.raw_id].iteritems():
 
                         <div class="cs_${change}">
 
                               <div class="node">
 
                                   ${h.link_to(h.safe_unicode(path),h.url.current(anchor=FID))}
 
                               </div>
 
                           <div class="changes">${h.fancy_file_stats(stats)}</div>
 
                         </div>
 
                      %endfor
 
                   %endfor
 
            </div>
 
        </div>
 

	
 
    </div>
 
    <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
 
    <%namespace name="diff_block" file="/changeset/diff_block.html"/>
 
     %for cs in c.cs_ranges:
 
          ##${comment.comment_inline_form(cs)}
 
          ## diff block
 
          <div class="h3">
 
          <a class="tooltip" title="${h.tooltip(cs.message)}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}">${'r%s:%s' % (cs.revision,h.short_id(cs.raw_id))}</a>
 
          <a class="tooltip" title="${h.tooltip(cs.message)}" href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}">${h.show_id(cs)}</a>
 
             <div class="gravatar">
 
                 <img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),20)}"/>
 
             </div>
 
             <div class="right">
 
              <span class="logtags">
 
                %if len(cs.parents)>1:
 
                <span class="merge">${_('merge')}</span>
 
                %endif
 
                %if h.is_hg(c.db_repo_scm_instance):
 
                  %for book in cs.bookmarks:
 
                  <span class="booktag" title="${_('Bookmark %s') % book}">
 
                     ${h.link_to(book,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}
 
                  </span>
 
                  %endfor
 
                %endif
 
                %for tag in cs.tags:
 
                    <span class="tagtag" title="${_('Tag %s') % tag}">
 
                    ${h.link_to(tag,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</span>
 
                %endfor
 
                %if cs.branch:
 
                <span class="branchtag" title="${_('Branch %s') % cs.branch}">
 
                   ${h.link_to(cs.branch,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}
 
                </span>
 
                %endif
kallithea/templates/compare/compare_cs.html
Show inline comments
 
@@ -2,50 +2,49 @@
 
<div class="container">
 
  %if not c.cs_ranges:
 
    <span class="empty_data">${_('No changesets')}</span>
 
  %else:
 

	
 
    %if c.ancestor:
 
    <div class="ancestor">${_('Ancestor')}:
 
      ${h.link_to(h.short_id(c.ancestor),h.url('changeset_home',repo_name=c.repo_name,revision=c.ancestor))}
 
    </div>
 
    %endif
 

	
 
    <table class="compare_view_commits noborder">
 
    %for cs in reversed(c.cs_ranges):
 
        <tr id="row-${cs.raw_id}">
 
        <td style="width:50px">
 
          %if cs.raw_id in c.statuses:
 
            <div title="${_('Changeset status: %s') % c.statuses[cs.raw_id][1]}" class="changeset-status-ico">
 
                <img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[cs.raw_id][0])}" />
 
            </div>
 
          %endif
 
        </td>
 
        <td style="width: 140px"><span class="tooltip" title="${h.tooltip(h.age(cs.date))}">${cs.date}</span></td>
 
        <td><div class="gravatar" commit_id="${cs.raw_id}"><img alt="gravatar" src="${h.gravatar_url(h.email_or_none(cs.author),14)}"/></div></td>
 
        <td><div class="author">${h.person(cs.author)}</div></td>
 
        <td>${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.other_repo.repo_name,revision=cs.raw_id))}
 
        </td>
 
        <td>${h.link_to(h.show_id(cs),h.url('changeset_home',repo_name=c.other_repo.repo_name,revision=cs.raw_id))}</td>
 
        <td>
 
        %if cs.branch:
 
        <span class="branchtag">${cs.branch}</span>
 
        %endif
 
        </td>
 
        <td class="expand_commit" commit_id="${cs.raw_id}" title="${_('Expand commit message')}">
 
            <i class="icon-resize-vertical" style="color:#DDD"></i>
 
        </td>
 
        <td><div id="C-${cs.raw_id}" class="message" style="white-space:normal; height:1.1em; padding:0">${h.urlify_commit(cs.message, c.repo_name)}</div></td>
 
        </tr>
 
    %endfor
 
    </table>
 
    %if c.as_form:
 
      <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
 
      ## links should perhaps use ('rev', c.org_rev) instead ...
 
      ${h.link_to(_('Show merge diff'),
 
        h.url('compare_url',
 
          repo_name=c.org_repo.repo_name,
 
          org_ref_type=c.org_ref_type, org_ref_name=c.org_ref_name,
 
          other_repo=c.other_repo.repo_name,
 
          other_ref_type=c.other_ref_type, other_ref_name=c.other_ref_name,
 
          merge='1'),
 
        )}
 
      </div>
kallithea/templates/files/diff_2way.html
Show inline comments
 
## -*- coding: utf-8 -*-
 

	
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="js_extra()">
 
<script type="text/javascript" src="${h.url('/js/codemirror.js')}"></script>
 
<script type="text/javascript" src="${h.url('/js/mergely.js')}"></script>
 
</%def>
 
<%def name="css_extra()">
 
<link rel="stylesheet" type="text/css" href="${h.url('/css/codemirror.css')}"/>
 
<link rel="stylesheet" type="text/css" href="${h.url('/css/mergely.css')}"/>
 
</%def>
 

	
 
<%def name="title()">
 
    ${_('%s File side-by-side diff') % c.repo_name}
 
    %if c.site_name:
 
        &middot; ${c.site_name}
 
    %endif
 
</%def>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('File diff')} r${c.changeset_1.revision}:${h.short_id(c.changeset_1.raw_id)} &rarr; r${c.changeset_2.revision}:${h.short_id(c.changeset_2.raw_id)}
 
    ${_('File diff')} ${h.show_id(c.changeset_1)} &rarr; ${h.show_id(c.changeset_2)}
 
</%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="diff-container" style="overflow-x: hidden">
 
        <div class="diffblock comm" style="margin:3px; padding:1px">
 
            <div class="code-header">
 
                <div class="changeset_header">
 
                    <div class="changeset_file">
 
                        ${h.link_to(h.safe_unicode(c.node1.path),h.url('files_home',repo_name=c.repo_name,
 
                        revision=c.cs2.raw_id,f_path=h.safe_unicode(c.node1.path)))}
 
                    </div>
 
                    <div class="diff-actions">
 
                      <a href="${h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(c.node1.path),diff2=c.cs2.raw_id,diff1=c.cs1.raw_id,diff='diff',fulldiff=1)}" class="tooltip" title="${h.tooltip(_('Show full diff for this file'))}">
kallithea/templates/files/file_diff.html
Show inline comments
 
<%inherit file="/base/base.html"/>
 

	
 
<%def name="title()">
 
    ${_('%s File Diff') % c.repo_name}
 
    %if c.site_name:
 
        &middot; ${c.site_name}
 
    %endif
 
</%def>
 

	
 
<%def name="breadcrumbs_links()">
 
    ${_('File diff')} r${c.changeset_1.revision}:${h.short_id(c.changeset_1.raw_id)} &rarr; r${c.changeset_2.revision}:${h.short_id(c.changeset_2.raw_id)}
 
    ${_('File diff')} ${h.show_id(c.changeset_1)} &rarr; ${h.show_id(c.changeset_2)}
 
</%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>
 
    ## diff block
 
    <%namespace name="diff_block" file="/changeset/diff_block.html"/>
 
    ${diff_block.diff_block(c.changes)}
 
    </div>
 
</div>
 

	
 
<script>
 
YUE.onDOMReady(function(){
 

	
 
    YUE.on(YUQ('.diff-menu-activate'),'click',function(e){
kallithea/templates/files/files_browser.html
Show inline comments
 
@@ -62,49 +62,49 @@
 
                %endif
 

	
 
            %for cnt,node in enumerate(c.file):
 
                <tr class="parity${cnt%2}">
 
                     <td>
 
                        %if node.is_submodule():
 
                           ${h.link_to(node.name,node.url or '#',class_="submodule-dir ypjax-link")}
 
                        %else:
 
                          ${h.link_to(node.name, h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=h.safe_unicode(node.path)),class_=file_class(node)+" ypjax-link")}
 
                        %endif:
 
                     </td>
 
                     <td>
 
                     %if node.is_file():
 
                         ${h.format_byte_size(node.size,binary=True)}
 
                     %endif
 
                     </td>
 
                     <td>
 
                      %if node.is_file():
 
                          ${node.mimetype}
 
                      %endif
 
                     </td>
 
                     <td>
 
                         %if node.is_file():
 
                             <div class="tooltip" title="${h.tooltip(node.last_changeset.message)}">
 
                              <pre>${'r%s:%s' % (node.last_changeset.revision,node.last_changeset.short_id)}</pre>
 
                              <pre>${h.show_id(node.last_changeset)}</pre>
 
                             </div>
 
                         %endif
 
                     </td>
 
                     <td>
 
                         %if node.is_file():
 
                             <span class="tooltip" title="${h.tooltip(h.fmt_date(node.last_changeset.date))}">
 
                            ${h.age(node.last_changeset.date)}</span>
 
                         %endif
 
                     </td>
 
                     <td>
 
                         %if node.is_file():
 
                             <span title="${node.last_changeset.author}">
 
                            ${h.person(node.last_changeset.author)}
 
                            </span>
 
                         %endif
 
                     </td>
 
                </tr>
 
            %endfor
 
            </tbody>
 
            <tbody id="tbody_filtered" style="display:none">
 
            </tbody>
 
        </table>
 
    </div>
 
</div>
kallithea/templates/files/files_edit.html
Show inline comments
 
@@ -24,49 +24,49 @@
 
<%def name="breadcrumbs_links()">
 
    ${_('Edit file')} @ ${h.show_id(c.cs)}
 
</%def>
 

	
 
<%def name="main()">
 
${self.repo_context_bar('files')}
 
<div class="box">
 
    <!-- box / title -->
 
    <div class="title">
 
        ${self.breadcrumbs()}
 
        <ul class="links">
 
            <li>
 
              <span><a href="#">${_('Branch')}: ${c.cs.branch}</a></span>
 
            </li>
 
        </ul>
 
    </div>
 
    <div class="table" id="edit">
 
        <div id="files_data">
 
            <h3 class="files_location">${_('Location')}: ${h.files_breadcrumbs(c.repo_name,c.cs.revision,c.file.path)}</h3>
 
            ${h.form(h.url.current(),method='post',id='eform')}
 
            <div id="body" class="codeblock">
 
            <div class="code-header">
 
                <div class="stats">
 
                    <div class="left"><i class="icon-file"></i></div>
 
                    <div class="left item">${h.link_to("r%s:%s" % (c.file.changeset.revision,h.short_id(c.file.changeset.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id))}</div>
 
                    <div class="left item">${h.link_to(h.show_id(c.file.changeset),h.url('changeset_home',repo_name=c.repo_name,revision=c.file.changeset.raw_id))}</div>
 
                    <div class="left item">${h.format_byte_size(c.file.size,binary=True)}</div>
 
                    <div class="left item last">${c.file.mimetype}</div>
 
                    <div class="buttons">
 
                      ${h.link_to(_('Show Annotation'),h.url('files_annotate_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="btn btn-mini")}
 
                      ${h.link_to(_('Show as Raw'),h.url('files_raw_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="btn btn-mini")}
 
                      ${h.link_to(_('Download as Raw'),h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="btn btn-mini")}
 
                      % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
 
                       % if not c.file.is_binary:
 
                        ${h.link_to(_('Source'),h.url('files_home',repo_name=c.repo_name,revision=c.cs.raw_id,f_path=c.f_path),class_="btn btn-mini")}
 
                       % endif
 
                      % endif
 
                    </div>
 
                </div>
 
                <label class="commit" for="set_mode">${_('Editing file')}: ${c.file.unicode_path}</label>
 
                ${h.select('set_mode','plain',[('plain',_('plain'))])}
 
            </div>
 
                <pre id="editor_pre"></pre>
 
                <textarea id="editor" name="content" style="display:none">${h.escape(c.file.content)|n}</textarea>
 
                <div style="padding: 10px;color:#666666">${_('Commit Message')}</div>
 
                <textarea id="commit" name="message" style="height: 60px;width: 99%;margin-left:4px" placeholder="${c.default_message}"></textarea>
 
            </div>
 
            <div style="text-align: left;padding-top: 5px">
 
            ${h.submit('commit',_('Commit changes'),class_="btn btn-small btn-success")}
 
            ${h.reset('reset',_('Reset'),class_="btn btn-small")}
kallithea/templates/files/files_source.html
Show inline comments
 
<div id="node_history" style="padding: 0px 0px 10px 0px">
 
    <div>
 
        <div style="float:left">
 
        ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='get')}
 
        ${h.hidden('diff2',c.file_changeset.raw_id)}
 
        ${h.hidden('diff1')}
 
        ${h.submit('diff',_('Diff to Revision'),class_="btn btn-small")}
 
        ${h.submit('show_rev',_('Show at Revision'),class_="btn btn-small")}
 
        ${h.hidden('annotate', c.annotate)}
 
        ${h.link_to(_('Show Full History'),h.url('changelog_file_home',repo_name=c.repo_name, revision=c.file_changeset.raw_id, f_path=c.f_path),class_="btn btn-small")}
 
        ${h.link_to(_('Show Authors'),'#',class_="btn btn-small" ,id="show_authors")}
 

	
 
        ${h.end_form()}
 
        </div>
 
        <div id="file_authors" class="file_author" style="clear:both; display: none"></div>
 
    </div>
 
    <div style="clear:both"></div>
 
</div>
 

	
 

	
 
<div id="body" class="codeblock">
 
    <div class="code-header">
 
        <div class="stats">
 
            <div class="left img"><i class="icon-file"></i></div>
 
            <div class="left item"><pre class="tooltip" title="${h.tooltip(h.fmt_date(c.file_changeset.date))}">${h.link_to("r%s:%s" % (c.file_changeset.revision,h.short_id(c.file_changeset.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=c.file_changeset.raw_id))}</pre></div>
 
            <div class="left item"><pre class="tooltip" title="${h.tooltip(h.fmt_date(c.file_changeset.date))}">${h.link_to(h.show_id(c.file_changeset),h.url('changeset_home',repo_name=c.repo_name,revision=c.file_changeset.raw_id))}</pre></div>
 
            <div class="left item"><pre>${h.format_byte_size(c.file.size,binary=True)}</pre></div>
 
            <div class="left item last"><pre>${c.file.mimetype}</pre></div>
 
            <div class="buttons">
 
              %if c.annotate:
 
                ${h.link_to(_('Show Source'),    h.url('files_home',         repo_name=c.repo_name,revision=c.file_changeset.raw_id,f_path=c.f_path),class_="btn btn-mini")}
 
              %else:
 
                ${h.link_to(_('Show Annotation'),h.url('files_annotate_home',repo_name=c.repo_name,revision=c.file_changeset.raw_id,f_path=c.f_path),class_="btn btn-mini")}
 
              %endif
 
              ${h.link_to(_('Show as Raw'),h.url('files_raw_home',repo_name=c.repo_name,revision=c.file_changeset.raw_id,f_path=c.f_path),class_="btn btn-mini")}
 
              ${h.link_to(_('Download as Raw'),h.url('files_rawfile_home',repo_name=c.repo_name,revision=c.file_changeset.raw_id,f_path=c.f_path),class_="btn btn-mini")}
 
              % if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
 
               %if c.on_branch_head and c.changeset.branch and not c.file.is_binary:
 
                ${h.link_to(_('Edit on Branch:%s') % c.changeset.branch, h.url('files_edit_home',repo_name=c.repo_name,revision=c.changeset.branch,f_path=c.f_path, anchor='edit'),class_="btn btn-mini")}
 
                ${h.link_to(_('Delete'), h.url('files_delete_home',repo_name=c.repo_name,revision=c.changeset.branch,f_path=c.f_path, anchor='edit'),class_="btn btn-mini btn-danger")}
 
               %elif c.on_branch_head and c.changeset.branch and c.file.is_binary:
 
                ${h.link_to(_('Edit'), '#', class_="btn btn-mini disabled tooltip", title=_('Editing binary files not allowed'))}
 
                ${h.link_to(_('Delete'), h.url('files_delete_home',repo_name=c.repo_name,revision=c.changeset.branch,f_path=c.f_path, anchor='edit'),class_="btn btn-mini btn-danger")}
 
               %else:
 
                ${h.link_to(_('Edit'), '#', class_="btn btn-mini disabled tooltip", title=_('Editing files allowed only when on branch head revision'))}
 
                ${h.link_to(_('Delete'), '#', class_="btn btn-mini btn-danger disabled tooltip", title=_('Deleting files allowed only when on branch head revision'))}
 
               % endif
 
              % endif
 
            </div>
 
        </div>
kallithea/templates/tags/tags_data.html
Show inline comments
 
@@ -8,38 +8,38 @@
 
            <th class="left">Raw date</th> ##notranslation
 
            <th class="left">${_('Date')}</th>
 
            <th class="left">${_('Author')}</th>
 
            <th class="left">Raw rev</th> ##notranslation
 
            <th class="left">${_('Revision')}</th>
 
            <th class="left">${_('Compare')}</th>
 
        </tr>
 
      </thead>
 
        %for cnt,tag in enumerate(c.repo_tags.items()):
 
        <tr class="parity${cnt%2}">
 
            <td>${tag[0]}</td>
 
            <td>
 
                <span class="logtags">
 
                    <span class="tagtag">${h.link_to(tag[0],
 
                    h.url('changeset_home',repo_name=c.repo_name,revision=tag[1].raw_id))}
 
                    </span>
 
                </span>
 
            </td>
 
            <td>${tag[1]._timestamp}</td>
 
            <td><span class="tooltip" title="${h.tooltip(h.age(tag[1].date))}">${h.fmt_date(tag[1].date)}</span></td>
 
            <td title="${tag[1].author}">${h.person(tag[1].author)}</td>
 
            <td>${tag[1].revision}</td>
 
            <td>
 
                <div>
 
                    <pre><a href="${h.url('changeset_home',repo_name=c.repo_name,revision=tag[1].raw_id)}">r${tag[1].revision}:${h.short_id(tag[1].raw_id)}</a></pre>
 
                    <pre><a href="${h.url('changeset_home',repo_name=c.repo_name,revision=tag[1].raw_id)}">${h.show_id(tag[1])}</a></pre>
 
                </div>
 
            </td>
 
            <td>
 
                <input class="branch-compare" type="radio" name="compare_org" value="${tag[0]}"/>
 
                <input class="branch-compare" type="radio" name="compare_other" value="${tag[0]}"/>
 
            </td>
 
        </tr>
 
        %endfor
 
    </table>
 
   </div>
 
%else:
 
    ${_('There are no tags yet')}
 
%endif
0 comments (0 inline, 0 general)