Changeset - 103f07acad83
kallithea/lib/page.py
Show inline comments
 
@@ -69,62 +69,62 @@ class Page(_Page):
 
                                                            (radius * 2) + 1)
 
        nav_items = []
 

	
 
        # Create a link to the first page (unless we are on the first page
 
        # or there would be no need to insert '..' spacers)
 
        if self.page != self.first_page and self.first_page < leftmost_page:
 
            nav_items.append(self._pagerlink(self.first_page, self.first_page))
 
            nav_items.append(HTML.li(self._pagerlink(self.first_page, self.first_page)))
 

	
 
        # Insert dots if there are pages between the first page
 
        # and the currently displayed page range
 
        if leftmost_page - self.first_page > 1:
 
            # Wrap in a SPAN tag if nolink_attr is set
 
            text_ = '..'
 
            if self.dotdot_attr:
 
                text_ = HTML.span(c=text_, **self.dotdot_attr)
 
            nav_items.append(text_)
 
            nav_items.append(HTML.li(text_))
 

	
 
        for thispage in xrange(leftmost_page, rightmost_page + 1):
 
            # Highlight the current page number and do not use a link
 
            text_ = str(thispage)
 
            if thispage == self.page:
 
                # Wrap in a SPAN tag if nolink_attr is set
 
                if self.curpage_attr:
 
                    text_ = HTML.span(c=text_, **self.curpage_attr)
 
                    text_ = HTML.li(HTML.span(c=text_), **self.curpage_attr)
 
                nav_items.append(text_)
 
            # Otherwise create just a link to that page
 
            else:
 
                nav_items.append(self._pagerlink(thispage, text_))
 
                nav_items.append(HTML.li(self._pagerlink(thispage, text_)))
 

	
 
        # Insert dots if there are pages between the displayed
 
        # page numbers and the end of the page range
 
        if self.last_page - rightmost_page > 1:
 
            text_ = '..'
 
            # Wrap in a SPAN tag if nolink_attr is set
 
            if self.dotdot_attr:
 
                text_ = HTML.span(c=text_, **self.dotdot_attr)
 
            nav_items.append(text_)
 
            nav_items.append(HTML.li(text_))
 

	
 
        # Create a link to the very last page (unless we are on the last
 
        # page or there would be no need to insert '..' spacers)
 
        if self.page != self.last_page and rightmost_page < self.last_page:
 
            nav_items.append(self._pagerlink(self.last_page, self.last_page))
 
            nav_items.append(HTML.li(self._pagerlink(self.last_page, self.last_page)))
 

	
 
        #_page_link = url.current()
 
        #nav_items.append(literal('<link rel="prerender" href="%s?page=%s">' % (_page_link, str(int(self.page)+1))))
 
        #nav_items.append(literal('<link rel="prefetch" href="%s?page=%s">' % (_page_link, str(int(self.page)+1))))
 
        return self.separator.join(nav_items)
 

	
 
    def pager(self, format='~2~', page_param='page', partial_param='partial',
 
    def pager(self, format='$link_previous ~2~ $link_next', page_param='page', partial_param='partial',
 
        show_if_single_page=False, separator=' ', onclick=None,
 
        symbol_first='<<', symbol_last='>>',
 
        symbol_previous='<', symbol_next='>',
 
        link_attr=None,
 
        curpage_attr=None,
 
        dotdot_attr=None, **kwargs):
 
        self.curpage_attr = curpage_attr or {'class': 'pager_curpage'}
 
        self.curpage_attr = curpage_attr or {'class': 'active'}
 
        self.separator = separator
 
        self.pager_kwargs = kwargs
 
        self.page_param = page_param
 
        self.partial_param = partial_param
 
        self.onclick = onclick
 
        self.link_attr = link_attr or {'class': 'pager_link', 'rel': 'prerender'}
 
@@ -149,18 +149,18 @@ class Page(_Page):
 
            'last_item': self.last_item,
 
            'item_count': self.item_count,
 
            'link_first': self.page > self.first_page and \
 
                    self._pagerlink(self.first_page, symbol_first) or '',
 
            'link_last': self.page < self.last_page and \
 
                    self._pagerlink(self.last_page, symbol_last) or '',
 
            'link_previous': self.previous_page and \
 
            'link_previous': HTML.li(self.previous_page and \
 
                    self._pagerlink(self.previous_page, symbol_previous) \
 
                    or HTML.span(symbol_previous, class_="yui-pg-previous"),
 
            'link_next': self.next_page and \
 
                    or HTML.a(symbol_previous)),
 
            'link_next': HTML.li(self.next_page and \
 
                    self._pagerlink(self.next_page, symbol_next) \
 
                    or HTML.span(symbol_next, class_="yui-pg-next")
 
                    or HTML.a(symbol_next))
 
        })
 

	
 
        return literal(result)
 

	
 

	
 
