Skip to content

Commit

Permalink
[#1126] Added config for sysadmin area
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmartin committed Jul 31, 2013
1 parent 3e7f690 commit 7910f78
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ckan/templates/admin/config.html
Expand Up @@ -4,7 +4,9 @@

{% block primary_content_inner %}
<form method='post' action="" class="form-horizontal">
{{ autoform.generate(form_items, data, errors) }}
{% block admin_form %}
{{ autoform.generate(form_items, data, errors) }}
{% endblock %}
<div class="form-actions">
{% set locale = h.dump_json({'content': _('Are you sure you want to reset the config?')}) %}
<a href="{% url_for controller='admin', action='reset_config' %}" class="btn btn-danger pull-left" data-module="confirm-action" data-module-i18n="{{ locale }}">{{ _('Reset') }}</a>
Expand All @@ -20,6 +22,7 @@ <h2 class="module-heading">
{{ _('CKAN config options') }}
</h2>
<div class="module-content">
{% block admin_form_help %}
{% set about_url = h.url_for(controller='home', action='about') %}
{% set home_url = h.url_for(controller='home', action='index') %}
{% set docs_url = "http://docs.ckan.org/en/{0}/theming.html".format(g.ckan_doc_version) %}
Expand All @@ -39,6 +42,7 @@ <h2 class="module-heading">
the templates more fully we recommend
<a href="{{ docs_url }}" target="_blank">reading the documentation</a>.</p>
{% endtrans %}
{% endblock %}
</div>
</div>
{% endblock %}
19 changes: 19 additions & 0 deletions ckanext/homepage/theme/templates/admin/config.html
@@ -0,0 +1,19 @@
{% ckan_extends %}

{% import 'macros/form.html' as form %}

{% block admin_form %}
{{ super() }}
{{ form.select('homepage_layout', label=_('Homepage'), options=[
{'value': 1, 'text': 'Introductory area, search, featured group and featured organization'},
{'value': 2, 'text': 'Search, featured dataset, stats and featured organization'}
], selected=1, error=false) }}
{% endblock %}

{% block admin_form_help %}
{{ super() }}
{% trans %}
<p><strong>Homepage:</strong> This is for choosing a predefined layout for
the modules that appear on your homepage.</p>
{% endtrans %}
{% endblock %}

0 comments on commit 7910f78

Please sign in to comment.