{% extends "admin/_base.html" %} {%- block subtitle -%} {{ ui.subtitle_item(_('Config')) }} {{- super() }} {%- endblock %} {%- block breadcrumb_content -%} {{ super() }} {{ ui.breadcrumb(_("Config"), h.url_for("admin.config")) }} {%- endblock %} {%- block primary_content_inner -%} {% set modal_id = ui.util.id() %} {{ ui.heading(_("Configuration", level=2)) }} {{ ui.form_errors(error_summary) }} {%- call ui.util.call(ui.form, method="POST", enctype="multipart/form-data") -%} {%- block admin_form -%} {{ ui.input(id='field-ckan-site-title', label=_('Site Title'), name='ckan.site_title', value=data['ckan.site_title'], errors=errors["ckan.site_title"]) }} {{ ui.input(id='field-theme', label=_('Custom Stylesheet'), name='ckan.theme', value=data['ckan.theme'], errors=errors['ckan.theme']) }} {{ ui.input(id='field-ckan-site-description', label=_('Site Tag Line'), name='ckan.site_description', value=data['ckan.site_description'], errors=errors['ckan.site_description']) }} {{ ui.markdown(id='field-ckan-site-about', label=_('About'), name='ckan.site_about', value=data['ckan.site_about'], errors=errors['ckan.site_about'], placeholder=_('About page text')) }} {{ ui.markdown(id='field-ckan-site-intro-text', label=_('Intro Text'), name='ckan.site_intro_text', value=data['ckan.site_intro_text'], errors=errors['ckan.site_intro_text'], placeholder=_('Text on home page')) }} {{ ui.textarea(id='field-ckan-site-custom-css', label=_('Custom CSS'), name='ckan.site_custom_css', value=data['ckan.site_custom_css'], errors=errors['ckan.site_custom_css'], placeholder=_('Customisable css inserted into the page header')) }} {{ ui.input(label="Site logo URL", name="ckan.site_logo", value=data["ckan.site_logo"], errors=errors["ckan.site_logo"], attrs={"onchange": "this.form['logo_upload'].value = '';"}) }} {{ ui.input(label="Site logo upload", name="logo_upload", type="file", value=data["logo_upload"], errors=errors["logo_upload"], attrs={"onchange": "this.form['ckan.site_logo'].value = '';"}) }} {%- endblock %} {%- call ui.util.call(ui.form_actions) -%} {{ ui.modal_handle(_('Reset'), id=modal_id) }} {{ ui.submit(_('Update Config'), name="save") }} {%- endcall %} {%- endcall %} {%- with form_id = ui.util.id() -%} {{ ui.form(method="POST", action=h.url_for('admin.reset_config'), attrs={"id": form_id}) }} {%- call ui.util.call(ui.confirm_modal, id=modal_id, form_id=form_id) -%} {{ _('Are you sure you want to reset the config?') }} {%- endcall %} {%- endwith %} {%- endblock %} {%- block secondary_content -%} {%- call ui.util.call(ui.sidebar_section, title=_("CKAN config options")) -%} {% block admin_form_help %} {{ ui.definition_list([ [_("Site Title"), _("This is the title of this CKAN instance. It appears in various places throughout CKAN.")], [_("Custom Stylesheet"), _("Define an alternative main CSS file.")], [_("Site Tag Logo"), _("This is the logo that appears in the header of all the CKAN instance templates.")], [_("About"), _("This text will appear on this CKAN instances about page.")], [_("Intro Text"), _("This text will appear on this CKAN instances home page as a welcome to visitors.")], [_("Custom CSS"), _("This is a block of CSS that appears on every page. If you wish to customize the templates more fully we recommend reading the documentation.")], ]) }} {% endblock %} {%- endcall %} {%- endblock %}