Changeset - 103f07acad83
kallithea/lib/page.py
Show inline comments
 
# -*- coding: utf-8 -*-
 
# This program is free software: you can redistribute it and/or modify
 
# it under the terms of the GNU General Public License as published by
 
# the Free Software Foundation, either version 3 of the License, or
 
# (at your option) any later version.
 
#
 
# This program is distributed in the hope that it will be useful,
 
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
# GNU General Public License for more details.
 
#
 
# You should have received a copy of the GNU General Public License
 
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
"""
 
Custom paging classes
 
"""
 

	
 
import math
 
import re
 
from kallithea.config.routing import url
 
from webhelpers.html import literal, HTML
 
from webhelpers.paginate import Page as _Page
 

	
 
class Page(_Page):
 
    """
 
    Custom pager to match rendering style with YUI paginator
 
    """
 

	
 
    def __init__(self, *args, **kwargs):
 
        kwargs.setdefault('url', url.current)
 
        _Page.__init__(self, *args, **kwargs)
 

	
 
    def _get_pos(self, cur_page, max_page, items):
 
        edge = (items / 2) + 1
 
        if (cur_page <= edge):
 
            radius = max(items / 2, items - cur_page)
 
        elif (max_page - cur_page) < edge:
 
            radius = (items - 1) - (max_page - cur_page)
 
        else:
 
            radius = items / 2
 

	
 
        left = max(1, (cur_page - (radius)))
 
        right = min(max_page, cur_page + (radius))
 
        return left, cur_page, right
 

	
 
    def _range(self, regexp_match):
 
        """
 
        Return range of linked pages (e.g. '1 2 [3] 4 5 6 7 8').
 

	
 
        Arguments:
 

	
 
        regexp_match
 
            A "re" (regular expressions) match object containing the
 
            radius of linked pages around the current page in
 
            regexp_match.group(1) as a string
 

	
 
        This function is supposed to be called as a callable in
 
        re.sub.
 

	
 
        """
 
        radius = int(regexp_match.group(1))
 

	
 
        # Compute the first and last page number within the radius
 
        # e.g. '1 .. 5 6 [7] 8 9 .. 12'
 
        # -> leftmost_page  = 5
 
        # -> rightmost_page = 9
 
        leftmost_page, _cur, rightmost_page = self._get_pos(self.page,
 
                                                            self.last_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'}
 
        self.dotdot_attr = dotdot_attr or {'class': 'pager_dotdot'}
 

	
 
        # Don't show navigator if there is no more than one page
 
        if self.page_count == 0 or (self.page_count == 1 and not show_if_single_page):
 
            return ''
 

	
 
        from string import Template
 
        # Replace ~...~ in token format by range of pages
 
        result = re.sub(r'~(\d+)~', self._range, format)
 

	
 
        # Interpolate '%' variables
 
        result = Template(result).safe_substitute({
 
            'first_page': self.first_page,
 
            'last_page': self.last_page,
 
            'page': self.page,
 
            'page_count': self.page_count,
 
            'items_per_page': self.items_per_page,
 
            'first_item': self.first_item,
 
            '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):
 

	
 
    def __init__(self, collection, page=1, items_per_page=20,
 
                 item_count=None, **kwargs):
 

	
 
        """Create a "RepoPage" instance. special pager for paging
 
        repository
 
        """
 
        # TODO: call baseclass __init__
 
        self._url_generator = kwargs.pop('url', url.current)
 

	
 
        # Safe the kwargs class-wide so they can be used in the pager() method
 
        self.kwargs = kwargs
 

	
 
        # Save a reference to the collection
 
        self.original_collection = collection
 

	
 
        self.collection = collection
 

	
 
        # The self.page is the number of the current page.
 
        # The first page has the number 1!
 
        try:
 
            self.page = int(page)  # make it int() if we get it as a string
 
        except (ValueError, TypeError):
 
            self.page = 1
 

	
 
        self.items_per_page = items_per_page
 

	
 
        # Unless the user tells us how many items the collections has
 
        # we calculate that ourselves.
 
        if item_count is not None:
 
            self.item_count = item_count
 
        else:
 
            self.item_count = len(self.collection)
 

	
 
        # Compute the number of the first and last available page
 
        if self.item_count > 0:
 
            self.first_page = 1
 
            self.page_count = int(math.ceil(float(self.item_count) /
 
                                            self.items_per_page))
 
            self.last_page = self.first_page + self.page_count - 1
 

	
 
            # Make sure that the requested page number is the range of
 
            # valid pages
 
            if self.page > self.last_page:
 
                self.page = self.last_page
 
            elif self.page < self.first_page:
 
                self.page = self.first_page
 

	
 
            # Note: the number of items on this page can be less than
 
            #       items_per_page if the last page is not full
 
            self.first_item = max(0, (self.item_count) - (self.page *
 
                                                          items_per_page))
 
            self.last_item = ((self.item_count - 1) - items_per_page *
 
                              (self.page - 1))
 

	
 
            self.items = list(self.collection[self.first_item:self.last_item + 1])
 

	
 
            # Links to previous and next page
 
            if self.page > self.first_page:
 
                self.previous_page = self.page - 1
 
            else:
 
                self.previous_page = None
 

	
 
            if self.page < self.last_page:
 
                self.next_page = self.page + 1
 
            else:
 
                self.next_page = None
 

	
 
        # No items available
 
        else:
 
            self.first_page = None
 
            self.page_count = 0
 
            self.last_page = None
 
            self.first_item = None
 
            self.last_item = None
 
            self.previous_page = None
 
            self.next_page = None
 
            self.items = []
 

	
 
        # This is a subclass of the 'list' type. Initialise the list now.
 
        list.__init__(self, reversed(self.items))
kallithea/public/css/style.css
Show inline comments
 
@@ -930,507 +930,439 @@ input.disabled {
 
#content div.panel div.form div.fields div.field div.input input.large,
 
#content div.panel div.form div.form-horizontal div.form-group div.input input.large {
 
    width: 85%;
 
}
 

	
 
#content div.panel div.form div.fields div.field div.input input.date,
 
#content div.panel div.form div.form-horizontal div.form-group div.input input.date {
 
    width: 177px;
 
}
 

	
 
#content div.panel div.form div.fields div.field div.input input.button,
 
#content div.panel div.form div.form-horizontal div.form-group div.input input.button {
 
    background: #D4D0C8;
 
    border-top: 1px solid #FFF;
 
    border-left: 1px solid #FFF;
 
    border-right: 1px solid #404040;
 
    border-bottom: 1px solid #404040;
 
    color: #000;
 
    margin: 0;
 
    padding: 4px 8px;
 
}
 

	
 
#content div.panel div.form div.fields div.field div.textarea,
 
#content div.panel div.form div.form-horizontal div.form-group div.textarea {
 
    border-top: 1px solid #b3b3b3;
 
    border-left: 1px solid #b3b3b3;
 
    border-right: 1px solid #eaeaea;
 
    border-bottom: 1px solid #eaeaea;
 
    margin: 0 0 0 200px;
 
    padding: 7px 7px 6px;
 
}
 

	
 
#content div.panel div.form div.fields div.field div.textarea-editor,
 
#content div.panel div.form div.form-horizontal div.form-group div.textarea-editor {
 
    border: 1px solid #ddd;
 
    padding: 0;
 
}
 

	
 
#content div.panel div.form div.fields div.field div.textarea textarea,
 
#content div.panel div.form div.form-horizontal div.form-group div.textarea textarea {
 
    width: 100%;
 
    height: 220px;
 
    overflow-y: auto;
 
    background: #FFF;
 
    color: #000;
 
    font-size: 12px;
 
    outline: none;
 
    border-width: 0;
 
    margin: 0;
 
    padding: 0;
 
}
 

	
 
#content div.panel div.form div.fields div.field div.textarea table,
 
#content div.panel div.form div.form-horizontal div.form-group div.textarea table {
 
    width: 100%;
 
    border: none;
 
    margin: 0;
 
    padding: 0;
 
}
 

	
 
#content div.panel div.form div.fields div.field div.textarea table td,
 
#content div.panel div.form div.form-horizontal div.form-group div.textarea table td {
 
    background: #DDD;
 
    border: none;
 
    padding: 0;
 
}
 

	
 
#content div.panel div.form div.fields div.field div.textarea table td table,
 
#content div.panel div.form div.form-horizontal div.form-group div.textarea table td table {
 
    width: auto;
 
    border: none;
 
    margin: 0;
 
    padding: 0;
 
}
 

	
 
#content div.panel div.form div.fields div.field div.textarea table td table td,
 
