Changeset - 0253b8e7d76c
[Not reviewed]
kallithea/templates/admin/admin_log.html
Show inline comments
 
@@ -18,46 +18,47 @@
 
          ${l.username}
 
        %endif
 
        </td>
 
        <td>${h.action_parser(l)[0]()}
 
            <div class="journal_action_params">
 
                ${h.literal(h.action_parser(l)[1]())}
 
            </div>
 
        </td>
 
        <td>
 
            %if l.repository is not None:
 
              ${h.link_to(l.repository.repo_name,h.url('summary_home',repo_name=l.repository.repo_name))}
 
            %else:
 
              ${l.repository_name}
 
            %endif
 
        </td>
 

	
 
        <td>${h.fmt_date(l.action_date)}</td>
 
        <td>${l.user_ip}</td>
 
    </tr>
 
    %endfor
 
</table>
 

	
 
<script type="text/javascript">
 
  $(document).ready(function(){
 
    $('#user_log').on('click','.pager_link',function(e){
 
    var $user_log = $('#user_log');
 
    $user_log.on('click','.pager_link',function(e){
 
      ypjax(e.target.href,"user_log",function(){
 
        show_more_event();
 
        tooltip_activate();
 
        show_changeset_tooltip();
 
      });
 
      e.preventDefault();
 
    });
 
    $('#user_log').on('click','.show_more',function(e){
 
      var el = e.target;
 
      $('#'+el.id.substring(1)).show();
 
      $(el.parentNode).hide();
 
    });
 
  });
 
</script>
 

	
 
<div class="pagination-wh pagination-left">
 
${c.users_log.pager('$link_previous ~2~ $link_next')}
 
</div>
 
%else:
 
    ${_('No actions yet')}
 
%endif
kallithea/templates/admin/settings/settings_system.html
Show inline comments
 
@@ -15,29 +15,30 @@
 
</div>
 
%for dt, dd, tt in elems:
 
  <dt style="width:150px; text-align: left">${dt}:</dt>
 
  <dd style="margin-left: 160px" title="${tt}">${dd}</dd>
 
%endfor
 
</dl>
 

	
 
<h4>${_('Python packages')}</h4>
 
<table class="table" style="margin:0px 0px 0px 0px">
 
  <colgroup>
 
      <col style="width:180px">
 
  </colgroup>
 
  <tbody>
 
      %for key, value in c.modules:
 
          <tr>
 
              <td style="padding-right:5px;">${key}</td>
 
              <td>${value}</td>
 
          </tr>
 
      %endfor
 
  </tbody>
 
</table>
 

	
 
<script>
 
    $('#check_for_update').click(function(e){
 
        $('#update_notice').show();
 
        var $update_notice = $('#update_notice');
 
        $update_notice.show();
 
        ypjax("${h.url('admin_settings_system_update')}",
 
              "update_notice");
 
    })
 
</script>
kallithea/templates/base/base.html
Show inline comments
 
@@ -187,51 +187,52 @@
 
              ## also it feels like a job for the controller
 
              %if c.authuser.username != 'default':
 
                  <li>
 
                   <a class="${follow_class()}" onclick="javascript:toggleFollowingRepo(this,${c.db_repo.repo_id},'${str(h.get_token())}');">
 
                    <span class="show-follow"><i class="icon-heart-empty"></i> ${_('Follow')}</span>
 
                    <span class="show-following"><i class="icon-heart"></i> ${_('Unfollow')}</span>
 
                  </a>
 
                  </li>
 
                  <li><a href="${h.url('repo_fork_home',repo_name=c.repo_name)}"><i class="icon-code-fork"></i> ${_('Fork')}</a></li>
 
                  <li><a href="${h.url('pullrequest_home',repo_name=c.repo_name)}"><i class="icon-code-fork"></i> ${_('Create Pull Request')}</a></li>
 
              %endif
 
             </ul>
 
        </li>
 
        <li ${is_current('showpullrequest')}>
 
          <a href="${h.url('pullrequest_show_all',repo_name=c.repo_name)}" title="${_('Show Pull Requests for %s') % c.repo_name}"> <i class="icon-code-fork"></i> ${_('Pull Requests')}
 
            %if c.repository_pull_requests:
 
              <span>${c.repository_pull_requests}</span>
 
            %endif
 
          </a>
 
        </li>
 
      </ul>
 
  </div>
 
  <script type="text/javascript">
 
      YUE.on('branch_tag_switcher_2','mouseover',function(){
 
         var loaded = YUD.hasClass('branch_tag_switcher_2','loaded');
 
         var $branch_tag_switcher_2 = $('#branch_tag_switcher_2');
 
         var loaded = $branch_tag_switcher_2.hasClass('loaded');
 
         if(!loaded){
 
             YUD.addClass('branch_tag_switcher_2','loaded');
 
             $branch_tag_switcher_2.addClass('loaded');
 
             ypjax("${h.url('branch_tag_switcher',repo_name=c.repo_name)}",'switch_to_list_2');
 
         }
 
         return false;
 
      });
 
  </script>
 
  <!--- END CONTEXT BAR -->
 
</%def>
 

	
 
<%def name="menu(current=None)">
 
  <%
 
  def is_current(selected):
 
      if selected == current:
 
          return h.literal('class="current"')
 
  %>
 

	
 
  <ul id="quick" class="horizontal-list">
 
    <!-- repo switcher -->
 
    <li ${is_current('repositories')}>
 
      <input id="repo_switcher" name="repo_switcher" type="hidden">
 
    </li>
 

	
 
    ##ROOT MENU
 
    %if c.authuser.username != 'default':
 
      <li ${is_current('journal')}>
kallithea/templates/changelog/changelog_summary_data.html
Show inline comments
 
@@ -49,49 +49,50 @@
 
                %for book in cs.bookmarks:
 
                    <div class="booktag" title="${_('Bookmark %s') % book}">
 
                        ${h.link_to(book,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}
 
                    </div>
 
                %endfor
 
            %endif
 
            %for tag in cs.tags:
 
             <div class="tagtag" title="${_('Tag %s') % tag}">
 
                 ${h.link_to(tag,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}
 
             </div>
 
            %endfor
 
            %if cs.branch:
 
             <div class="branchtag" title="${_('Branch %s' % cs.branch)}">
 
                 ${h.link_to(cs.branch,h.url('changelog_home',repo_name=c.repo_name,branch=cs.branch))}
 
             </div>
 
            %endif
 
        </td>
 
    </tr>
 
%endfor
 

	
 
</table>
 

	
 
<script type="text/javascript">
 
  $(document).ready(function(){
 
    $('#shortlog_data').on('click','.pager_link',function(e){
 
    var $shortlog_data = $('#shortlog_data');
 
    $shortlog_data.on('click','.pager_link',function(e){
 
      ypjax(e.target.href,"shortlog_data",function(){tooltip_activate();});
 
      e.preventDefault();
 
    });
 
  });
 
</script>
 

	
 
<div class="pagination-wh pagination-left">
 
${c.repo_changesets.pager('$link_previous ~2~ $link_next')}
 
</div>
 
%else:
 

	
 
%if h.HasRepoPermissionAny('repository.write','repository.admin')(c.repo_name):
 
<h4>${_('Add or upload files directly via Kallithea')}</h4>
 
<div style="margin: 20px 30px;">
 
  <div id="add_node_id" class="add_node">
 
      <a class="btn btn-mini" href="${h.url('files_add_home',repo_name=c.repo_name,revision=0,f_path='', anchor='edit')}">${_('Add New File')}</a>
 
  </div>
 
</div>
 
%endif
 

	
 

	
 
<h4>${_('Push new repo')}</h4>
 
<pre>
 
    ${c.db_repo_scm_instance.alias} clone ${c.clone_repo_url}
kallithea/templates/files/files.html
Show inline comments
 
@@ -177,62 +177,60 @@ var callbacks = function(State){
 
                dataType: 'json',
 
                type: 'GET',
 
                success: function(data) {
 
                  cache[key] = data;
 
                  query.callback({results: data.results});
 
                }
 
              })
 
          }
 
        },
 
    });
 
    $('#show_authors').on('click', function(){
 
        $.ajax({
 
            url: pyroutes.url('files_authors_home', {'revision': _rev, 'f_path': _f_path}),
 
            success: function(data) {
 
                $('#file_authors').html(data);
 
                $('#file_authors').show();
 
                tooltip_activate()
 
            }
 
        })
 
    })
 
}
 

	
 
