some documentation, icons

parent 63c58fb2
......@@ -27,3 +27,56 @@ Lists of endpoints and assorted scans on these endpoints.
All data in the scanners section of the admin interface is auto-generated. Changing data here makes no sense as it will
be overwritten by a scanner.
## Configuration in the Admin interface
### Common Configurations
... todo ...
### Map / Site Configurations
The map can be configured to show a number of countries and organization types, with a default first view.
All of this is done in the admin interface under:
> Map > Configurations
Below is a sample configuration that can help you getting started. Loading failmap for the first time, this sample
configuration is included as a fixture. You can show any number of countries and organization types.
![Configurations](user_guide/configurations.png)
On the above image, you can see the following features:
1: Ordering
Items can be ordered using drag and drop using the dotted area at the beginning of each row.
Ordering is used to display menu items in a certain order. In the above example the menu will be rendered as:
NL, DE, and the organization types will render as: Municipality, Province for NL, and bundesland for Germany.
In case there is only one country, the country navigation bar will not be shown.
In case there is only one organization_type for a country, the category navigation bar will not be shown.
In the example above no menu will be displayed at all, as there is nothing to navigate to.
2: is_displayed
Determines if a country/organization_type is displayed in the navigation.
3: is_the_default_option
There can be only one default option. If you select multiple, the first one is chosen. The default
is loaded when opening the website for the first time.
4: is_scanned
Todo: Determines if the country/organization_type will be scanned with scanners.
5: buttons
Using the buttons it's possible to easily enable / disable each option without going into details.
Results are effective immediately on development and after cache has expired on public sites.
......@@ -101,7 +101,7 @@ class ConfigurationAdmin(SortableAdminMixin, ImportExportModelAdmin, admin.Model
configuration.is_displayed = True
configuration.save()
display.short_description = ' Display'
display.short_description = '☀️ Display'
actions.append(display)
def hide(self, request, queryset):
......@@ -110,7 +110,7 @@ class ConfigurationAdmin(SortableAdminMixin, ImportExportModelAdmin, admin.Model
configuration.is_displayed = False
configuration.save()
hide.short_description = ' Hide'
hide.short_description = '🌑 Hide'
actions.append(hide)
def allow_scanning(self, request, queryset):
......@@ -119,7 +119,7 @@ class ConfigurationAdmin(SortableAdminMixin, ImportExportModelAdmin, admin.Model
configuration.is_scanned = True
configuration.save()
allow_scanning.short_description = ' Allow scanning'
allow_scanning.short_description = '❤️ Allow scanning'
actions.append(allow_scanning)
def stop_scanning(self, request, queryset):
......@@ -128,26 +128,26 @@ class ConfigurationAdmin(SortableAdminMixin, ImportExportModelAdmin, admin.Model
configuration.is_scanned = False
configuration.save()
stop_scanning.short_description = ' Stop scanning'
stop_scanning.short_description = '💔 Stop scanning'
actions.append(stop_scanning)
def remove_default(self, request, queryset):
def set_default(self, request, queryset):
for configuration in queryset:
configuration.is_the_default_option = False
configuration.is_the_default_option = True
configuration.save()
remove_default.short_description = ' Remove default'
actions.append(remove_default)
set_default.short_description = '😀 Set default'
actions.append(set_default)
def set_default(self, request, queryset):
def remove_default(self, request, queryset):
for configuration in queryset:
configuration.is_the_default_option = True
configuration.is_the_default_option = False
configuration.save()
set_default.short_description = ' Set default'
actions.append(set_default)
remove_default.short_description = '😭 Remove default'
actions.append(remove_default)
admin.site.register(Configuration, ConfigurationAdmin)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment