user_edit_my_account.html
187 lines
| 6.7 KiB
| text/html
|
HtmlLexer
r547 | ## -*- coding: utf-8 -*- | ||
<%inherit file="/base/base.html"/> | |||
<%def name="title()"> | |||
r619 | ${_('My account')} ${c.rhodecode_user.username} - ${c.rhodecode_name} | ||
r547 | </%def> | ||
<%def name="breadcrumbs_links()"> | |||
${_('My Account')} | |||
</%def> | |||
<%def name="page_nav()"> | |||
${self.menu('admin')} | |||
</%def> | |||
<%def name="main()"> | |||
<div class="box box-left"> | |||
<!-- box / title --> | |||
<div class="title"> | |||
${self.breadcrumbs()} | |||
</div> | |||
<!-- end box / title --> | |||
<div class="ui-tabs-panel ui-widget-content ui-corner-bottom"> | |||
${h.form(url('admin_settings_my_account_update'),method='put')} | |||
<div class="form"> | |||
<div class="fields"> | |||
<div class="field"> | |||
<div class="label"> | |||
<label for="username">${_('Username')}:</label> | |||
</div> | |||
<div class="input"> | |||
${h.text('username')} | |||
</div> | |||
</div> | |||
<div class="field"> | |||
<div class="label"> | |||
<label for="new_password">${_('New password')}:</label> | |||
</div> | |||
<div class="input"> | |||
${h.password('new_password')} | |||
</div> | |||
</div> | |||
<div class="field"> | |||
<div class="label"> | |||
r697 | <label for="name">${_('First Name')}:</label> | ||
r547 | </div> | ||
<div class="input"> | |||
${h.text('name')} | |||
</div> | |||
</div> | |||
<div class="field"> | |||
<div class="label"> | |||
r697 | <label for="lastname">${_('Last Name')}:</label> | ||
r547 | </div> | ||
<div class="input"> | |||
${h.text('lastname')} | |||
</div> | |||
</div> | |||
<div class="field"> | |||
<div class="label"> | |||
<label for="email">${_('Email')}:</label> | |||
</div> | |||
<div class="input"> | |||
${h.text('email')} | |||
</div> | |||
</div> | |||
<div class="buttons"> | |||
${h.submit('save','save',class_="ui-button ui-widget ui-state-default ui-corner-all")} | |||
</div> | |||
</div> | |||
</div> | |||
${h.end_form()} | |||
</div> | |||
</div> | |||
<div class="box box-right"> | |||
<!-- box / title --> | |||
<div class="title"> | |||
r647 | <h5>${_('My repositories')} | ||
<input class="top-right-rounded-corner top-left-rounded-corner bottom-left-rounded-corner bottom-right-rounded-corner" id="q_filter" size="15" type="text" name="filter" value="${_('quick filter...')}"/> | |||
</h5> | |||
r547 | </div> | ||
<!-- end box / title --> | |||
<div class="table"> | |||
<table> | |||
r663 | <thead> | ||
<tr> | |||
<th class="left">${_('Name')}</th> | |||
<th class="left">${_('revision')}</th> | |||
<th colspan="2" class="left">${_('action')}</th> | |||
</thead> | |||
r547 | <tbody> | ||
%if c.user_repos: | |||
%for repo in c.user_repos: | |||
<tr> | |||
<td> | |||
r665 | %if repo['repo'].dbrepo.repo_type =='hg': | ||
r647 | <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="/images/icons/hgicon.png"/> | ||
r665 | %elif repo['repo'].dbrepo.repo_type =='git': | ||
r647 | <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="/images/icons/giticon.png"/> | ||
%else: | |||
%endif | |||
r665 | %if repo['repo'].dbrepo.private: | ||
r547 | <img class="icon" alt="${_('private')}" src="/images/icons/lock.png"/> | ||
%else: | |||
<img class="icon" alt="${_('public')}" src="/images/icons/lock_open.png"/> | |||
%endif | |||
r665 | ${h.link_to(repo['repo'].name, h.url('summary_home',repo_name=repo['repo'].name),class_="repo_name")} | ||
%if repo['repo'].dbrepo.fork: | |||
<a href="${h.url('summary_home',repo_name=repo['repo'].dbrepo.fork.repo_name)}"> | |||
r547 | <img class="icon" alt="${_('public')}" | ||
r665 | title="${_('Fork of')} ${repo['repo'].dbrepo.fork.repo_name}" | ||
r547 | src="/images/icons/arrow_divide.png"/></a> | ||
%endif | |||
</td> | |||
r665 | <td><span class="tooltip" tooltip_title="${repo['repo'].last_change}">${("r%s:%s") % (h.get_changeset_safe(repo['repo'],'tip').revision,h.short_id(h.get_changeset_safe(repo['repo'],'tip').raw_id))}</span></td> | ||
<td><a href="${h.url('repo_settings_home',repo_name=repo['repo'].name)}" title="${_('edit')}"><img class="icon" alt="${_('private')}" src="/images/icons/application_form_edit.png"/></a></td> | |||
r547 | <td> | ||
r665 | ${h.form(url('repo_settings_delete', repo_name=repo['repo'].name),method='delete')} | ||
${h.submit('remove_%s' % repo['repo'].name,'',class_="delete_icon action_button",onclick="return confirm('Confirm to delete this repository');")} | |||
r547 | ${h.end_form()} | ||
</td> | |||
</tr> | |||
%endfor | |||
%else: | |||
${_('No repositories yet')} | |||
%if h.HasPermissionAny('hg.admin','hg.create.repository')(): | |||
${h.link_to(_('create one now'),h.url('admin_settings_create_repository'))} | |||
%endif | |||
%endif | |||
</tbody> | |||
</table> | |||
</div> | |||
</div> | |||
r647 | <script type="text/javascript"> | ||
var D = YAHOO.util.Dom; | |||
var E = YAHOO.util.Event; | |||
var S = YAHOO.util.Selector; | |||
var q_filter = D.get('q_filter'); | |||
var F = YAHOO.namespace('q_filter'); | |||
E.on(q_filter,'click',function(){ | |||
q_filter.value = ''; | |||
}); | |||
F.filterTimeout = null; | |||
F.updateFilter = function() { | |||
// Reset timeout | |||
F.filterTimeout = null; | |||
var obsolete = []; | |||
var nodes = S.query('div.table tr td a.repo_name'); | |||
var req = D.get('q_filter').value; | |||
for (n in nodes){ | |||
D.setStyle(nodes[n].parentNode.parentNode,'display','') | |||
} | |||
if (req){ | |||
for (n in nodes){ | |||
if (nodes[n].innerHTML.toLowerCase().indexOf(req) == -1) { | |||
obsolete.push(nodes[n]); | |||
} | |||
} | |||
if(obsolete){ | |||
for (n in obsolete){ | |||
D.setStyle(obsolete[n].parentNode.parentNode,'display','none'); | |||
} | |||
} | |||
} | |||
} | |||
E.on(q_filter,'keyup',function(e){ | |||
clearTimeout(F.filterTimeout); | |||
setTimeout(F.updateFilter,600); | |||
}); | |||
</script> | |||
r547 | </%def> |