Ejemplo n.º 1
0
def breadcrumbs(page):
    from adhocracy.lib.helpers import base_url
    bc = _url.root()
    bc += _url.link(_("Norms"), base_url(u'/page'))
    if page is not None:
        bc += entity_bc(page)
    return bc
Ejemplo n.º 2
0
def breadcrumbs(category):
    from adhocracy.lib.helpers import base_url
    bc = _url.root()
    bc += _url.link(_("Categories"), base_url(u'/category'))
    if category is not None:
        bc += bc_entity(category)
    return bc
Ejemplo n.º 3
0
def breadcrumbs(category):
    from adhocracy.lib.helpers import base_url
    bc = _url.root()
    bc += _url.link(_("Categories"), base_url(u'/category'))
    if category is not None:
        bc += bc_entity(category)
    return bc
Ejemplo n.º 4
0
def breadcrumbs(selection):
    bc = _url.root()
    if selection is not None:
        bc = bc_entity(selection)
    else:
        bc += _("Implementation")
    return bc
Ejemplo n.º 5
0
def breadcrumbs(user, dashboard=False):
    from adhocracy.lib.helpers import base_url
    items = []
    if c.instance is not None:
        items.append(_url.link(_("Members"), base_url(u'/user')))
    elif has('user.index_all'):
        items.append(_url.link(_("Members"), base_url(u'/user/all')))
    if user is not None:
        items.append(_url.link(user.name, url(user)))
    if dashboard:
        items.append(_url.link(_('Dashboard'), base_url('/user/dashboard')))
    return _url.root() + _url.BREAD_SEP.join(items)
Ejemplo n.º 6
0
def breadcrumbs(user, dashboard=False):
    from adhocracy.lib.helpers import base_url
    items = []
    if c.instance is not None:
        items.append(_url.link(_("Members"), base_url(u'/user')))
    elif has('user.index_all'):
        items.append(_url.link(_("Members"), base_url(u'/user/all')))
    if user is not None:
        items.append(_url.link(user.name, url(user)))
    if dashboard:
        items.append(_url.link(_('Dashboard'), base_url('/user/dashboard')))
    return _url.root() + _url.BREAD_SEP.join(items)
Ejemplo n.º 7
0
def breadcrumbs(proposal):
    from adhocracy.lib.helpers import base_url
    bc = _url.root()
    if c.instance.show_proposals_navigation:
        bc += _url.link(_("Proposals"), base_url(u'/proposal'))
    elif c.instance.display_category_pages:
        bc += _url.link(_("Categories"), base_url(u'/category'))

        if proposal is not None and proposal.category is not None:
            bc += bc_category(proposal.category)
    else:
        # FIXME this case will produce a double BREAD_SEP
        pass
    if proposal is not None:
        bc += bc_entity(proposal)
    return bc
Ejemplo n.º 8
0
def breadcrumbs(proposal):
    from adhocracy.lib.helpers import base_url
    bc = _url.root()
    if c.instance.show_proposals_navigation:
        bc += _url.link(_("Proposals"), base_url(u'/proposal'))
    elif c.instance.display_category_pages:
        bc += _url.link(_("Categories"), base_url(u'/category'))

        if proposal is not None and proposal.category is not None:
            bc += bc_category(proposal.category)
    else:
        # FIXME this case will produce a double BREAD_SEP
        pass
    if proposal is not None:
        bc += bc_entity(proposal)
    return bc
Ejemplo n.º 9
0
def breadcrumbs(proposal):
    bc = _url.root()
    bc += _url.link(_("Proposals"), u'/proposal')
    if proposal is not None:
        bc += bc_entity(proposal)
    return bc
Ejemplo n.º 10
0
def breadcrumbs(milestone):
    bc = _url.root()
    bc += _url.link(_("Milestones"), u'/milestone')
    if milestone is not None:
        bc += bc_entity(milestone)
    return bc
Ejemplo n.º 11
0
def breadcrumbs(tag):
    bc = _url.root()
    bc += _url.link(_("Tags"), u'/tag')
    if tag is not None:
        bc += bc_entity(tag)
    return bc
Ejemplo n.º 12
0
def breadcrumbs(staticpage):
    return _url.root() + _url.link(staticpage.title, url(staticpage))
Ejemplo n.º 13
0
def breadcrumbs(instance):
    bc = _url.root()
    return bc
Ejemplo n.º 14
0
def breadcrumbs(page):
    bc = _url.root()
    bc += _url.link(_("Documents"), u'/page')
    if page is not None:
        bc += entity_bc(page)
    return bc
Ejemplo n.º 15
0
def breadcrumbs(milestone):
    bc = _url.root()
    bc += _url.link(_("Milestones"), u'/milestone')
    if milestone is not None:
        bc += bc_entity(milestone)
    return bc
Ejemplo n.º 16
0
def breadcrumbs(instance=None):
    bc = _url.root()
    return bc
Ejemplo n.º 17
0
def breadcrumbs(badge=None):
    from adhocracy.lib.helpers import base_url
    items = []
    items.append(_url.link(_("Badges"), base_url(u'/badge')))
    return _url.root() + _url.BREAD_SEP.join(items)
Ejemplo n.º 18
0
def breadcrumbs(badge=None):
    from adhocracy.lib.helpers import base_url
    items = []
    items.append(_url.link(_("Badges"), base_url(u'/badge')))
    return _url.root() + _url.BREAD_SEP.join(items)
Ejemplo n.º 19
0
def breadcrumbs(user):
    bc = _url.root()
    bc += _url.link(_("Users"), u'/user')
    if user is not None:
        bc += bc_entity(user)
    return bc
Ejemplo n.º 20
0
def breadcrumbs(user):
    bc = _url.root()
    bc += _url.link(_("Users"), u'/user')
    if user is not None:
        bc += bc_entity(user)
    return bc
Ejemplo n.º 21
0
def breadcrumbs(page):
    bc = _url.root()
    bc += _url.link(_("Documents"), u'/page')
    if page is not None:
        bc += entity_bc(page)
    return bc
Ejemplo n.º 22
0
def breadcrumbs(proposal):
    bc = _url.root()
    bc += _url.link(_("Proposals"), u'/proposal')
    if proposal is not None:
        bc += bc_entity(proposal)
    return bc
Ejemplo n.º 23
0
def breadcrumbs(tag):
    bc = _url.root()
    bc += _url.link(_("Tags"), u'/tag')
    if tag is not None:
        bc += bc_entity(tag)
    return bc