## DATA TABLE RE USABLE ELEMENTS
## usage:
## <%namespace name="dt" file="/data_table/_dt_elements.html"/>
<%def name="repo_actions(repo_name)">
${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="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):
![${_('Mercurial repository')} ${_('Mercurial repository')}](${h.url('/images/icons/hgicon.png')})
%elif h.is_git(rtype):
![${_('Git repository')} ${_('Git repository')}](${h.url('/images/icons/giticon.png')})
%endif
##PRIVATE/PUBLIC
%if private and c.visual.show_private_icon:
![${_('private repository')} ${_('private repository')}](${h.url('/images/icons/lock.png')})
%elif not private and c.visual.show_public_icon:
![${_('public repository')} ${_('public repository')}](${h.url('/images/icons/lock_open.png')})
%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 of')} ${fork_of.repo_name} ${_('fork')}](${h.url('/images/icons/arrow_divide.png')})
%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="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>