#content div.panel div.form div.form-horizontal div.form-group div.textarea table td table td {
 
    font-size: 11px;
 
    padding: 5px 5px 5px 0;
 
}
 

	
 
#content div.panel div.form div.fields div.field input[type=text]:focus,
 
#content div.panel div.form div.form-horizontal div.form-group input[type=text]:focus,
 
#content div.panel div.form div.fields div.field input[type=password]:focus,
 
#content div.panel div.form div.form-horizontal div.form-group input[type=password]:focus,
 
#content div.panel div.form div.fields div.field input[type=file]:focus,
 
#content div.panel div.form div.form-horizontal div.form-group input[type=file]:focus,
 
#content div.panel div.form div.fields div.field textarea:focus,
 
#content div.panel div.form div.form-horizontal div.form-group textarea:focus,
 
#content div.panel div.form div.fields div.field select:focus,
 
#content div.panel div.form div.form-horizontal div.form-group select:focus,
 
.reviewer_ac input:focus {
 
    background: #f6f6f6;
 
    border-color: #666;
 
}
 

	
 
.reviewer_ac {
 
    padding: 10px
 
}
 

	
 
div.form div.fields div.field div.button,
 
div.form div.form-horizontal div.form-group div.button {
 
    margin: 0;
 
    padding: 0 0 0 8px;
 
}
 
#content div.panel table.noborder {
 
    border: 1px solid transparent;
 
}
 

	
 
#content div.panel table {
 
    width: 100%;
 
    border-collapse: separate;
 
    margin: 0;
 
    padding: 0;
 
    border: 1px solid #eee;
 
    border-radius: 4px;
 
}
 

	
 
#content div.panel table th {
 
    background: #eee;
 
    border-bottom: 1px solid #ddd;
 
    padding: 5px 0px 5px 5px;
 
    text-align: left;
 
}
 

	
 
#content div.panel table th.left {
 
    text-align: left;
 
}
 

	
 
#content div.panel table th.right {
 
    text-align: right;
 
}
 

	
 
#content div.panel table th.center {
 
    text-align: center;
 
}
 

	
 
#content div.panel table th.selected {
 
    vertical-align: middle;
 
    padding: 0;
 
}
 

	
 
#content div.panel table td {
 
    background: #fff;
 
    border-bottom: 1px solid #cdcdcd;
 
    vertical-align: middle;
 
    padding: 5px;
 
}
 

	
 
#content div.panel table td.compact {
 
    padding: 0;
 
}
 

	
 
#content div.panel table tr.selected td {
 
    background: #FFC;
 
}
 

	
 
#content div.panel table td.selected {
 
    width: 3%;
 
    text-align: center;
 
    vertical-align: middle;
 
    padding: 0;
 
}
 

	
 
#content div.panel table td.action {
 
    width: 45%;
 
    text-align: left;
 
}
 

	
 
#content div.panel table td.date {
 
    width: 33%;
 
    text-align: center;
 
}
 

	
 
#content div.panel div.action {
 
    float: right;
 
    background: #FFF;
 
    text-align: right;
 
    margin: 10px 0 0;
 
    padding: 0;
 
}
 

	
 
#content div.panel div.action select {
 
    font-size: 11px;
 
    margin: 0;
 
}
 

	
 
#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;
 
}
 

	
 
#content div.panel div.traffic div.legend h6 {
 
    float: left;
 
    border: none;
 
    margin: 0;
 
    padding: 0;
 
}
 

	
 
#content div.panel div.traffic div.legend li {
 
    list-style: none;
 
    float: left;
 
    font-size: 11px;
 
    margin: 0;
 
    padding: 0 8px 0 4px;
 
}
 

	
 
#content div.panel div.traffic div.legend li.visits {
 
    border-left: 12px solid #edc240;
 
}
 

	
 
#content div.panel div.traffic div.legend li.pageviews {
 
    border-left: 12px solid #afd8f8;
 
}
 

	
 
#content div.panel div.traffic table {
 
    width: auto;
 
}
 

	
 
#content div.panel div.traffic table td {
 
    background: transparent;
 
    border: none;
 
    padding: 2px 3px 3px;
 
}
 

	
 
#content div.panel div.traffic table td.legendLabel {
 
    padding: 0 3px 2px;
 
}
 

	
 
#content div.panel #summary {
 
    margin-right: 200px;
 
    min-height: 240px;
 
}
 

	
 
#summary-menu-stats {
 
    float: left;
 
    width: 180px;
 
    position: absolute;
 
    top: 0;
 
    right: 0;
 
}
 

	
 
#summary-menu-stats ul {
 
    margin: 0 10px;
 
    display: block;
 
    background-color: #f9f9f9;
 
    border: 1px solid #d1d1d1;
 
    border-radius: 4px;
 
}
 

	
 
#content #summary-menu-stats li {
 
    border-top: 1px solid #d1d1d1;
 
    padding: 0;
 
}
 

	
 
#content #summary-menu-stats li:hover {
 
    background: #f0f0f0;
 
}
 

	
 
#content #summary-menu-stats li:first-child {
 
    border-top: none;
 
}
 

	
 
#summary-menu-stats a {
 
    display: block;
 
    padding: 12px 10px;
 
    background-repeat: no-repeat;
 
    background-position: 10px 50%;
 
    padding-right: 10px;
 
}
 

	
 
#repo_size_2.loaded {
 
    margin-left: 30px;
 
    display: block;
 
    padding-right: 10px;
 
    padding-bottom: 7px;
 
}
 

	
 
#summary-menu-stats a:hover {
 
    text-decoration: none;
 
}
 

	
 
#summary-menu-stats .badge {
 
    padding: 2px 4px !important;
 
    font-size: 10px;
 
}
 

	
 
#summary .metatag {
 
    display: inline-block;
 
    padding: 3px 5px;
 
    margin-bottom: 3px;
 
    margin-right: 1px;
 
    border-radius: 5px;
 
}
 

	
 
#content div.panel #summary p {
 
    margin-bottom: -5px;
 
    width: 600px;
 
    white-space: pre-wrap;
 
}
 

	
 
#content div.panel #summary p:last-child {
 
    margin-bottom: 9px;
 
}
 

	
 
#content div.panel #summary p:first-of-type {
 
    margin-top: 9px;
 
}
 

	
 
.metatag {
 
    display: inline-block;
 
    margin-right: 1px;
 
    border-radius: 4px 4px 4px 4px;
 

	
 
    border: solid 1px #9CF;
 
    padding: 2px 3px 2px 3px !important;
 
    background-color: #DEF;
 
}
 

	
 
.metatag[tag="dead"] {
 
    background-color: #E44;
 
}
 

	
 
.metatag[tag="stale"] {
 
    background-color: #EA4;
 
}
 

	
 
.metatag[tag="featured"] {
 
    background-color: #AEA;
 
}
 

	
 
.metatag[tag="requires"] {
 
    background-color: #9CF;
 
}
 

	
 
.metatag[tag="recommends"] {
 
    background-color: #BDF;
 
}
 

	
 
.metatag[tag="lang"] {
 
    background-color: #FAF474;
 
}
 

	
 
.metatag[tag="license"] {
 
    border: solid 1px #9CF;
 
    background-color: #DEF;
 
}
 
.metatag[tag="see"] {
 
    border: solid 1px #CBD;
 
    background-color: #EDF;
 
}
 

	
 
a.metatag[tag="license"]:hover {
 
    background-color: #577632;
 
    color: #FFF;
 
    text-decoration: none;
 
}
 

	
 
#summary .desc {
 
    white-space: pre;
 
    width: 100%;
 
}
 

	
 
#summary .repo_name {
 
    font-size: 1.6em;
 
    font-weight: bold;
 
    vertical-align: baseline;
 
    clear: right
 
}
 

	
 
#footer {
 
    clear: both;
 
    overflow: hidden;
 
    text-align: right;
 
    margin: 0;
 
    padding: 0 10px 4px;
 
@@ -3276,414 +3208,384 @@ div#legend_data, div#legend_container, d
 
}
 

	
 
.repo-switcher .select2-choice {
 
    padding: 0px 8px 1px !important;
 
    display: block;
 
    height: 100%;
 
}
 

	
 
.repo-switcher .select2-container,
 
.repo-switcher .select2-choice,
 
.repo-switcher .select2-choice span {
 
    background: transparent !important;
 
    border: 0 !important;
 
    box-shadow: none !important;
 
    color: #FFFFFF !important;
 
}
 

	
 
.repo-switcher .select2-arrow {
 
    display: none !important;
 
}
 

	
 
.repo-switcher-dropdown.select2-drop.select2-drop-active {
 
    box-shadow: none;
 
    color: #fff;
 
    background-color: #576622;
 
}
 

	
 
