<%namespace name="dt" file="/data_table/_dt_elements.mako"/> <%def name="form_item(position=None, title=None, redirect_url=None, repo=None, repo_group=None)">
${h.hidden('cur_position', position)}
${h.checkbox('remove', value=True)}

${_('Server URL is available as ${server_url} variable. E.g. Redirect url: ${server_url}/_admin/exception_tracker')}

% if repo: ${dt.repo_name(name=repo.repo_name, rtype=repo.repo_type,rstate=None,private=None,archived=False, fork_repo_name=None)} ${h.hidden('bookmark_repo', repo.repo_id)} % elif repo_group: ${dt.repo_group_name(repo_group.group_name)} ${h.hidden('bookmark_repo_group', repo_group.group_id)} % else:
${h.hidden('bookmark_repo', class_='bookmark_repo')}

${_('Available as ${repo_url} e.g. Redirect url: ${repo_url}/changelog')}

${h.hidden('bookmark_repo_group', class_='bookmark_repo_group')}

${_('Available as ${repo_group_url} e.g. Redirect url: ${repo_group_url}')}

% endif

${_('Your Bookmarks')}

${_('Store upto 10 bookmark links to favorite repositories, external issue tracker or CI server. ')}
${_('Bookmarks are accessible from your username dropdown or by keyboard shortcut `g 0-9`')}

${h.secure_form(h.route_path('my_account_bookmarks_update'), request=request)}
## generate always 10 entries % for item in (c.bookmark_items + [None for i in range(10)])[:10]: % if item is None: ## empty placehodlder ${form_item()} % else: ## actual entry ${form_item(position=item.position, title=item.title, redirect_url=item.redirect_url, repo=item.repository, repo_group=item.repository_group)} % endif % endfor
${h.submit('save',_('Save'),class_="btn")}
${h.end_form()}