## DATA TABLE RE USABLE ELEMENTS ## usage: ## <%namespace name="dt" file="/data_table/_dt_elements.html"/> <%def name="quick_menu(repo_name)"> <%def name="repo_name(name,rtype,private,fork_of,short_name=False,admin=False)"> <% def get_name(name,short_name=short_name): if short_name: return name.split('/')[-1] else: return name %>
##TYPE OF REPO %if h.is_hg(rtype): ${_('Mercurial repository')} %elif h.is_git(rtype): ${_('Git repository')} %endif ##PRIVATE/PUBLIC %if private and c.visual.show_private_icon: ${_('private repository')} %elif not private and c.visual.show_public_icon: ${_('public repository')} %endif ##NAME %if admin: ${h.link_to(get_name(name),h.url('edit_repo',repo_name=name),class_="repo_name")} %else: ${h.link_to(get_name(name),h.url('summary_home',repo_name=name),class_="repo_name")} %endif %if fork_of: ${_('fork')} %endif
<%def name="last_change(last_change)"> ${h.age(last_change)} <%def name="revision(name,rev,tip,author,last_msg)">
%if rev >= 0:
${'r%s:%s' % (rev,h.short_id(tip))}
%else: ${_('No changesets yet')} %endif
<%def name="rss(name)"> %if c.rhodecode_user.username != 'default': %else: %endif <%def name="atom(name)"> %if c.rhodecode_user.username != 'default': %else: %endif <%def name="user_gravatar(email, size=24)">
gravatar
<%def name="repo_actions(repo_name, super_user=True)">
${h.submit('edit_%s' % repo_name,_('edit'),class_="edit_icon action_button")}
${h.form(h.url('repo', repo_name=repo_name),method='delete')} ${h.submit('remove_%s' % repo_name,_('delete'),class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this repository: %s') % repo_name+"');")} ${h.end_form()}
<%def name="user_actions(user_id, username)"> ${h.form(h.url('delete_user', id=user_id),method='delete')} ${h.submit('remove_',_('delete'),id="remove_user_%s" % user_id, class_="delete_icon action_button",onclick="return confirm('"+_('Confirm to delete this user: %s') % username+"');")} ${h.end_form()} <%def name="user_name(user_id, username)"> ${h.link_to(username,h.url('edit_user', id=user_id))} <%def name="toggle_follow(repo_id)">