class RepoPage(Page):
kallithea/public/css/style.css
Show inline comments
 
@@ -1116,135 +1116,67 @@ div.form div.form-horizontal div.form-gr
 

	
 
#content div.panel div.action .ui-selectmenu {
 
    margin: 0;
 
    padding: 0;
 
}
 

	
 
#content div.panel div.pagination {
 
    height: 1%;
 
    clear: both;
 
    overflow: hidden;
 
    margin: 10px 0 0;
 
    padding: 0;
 
}
 

	
 
#content div.panel div.pagination ul.pager {
 
    float: right;
 
    text-align: right;
 
    margin: 0;
 
    padding: 0;
 
}
 

	
 
#content div.panel div.pagination ul.pager li {
 
    height: 1%;
 
    float: left;
 
    list-style: none;
 
    background: #ebebeb url("../images/pager.png") repeat-x;
 
    border-top: 1px solid #dedede;
 
    border-left: 1px solid #cfcfcf;
 
    border-right: 1px solid #c4c4c4;
 
    border-bottom: 1px solid #c4c4c4;
 
    color: #4A4A4A;
 
    font-weight: 700;
 
    margin: 0 0 0 4px;
 
    padding: 0;
 
}
 

	
 
#content div.panel div.pagination ul.pager li.separator {
 
    padding: 6px;
 
}
 

	
 
#content div.panel div.pagination ul.pager li.current {
 
    background: #b4b4b4 url("../images/pager_selected.png") repeat-x;
 
    border-top: 1px solid #ccc;
 
    border-left: 1px solid #bebebe;
 
    border-right: 1px solid #b1b1b1;
 
    border-bottom: 1px solid #afafaf;
 
    color: #515151;
 
    padding: 6px;
 
}
 

	
 
#content div.panel div.pagination ul.pager li a {
 
    height: 1%;
 
    display: block;
 
    float: left;
 
    color: #515151;
 
    text-decoration: none;
 
    margin: 0;
 
    padding: 6px;
 
}
 

	
 
#content div.panel div.pagination ul.pager li a:hover,
 
#content div.panel div.pagination ul.pager li a:active {
 
    background: #b4b4b4 url("../images/pager_selected.png") repeat-x;
 
    border-top: 1px solid #ccc;
 
    border-left: 1px solid #bebebe;
 
    border-right: 1px solid #b1b1b1;
 
    border-bottom: 1px solid #afafaf;
 
    margin: -1px;
 
}
 

	
 
#content div.panel div.pagination-right {
 
    float: right;
 
}
 

	
 
#content div.panel div.pagination-wh {
 
#content div.panel ul.pagination {
 
    height: 1%;
 
    overflow: hidden;
 
    text-align: right;
 
    margin: 10px 0 0;
 
    padding: 0;
 
}
 

	
 
#content div.panel div.pagination-wh > :first-child {
 
#content div.panel ul.pagination > li {
 
    display: inline;
 
}
 

	
 
#content div.panel ul.pagination > :first-child {
 
    border-radius: 4px 0px 0px 4px;
 
}
 

	
 
#content div.panel div.pagination-wh > :last-child {
 
#content div.panel ul.pagination > :last-child {
 
    border-radius: 0px 4px 4px 0px;
 
    border-right: 1px solid #cfcfcf;
 
}
 

	
 
#content div.panel div.pagination-wh a,
 
#content div.panel div.pagination-wh span.pager_dotdot,
 
#content div.panel div.pagination-wh span.yui-pg-previous,
 
#content div.panel div.pagination-wh span.yui-pg-last,
 
#content div.panel div.pagination-wh span.yui-pg-next,
 
#content div.panel div.pagination-wh span.yui-pg-first {
 
#content div.panel ul.pagination > li {
 
    height: 1%;
 
    float: left;
 
    background: #ebebeb url("../images/pager.png") repeat-x;
 
    border-top: 1px solid #dedede;
 
    border-left: 1px solid #cfcfcf;
 
    border-bottom: 1px solid #c4c4c4;
 
    color: #4A4A4A;
 
    font-weight: 700;
 
    padding: 6px;
 
}
 

	
 
#content div.panel div.pagination-wh span.pager_curpage {
 
    height: 1%;
 
    float: left;
 
#content div.panel ul.pagination > li.active {
 
    background: #b4b4b4 url("../images/pager_selected.png") repeat-x;
 
    border-top: 1px solid #ccc;
 
    border-left: 1px solid #bebebe;
 
    border-bottom: 1px solid #afafaf;
 
    color: #515151;
 
    font-weight: 700;
 
    padding: 6px;
 
}
 

	
 
