def prepare_pagination_project(page_indices):
    """ Creates pagination object for project from indices """
    pagination = {}
    pagination['prev'] = ViewUrlGenerator.get_project_all_url(
        page_indices['prev'])
    pagination['current'] = ViewUrlGenerator.get_project_all_url(
        page_indices['current'])
    pagination['next'] = ViewUrlGenerator.get_project_all_url(
        page_indices['next'])

    pagination['pages'] = []
    for index in page_indices['page_indices']:
        pag = {}
        pag['index'] = index
        pag['url'] = ViewUrlGenerator.get_project_all_url(index)
        pag['is_current'] = (index == page_indices['current'])
        pagination['pages'].append(pag)
    return pagination
def prepare_menu_for_html(menu):
    """ Adds default items to menu plus already existing ones """
    menu_items = []

    item_1 = {}
    item_1['name'] = ''
    item_1['icon'] = 'fa fa-home fa-lg'
    item_1['link'] = '/main/view/'

    item_2 = {}
    item_2['name'] = 'Layouts'
    item_2['icon'] = ''
    item_2['link'] = ViewUrlGenerator.get_layout_all_url(1)

    item_3 = {}
    item_3['name'] = 'Projects'
    item_3['icon'] = ''
    item_3['link'] = ViewUrlGenerator.get_project_all_url(1)

    item_4 = {}
    item_4['name'] = 'Workers'
    item_4['icon'] = ''
    item_4['link'] = ViewUrlGenerator.get_worker_all_url(1)

    item_5 = {}
    item_5['name'] = 'Definitions'
    item_5['icon'] = ''
    item_5['link'] = ViewUrlGenerator.get_benchmark_definitions_url(1)

    item_6 = {}
    item_6['name'] = 'Executions'
    item_6['icon'] = ''
    item_6['link'] = ViewUrlGenerator.get_benchmark_executions_quick_url()

    item_7 = {}
    item_7['name'] = 'Notifications'
    item_7['icon'] = ''
    item_7['link'] = ViewUrlGenerator.get_notifications_url()

    menu_items.append(item_1)
    menu_items.append(item_2)
    menu_items.append(item_3)
    menu_items.append(item_4)
    menu_items.append(item_5)
    menu_items.append(item_6)
    menu_items.append(item_7)

    for item in menu:
        menu_items.append(item)

    return menu_items