$(document).ready(function(){
 
    ypjax_links();
 
    var container = 'files_data';
 
    var $files_data = $('#files_data');
 
    //Bind to StateChange Event
 
    History.Adapter.bind(window,'statechange',function(){
 
        var State = History.getState();
 
        cache_key = State.url;
 
        //check if we have this request in cache maybe ?
 
        var _cache_obj = CACHE[cache_key];
 
        var _cur_time = new Date().getTime();
 
        // get from cache if it's there and not yet expired !
 
        if(_cache_obj !== undefined && _cache_obj[0] > _cur_time){
 
            YUD.get(container).innerHTML=_cache_obj[1];
 
            YUD.setStyle(container,'opacity','1.0');
 

	
 
            $files_data.html(_cache_obj[1]);
 
            $files_data.css('opacity','1.0');
 
            //callbacks after ypjax call
 
            callbacks(State);
 
        }
 
        else{
 
            ypjax(State.url, container, function(){
 
                    callbacks(State);
 
                    var expire_on = new Date().getTime() + CACHE_EXPIRE;
 
                    CACHE[cache_key] = [expire_on, $files_data.html()];
 
                });
 
        }
 
    });
 

	
 
    // init the search filter
 
    var _State = {
 
       url: "${h.url.current()}",
 
       data: {
 
         node_list_url: node_list_url.replace('__REV__',"${c.changeset.raw_id}").replace('__FPATH__', "${h.safe_unicode(c.file.path)}"),
 
         url_base: url_base.replace('__REV__',"${c.changeset.raw_id}"),
 
         rev:"${c.changeset.raw_id}",
 
         f_path: "${h.safe_unicode(c.file.path)}"
 
       }
 
    }
 
    fileBrowserListeners(_State.url, _State.data.node_list_url, _State.data.url_base);
 

	
kallithea/templates/followers/followers_data.html
Show inline comments
 
## -*- coding: utf-8 -*-
 

	
 
% for f in c.followers_pager:
 
    <div>
 
        <div class="follower_user">
 
            <div class="gravatar">
 
                <img alt="gravatar" src="${h.gravatar_url(f.user.email,24)}"/>
 
            </div>
 
            <span style="font-size: 20px"> <b>${f.user.username}</b> (${f.user.name} ${f.user.lastname})</span>
 
        </div>
 
        <div style="clear:both;padding-top: 10px"></div>
 
        <div class="follower_date">${_('Started following -')}
 
        <span class="tooltip" title="${h.tooltip(f.follows_from)}"> ${h.age(f.follows_from)}</span></div>
 
        <div style="border-bottom: 1px solid #DDD;margin:10px 0px 10px 0px"></div>
 
    </div>
 
% endfor
 

	
 
<div class="pagination-wh pagination-left">
 
<script type="text/javascript">
 
$(document).ready(function(){
 
    $('#followers').on('click','.pager_link',function(e){
 
    var $followers = $('#followers');
 
    $followers.on('click','.pager_link',function(e){
 
        ypjax(e.target.href,"followers",function(){
 
            show_more_event();
 
            tooltip_activate();
 
            show_changeset_tooltip();
 
        });
 
        e.preventDefault();
 
    });
 
});
 
</script>
 
${c.followers_pager.pager('$link_previous ~2~ $link_next')}
 
</div>
kallithea/templates/forks/forks_data.html
Show inline comments
 
@@ -5,39 +5,40 @@
 
        <div>
 
            <div class="fork_user">
 
                <div class="gravatar">
 
                    <img alt="gravatar" src="${h.gravatar_url(f.user.email,24)}"/>
 
                </div>
 
                <span style="font-size: 20px">
 
                 <b>${f.user.username}</b> (${f.user.name} ${f.user.lastname}) /
 
                  ${h.link_to(f.repo_name,h.url('summary_home',repo_name=f.repo_name))}
 
                </span>
 
                <div style="padding:5px 3px 3px 42px;">${f.description}</div>
 
            </div>
 
            <div style="clear:both;padding-top: 10px"></div>
 
            <div class="follower_date">${_('Forked')} -
 
                <span class="tooltip" title="${h.tooltip(h.fmt_date(f.created_on))}"> ${h.age(f.created_on)}</span>
 
                <a title="${_('Compare fork with %s' % c.repo_name)}"
 
                   href="${h.url('compare_url',repo_name=c.repo_name, org_ref_type=c.db_repo.landing_rev[0],org_ref_name=c.db_repo.landing_rev[1],other_repo=f.repo_name,other_ref_type=c.db_repo.landing_rev[0],other_ref_name=c.db_repo.landing_rev[1], merge=1)}"
 
                   class="btn btn-small"><i class="icon-loop"></i> ${_('Compare fork')}</a>
 
            </div>
 
            <div style="border-bottom: 1px solid #DDD;margin:10px 0px 10px 0px"></div>
 
        </div>
 
    % endfor
 
  <div class="pagination-wh pagination-left">
 
  <script type="text/javascript">
 
  $(document).ready(function(){
 
      $('#forks').on('click','.pager_link',function(e){
 
      var $forks = $('#forks');
 
      $forks.on('click','.pager_link',function(e){
 
          ypjax(e.target.href,"forks",function(){
 
              show_more_event();
 
              tooltip_activate();
 
              show_changeset_tooltip();
 
          });
 
          e.preventDefault();
 
      });
 
  });
 
  </script>
 
  ${c.forks_pager.pager('$link_previous ~2~ $link_next')}
 
  </div>
 
% else:
 
    ${_('There are no forks yet')}
 
% endif
kallithea/templates/journal/journal_data.html
Show inline comments
 
@@ -19,44 +19,45 @@
 
                    <div class="journal_action">${h.action_parser(entry)[0]()}</div>
 
                    <div class="journal_repo">
 
                        <span class="journal_repo_name">
 
                        %if entry.repository is not None:
 
                          ${h.link_to(entry.repository.repo_name,
 
                                      h.url('summary_home',repo_name=entry.repository.repo_name))}
 
                        %else:
 
                          ${entry.repository_name}
 
                        %endif
 
                        </span>
 
                    </div>
 
                    <div class="journal_action_params">${h.literal(h.action_parser(entry)[1]())}</div>
 
                    <div class="date"><span class="tooltip" title="${h.tooltip(h.fmt_date(entry.action_date))}">${h.age(entry.action_date)}</span></div>
 
                %endfor
 
                </div>
 
            </div>
 
        %endfor
 
    %endfor
 

	
 
  <div class="pagination-wh pagination-left" style="padding: 0px 0px 0px 10px;">
 
  ${c.journal_pager.pager('$link_previous ~2~ $link_next')}
 
  </div>
 
    <script type="text/javascript">
 
    $(document).ready(function(){
 
        $('#journal').on('click','.pager_link',function(e){
 
        var $journal = $('#journal');
 
        $journal.on('click','.pager_link',function(e){
 
            ypjax(e.target.href,"journal",function(){
 
                show_more_event();
 
                tooltip_activate();
 
                show_changeset_tooltip();
 
            });
 
            e.preventDefault();
 
        });
 
        $('#journal').on('click','.show_more',function(e){
 
            var el = e.target;
 
            $('#'+el.id.substring(1)).show();
 
            $(el.parentNode).hide();
 
        });
 
    });
 
    </script>
 
%else:
 
  <div style="padding:5px 0px 10px 10px;">
 
      ${_('No entries yet')}
 
  </div>
 
%endif
kallithea/templates/pullrequests/pullrequest_show_my.html
Show inline comments
 
@@ -10,40 +10,41 @@
 

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

	
 
<%def name="main()">
 

	
 
<div class="box">
 
    <!-- box / title -->
 
    <div class="title">
 
        ${self.breadcrumbs()}
 
    </div>
 

	
 
    <div id="pullrequests_container" class="table">
 
        ## loaded via AJAX
 
        ${_('Loading...')}
 
    </div>
 

	
 
<script type="text/javascript">
 
pyroutes.register('my_pullrequests_data', "${url('my_pullrequests_data')}", []);
 

	
 
var show_pullrequests = function(e){
 

	
 
    var url = pyroutes.url('my_pullrequests_data');
 
    if(YUD.get('show_closed') && YUD.get('show_closed').checked) {
 
    if ($('#show_closed').prop('checked')) {
 
        var url = pyroutes.url('my_pullrequests_data', {'pr_show_closed': '1'});
 
    }
 
    ypjax(url, 'pullrequests_container', function(){
 
        YUE.on('show_closed','change',function (e) {
 
        // new #show_closed has just been loaded
 
        $('#show_closed').change(function (e) {
 
            show_pullrequests(e);
 
        });
 
    });
 
}
 
show_pullrequests()
 

	
 
</script>
 

	
 
</div>
 

	
 
</%def>
0 comments (0 inline, 0 general)