## DATA TABLE RE USABLE ELEMENTS
## usage:
## <%namespace name="dt" file="/data_table/_dt_elements.html"/>
<%def name="quick_menu(repo_name)">
%def>
<%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):
%elif h.is_git(rtype):
%endif
##PRIVATE/PUBLIC
%if private and c.visual.show_private_icon:
%elif not private and c.visual.show_public_icon:
%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:
%endif
%def>
<%def name="last_change(last_change)">
${h.age(last_change)}
%def>
<%def name="revision(name,rev,tip,author,last_msg)">
%def>
<%def name="rss(name)">
%if c.rhodecode_user.username != 'default':
%else:
%endif
%def>
<%def name="atom(name)">
%if c.rhodecode_user.username != 'default':
%else:
%endif
%def>
<%def name="user_gravatar(email, size=24)">
%def>
<%def name="repo_actions(repo_name, super_user=True)">
${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>
<%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>
<%def name="user_name(user_id, username)">
${h.link_to(username,h.url('edit_user', id=user_id))}
%def>
<%def name="toggle_follow(repo_id)">
%def>