.repo-switcher-dropdown.select2-drop.select2-drop-active .select2-results .select2-highlighted {
 
    background-color: #6388ad;
 
}
 

	
 
#content div.graph {
 
    padding: 0 10px 10px;
 
    height: 450px;
 
}
 

	
 
#content div.panel ol.lower-roman,
 
#content div.panel ol.upper-roman,
 
#content div.panel ol.lower-alpha,
 
#content div.panel ol.upper-alpha,
 
#content div.panel ol.decimal {
 
    margin: 10px 24px 10px 44px;
 
}
 

	
 
#content div.panel div.form,
 
#content div.panel div.table,
 
#content div.panel div.traffic {
 
    position: relative;
 
    clear: both;
 
    margin: 0;
 
    padding: 0 20px 10px;
 
}
 

	
 
#content div.panel div.form div.fields,
 
#content div.panel div.form div.form-horizontal,
 
#login div.form-horizontal,
 
#login div.form-horizontal div.form-group,
 
#register div.form,
 
#register div.form div.fields,
 
#register div.form div.form-horizontal {
 
    clear: both;
 
    overflow: hidden;
 
    margin: 0;
 
    padding: 0;
 
}
 

	
 
#content div.panel div.form div.fields div.field div.input input.error,
 
#content div.panel div.form div.form-horizontal div.form-group div.input input.error,
 
#login div.form div.form-horizontal div.form-group div.input input.error,
 
#register div.form div.fields div.field div.input input.error,
 
#register div.form div.form-horizontal div.form-group div.input input.error {
 
    background: #FBE3E4;
 
    border-top: 1px solid #e1b2b3;
 
    border-left: 1px solid #e1b2b3;
 
    border-right: 1px solid #FBC2C4;
 
    border-bottom: 1px solid #FBC2C4;
 
}
 

	
 
#content div.panel div.form div.fields div.field div.input input.success,
 
#content div.panel div.form div.form-horizontal div.form-group div.input input.success,
 
#login div.form div.form-horizontal div.form-group div.input input.success,
 
#register div.form div.fields div.field div.input input.success,
 
#register div.form div.form-horizontal div.form-group div.input input.success {
 
    background: #E6EFC2;
 
    border-top: 1px solid #cebb98;
 
    border-left: 1px solid #cebb98;
 
    border-right: 1px solid #c6d880;
 
    border-bottom: 1px solid #c6d880;
 
}
 

	
 
#content div.panel div.form div.fields div.field div.select select,
 
#content div.panel div.form div.form-horizontal div.form-group div.select select,
 
#content div.panel table th.selected input,
 
#content div.panel table td.selected input {
 
    margin: 0;
 
}
 

	
 
#content div.panel div.form div.fields div.field div.select,
 
#content div.panel div.form div.form-horizontal div.form-group div.select,
 
#content div.panel div.form div.fields div.field div.checkboxes,
 
#content div.panel div.form div.form-horizontal div.form-group div.checkboxes,
 
#content div.panel div.form div.fields div.field div.radios,
 
#content div.panel div.form div.form-horizontal div.form-group div.radios {
 
    margin: 0 0 0 200px;
 
    padding: 0;
 
}
 

	
 
#content div.panel div.form div.fields div.field div.select a:hover,
 
#content div.panel div.form div.form-horizontal div.form-group div.select a:hover,
 
#content div.panel div.form div.fields div.field div.select a.ui-selectmenu:hover,
 
#content div.panel div.form div.form-horizontal div.form-group div.select a.ui-selectmenu:hover,
 
#content div.panel div.action a:hover {
 
    color: #000;
 
    text-decoration: none;
 
}
 

	
 
#content div.panel div.form div.fields div.field div.select a.ui-selectmenu-focus,
 
#content div.panel div.form div.form-horizontal div.form-group div.select a.ui-selectmenu-focus,
 
#content div.panel div.action a.ui-selectmenu-focus {
 
    border: 1px solid #666;
 
}
 

	
 
#content div.panel div.form div.fields div.field div.checkboxes div.checkbox,
 
#content div.panel div.form div.form-horizontal div.form-group div.checkboxes div.checkbox,
 
#content div.panel div.form div.fields div.field div.radios div.radio,
 
#content div.panel div.form div.form-horizontal div.form-group div.radios div.radio {
 
    clear: both;
 
    overflow: hidden;
 
    margin: 0;
 
    padding: 8px 0 2px;
 
}
 

	
 
#content div.panel div.form div.fields div.field div.checkboxes div.checkbox input,
 
#content div.panel div.form div.form-horizontal div.form-group div.checkboxes div.checkbox input,
 
#content div.panel div.form div.fields div.field div.radios div.radio input,
 
#content div.panel div.form div.form-horizontal div.form-group div.radios div.radio input {
 
    float: left;
 
    margin: 0;
 
}
 

	
 
#content div.panel div.form div.fields div.field div.checkboxes div.checkbox label,
 
#content div.panel div.form div.form-horizontal div.form-group div.checkboxes div.checkbox label,
 
#content div.panel div.form div.fields div.field div.radios div.radio label,
 
#content div.panel div.form div.form-horizontal div.form-group div.radios div.radio label {
 
    height: 1%;
 
    display: block;
 
    float: left;
 
    margin: 2px 0 0 4px;
 
}
 

	
 
div.form div.fields div.field div.button input,
 
div.form div.form-horizontal div.form-group div.button input,
 
#content div.panel div.form div.fields div.buttons input
 
#content div.panel div.form div.form-horizontal div.buttons input
 
div.form div.fields div.buttons input,
 
div.form div.form-horizontal div.buttons input,
 
#content div.panel div.action div.button input {
 
    font-size: 11px;
 
    font-weight: 700;
 
    margin: 0;
 
}
 

	
 
div.form div.fields div.field div.highlight,
 
div.form div.form-horizontal div.form-group div.highlight,
 
#content div.panel div.form div.fields div.buttons div.highlight,
 
#content div.panel div.form div.form-horizontal div.buttons div.highlight {
 
    display: inline;
 
}
 

	
 
#content div.panel div.form div.fields div.buttons,
 
#content div.panel div.form div.form-horizontal div.buttons,
 
div.form div.fields div.buttons,
 
div.form div.form-horizontal div.buttons {
 
    margin: 10px 0 0 200px;
 
    padding: 0;
 
}
 

	
 
#content div.panel table td.user,
 
#content div.panel table td.address {
 
    width: 10%;
 
    text-align: center;
 
}
 

	
 
#content div.panel div.action div.button,
 
#login div.form div.form-horizontal div.form-group div.input div.link,
 
#register div.form div.fields div.field div.input div.link,
 
#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;
 
}
 

	
 
#login div.color,
 
#register div.color {
 
    clear: both;
 
    overflow: hidden;
 
    background: #FFF;
 
    margin: 10px auto 0;
 
    padding: 3px 3px 3px 0;
 
}
 

	
 
#login div.color a,
 
#register div.color a {
 
    width: 20px;
 
    height: 20px;
 
    display: block;
 
    float: left;
 
    margin: 0 0 0 3px;
 
    padding: 0;
 
}
 

	
 
#login div.panel-heading h5,
 
#register div.panel-heading h5 {
 
    color: #fff;
 
    margin: 10px;
 
    padding: 0;
 
}
 

	
 
#login div.form div.form-horizontal div.form-group,
 
#register div.form div.fields div.field,
 
#register div.form div.form-horizontal div.form-group {
 
    clear: both;
 
    overflow: hidden;
 
    margin: 0;
 
    padding: 0 0 10px;
 
}
 

	
 
#login div.form div.form-horizontal div.form-group span.error-message,
 
#register div.form div.fields div.field span.error-message,
 
#register div.form div.form-horizontal div.form-group span.error-message {
 
    height: 1%;
 
    display: block;
 
    color: red;
 
    margin: 8px 0 0;
 
    padding: 0;
 
    max-width: 320px;
 
}
 

	
 
#login div.form div.form-horizontal div.form-group label,
 
#register div.form div.fields div.field > label,
 
#register div.form div.form-horizontal div.form-group > label {
 
    color: #000;
 
    font-weight: 700;
 
}
 

	
 
#login div.form div.form-horizontal div.form-group div,
 
#register div.form div.fields div.field div.input,
 
#register div.form div.form-horizontal div.form-group div.input {
 
    float: left;
 
    margin: 0;
 
    padding: 0;
 
}
 

	
 
#login div.form div.form-horizontal div.form-group div input.large {
 
    width: 250px;
 
}
 

	
 
#login div.form div.form-horizontal div.form-group div.checkbox,
 
