def vacancies_and_studentships(context,
                               heading=3,
                               format=0,
                               max_items=20,
                               entity=None):
    """
    Depends on Cardiff's row/column CSS
    Publishes a date-ordered list of vacancies and studentships
    {% vacancies_and_studentships format max_items %}
    """
    instance = VacanciesPlugin()

    if not entity:
        entity = work_out_entity(context, entity)

    instance.entity = entity
    instance.heading_level = heading
    instance.display = 0
    instance.limit_to = max_items
    instance.format = format

    nep = CMSVacanciesPlugin()

    nep.render(context, instance, None)

    return context
    """
Exemplo n.º 2
0
def common_settings(request, slug):
    # general values - entity, request, template
    entity = Entity.objects.get(slug=slug) or default_entity
    request.current_page = entity.get_website() # for the menu, so it knows where we are
    context = RequestContext(request)
    instance = VacanciesPlugin()
    instance.limit_to = MAIN_NEWS_EVENTS_PAGE_LIST_LENGTH
    instance.default_limit = MAIN_NEWS_EVENTS_PAGE_LIST_LENGTH
    instance.entity = entity
    instance.heading_level = IN_BODY_HEADING_LEVEL
    instance.display = "vacancies-and-studentships"
    instance.format = "details image"
    instance.layout = layout
    instance.view = "current"
    return instance, context, entity
def vacancies_and_studentships(context, heading=3, format=0, max_items=20, entity=None):
    """
    Depends on Cardiff's row/column CSS
    Publishes a date-ordered list of vacancies and studentships
    {% vacancies_and_studentships format max_items %}
    """        
    instance = VacanciesPlugin()
        
    if not entity:
        entity = work_out_entity(context, entity)
    
    instance.entity = entity
    instance.heading_level = heading
    instance.display = 0
    instance.limit_to = max_items
    instance.format = format
    
    nep = CMSVacanciesPlugin()
    
    nep.render(context, instance, None)
    
    return context
    """