Files @ ffd45b185016
Branch filter:

Location: kallithea/rhodecode/templates/summary/summary.html - annotation

Bradley M. Kuhn
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.
1e757ac98988
1e757ac98988
1e757ac98988
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
1e757ac98988
1e757ac98988
1e757ac98988
9e677f6d34cb
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
1e757ac98988
1e757ac98988
1e757ac98988
eacd33e0c5b3
1e757ac98988
1e757ac98988
6bef2a9f73e2
ffd45b185016
ffd45b185016
c78de39f30fc
c78de39f30fc
c78de39f30fc
c78de39f30fc
79abd21d51c4
79abd21d51c4
79abd21d51c4
79abd21d51c4
c78de39f30fc
c78de39f30fc
c78de39f30fc
79abd21d51c4
c78de39f30fc
c78de39f30fc
c78de39f30fc
6bef2a9f73e2
6bef2a9f73e2
1e757ac98988
072a37c44f58
07e56179633e
07e56179633e
07e56179633e
ffd45b185016
1e757ac98988
1e757ac98988
1e757ac98988
1e757ac98988
1e757ac98988
b4f401524060
b4f401524060
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
f91d3f9b7230
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
f91d3f9b7230
b4f401524060
b4f401524060
b4f401524060
b4f401524060
b4f401524060
4a28aff31a15
b4f401524060
4a28aff31a15
f91d3f9b7230
4a28aff31a15
ffd45b185016
07e56179633e
f91d3f9b7230
b4f401524060
b4f401524060
f91d3f9b7230
b4f401524060
b4f401524060
b4f401524060
b4f401524060
b4f401524060
b4f401524060
b4f401524060
260a7a01b054
b4f401524060
4a28aff31a15
ffd45b185016
f91d3f9b7230
b4f401524060
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
2a8bf2a3da98
aab189b312fa
aab189b312fa
2a8bf2a3da98
b4f401524060
b4f401524060
b4f401524060
1c32b72930fa
1c32b72930fa
1c32b72930fa
1c32b72930fa
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
1c32b72930fa
1c32b72930fa
1c32b72930fa
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
1c32b72930fa
1c32b72930fa
835d44dd6ed8
b10976229890
b10976229890
ffd45b185016
ffd45b185016
1c32b72930fa
835d44dd6ed8
835d44dd6ed8
835d44dd6ed8
835d44dd6ed8
ffd45b185016
835d44dd6ed8
ffd45b185016
835d44dd6ed8
835d44dd6ed8
835d44dd6ed8
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
1c32b72930fa
1c32b72930fa
1c32b72930fa
b4f401524060
1e757ac98988
4a28aff31a15
f91d3f9b7230
ffd45b185016
1e757ac98988
e2d76554d2c6
e2d76554d2c6
6aae03fa3fee
e2d76554d2c6
e2d76554d2c6
e2d76554d2c6
e2d76554d2c6
f91d3f9b7230
1e757ac98988
b04d5214fd3c
c7970889c5c0
b04d5214fd3c
df59c0503636
df59c0503636
df59c0503636
df59c0503636
0bc7b5895242
0bc7b5895242
ffd45b185016
59fab1f641bf
59fab1f641bf
59fab1f641bf
f91d3f9b7230
0bc7b5895242
df59c0503636
df59c0503636
df59c0503636
1e757ac98988
1e757ac98988
0bc7b5895242
df59c0503636
df59c0503636
df59c0503636
4a28aff31a15
4a28aff31a15
4a28aff31a15
4a28aff31a15
4a28aff31a15
4a28aff31a15
4a28aff31a15
f91d3f9b7230
4a28aff31a15
4a28aff31a15
4a28aff31a15
a8c66e870bd0
a8c66e870bd0
a8c66e870bd0
a8c66e870bd0
f91d3f9b7230
a8c66e870bd0
a8c66e870bd0
f91d3f9b7230
f91d3f9b7230
a8c66e870bd0
a8c66e870bd0
f91d3f9b7230
b4f401524060
b4f401524060
a8c66e870bd0
f91d3f9b7230
a8c66e870bd0
b4f401524060
b4f401524060
a8c66e870bd0
a8c66e870bd0
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
f91d3f9b7230
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
f91d3f9b7230
ffd45b185016
ffd45b185016
47c2a006d43b
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
ffd45b185016
4a28aff31a15
ffd45b185016
4a28aff31a15
4a28aff31a15
4a28aff31a15
4a28aff31a15
4a28aff31a15
4a28aff31a15
4a28aff31a15
4a28aff31a15
a3efaaa6ed4f
b4f401524060
ef23fa832ab2
ef23fa832ab2
4a28aff31a15
a3efaaa6ed4f
b3a3890b7160
4a28aff31a15
4a28aff31a15
4a28aff31a15
4a28aff31a15
4a28aff31a15
4a28aff31a15
a3efaaa6ed4f
a3efaaa6ed4f
a3efaaa6ed4f
b3a3890b7160
4a28aff31a15
4a28aff31a15
4a28aff31a15
a3efaaa6ed4f
4a28aff31a15
df59c0503636
4a28aff31a15
4a28aff31a15
4a28aff31a15
a3efaaa6ed4f
f91d3f9b7230
4a28aff31a15
f91d3f9b7230
4a28aff31a15
f91d3f9b7230
4a28aff31a15
4a28aff31a15
4a28aff31a15
4a28aff31a15
f91d3f9b7230
4a28aff31a15
4a28aff31a15
4a28aff31a15
f91d3f9b7230
4a28aff31a15
4a28aff31a15
4a28aff31a15
4a28aff31a15
4a28aff31a15
4a28aff31a15
4a28aff31a15
f91d3f9b7230
4a28aff31a15
ec6354949623
4a28aff31a15
4a28aff31a15
f91d3f9b7230
4a28aff31a15
4a28aff31a15
4a28aff31a15
4a28aff31a15
f91d3f9b7230
4a28aff31a15
4a28aff31a15
4a28aff31a15
4a28aff31a15
4a28aff31a15
4a28aff31a15
4a28aff31a15
4a28aff31a15
4a28aff31a15
4a28aff31a15
4a28aff31a15
f91d3f9b7230
4a28aff31a15
1e757ac98988
f91d3f9b7230
<%inherit file="/base/base.html"/>

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