#register div.form div.fields div.field div.checkbox,
 
#register div.form div.form-horizontal div.form-group div.checkbox {
 
    margin: 0 0 0 184px;
 
    padding: 0;
 
}
 

	
 
#login div.form div.form-horizontal div.form-group div.checkbox label,
 
#register div.form div.fields div.field div.checkbox label,
 
#register div.form div.form-horizontal div.form-group div.checkbox label {
 
    color: #565656;
 
    font-weight: 700;
 
}
 

	
 
#login div.form div.buttons input,
 
#register div.form div.fields div.buttons input,
 
#register div.form div.form-horizontal div.buttons input {
 
    color: #000;
 
    font-size: 1em;
 
    font-weight: 700;
 
    margin: 0;
 
}
 

	
 
#changeset_content .container .wrapper,
 
#graph_content .container .wrapper {
 
    width: 600px;
 
}
 

	
 
#changeset_content .container .date,
 
.ac .match {
 
    font-weight: 700;
 
    padding-top: 5px;
 
    padding-bottom: 5px;
 
}
 

	
 
div#legend_container table td,
 
div#legend_choices table td {
 
    border: none !important;
 
    height: 20px !important;
 
    padding: 0 !important;
 
}
 

	
 
.q_filter_box {
 
    border-radius: 4px;
 
    border: 0 none;
 
    margin-bottom: -4px;
 
    margin-top: -4px;
 
    padding-left: 3px;
 
}
 

	
 
#node_filter {
 
    border: 0px solid #545454;
 
    color: #AAAAAA;
 
    padding-left: 3px;
 
}
 

	
 
.reviewer_status {
 
    float: left;
 
}
 

	
 
.reviewers_member {
 
    height: 15px;
 
    padding: 0px 0px 0px 10px;
 
}
 

	
 
.emails_wrap {
 
    padding: 0px 20px;
 
}
 

	
 
.emails_wrap .email_entry {
 
    height: 30px;
 
    padding: 0px 0px 0px 10px;
 
}
 
.emails_wrap .email_entry .email {
 
    float: left
 
}
 
.emails_wrap .email_entry .email_action {
 
    float: left
 
}
 

	
 
.ips_wrap {
 
    padding: 0px 20px;
 
}
 

	
 
.ips_wrap .ip_entry {
 
    height: 30px;
 
    padding: 0px 0px 0px 10px;
 
}
 
.ips_wrap .ip_entry .ip {
 
    float: left
 
}
 
.ips_wrap .ip_entry .ip_action {
 
    float: left
 
}
 

	
 

	
 
/*README STYLE*/
 

	
 
div.readme {
 
    padding: 0px;
 
}
 

	
 
div.readme h2 {
 
    font-weight: normal;
 
}
 

	
 
div.readme .readme_box {
 
    background-color: #fafafa;
 
}
 

	
 
div.readme .readme_box {
 
    clear: both;
 
    overflow: hidden;
 
    margin: 0;
 
    padding: 0 20px 10px;
 
}
 

	
 
div.readme .readme_box h1,
 
div.readme .readme_box h2,
 
div.readme .readme_box h3,
 
div.readme .readme_box h4,
 
@@ -3895,388 +3797,384 @@ div.rst-block pre {
 
    margin: 6px;
 
}
 

	
 
.comments-number {
 
    padding: 0px 20px 10px;
 
    font-weight: bold;
 
    color: #666;
 
    font-size: 16px;
 
}
 

	
 
.automatic-comment {
 
    font-style: italic;
 
}
 

	
 
/** comment form **/
 

	
 
.status-block {
 
    margin: 5px;
 
    clear: both
 
}
 

	
 
.comment-form textarea {
 
    width: 100%;
 
    height: 100px;
 
    font-family: Lucida Console, Consolas, Monaco, Inconsolata, Liberation Mono, monospace;
 
}
 

	
 
form.comment-form {
 
    margin-top: 10px;
 
    margin-left: 10px;
 
}
 

	
 
.comment-inline-form .comment-block-ta,
 
.comment-form .comment-block-ta {
 
    border: 1px solid #ccc;
 
    border-radius: 3px;
 
    box-sizing: border-box;
 
}
 

	
 
.comment-form-submit {
 
    margin-top: 5px;
 
    margin-left: 525px;
 
}
 

	
 
.file-comments {
 
    display: none;
 
}
 

	
 
.comment-form .comment {
 
    margin-left: 10px;
 
}
 

	
 
.comment-form .comment-help {
 
    padding: 5px 5px 5px 5px;
 
    color: #666;
 
}
 

	
 
.comment-form .comment-button {
 
    padding-top: 5px;
 
}
 

	
 
.add-another-button {
 
    margin-left: 10px;
 
    margin-top: 10px;
 
    margin-bottom: 10px;
 
}
 

	
 
.comment .buttons {
 
    float: right;
 
    margin: -1px 0px 0px 0px;
 
}
 

	
 
.show-inline-comments {
 
    position: relative;
 
    top: 1px
 
}
 

	
 
/** comment inline form **/
 
.comment-inline-form {
 
    margin: 4px;
 
    max-width: 978px;
 
}
 
.comment-inline-form .submitting-overlay {
 
    display: none;
 
    height: 0;
 
    text-align: center;
 
    font-size: 16px;
 
    opacity: 0.5;
 
}
 

	
 
.comment-inline-form .clearfix,
 
.comment-form .clearfix {
 
    background: #EEE;
 
    border-radius: 4px;
 
    padding: 5px;
 
    margin: 0px;
 
}
 

	
 
div.comment-inline-form {
 
    padding: 4px 0px 6px 0px;
 
}
 

	
 
.comment-inline-form textarea {
 
    width: 100%;
 
    height: 100px;
 
    font-family: Lucida Console, Consolas, Monaco, Inconsolata, Liberation Mono, monospace;
 
}
 

	
 
form.comment-inline-form {
 
    margin-top: 10px;
 
    margin-left: 10px;
 
}
 

	
 
.comment-inline-form-submit {
 
    margin-top: 5px;
 
    margin-left: 525px;
 
}
 

	
 
.file-comments {
 
    display: none;
 
}
 

	
 
.comment-inline-form .comment {
 
    margin-left: 10px;
 
}
 

	
 
.comment-inline-form .comment-help {
 
    padding: 5px 5px 5px 5px;
 
    color: #666;
 
}
 

	
 
.comment-inline-form .comment-button {
 
    padding-top: 5px;
 
}
 

	
 
/** comment inline **/
 
.inline-comments {
 
    padding: 0 20px;
 
}
 

	
 
.inline-comments .comment .comment-wrapp {
 
    max-width: 978px;
 
    border: 1px solid #ddd;
 
    border-radius: 4px;
 
    margin: 3px 3px 5px 5px;
 
    background-color: #FAFAFA;
 
}
 

	
 
.inline-comments .add-button-row {
 
    padding: 2px 4px 8px 5px;
 
}
 

	
 
.inline-comments .comment .meta {
 
    background: #f8f8f8;
 
    padding: 4px;
 
    border-bottom: 1px solid #ddd;
 
    min-height: 20px;
 
    overflow: auto;
 
}
 

	
 
.inline-comments .comment .meta img {
 
    vertical-align: middle;
 
}
 

	
 
.inline-comments .comment .meta .user {
 
    font-weight: bold;
 
    float: left;
 
    padding: 3px;
 
}
 

	
 
.inline-comments .comment .meta .date {
 
    float: left;
 
    padding: 3px;
 
}
 

	
 
.inline-comments .comment .text {
 
    background-color: #FAFAFA;
 
    margin: 6px;
 
}
 

	
 
.inline-comments .comments-number {
 
    padding: 0px 0px 10px 0px;
 
    font-weight: bold;
 
    color: #666;
 
    font-size: 16px;
 
}
 

	
 
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;
 
}
 

	
 
.notification-header {
 
    padding-top: 6px;
 
}
 
.notification-header .desc {
 
    font-size: 16px;
 
    height: 24px;
 
    float: left
 
}
 
.notification-list .container.unread {
 
    background: none repeat scroll 0 0 rgba(255, 255, 180, 0.6);
 
}
 
.notification-header .gravatar {
 
    background: none repeat scroll 0 0 transparent;
 
    padding: 0px 0px 0px 8px;
 
}
 
.notification-list .container .notification-header .desc {
 
    font-weight: bold;
 
    font-size: 17px;
 
}
 
.notification-table {
 
    border: 1px solid #ccc;
 
    border-radius: 6px 6px 6px 6px;
 
    clear: both;
 
    margin: 0px 20px 0px 20px;
 
}
 
