{% extends 'layout_repo.html' %} {% from 'include/panel.html' import panel %} {% from 'include/modal_dialog.html' import modal_dialog, button_confirm, modal_confirm %} {% from 'include/widget.html' import maxage_dropdown, encoding_dropdown %} {% set active_page='repo' %} {% set active_repo_page='settings' %} {% block title %} {% trans %}Settings{% endtrans %} {% endblock %} {% block content %} {% macro encoding_dropdown(value=-1) -%} {% set encodings = ['utf-8', 'ascii', 'big5', 'big5hkscs', 'cp037', 'cp424', 'cp437', 'cp500', 'cp720', 'cp737', 'cp775', 'cp850', 'cp852', 'cp855', 'cp856', 'cp857', 'cp858', 'cp860', 'cp861', 'cp862', 'cp863', 'cp864', 'cp865', 'cp866', 'cp869', 'cp874', 'cp875', 'cp932', 'cp949', 'cp950', 'cp1006', 'cp1026', 'cp1140', 'cp1250', 'cp1251', 'cp1252', 'cp1253', 'cp1254', 'cp1255', 'cp1256', 'cp1257', 'cp1258', 'euc_jp', 'euc_jis_2004', 'euc_jisx0213', 'euc_kr', 'gb2312', 'gbk', 'gb18030', 'hz', 'iso2022_jp', 'iso2022_jp_1', 'iso2022_jp_2', 'iso2022_jp_2004', 'iso2022_jp_3', 'iso2022_jp_ext', 'iso2022_kr', 'iso8859-1', 'iso8859-2', 'iso8859-3', 'iso8859-4', 'iso8859-5', 'iso8859-6', 'iso8859-7', 'iso8859-8', 'iso8859-9', 'iso8859-10', 'iso8859-13', 'iso8859-14', 'iso8859-15', 'iso8859-16', 'johab', 'koi8-r', 'koi8-u', 'mac-cyrillic', 'mac-greek', 'mac-iceland', 'mac-latin2', 'mac-roman', 'mac-turkish', 'ptcp154', 'shift_jis', 'shift_jis_2004', 'shift_jisx0213', 'utf-32', 'utf-32-be', 'utf-32-le', 'utf-16', 'utf-16-be', 'utf-16-le', 'utf-7', 'utf-8-sig'] %} {%- endmacro %} {% call panel(title=_("Character encoding"), description='This value may need to be changed if your files are not displayed with the right characters. This is very common for non-english speaker.', class="default") %}
{{ encoding_dropdown(class="form-control", name="new_encoding", id="new_encoding", value=repo.encoding) }}
{% endcall %} {% call panel(title=_("Remove older"), description=_('You can parameterize the storage time of earlier versions for each repository. Changing this value may free up disk space.'), class="default") %}
{% if not is_maintainer %} {% trans %}Ask your administrator to change this setting.{% endtrans %} {% endif %}
{% endcall %} {% call panel(title=_("Notification"), description=_('An email notification will be sent if backup is inactive for the given period of time.'), class="default") %}
{{ maxage_dropdown(class="form-control", name="maxage", value=repo.maxage)}}
{% endcall %} {% call panel(title=_("Delete repository"), description=_('Deleting the repository will permanently delete all related resources including files, history, status etc.'), class="danger") %}
{% trans %}Deleted repository cannot be restored!{% endtrans %}
{{ button_confirm(label=_('Delete'), target="#delete-repo-modal", disabled=not is_maintainer, redirect=url_for('/'), url=url_for('delete', repo)) }}
{% if not is_maintainer %} {% trans %}Ask your administrator if you want to delete this repository.{% endtrans %} {% endif %}
{% endcall %} {{ modal_confirm( id="delete-repo-modal", title=_('Confirmation required'), message=_("You are about to permanently delete this repository. Deleted repository CANNOT be restored! Are you ABSOLUTELY sure?"), fields=['action'], submit=_('Delete'), confirm_value=repo.display_name) }} {% endblock %}