<%def name="breadcrumbs_links()">
    ${_('Summary')}

    ## locking icon
    %if c.rhodecode_db_repo.enable_locking:
     %if c.rhodecode_db_repo.locked[0]:
       <span class="locking_locked tooltip" title="${_('Repository locked by %s') % h.person_by_id(c.rhodecode_db_repo.locked[0])}"></span>
     %else:
       <span class="locking_unlocked tooltip" title="${_('Repository unlocked')}"></span>
     %endif
    %endif

    ##FORK
    %if c.rhodecode_db_repo.fork:
    <span>
        - <i class="icon-code-fork"></i> ${_('Fork of')} "<a href="${h.url('summary_home',repo_name=c.rhodecode_db_repo.fork.repo_name)}">${c.rhodecode_db_repo.fork.repo_name}</a>"
    </span>
    %endif

    ##REMOTE
    %if c.rhodecode_db_repo.clone_uri:
    <span>
       - <i class="icon-code-fork"></i> ${_('Clone from')} "<a href="${h.url(str(h.hide_credentials(c.rhodecode_db_repo.clone_uri)))}">${h.hide_credentials(c.rhodecode_db_repo.clone_uri)}</a>"
    <span>
    %endif
</%def>

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

<%def name="head_extra()">
<link href="${h.url('atom_feed_home',repo_name=c.rhodecode_db_repo.repo_name,api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('%s ATOM feed') % c.repo_name}" type="application/atom+xml" />
<link href="${h.url('rss_feed_home',repo_name=c.rhodecode_db_repo.repo_name,api_key=c.rhodecode_user.api_key)}" rel="alternate" title="${_('%s RSS feed') % c.repo_name}" type="application/rss+xml" />