.notification-header .delete-notifications {
 
    float: right;
 
    padding-top: 8px;
 
    cursor: pointer;
 
}
 
.notification-header .read-notifications {
 
    float: right;
 
    padding-top: 8px;
 
    cursor: pointer;
 
}
 
.notification-subject {
 
    clear: both;
 
    border-bottom: 1px solid #eee;
 
    padding: 5px 0px 5px 38px;
 
}
 

	
 
.notification-body {
 
    clear: both;
 
    margin: 34px 2px 2px 8px
 
}
 

	
 
/****
 
PULL REQUESTS
 
*****/
 
.pullrequests_section_head {
 
    padding: 10px 10px 10px 0px;
 
    margin: 0 20px;
 
    font-size: 16px;
 
    font-weight: bold;
 
}
 

	
 
div.pr-details-title.closed {
 
    color: #555;
 
    background: #eee;
 
}
 

	
 
div.pr-details-title {
 
    font-size: 1.6em;
 
    padding: 5px 0px 5px 10px;
 
}
 

	
 
div.pr {
 
    margin: 0px 20px;
 
    padding: 4px 4px;
 
}
 
div.pr-desc {
 
    margin: 0px 20px;
 
}
 
tr.pr-closed td {
 
    background-color: #eee !important;
 
    color: #555 !important;
 
}
 

	
 
span.pr-closed-tag {
 
    margin-bottom: 1px;
 
    margin-right: 1px;
 
    padding: 1px 3px;
 
    font-size: 10px;
 
    padding: 1px 3px 1px 3px;
 
    font-size: 10px;
 
    color: #577632;
 
    white-space: nowrap;
 
    border-radius: 4px;
 
    border: 1px solid #d9e8f8;
 
    line-height: 1.5em;
 
}
 

	
 
.pr-box {
 
    max-width: 978px;
 
}
 

	
 
#s2id_org_ref,
 
#s2id_other_ref,
 
#s2id_org_repo,
 
#s2id_other_repo {
 
    min-width: 150px;
 
    margin: 5px;
 
}
 

	
 
#pr-summary .msg-div {
 
    margin: 5px 0;
 
}
 

	
 
/****
 
  PERMS
 
*****/
 
#perms .perms_section_head {
 
    padding: 10px 10px 10px 0px;
 
    font-size: 16px;
 
    font-weight: bold;
 
    text-transform: capitalize;
 
}
 

	
 
#perms .perm_tag {
 
    padding: 3px 3px 1px 3px;
 
    font-size: 10px;
 
    font-weight: bold;
 
    text-transform: uppercase;
 
    white-space: nowrap;
 
    border-radius: 3px;
 
}
 

	
 
#perms .perm_tag.admin {
 
    background-color: #B94A48;
 
    color: #ffffff;
 
}
 

	
 
#perms .perm_tag.write {
 
    background-color: #DB7525;
 
    color: #ffffff;
 
}
 

	
 
#perms .perm_tag.read {
 
    background-color: #468847;
 
    color: #ffffff;
 
}
 

	
 
#perms .perm_tag.none {
 
    background-color: #bfbfbf;
 
    color: #ffffff;
 
}
 

	
 
.perm-gravatar {
 
    vertical-align: middle;
 
    padding: 2px;
 
}
 
.perm-gravatar-ac {
 
    vertical-align: middle;
 
    padding: 2px;
 
    width: 14px;
 
    height: 14px;
 
}
 

	
 
/*****************************************************************************
 
                                  DIFFS CSS
 
******************************************************************************/
 
.diff-collapse {
 
    text-align: center;
 
    margin-bottom: -15px;
 
}
 
.diff-collapse-button {
 
    cursor: pointer;
 
    color: #666;
 
    font-size: 16px;
 
}
 
.diff-container {
 

	
 
}
 

	
 
.compare-revision-selector {
 
    font-weight: bold;
 
    font-size: 14px;
 
}
 
.compare-revision-selector > div {
 
    display: inline-block;
 
    margin-left: 8px;
 
    vertical-align: middle;
 
}
 