#content div.panel div.pagination-wh a:hover,
 
#content div.panel div.pagination-wh a:active {
 
}
 

	
 
#content div.panel ul.pagination > a:hover,
 
#content div.panel ul.pagination > a:active {
 
    background: #b4b4b4 url("../images/pager_selected.png") repeat-x;
 
    border-top: 1px solid #ccc;
 
    border-left: 1px solid #bebebe;
 
    border-bottom: 1px solid #afafaf;
 
    text-decoration: none;
 
}
 

	
 
#content div.panel ul.pagination > li a {
 
    color: inherit;
 
    text-decoration: inherit;
 
}
 

	
 
#content div.panel div.traffic div.legend {
 
    clear: both;
 
    overflow: hidden;
 
    border-bottom: 1px solid #ddd;
 
    margin: 0 0 10px;
 
    padding: 0 0 10px;
 
@@ -3462,42 +3394,12 @@ div.form div.form-horizontal div.buttons
 
#register div.form div.form-horizontal div.form-group div.input div.link {
 
    text-align: right;
 
    margin: 6px 0 0;
 
    padding: 0;
 
}
 

	
 
#content div.panel div.pagination div.results,
 
#content div.panel div.pagination-wh div.results {
 
    text-align: left;
 
    float: left;
 
    margin: 0;
 
    padding: 0;
 
}
 

	
 
#content div.panel div.pagination div.results span,
 
#content div.panel div.pagination-wh div.results span {
 
    height: 1%;
 
    display: block;
 
    float: left;
 
    background: #ebebeb url("../images/pager.png") repeat-x;
 
    border-top: 1px solid #dedede;
 
    border-left: 1px solid #cfcfcf;
 
    border-right: 1px solid #c4c4c4;
 
    border-bottom: 1px solid #c4c4c4;
 
    color: #4A4A4A;
 
    font-weight: 700;
 
    margin: 0;
 
    padding: 6px 8px;
 
}
 

	
 
#content div.panel div.pagination ul.pager li.disabled,
 
#content div.panel div.pagination-wh a.disabled {
 
    color: #B4B4B4;
 
    padding: 6px;
 
}
 

	
 
#login, #register {
 
    width: 520px;
 
    margin: 10% auto 0;
 
    padding: 0;
 
}
 

	
 
@@ -4081,16 +3983,12 @@ form.comment-inline-form {
 

	
 
input.status_change_radio {
 
    margin: 2px 0 5px 15px;
 
    vertical-align: middle;
 
}
 

	
 
.notification-paginator {
 
    padding: 0px 0px 4px 16px;
 
}
 

	
 
.badge {
 
    padding: 4px 4px !important;
 
    text-align: center;
 
    color: #888 !important;
 
    background-color: #DEDEDE !important;
 
    border-radius: 4px !important;
kallithea/templates/admin/admin_log.html
Show inline comments
 
@@ -53,12 +53,13 @@
 
      $('#'+el.id.substring(1)).show();
 
      $(el.parentNode).hide();
 
    });
 
  });
 
</script>
 

	
 
<div class="pagination-wh pagination-left">
 
${c.users_log.pager('$link_previous ~2~ $link_next')}
 
<ul class="pagination">
 
    ${c.users_log.pager()}
 
</ul>
 
</div>
 
%else:
 
    ${_('No actions yet')}
 
%endif
kallithea/templates/admin/gists/index.html
Show inline comments
 
@@ -60,16 +60,14 @@
 
            </div>
 

	
 
            <div style="border:0px;padding:10px 0px 0px 40px;color:#AAA">${gist.gist_description}</div>
 
          </div>
 
        % endfor
 

	
 
        <div class="notification-paginator">
 
          <div class="pagination-wh pagination-left">
 
            ${c.gists_pager.pager('$link_previous ~2~ $link_next', **request.GET.mixed())}
 
          </div>
 
        </div>
 
        <ul class="pagination">
 
            ${c.gists_pager.pager(**request.GET.mixed())}
 
        </ul>
 
    %else:
 
        <div class="table">${_('There are no gists yet')}</div>
 
    %endif
 
</div>
 
</%def>
kallithea/templates/admin/notifications/notifications_data.html
Show inline comments
 