<script>
redirect_hash_branch = function(){
    var branch = window.location.hash.replace(/^#(.*)/, '$1');
    if (branch){
        window.location = "${h.url('changelog_home',repo_name=c.repo_name,branch='__BRANCH__')}"
            .replace('__BRANCH__',branch);
    }
}
redirect_hash_branch();
window.onhashchange = function() {
    redirect_hash_branch();
};
</script>

</%def>

<%def name="main()">
${self.repo_context_bar('summary')}
    <%
    summary = lambda n:{False:'summary-short'}.get(n)
    %>
    <div class="box">
    <!-- box / title -->
    <div class="title">
        ${self.breadcrumbs()}
    </div>
    <!-- end box / title -->
    <div class="form">
      <div id="summary" class="fields">
        <div class="field">
            <div class="label-summary">
              <label>${_('Clone url')}:</label>
            </div>
            <div class="input ${summary(c.show_stats)}">
              <input style="width:80%" type="text" id="clone_url" readonly="readonly" value="${c.clone_repo_url}"/>
              <input style="display:none;width:80%" type="text" id="clone_url_id" readonly="readonly" value="${c.clone_repo_url_id}"/>
              <div style="display:none" id="clone_by_name" class="btn btn-small clone">${_('Show by Name')}</div>
              <div id="clone_by_id" class="btn btn-small clone">${_('Show by ID')}</div>
            </div>
        </div>

        <div class="field">
          <div class="label-summary">
              <label>${_('Description')}:</label>
          </div>
             %if c.visual.stylify_metatags:
               <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(h.desc_stylize(c.rhodecode_db_repo.description))}</div>
             %else:
               <div class="input ${summary(c.show_stats)} desc">${h.urlify_text(c.rhodecode_db_repo.description)}</div>
             %endif
        </div>

             <div class="field">
              <div class="label-summary">
                  <label>${_('Trending files')}:</label>
              </div>
              <div class="input ${summary(c.show_stats)}">
                %if c.show_stats:
                <div id="lang_stats"></div>
                %else:
                   ${_('Statistics are disabled for this repository')}
                   %if h.HasPermissionAll('hg.admin')('enable stats on from summary'):
                        ${h.link_to(_('Enable'),h.url('edit_repo',repo_name=c.repo_name, anchor='repo_enable_statistics'),class_="btn btn-mini")}
                   %endif
                %endif
              </div>
             </div>

             <div class="field">
              <div class="label-summary">
                  <label>${_('Download')}:</label>
              </div>
              <div class="input ${summary(c.show_stats)}">
                %if len(c.rhodecode_repo.revisions) == 0:
                  ${_('There are no downloads yet')}
                %elif not c.enable_downloads:
                  ${_('Downloads are disabled for this repository')}
                    %if h.HasPermissionAll('hg.admin')('enable downloads on from summary'):
                        ${h.link_to(_('Enable'),h.url('edit_repo',repo_name=c.repo_name, anchor='repo_enable_downloads'),class_="btn btn-mini")}
                    %endif
                %else:
                    <span id="${'zip_link'}">
                        <a class="btn btn-small" href="${h.url('files_archive_home',repo_name=c.rhodecode_db_repo.repo_name,fname='tip.zip')}"><i class="icon-archive"></i> ${_('Download as zip')}</a>
                    </span>
                    ${h.hidden('download_options')}
                    <span style="vertical-align: bottom">
                      <input id="archive_subrepos" type="checkbox" name="subrepos" />
                      <label for="archive_subrepos" class="tooltip" title="${h.tooltip(_('Check this to download archive with subrepos'))}" >${_('with subrepos')}</label>
                    </span>
                %endif
              </div>
             </div>
        </div>
        <div id="summary-menu-stats">
          <ul>
            <li>
               <a title="${_('Owner')} ${c.rhodecode_db_repo.user.email}">
                <i class="icon-user"></i> ${c.rhodecode_db_repo.user.username}
                  <div class="gravatar" style="float: right; margin: 0px 0px 0px 0px" title="${c.rhodecode_db_repo.user.name} ${c.rhodecode_db_repo.user.lastname}">
                     <img alt="gravatar" src="${h.gravatar_url(c.rhodecode_db_repo.user.email, 18)}"/>
                  </div>
              </a>
            </li>
            <li>
               <a title="${_('Followers')}" href="${h.url('repo_followers_home',repo_name=c.repo_name)}">
                <i class="icon-heart"></i> ${_('Followers')}
                <span class="stats-bullet" id="current_followers_count">${c.repository_followers}</span>
              </a>
            </li>
            <li>
              <a title="${_('Forks')}" href="${h.url('repo_forks_home',repo_name=c.repo_name)}">
                <i class="icon-code-fork"></i> ${_('Forks')}
                <span class="stats-bullet">${c.repository_forks}</span>
              </a>
            </li>

            %if c.rhodecode_user.username != 'default':
            <li class="repo_size">
              <a href="#" onclick="javascript:showRepoSize('repo_size_2','${c.rhodecode_db_repo.repo_name}','${str(h.get_token())}')"><i class="icon-archive"></i> ${_('Repository Size')}</a>
              <span  class="stats-bullet" id="repo_size_2"></span>
            </li>
            %endif

            <li>
            %if c.rhodecode_user.username != 'default':
              <a href="${h.url('atom_feed_home',repo_name=c.rhodecode_db_repo.repo_name,api_key=c.rhodecode_user.api_key)}"><i class="icon-rss-sign"></i> ${_('Feed')}</a>
            %else:
              <a href="${h.url('atom_feed_home',repo_name=c.rhodecode_db_repo.repo_name)}"><i class="icon-rss-sign"></i> ${_('Feed')}</a>
            %endif
            </li>

            %if c.show_stats:
            <li>
              <a title="${_('Statistics')}" href="${h.url('repo_stats_home',repo_name=c.repo_name)}">
                <i class="icon-bar-chart"></i> ${_('Statistics')}
              </a>
            </li>
            %endif
          </ul>
        </div>
    </div>
