## -*- coding: utf-8 -*- <%namespace name="base" file="/base/base.mako"/>

${_('Settings for Repository: %s') % c.rhodecode_db_repo.repo_name}

${h.secure_form(h.route_path('edit_repo', repo_name=c.rhodecode_db_repo.repo_name), request=request)}
${c.form['repo_name'].render(css_class='medium', oid='repo_name')|n} ${c.form.render_error(request, c.form['repo_name'])|n}

${_('permalink id')}: `_${c.rhodecode_db_repo.repo_id}` ${_('what is that ?')}

${c.form['repo_group'].render(css_class='medium', oid='repo_group')|n} ${c.form.render_error(request, c.form['repo_group'])|n} % if c.personal_repo_group: ${_('Select my personal group (`%(repo_group_name)s`)') % {'repo_group_name': c.personal_repo_group.group_name}} % endif

${_('Optional select a group to put this repository into.')}

% if c.rhodecode_db_repo.repo_type != 'svn': <% sync_link = h.literal(h.link_to('remote sync', h.route_path('edit_repo_remote', repo_name=c.repo_name))) %>
%if c.rhodecode_db_repo.clone_uri: ## display, if we don't have any errors % if not c.form['repo_clone_uri'].error:
${c.rhodecode_db_repo.clone_uri_hidden} ${_('edit')}
% endif ## alter field
${c.form['repo_clone_uri'].render(css_class='medium', oid='clone_uri', placeholder=_('enter new value, or leave empty to remove'))|n} ${c.form.render_error(request, c.form['repo_clone_uri'])|n} % if c.form['repo_clone_uri'].error: ## we got error from form subit, means we modify the url ${h.hidden('repo_clone_uri_change', 'MOD')} % else: ${h.hidden('repo_clone_uri_change', 'OLD')} % endif % if not c.form['repo_clone_uri'].error: ${_('cancel')} % endif
%else: ## not set yet, display form to set it ${c.form['repo_clone_uri'].render(css_class='medium', oid='clone_uri')|n} ${c.form.render_error(request, c.form['repo_clone_uri'])|n} ${h.hidden('repo_clone_uri_change', 'NEW')} %endif

${_('http[s] url where from repository was imported. This field can used for doing {sync_link}.').format(sync_link=sync_link)|n}
${_('This field is stored encrypted inside Database, a format of http://user:password@server.com/repo_name can be used and will be hidden from display.')}

%if c.rhodecode_db_repo.push_uri: ## display, if we don't have any errors % if not c.form['repo_push_uri'].error:
${c.rhodecode_db_repo.push_uri_hidden} ${_('edit')}
% endif ## alter field
${c.form['repo_push_uri'].render(css_class='medium', oid='push_uri', placeholder=_('enter new value, or leave empty to remove'))|n} ${c.form.render_error(request, c.form['repo_push_uri'])|n} % if c.form['repo_push_uri'].error: ## we got error from form subit, means we modify the url ${h.hidden('repo_push_uri_change', 'MOD')} % else: ${h.hidden('repo_push_uri_change', 'OLD')} % endif % if not c.form['repo_push_uri'].error: ${_('cancel')} % endif
%else: ## not set yet, display form to set it ${c.form['repo_push_uri'].render(css_class='medium', oid='push_uri')|n} ${c.form.render_error(request, c.form['repo_push_uri'])|n} ${h.hidden('repo_push_uri_change', 'NEW')} %endif

${_('http[s] url to sync data back. This field can used for doing {sync_link}.').format(sync_link=sync_link)|n}
${_('This field is stored encrypted inside Database, a format of http://user:password@server.com/repo_name can be used and will be hidden from display.')}

% else: ${h.hidden('repo_clone_uri', '')} ${h.hidden('repo_push_uri', '')} % endif
${c.form['repo_landing_commit_ref'].render(css_class='medium', oid='repo_landing_commit_ref')|n} ${c.form.render_error(request, c.form['repo_landing_commit_ref'])|n}

${_('The default commit for file pages, downloads, full text search index, and README generation.')}

${base.gravatar(c.rhodecode_db_repo.user.email or c.rhodecode_db_repo.user.username, user=c.rhodecode_db_repo.user, tooltip=True)}
${c.form['repo_owner'].render(css_class='medium', oid='repo_owner')|n}
${c.form.render_error(request, c.form['repo_owner'])|n}

${_('Change owner of this repository.')}

${c.form['repo_description'].render(css_class='medium', oid='repo_description')|n} ${c.form.render_error(request, c.form['repo_description'])|n} <% metatags_url = h.literal('''meta-tags''') %> % if c.visual.stylify_metatags: ${_('Plain text format with {metatags} support.').format(metatags=metatags_url)|n} % else: ${_('Plain text format.')} % endif ${_('Add a README file for longer descriptions')}
${c.form['repo_private'].render(css_class='medium')|n} ${c.form.render_error(request, c.form['repo_private'])|n} ${_('Private repositories are only visible to people explicitly added as collaborators.')}
${c.form['repo_enable_statistics'].render(css_class='medium')|n} ${c.form.render_error(request, c.form['repo_enable_statistics'])|n} ${_('Enable statistics window on summary page.')}
${c.form['repo_enable_downloads'].render(css_class='medium')|n} ${c.form.render_error(request, c.form['repo_enable_downloads'])|n} ${_('Enable download menu on summary page.')}
${c.form['repo_enable_locking'].render(css_class='medium')|n} ${c.form.render_error(request, c.form['repo_enable_locking'])|n} ${_('Enable automatic locking on repository. Pulling from this repository creates a lock that can be released by pushing back by the same user')}
%if c.visual.repository_fields: ## EXTRA FIELDS %for field in c.repo_fields:
${h.text(field.field_key_prefixed, field.field_value, class_='medium')} key: ${field.field_key}; ${field.field_desc}
%endfor %endif
${h.submit('save',_('Save'),class_="btn")} ${h.reset('reset',_('Reset'),class_="btn")}
${h.end_form()}