@@ -24,15 +24,13 @@ unread = lambda n:{False:'unread'}.get(n
 
    </div>
 
        <div class="notification-subject"></div>
 
  </div>
 
%endfor
 
</div>
 

	
 
<div class="notification-paginator">
 
  <div class="pagination-wh pagination-left">
 
  ${c.notifications.pager('$link_previous ~2~ $link_next',controller='admin/notifications',**request.GET.mixed())}
 
  </div>
 
</div>
 
<ul class="pagination">
 
    ${c.notifications.pager(controller='admin/notifications', **request.GET.mixed())}
 
</ul>
 

	
 
%else:
 
    <div class="table">${_('No notifications here yet')}</div>
 
%endif
kallithea/templates/changelog/changelog.html
Show inline comments
 
@@ -179,15 +179,15 @@ ${self.repo_context_bar('changelog', c.f
 
                </table>
 

	
 
                <input type="checkbox" id="singlerange" style="display:none"/>
 

	
 
                </div>
 

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

	
 
        <script type="text/javascript" src="${h.url('/js/graph.js', ver=c.kallithea_version)}"></script>
 
        <script type="text/javascript">
 
            $(document).ready(function(){
kallithea/templates/changelog/changelog_summary_data.html
Show inline comments
 
@@ -72,15 +72,15 @@
 
        </td>
 
    </tr>
 
%endfor
 

	
 
</table>
 

	
 
<div class="pagination-wh pagination-left">
 
${c.repo_changesets.pager('$link_previous ~2~ $link_next')}
 
</div>
 
<ul class="pagination">
 
    ${c.repo_changesets.pager()}
 
</ul>
 
%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">
kallithea/templates/followers/followers_data.html
Show inline comments
 
@@ -10,9 +10,9 @@
 
        <div class="follower_date">${_('Started following -')}
 
        <span class="tooltip" title="${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">
 
${c.followers_pager.pager('$link_previous ~2~ $link_next')}
 
</div>
 
<ul class="pagination">
 
    ${c.followers_pager.pager()}
 
</ul>
kallithea/templates/forks/forks_data.html
Show inline comments
 
@@ -18,12 +18,12 @@
 
                   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-default btn-sm"><i class="icon-git-compare"></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">
 
  ${c.forks_pager.pager('$link_previous ~2~ $link_next')}
 
  </div>
 
    <ul class="pagination">
 
        ${c.forks_pager.pager()}
 
    </ul>
 
% else:
 
    ${_('There are no forks yet')}
 
% endif
kallithea/templates/journal/journal_data.html
Show inline comments
 
@@ -30,14 +30,14 @@
 
                %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>
 
    <ul class="pagination">
 
        ${c.journal_pager.pager()}
 
    </ul>
 
%else:
 
  <div style="padding:5px 0px 10px 10px;">
 
      ${_('No entries yet')}
 
  </div>
 
%endif
kallithea/templates/pullrequests/pullrequest_data.html
Show inline comments
 
@@ -77,14 +77,12 @@
 
    </tr>
 
% endfor
 
  </table>
 
</div>
 

	
 
%if hasattr(pullrequests, 'pager'):
 
<div class="notification-paginator">
 
  <div class="pagination-wh pagination-left">
 
  ${pullrequests.pager('$link_previous ~2~ $link_next', **request.GET.mixed())}
 
  </div>
 
</div>
 
    <ul class="pagination">
 
        ${pullrequests.pager(**request.GET.mixed())}
 
    </ul>
 
%endif
 

	
 
</%def>
kallithea/templates/search/search_commit.html
Show inline comments
 
@@ -34,10 +34,10 @@
 
            </div>
 
        </div>
 
        %endif
 
    %endif
 
%endfor
 
%if c.cur_query and c.formated_results:
 
<div class="pagination-wh pagination-left">
 
    ${c.formated_results.pager('$link_previous ~2~ $link_next')}
 
</div>
 
    <ul class="pagination">
 
        ${c.formated_results.pager()}
 
    </ul>
 
%endif
kallithea/templates/search/search_content.html
Show inline comments
 
@@ -23,10 +23,10 @@
 
        </div>
 
        %endif
 

	
 
    %endif
 
%endfor
 
%if c.cur_query and c.formated_results:
 
<div class="pagination-wh pagination-left" style="padding-left:16px">
 
    ${c.formated_results.pager('$link_previous ~2~ $link_next')}
 
</div>
 
    <ul class="pagination">
 
        ${c.formated_results.pager()}
 
    </ul>
 
%endif
kallithea/templates/search/search_path.html
Show inline comments
 
@@ -17,10 +17,10 @@
 
            </div>
 
        %endif
 

	
 
    %endif
 
%endfor
 
%if c.cur_query and c.formated_results:
 
<div class="pagination-wh pagination-left">
 
    ${c.formated_results.pager('$link_previous ~2~ $link_next')}
 
</div>
 
    <ul class="pagination">
 
        ${c.formated_results.pager()}
 
    </ul>
 
%endif
0 comments (0 inline, 0 general)