</div>


<div class="box" style="margin-top: -20px">
    <div class="title">
        <div class="breadcrumbs">
        %if c.repo_changesets:
            ${h.link_to(_('Latest changes'),h.url('changelog_home',repo_name=c.repo_name))}
        %else:
            ${_('Quick start')}
         %endif
        </div>
    </div>
    <div class="table">
        <div id="shortlog_data">
            <%include file='../changelog/changelog_summary_data.html'/>
        </div>
    </div>
</div>

%if c.readme_data:
<div id="readme" class="anchor">
<div class="box" style="background-color: #FAFAFA">
    <div class="title" title="${_('Readme file from revision %s:%s') % (c.rhodecode_db_repo.landing_rev[0], c.rhodecode_db_repo.landing_rev[1])}">
        <div class="breadcrumbs">
            <a href="${h.url('files_home',repo_name=c.repo_name,revision='tip',f_path=c.readme_file)}">${c.readme_file}</a>
        </div>
    </div>
    <div class="readme">
      <div class="readme_box">
        ${c.readme_data|n}
      </div>
    </div>
</div>
</div>
%endif

<script type="text/javascript">
var clone_url = 'clone_url';
YUE.on(clone_url,'click',function(e){
    if(YUD.hasClass(clone_url,'selected')){
        return
    }
    else{
        YUD.addClass(clone_url,'selected');
        YUD.get(clone_url).select();
    }
})

YUE.on('clone_by_name','click',function(e){
    // show url by name and hide name button
    YUD.setStyle('clone_url','display','');
    YUD.setStyle('clone_by_name','display','none');

    // hide url by id and show name button
    YUD.setStyle('clone_by_id','display','');
    YUD.setStyle('clone_url_id','display','none');

})
YUE.on('clone_by_id','click',function(e){

    // show url by id and hide id button
    YUD.setStyle('clone_by_id','display','none');
    YUD.setStyle('clone_url_id','display','');

    // hide url by name and show id button
    YUD.setStyle('clone_by_name','display','');
    YUD.setStyle('clone_url','display','none');
})