.compare-revision-selector .btn {
kallithea/templates/admin/admin_log.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
%if c.users_log:
 
<table class="table">
 
    <tr>
 
        <th class="left">${_('Username')}</th>
 
        <th class="left">${_('Action')}</th>
 
        <th class="left">${_('Repository')}</th>
 
        <th class="left">${_('Date')}</th>
 
        <th class="left">${_('From IP')}</th>
 
    </tr>
 

	
 
    %for cnt,l in enumerate(c.users_log):
 
    <tr class="parity${cnt%2}">
 
        <td>
 
        %if l.user is not None:
 
          ${h.link_to(l.user.username,h.url('edit_user', id=l.user.user_id))}
 
        %else:
 
          ${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(){
 
    var $user_log = $('#user_log');
 
    $user_log.on('click','.pager_link',function(e){
 
      asynchtml(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')}
 
<ul class="pagination">
 
    ${c.users_log.pager()}
 
</ul>
 
</div>
 
%else:
 
    ${_('No actions yet')}
 
%endif
kallithea/templates/admin/gists/index.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<%inherit file="/base/base.html"/>
 

	
 
<%block name="title">
 
    %if c.show_private:
 
        ${_('Private Gists for User %s') % c.authuser.username}
 
    %elif c.show_public:
 
        ${_('Public Gists for User %s') % c.authuser.username}
 
    %else:
 
        ${_('Public Gists')}
 
    %endif
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    %if c.show_private:
 
        ${_('Private Gists for User %s') % c.authuser.username}
 
    %elif c.show_public:
 
        ${_('Public Gists for User %s') % c.authuser.username}
 
    %else:
 
        ${_('Public Gists')}
 
    %endif
 
    - ${c.gists_pager.item_count}
 
</%def>
 

	
 
<%block name="header_menu">
 
    ${self.menu('gists')}
 
</%block>
 

	
 
<%def name="main()">
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
        %if c.authuser.username != 'default':
 
        <ul class="links">
 
          <li>
 
             <a href="${h.url('new_gist')}" class="btn btn-success btn-xs"><i class="icon-plus"></i> ${_('Create New Gist')}</a>
 
          </li>
 
        </ul>
 
        %endif
 
    </div>
 
    %if c.gists_pager.item_count>0:
 
        % for gist in c.gists_pager:
 
          <div class="gist-item" style="padding:10px 20px 10px 15px">
 

	
 
            ${h.gravatar_div(gist.owner.email, size=28)}
 
            <div title="${gist.owner.full_contact}" class="user" style="font-size: 16px">
 
                <b>${h.person(gist.owner.full_contact)}</b> /
 
                <b><a href="${h.url('gist',gist_id=gist.gist_access_id)}">gist: ${gist.gist_access_id}</a></b>
 
            </div>
 
            <div style="padding: 4px 0px 0px 0px">
 
                ${_('Created')} ${h.age(gist.created_on)} /
 
                <span style="color: #AAA">
 
                  %if gist.gist_expires == -1:
 
                   ${_('Expires')}: ${_('Never')}
 
                  %else:
 
                   ${_('Expires')}: ${h.age(h.time_to_datetime(gist.gist_expires))}
 
                  %endif
 
                </span>
 
            </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
 

	
 
%if c.notifications:
 
<%
 
unread = lambda n:{False:'unread'}.get(n)
 
%>
 

	
 
<div class="notification-list notification-table">
 
%for notification in c.notifications:
 
  <div id="notification_${notification.notification.notification_id}" class="container ${unread(notification.read)}">
 
    <div class="notification-header">
 
      ${h.gravatar_div(notification.notification.created_by_user.email, size=24)}
 
      <div class="desc ${unread(notification.read)}">
 
      <a href="${url('notification', notification_id=notification.notification.notification_id)}">${notification.notification.description}</a>
 

	
 
      </div>
 
      <div class="delete-notifications">
 
        <span id="${notification.notification.notification_id}" class="delete-notification"><i class="icon-minus-circled" style="color: #b94a48; padding: 2px;"></i></span>
 
      </div>
 
      %if not notification.read:
 
      <div class="read-notifications">
 
        <span id="${notification.notification.notification_id}" class="read-notification"><i class="icon-ok" style="color: #4CBB17; padding: 2px;"></i></span>
 
      </div>
 
      %endif
 
    </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
 
## -*- coding: utf-8 -*-
 

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

	
 
<%block name="title">
 
    ${_('%s Changelog') % c.repo_name}
 
    %if c.changelog_for_path:
 
      /${c.changelog_for_path}
 
    %endif
 
</%block>
 

	
 
<%def name="breadcrumbs_links()">
 
    <% size = c.size if c.size <= c.total_cs else c.total_cs %>
 
    ${_('Changelog')}
 
    %if c.changelog_for_path:
 
     - /${c.changelog_for_path}
 
    %endif
 
    %if c.revision:
 
    @ ${h.short_id(c.first_revision.raw_id)}
 
    %endif
 
    - ${ungettext('showing %d out of %d revision', 'showing %d out of %d revisions', size) % (size, c.total_cs)}
 
</%def>
 

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

	
 
<%def name="main()">
 
${self.repo_context_bar('changelog', c.first_revision.raw_id if c.first_revision else None)}
 
<div class="panel panel-primary">
 
    <!-- box / title -->
 
    <div class="panel-heading">
 
        ${self.breadcrumbs()}
 
    </div>
 
    <div class="table">
 
        %if c.pagination:
 
            <div>
 
                <div style="overflow:auto; ${'display:none' if c.changelog_for_path else ''}">
 
                    <div class="container_header">
 
                        <div style="float:left; margin-left:20px;">
 
                            ${h.form(h.url.current(),method='get',style="display:inline")}
 
                                ${h.submit('set',_('Show'),class_="btn btn-default btn-sm")}
 
                                ${h.text('size',size=3,value=c.size)}
 
                                ${_('revisions')}
 
                                %if c.branch_name:
 
                                    ${h.hidden('branch', c.branch_name)}
 
                                %endif
 
                            ${h.end_form()}
 
                            <a href="#" class="btn btn-default btn-sm" id="rev_range_clear" style="display:none">${_('Clear selection')}</a>
 
                        </div>
 
                        <div style="float: right; margin: 0px 0px 0px 4px">
 
                            <a href="#" class="btn btn-default btn-sm" id="rev_range_container" style="display:none"></a>
 
                            %if c.revision:
 
                                <a class="btn btn-default btn-sm" href="${h.url('changelog_home', repo_name=c.repo_name)}">
 
                                    ${_('Go to tip of repository')}
 
                                </a>
 
                            %endif
 
                            %if c.db_repo.fork:
 
                                <a id="compare_fork"
 
                                   title="${_('Compare fork with %s' % c.db_repo.fork.repo_name)}"
 
                                   href="${h.url('compare_url',repo_name=c.db_repo.fork.repo_name,org_ref_type=c.db_repo.landing_rev[0],org_ref_name=c.db_repo.landing_rev[1],other_repo=c.repo_name,other_ref_type='branch' if request.GET.get('branch') else c.db_repo.landing_rev[0],other_ref_name=request.GET.get('branch') or c.db_repo.landing_rev[1], merge=1)}"
 
                                   class="btn btn-default btn-sm"><i class="icon-git-compare"></i> ${_('Compare fork with parent repository (%s)' % c.db_repo.fork.repo_name)}</a>
 
                            %endif
 
                            ## text and href of open_new_pr is controlled from javascript
 
                            <a id="open_new_pr" class="btn btn-default btn-sm"></a>
 
                            ${_("Branch filter:")} ${h.select('branch_filter',c.branch_name,c.branch_filters)}
 
                        </div>
 
                    </div>
 
                </div>
 

	
 
                <div id="changelog" style="clear:both">
 

	
 
                <div id="graph_nodes">
 
                    <canvas id="graph_canvas" style="width:0"></canvas>
 
                </div>
 
                <div id="graph_content" style="${'margin: 0px' if c.changelog_for_path else ''}">
 

	
 
                <table id="changesets">
 
                <tbody>
 
                %for cnt,cs in enumerate(c.pagination):
 
                    <tr id="chg_${cnt+1}" class="container ${'mergerow' if len(cs.parents) > 1 else ''}">
 
                        <td class="checkbox">
 
                            %if c.changelog_for_path:
 
                                ${h.checkbox(cs.raw_id,class_="changeset_range", disabled="disabled")}
 
                            %else:
 
                                ${h.checkbox(cs.raw_id,class_="changeset_range")}
 
                            %endif
 
                        <td class="status">
 
                          %if c.statuses.get(cs.raw_id):
 
                            <div class="changeset-status-ico">
 
                            %if c.statuses.get(cs.raw_id)[2]:
 
                              <a class="tooltip" title="${_('Changeset status: %s by %s\nClick to open associated pull request %s') % (c.statuses.get(cs.raw_id)[1], c.statuses.get(cs.raw_id)[5].username, c.statuses.get(cs.raw_id)[4])}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}">
 
                                <i class="icon-circle changeset-status-${c.statuses.get(cs.raw_id)[0]}"></i>
 
                              </a>
 
                            %else:
 
                              <a class="tooltip" title="${_('Changeset status: %s by %s') % (c.statuses.get(cs.raw_id)[1], c.statuses.get(cs.raw_id)[5].username)}"
 
                                 href="${c.comments[cs.raw_id][0].url()}">
 
                                  <i class="icon-circle changeset-status-${c.statuses.get(cs.raw_id)[0]}"></i>
 
                              </a>
 
                            %endif
 
                            </div>
 
                          %endif
 
                        </td>
 
                        <td class="author">
 
                            ${h.gravatar(h.email_or_none(cs.author), size=16)}
 
                            <span title="${cs.author}" class="user">${h.shorter(h.person(cs.author),22)}</span>
 
                        </td>
 
                        <td class="hash" style="width:${len(h.show_id(cs))*6.5}px">
 
                            ${h.link_to(h.show_id(cs),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id), class_='changeset_hash')}
 
                        </td>
 
                        <td class="date">
 
                            <div class="date tooltip" title="${h.fmt_date(cs.date)}">${h.age(cs.date,True)}</div>
 
                        </td>
 
                        <td class="expand_commit" commit_id="${cs.raw_id}" title="${_('Expand commit message')}">
 
                            <i class="icon-align-left" style="color:#999"></i>
 
                        </td>
 
                        <td class="mid">
 
                            <div class="log-container">
 
                                <div class="message" id="C-${cs.raw_id}">${h.urlify_text(cs.message, c.repo_name,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</div>
 
                                <div class="extra-container">
 
                                    %if c.comments.get(cs.raw_id):
 
                                        <div class="comments-container">
 
                                            <div class="comments-cnt" title="${_('Changeset has comments')}">
 
                                                <a href="${c.comments[cs.raw_id][0].url()}">
 
                                                    ${len(c.comments[cs.raw_id])}
 
                                                    <i class="icon-comment-discussion"></i>
 
                                                </a>
 
                                            </div>
 
                                        </div>
 
                                    %endif
 
                                    %if cs.bumped:
 
                                        <span class="bumpedtag" title="Bumped">
 
                                            Bumped
 
                                        </span>
 
                                    %endif
 
                                    %if cs.divergent:
 
                                        <span class="divergenttag" title="Divergent">
 
                                            Divergent
 
                                        </span>
 
                                    %endif
 
                                    %if cs.extinct:
 
                                        <span class="extincttag" title="Extinct">
 
                                            Extinct
 
                                        </span>
 
                                    %endif
 
                                    %if cs.unstable:
 
                                        <span class="unstabletag" title="Unstable">
 
                                            Unstable
 
                                        </span>
 
                                    %endif
 
                                    %if cs.phase:
 
                                        <span class="phasetag" title="Phase">
 
                                            ${cs.phase}
 
                                        </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 (not c.branch_name) and cs.branch:
 
                                        <span class="branchtag" title="${_('Branch %s' % cs.branch)}">
 
                                            ${h.link_to(cs.branch,h.url('changelog_home',repo_name=c.repo_name,branch=cs.branch))}
 
                                        </span>
 
                                    %endif
 
                                </div>
 
                            </div>
 
                        </td>
 
                    </tr>
 
                %endfor
 
                </tbody>
 
                </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(){
 
                var $checkboxes = $('.changeset_range');
 

	
 
                pyroutes.register('changeset_home', "${h.url('changeset_home', repo_name='%(repo_name)s', revision='%(revision)s')}", ['repo_name', 'revision']);
 

	
 
                var checkbox_checker = function(e) {
 
                    var $checked_checkboxes = $checkboxes.filter(':checked');
 
                    var $singlerange = $('#singlerange');
 

	
 
                    $('#rev_range_container').hide();
 
                    $checkboxes.show();
 
                    $singlerange.show();
 

	
 
                    if ($checked_checkboxes.length > 0) {
 
                        $checked_checkboxes.first().parent('td').append($singlerange);
 
                        var singlerange = $singlerange.prop('checked');
 
                        var rev_end = $checked_checkboxes.first().prop('name');
 
                        if ($checked_checkboxes.length > 1 || singlerange) {
 
                            var rev_start = $checked_checkboxes.last().prop('name');
 
                            $('#rev_range_container').prop('href',
 
                                pyroutes.url('changeset_home', {'repo_name': '${c.repo_name}',
 
                                                                'revision': rev_start + '...' + rev_end}));
 
                            $('#rev_range_container').html(
 
                                 _TM['Show Selected Changesets {0} &rarr; {1}'].format(rev_start.substr(0, 12), rev_end.substr(0, 12)));
 
                            $('#rev_range_container').show();
 
                            $('#open_new_pr').prop('href', pyroutes.url('pullrequest_home',
 
                                                                        {'repo_name': '${c.repo_name}',
 
                                                                         'rev_start': rev_start,
 
                                                                         'rev_end': rev_end}));
 
                            $('#open_new_pr').html(_TM['Open New Pull Request for {0} &rarr; {1}'].format(rev_start.substr(0, 12), rev_end.substr(0, 12)));
 
                        } else {
 
                            $('#open_new_pr').prop('href', pyroutes.url('pullrequest_home',
 
                                                                        {'repo_name': '${c.repo_name}',
 
                                                                         'rev_end': rev_end}));
 
                            $('#open_new_pr').html(_TM['Open New Pull Request from {0}'].format(rev_end.substr(0, 12)));
 
                        }
 
                        $('#rev_range_clear').show();
 
                        $('#compare_fork').hide();
 

	
 
                        var disabled = true;
 
                        $checkboxes.each(function(){
 
                            var $this = $(this);
 
                            if (disabled) {
 
                                if ($this.prop('checked')) {
 
                                    $this.closest('tr').removeClass('out-of-range');
 
                                    disabled = singlerange;
 
                                } else {
 
                                    $this.closest('tr').addClass('out-of-range');
 
                                }
 
                            } else {
 
                                $this.closest('tr').removeClass('out-of-range');
 
                                disabled = $this.prop('checked');
 
                            }
 
                        });
 

	
 
                        if ($checked_checkboxes.length + (singlerange ? 1 : 0) >= 2) {
 
                            $checkboxes.hide();
 
                            $checked_checkboxes.show();
 
                            if (!singlerange)
 
                                $singlerange.hide();
 
                        }
 
                    } else {
 
                        $('#singlerange').hide().prop('checked', false);
 
                        $('#rev_range_clear').hide();
 
                        %if c.revision:
 
                            $('#open_new_pr').prop('href', pyroutes.url('pullrequest_home',
 
                                                                        {'repo_name': '${c.repo_name}',
 
                                                                         'rev_end':'${c.first_revision.raw_id}'}));
 
                            $('#open_new_pr').html(_TM['Open New Pull Request from {0}'].format('${c.revision}'));
 
                        %else:
 
                            $('#open_new_pr').prop('href', pyroutes.url('pullrequest_home',
 
                                                                        {'repo_name': '${c.repo_name}',
 
                                                                        'branch':'${c.first_revision.branch}'}));
 
                            $('#open_new_pr').html(_TM['Open New Pull Request from {0}'].format('${c.first_revision.branch}'));
 
                        %endif
 
                        $('#compare_fork').show();
 
                        $checkboxes.closest('tr').removeClass('out-of-range');
 
                    }
 
                };
 
                checkbox_checker();
 
                $checkboxes.click(function() {
 
                    checkbox_checker();
 
                    r.render(jsdata);
 
                });
 
                $('#singlerange').click(checkbox_checker);
 

	
 
                $('#rev_range_clear').click(function(e){
 
                    $checkboxes.prop('checked', false);
 
                    checkbox_checker();
 
                    r.render(jsdata);
 
                });
 

	
 
                var $msgs = $('.message');
 
                // get first element height
 
                var el = $('#graph_content .container')[0];
 
                var row_h = el.clientHeight;
 
                $msgs.each(function() {
 
                    var m = this;
 

	
 
                    var h = m.clientHeight;
 
                    if(h > row_h){
 
                        var offset = row_h - (h+12);
 
                        $(m.nextElementSibling).css('display', 'block');
 
                        $(m.nextElementSibling).css('margin-top', offset+'px');
 
                    }
 
                });
 

	
 
                $('.expand_commit').on('click',function(e){
 
                    var cid = $(this).attr('commit_id');
 
                    $('#C-'+cid).toggleClass('expanded');
 

	
 
                    //redraw the graph, r and jsdata are bound outside function
 
                    r.render(jsdata);
 
                });
 

	
 
                // change branch filter
 
                $("#branch_filter").select2({
 
                    dropdownAutoWidth: true,
 
                    maxResults: 50,
 
                    sortResults: branchSort
 
                    });
 

	
 
                $("#branch_filter").change(function(e){
 
                    var selected_branch = e.currentTarget.options[e.currentTarget.selectedIndex].value;
 
                    if(selected_branch != ''){
 
                        window.location = pyroutes.url('changelog_home', {'repo_name': '${c.repo_name}',
 
                                                                          'branch': selected_branch});
 
                    }else{
 
                        window.location = pyroutes.url('changelog_home', {'repo_name': '${c.repo_name}'});
 
                    }
 
                    $("#changelog").hide();
 
                });
 

	
 
                var jsdata = ${c.jsdata|n};
 
                var r = new BranchRenderer('graph_canvas', 'graph_content', 'chg_');
 
                r.render(jsdata);
 
            });
 

	
 
        </script>
 
        %else:
 
            ${_('There are no changes yet')}
 
        %endif
 
    </div>
 
</div>
 
</%def>
kallithea/templates/changelog/changelog_summary_data.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
%if c.repo_changesets:
 
<table class="table">
 
    <tr>
 
        <th class="left"></th>
 
        <th class="left"></th>
 
        <th class="left">${_('Revision')}</th>
 
        <th class="left">${_('Commit Message')}</th>
 
        <th class="left">${_('Age')}</th>
 
        <th class="left">${_('Author')}</th>
 
        <th class="left">${_('Refs')}</th>
 
    </tr>
 
%for cnt,cs in enumerate(c.repo_changesets):
 
    <tr class="parity${cnt%2} ${'mergerow' if len(cs.parents) > 1 else ''}">
 
        <td class="compact">
 
            <div class="changeset-status-container">
 
              %if c.statuses.get(cs.raw_id):
 
                <span class="changeset-status-ico shortlog">
 
                %if c.statuses.get(cs.raw_id)[2]:
 
                  <a class="tooltip" title="${_('Changeset status: %s by %s\nClick to open associated pull request %s') % (c.statuses.get(cs.raw_id)[1], c.statuses.get(cs.raw_id)[5].username, c.statuses.get(cs.raw_id)[4])}" href="${h.url('pullrequest_show',repo_name=c.statuses.get(cs.raw_id)[3],pull_request_id=c.statuses.get(cs.raw_id)[2])}">
 
                    <i class="icon-circle changeset-status-${c.statuses.get(cs.raw_id)[0]}"></i>
 
                  </a>
 
                %else:
 
                  <a class="tooltip" title="${_('Changeset status: %s by %s') % (c.statuses.get(cs.raw_id)[1], c.statuses.get(cs.raw_id)[5].username)}"
 
                     href="${c.comments[cs.raw_id][0].url()}">
 
                    <i class="icon-circle changeset-status-${c.statuses.get(cs.raw_id)[0]}"></i>
 
                  </a>
 
                %endif
 
                </span>
 
              %endif
 
            </div>
 
        </td>
 
        <td class="compact">
 
              %if c.comments.get(cs.raw_id,[]):
 
               <div class="comments-container">
 
                   <div title="${('comments')}">
 
                       <a href="${c.comments[cs.raw_id][0].url()}">
 
                          <i class="icon-comment"></i>${len(c.comments[cs.raw_id])}
 
                       </a>
 
                   </div>
 
               </div>
 
              %endif
 
        </td>
 
        <td>
 
            <a href="${h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id)}" class="revision-link">${h.show_id(cs)}</a>
 
        </td>
 
        <td>
 
            ${h.urlify_text(h.chop_at(cs.message,'\n'),c.repo_name, h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}
 
        </td>
 
        <td><span class="tooltip" title="${h.fmt_date(cs.date)}">
 
                      ${h.age(cs.date)}</span>
 
        </td>
 
        <td title="${cs.author}">${h.person(cs.author)}</td>
 
        <td>
 
            %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('changelog_home',repo_name=c.repo_name,branch=cs.branch))}
 
             </span>
 
            %endif
 
        </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">
 
      <a class="btn btn-default btn-xs" 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 repository')}</h4>
 
<pre>
 
    ${c.db_repo_scm_instance.alias} clone ${c.clone_repo_url}
 
    ${c.db_repo_scm_instance.alias} add README # add first file
 
    ${c.db_repo_scm_instance.alias} commit -m "Initial" # commit with message
 
    ${c.db_repo_scm_instance.alias} push ${'origin master' if h.is_git(c.db_repo_scm_instance) else ''} # push changes back
 
</pre>
 

	
 
<h4>${_('Existing repository?')}</h4>
 
<pre>
 
%if h.is_git(c.db_repo_scm_instance):
 
    git remote add origin ${c.clone_repo_url}
 
    git push -u origin master
 
%else:
 
    hg push ${c.clone_repo_url}
 
%endif
 
</pre>
 
%endif
kallithea/templates/followers/followers_data.html
Show inline comments
 
## -*- coding: utf-8 -*-
 

	
 
% for f in c.followers_pager:
 
    <div>
 
        <div class="follower_user">
 
            ${h.gravatar_div(f.user.email, size=24)}
 
            <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="${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
 
## -*- coding: utf-8 -*-
 

	
 
% if c.forks_pager:
 
    % for f in c.forks_pager:
 
        <div>
 
            <div class="fork_user">
 
                ${h.gravatar_div(f.owner.email, size=24)}
 
                <span style="font-size: 20px">
 
                 <b>${f.owner.username}</b> (${f.owner.name} ${f.owner.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.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-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
 
## -*- coding: utf-8 -*-
 

	
 
%if c.journal_day_aggregate:
 
    %for day,items in c.journal_day_aggregate:
 
     <div class="journal_day">${day}</div>
 
        % for user,entries in items:
 
            <div class="journal_container">
 
                ${h.gravatar_div(user.email if user else 'anonymous@kallithea-scm.org', size=24)}
 
                %if user:
 
                    <div class="journal_user">${user.name} ${user.lastname}</div>
 
                %else:
 
                    <div class="journal_user deleted">${entries[0].username}</div>
 
                %endif
 
                <div class="journal_action_container">
 
                % for entry in entries:
 
                    <div class="journal_icon"> ${h.action_parser(entry)[2]()}</div>
 
                    <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.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>
 
    <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
 
## -*- coding: utf-8 -*-
 

	
 
<%def name="pullrequest_overview(pullrequests)">
 

	
 
%if not len(pullrequests):
 
    <div class="normal-indent empty_data">${_('No entries')}</div>
 
    <% return %>
 
%endif
 

	
 
<div class="table">
 
  <table class="table">
 
    <thead>
 
      <tr>
 
        <th class="left">${_('Vote')}</th>
 
        <th class="left">${_('Title')}</th>
 
        <th class="left">${_('Owner')}</th>
 
        <th class="left">${_('Age')}</th>
 
        <th class="left">${_('From')}</th>
 
        <th class="left">${_('To')}</th>
 
        <th class="right" style="padding-right:5px">${_('Delete')}</th>
 
      </tr>
 
    </thead>
 
% for pr in pullrequests:
 
    <tr class="${'pr-closed' if pr.is_closed() else ''}">
 
      <td width="80px">
 
        <% status = pr.user_review_status(c.authuser.user_id) %>
 
        %if status:
 
          <i class="icon-circle changeset-status-${status}" title="${_("You voted: %s") % h.changeset_status_lbl(status)}"></i>
 
        %else:
 
          <i class="icon-circle changeset-status-not_reviewed" title="${_("You didn't vote")}"></i>
 
        %endif
 
      </td>
 
      <td>
 
        <a href="${pr.url()}">
 
        ${pr.title or _("(no title)")}
 
        %if pr.is_closed():
 
          <span class="pr-closed-tag">${_('Closed')}</span>
 
        %endif
 
        </a>
 
      </td>
 
      <td>
 
        ${pr.owner.full_name_and_username}
 
      </td>
 
      <td>
 
        <span class="tooltip" title="${h.fmt_date(pr.created_on)}">
 
          ${h.age(pr.created_on)}
 
        </span>
 
      </td>
 
      <td>
 
        <% org_ref_name=pr.org_ref.rsplit(':', 2)[-2] %>
 
        <a href="${h.url('summary_home', repo_name=pr.org_repo.repo_name, anchor=org_ref_name)}">
 
          ${pr.org_repo.repo_name}#${org_ref_name}
 
        </a>
 
      </td>
 
      <td>
 
        <% other_ref_name=pr.other_ref.rsplit(':', 2)[-2] %>
 
        <a href="${h.url('summary_home', repo_name=pr.other_repo.repo_name, anchor=other_ref_name)}">
 
          ${pr.other_repo.repo_name}#${other_ref_name}
 
        </a>
 
      </td>
 
      <td style="text-align:right">
 
        %if pr.owner_id == c.authuser.user_id:
 
          ${h.form(url('pullrequest_delete', repo_name=pr.other_repo.repo_name, pull_request_id=pr.pull_request_id), style="display:inline-block")}
 
          <button class="btn btn-default btn-xs"
 
                  id="remove_${pr.pull_request_id}"
 
                  name="remove_${pr.pull_request_id}"
 
                  title="${_('Delete Pull Request')}"
 
                  onclick="return confirm('${_('Confirm to delete this pull request')}')
 
                      && ((${len(pr.comments)} == 0) ||
 
                          confirm('${_('Confirm again to delete this pull request with %s comments') % len(pr.comments)}'))
 
                      ">
 
            <i class="icon-minus-circled"></i>
 
          </button>
 
          ${h.end_form()}
 
        %endif
 
      </td>
 
    </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
 
##commit highlighting
 

	
 
%for cnt,sr in enumerate(c.formated_results):
 
    %if h.HasRepoPermissionAny('repository.write','repository.read','repository.admin')(sr['repository'],'search results check'):
 
    <div class="table">
 
        <div id="body${cnt}" class="codeblock">
 
            <div class="code-header">
 
                <div class="search-path">${h.link_to(h.literal('%s &raquo; %s' % (sr['repository'],sr['raw_id'])),
 
                h.url('changeset_home',repo_name=sr['repository'],revision=sr['raw_id']))}
 
                ${h.fmt_date(h.time_to_datetime(sr['date']))}
 
                </div>
 
            </div>
 
            <div class="left">
 
                <div class="author">
 
                    ${h.gravatar_div(h.email_or_none(sr['author']), size=20)}
 
                    <span>${h.person(sr['author'])}</span><br/>
 
                    <span>${h.email_or_none(sr['author'])}</a></span><br/>
 
                </div>
 
                %if sr['message_hl']:
 
                <div class="search-code-body">
 
                    <pre>${h.literal(sr['message_hl'])}</pre>
 
                </div>
 
                %else:
 
                <div class="message">${h.urlify_text(sr['message'], sr['repository'])}</div>
 
                %endif
 
            </div>
 
        </div>
 
    </div>
 
    %else:
 
        %if cnt == 0:
 
        <div class="table">
 
            <div id="body${cnt}" class="codeblock">
 
                <div class="error">${_('Permission denied')}</div>
 
            </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
 
##content highlighting
 

	
 
%for cnt,sr in enumerate(c.formated_results):
 
    %if h.HasRepoPermissionAny('repository.write','repository.read','repository.admin')(sr['repository'],'search results check'):
 
    <div class="table">
 
        <div id="body${cnt}" class="codeblock">
 
            <div class="code-header">
 
                <div class="search-path">${h.link_to(h.literal('%s &raquo; %s' % (sr['repository'],sr['f_path'])),
 
                h.url('files_home',repo_name=sr['repository'],revision='tip',f_path=sr['f_path']))}
 
                </div>
 
            </div>
 
            <div class="search-code-body">
 
                <pre>${h.literal(sr['content_short_hl'])}</pre>
 
            </div>
 
        </div>
 
    </div>
 
    %else:
 
        %if cnt == 0:
 
        <div class="table">
 
            <div id="body${cnt}" class="codeblock">
 
                <div class="error">${_('Permission denied')}</div>
 
            </div>
 
        </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
 
##path search
 

	
 
%for cnt,sr in enumerate(c.formated_results):
 
    %if h.HasRepoPermissionAny('repository.write','repository.read','repository.admin')(sr['repository'],'search results check'):
 
        <div class="search_path">
 
            <div class="link">
 
                ${h.link_to(h.literal('%s &raquo; %s' % (sr['repository'],sr['f_path'])),
 
                    h.url('files_home',repo_name=sr['repository'],revision='tip',f_path=sr['f_path']))}
 
            </div>
 
        </div>
 
    %else:
 
        %if cnt == 0:
 
            <div class="error">
 
                <div class="link">
 
                    ${_('Permission denied')}
 
                </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
0 comments (0 inline, 0 general)