$(document).ready(function(){
    var cache = {}
    $("#download_options").select2({
        placeholder: _TM['Select changeset'],
        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})
            });
            query.callback(data);
          }else{
              $.ajax({
                url: pyroutes.url('repo_refs_data', {'repo_name': '${c.repo_name}'}),
                data: {},
                dataType: 'json',
                type: 'GET',
                success: function(data) {
                  cache[key] = data;
                  query.callback({results: data.results});
                }
              })
          }
        },
    });
    // on change of download options
    $('#download_options').change(function(e){
       var new_cs = e.added

       for(k in tmpl_links){
           var s = $('#'+k+'_link');
           if(s){
             var title_tmpl = "${_('Download %s as %s') % ('__CS_NAME__','__CS_EXT__')}";
             title_tmpl= title_tmpl.replace('__CS_NAME__',new_cs.text);
             title_tmpl = title_tmpl.replace('__CS_EXT__',k);
             title_tmpl = '<i class="icon-archive"></i> '+ title_tmpl;
             var url = tmpl_links[k].replace('__CS__',new_cs.id);
             var subrepos = $('#archive_subrepos').is(':checked');
             url = url.replace('__SUB__',subrepos);
             url = url.replace('__NAME__',title_tmpl);

             s.html(url)
           }
       }
    });

    var tmpl_links = {};
    %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()):
      tmpl_links["${archive['type']}"] = '${h.link_to('__NAME__', h.url('files_archive_home',repo_name=c.rhodecode_db_repo.repo_name, fname='__CS__'+archive['extension'],subrepos='__SUB__'),class_='btn btn-small')}';
    %endfor
})
</script>

%if c.show_stats:
<script type="text/javascript">
var data = ${c.trending_languages|n};
var total = 0;
var no_data = true;
var tbl = document.createElement('table');
tbl.setAttribute('class','trending_language_tbl');
var cnt = 0;
for (var i=0;i<data.length;i++){
    total+= data[i][1].count;
}
for (var i=0;i<data.length;i++){
    cnt += 1;
    no_data = false;

    var hide = cnt>2;
    var tr = document.createElement('tr');
    if (hide){
        tr.setAttribute('style','display:none');
        tr.setAttribute('class','stats_hidden');
    }
    var k = data[i][0];
    var obj = data[i][1];
    var percentage = Math.round((obj.count/total*100),2);

    var td1 = document.createElement('td');
    td1.width = 150;
    var trending_language_label = document.createElement('div');
    trending_language_label.innerHTML = obj.desc+" ("+k+")";
    td1.appendChild(trending_language_label);

    var td2 = document.createElement('td');
    td2.setAttribute('style','padding-right:14px !important');
    var trending_language = document.createElement('div');
    var nr_files = obj.count+" ${_('files')}";

    trending_language.title = k+" "+nr_files;

    if (percentage>22){
        trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"% "+nr_files+ "</b>";
    }
    else{
        trending_language.innerHTML = "<b style='font-size:0.8em'>"+percentage+"%</b>";
    }

    trending_language.setAttribute("class", 'trending_language top-right-rounded-corner bottom-right-rounded-corner');
    trending_language.style.width=percentage+"%";
    td2.appendChild(trending_language);

    tr.appendChild(td1);
    tr.appendChild(td2);
    tbl.appendChild(tr);
    if(cnt == 3){
        var show_more = document.createElement('tr');
        var td = document.createElement('td');
        lnk = document.createElement('a');

        lnk.href='#';
        lnk.innerHTML = "${_('Show more')}";
        lnk.id='code_stats_show_more';
        td.appendChild(lnk);

        show_more.appendChild(td);
        show_more.appendChild(document.createElement('td'));
        tbl.appendChild(show_more);
    }

}

YUD.get('lang_stats').appendChild(tbl);
YUE.on('code_stats_show_more','click',function(){
    l = YUD.getElementsByClassName('stats_hidden')
    for (e in l){
        YUD.setStyle(l[e],'display','');
    };
    YUD.setStyle(YUD.get('code_stats_show_more'),
            'display','none');
});
</script>
%endif

</%def>