admin

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 6, 2026 License: MIT Imports: 44 Imported by: 0

Documentation

Index

Constants

View Source
const CommentsPerPage = 25

CommentsPerPage - comments on a page of the comments list.

View Source
const ContentPerPage = 25

ContentPerPage - content items on a page of the content and moderation lists.

View Source
const PeoplePerPage = 25

PeoplePerPage - accounts on a page of the people list.

View Source
const RedirectsPerPage = 50

RedirectsPerPage - redirects on a page of the list.

View Source
const URLAliasesPerPage = 50

URLAliasesPerPage - the addresses a page of the list shows.

View Source
const UserFilesPerPage = 50

UserFilesPerPage - users per page on /admin/content/files.

View Source
const ViewsPerPage = 25

ViewsPerPage - page size of the Views list, like ContentPerPage/PeoplePerPage (admin/content_list.go, admin/people.go).

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	*interfaces.BaseController
	// contains filtered or unexported fields
}

Controller serves the admin's pages.

func NewController

func NewController(deps interfaces.BaseDeps, d Deps) *Controller

NewController creates the admin's Controller on deps and d.

func (*Controller) AccountSettingsPage

func (c *Controller) AccountSettingsPage(w http.ResponseWriter, r *http.Request)

AccountSettingsPage GET/POST /admin/config/account

func (*Controller) AppearanceCatalog

func (c *Controller) AppearanceCatalog(w http.ResponseWriter, r *http.Request)

AppearanceCatalog handles GET /admin/config/appearance/catalog: the themes' catalog (themes_catalog_url, themes.CatalogService) - each theme with what installs it (app theme add; the admin doesn't install), ?q= words filtering them.

func (*Controller) AppearancePage

func (c *Controller) AppearancePage(w http.ResponseWriter, r *http.Request)

AppearancePage handles GET/POST /admin/config/appearance: the available themes and the choice of the active one.

func (*Controller) AppearancePreview

func (c *Controller) AppearancePreview(w http.ResponseWriter, r *http.Request)

AppearancePreview handles POST /admin/config/appearance/preview: the site in another theme for this administrator only (their session, middleware.ThemePreviewMiddleware), from the front page. The theme's block layout is set up first, as on the Blocks page.

func (*Controller) AppearancePreviewStop

func (c *Controller) AppearancePreviewStop(w http.ResponseWriter, r *http.Request)

AppearancePreviewStop handles POST /admin/config/appearance/preview/stop: the site in the active theme again.

func (*Controller) AppearanceSettingsSave

func (c *Controller) AppearanceSettingsSave(w http.ResponseWriter, r *http.Request)

AppearanceSettingsSave handles POST /admin/config/appearance/settings: the theme-independent display options.

func (*Controller) AppearanceThemeSettings

func (c *Controller) AppearanceThemeSettings(w http.ResponseWriter, r *http.Request)

AppearanceThemeSettings handles GET/POST /admin/config/appearance/theme/{theme}: the settings a theme offers (theme.yaml), by its placement key. POST "action": "reset" - back to the defaults, "preview" - save and see the inactive theme, else save.

func (*Controller) BlockCreate

func (c *Controller) BlockCreate(w http.ResponseWriter, r *http.Request)

BlockCreate handles POST /admin/config/blocks - a new block starts empty at the end of the theme's default region, visible everywhere; the admin adjusts body, region and visibility afterwards.

func (*Controller) BlockDelete

func (c *Controller) BlockDelete(w http.ResponseWriter, r *http.Request)

BlockDelete handles POST /admin/config/blocks/{id}/delete.

func (*Controller) BlockDeleteConfirm

func (c *Controller) BlockDeleteConfirm(w http.ResponseWriter, r *http.Request)

BlockDeleteConfirm renders GET /admin/config/blocks/{id}/delete.

func (*Controller) BlockEdit

func (c *Controller) BlockEdit(w http.ResponseWriter, r *http.Request)

BlockEdit renders GET /admin/config/blocks/{id}/edit - title, body, published flag and visibility.

func (*Controller) BlockList

func (c *Controller) BlockList(w http.ResponseWriter, r *http.Request)

BlockList renders GET /admin/config/blocks - the block list with a title-only quick-add. Each row's "Region" select moves the block between regions; order within a region is drag-and-drop.

func (*Controller) BlockRegionDemo

func (c *Controller) BlockRegionDemo(w http.ResponseWriter, r *http.Request)

BlockRegionDemo renders GET /admin/config/blocks/demo - the real public layout with every region outlined and labelled "Label (machine_name)" (region_blocks.html's blockDemoMode), so an admin can see where each region sits. Rendered through the public template set (no "admin/" path prefix, see pageFilesToParse) to reuse the public partials unchanged; the admin bar still shows because data["isAdmin"] is true.

func (*Controller) BlockUpdate

func (c *Controller) BlockUpdate(w http.ResponseWriter, r *http.Request)

BlockUpdate handles POST /admin/config/blocks/{id} - title/body/published go to the BlockDef row, visibility (scope + content types) to its placement.

func (*Controller) BlockedBotCreate

func (c *Controller) BlockedBotCreate(w http.ResponseWriter, r *http.Request)

BlockedBotCreate handles POST /admin/config/robots: a User-Agent pattern blocked, with its comment.

func (*Controller) BlockedBotDelete

func (c *Controller) BlockedBotDelete(w http.ResponseWriter, r *http.Request)

BlockedBotDelete handles POST /admin/config/robots/delete/{id}: the User-Agent pattern no longer blocked.

func (*Controller) BlockedBotImport

func (c *Controller) BlockedBotImport(w http.ResponseWriter, r *http.Request)

BlockedBotImport handles POST /admin/config/robots/import: User-Agent patterns blocked, one per line ("#" - a comment line); a duplicate is skipped.

func (*Controller) BlockedBotList

func (c *Controller) BlockedBotList(w http.ResponseWriter, r *http.Request)

BlockedBotList handles GET /admin/config/robots: the blocked User-Agent patterns and IP addresses, their add and import forms, and the site's own robots.txt rules.

func (*Controller) BlockedIPCreate

func (c *Controller) BlockedIPCreate(w http.ResponseWriter, r *http.Request)

BlockedIPCreate handles POST /admin/config/robots/ip: an IP address blocked, with its comment.

func (*Controller) BlockedIPDelete

func (c *Controller) BlockedIPDelete(w http.ResponseWriter, r *http.Request)

BlockedIPDelete handles POST /admin/config/robots/ip/delete/{id}: the IP address no longer blocked.

func (*Controller) BlockedIPImport

func (c *Controller) BlockedIPImport(w http.ResponseWriter, r *http.Request)

BlockedIPImport handles POST /admin/config/robots/ip/import: IP addresses blocked, one per line ("#" - a comment line); a duplicate is skipped.

func (*Controller) BlocksReorder

func (c *Controller) BlocksReorder(w http.ResponseWriter, r *http.Request)

BlocksReorder handles POST /admin/config/blocks/reorder - bulk Region/Weight update from the drag-and-drop list: "order=id1,id2,..." plus "region_<placementID>" per row.

func (*Controller) BreadcrumbRuleCreate

func (c *Controller) BreadcrumbRuleCreate(w http.ResponseWriter, r *http.Request)

BreadcrumbRuleCreate handles POST /admin/config/breadcrumbs; a rule with a field goes on to its edit page to pick the terms.

func (*Controller) BreadcrumbRuleDelete

func (c *Controller) BreadcrumbRuleDelete(w http.ResponseWriter, r *http.Request)

BreadcrumbRuleDelete handles POST /admin/config/breadcrumbs/{id}/delete.

func (*Controller) BreadcrumbRuleDeleteConfirm

func (c *Controller) BreadcrumbRuleDeleteConfirm(w http.ResponseWriter, r *http.Request)

BreadcrumbRuleDeleteConfirm renders GET /admin/config/breadcrumbs/{id}/delete.

func (*Controller) BreadcrumbRuleEdit

func (c *Controller) BreadcrumbRuleEdit(w http.ResponseWriter, r *http.Request)

BreadcrumbRuleEdit renders GET /admin/config/breadcrumbs/{id}/edit.

func (*Controller) BreadcrumbRuleList

func (c *Controller) BreadcrumbRuleList(w http.ResponseWriter, r *http.Request)

BreadcrumbRuleList renders GET /admin/config/breadcrumbs.

func (*Controller) BreadcrumbRuleReorder

func (c *Controller) BreadcrumbRuleReorder(w http.ResponseWriter, r *http.Request)

BreadcrumbRuleReorder handles POST /admin/config/breadcrumbs/reorder - the drag-and-drop order as a CSV of IDs in "order".

func (*Controller) BreadcrumbRuleUpdate

func (c *Controller) BreadcrumbRuleUpdate(w http.ResponseWriter, r *http.Request)

BreadcrumbRuleUpdate handles POST /admin/config/breadcrumbs/{id}.

func (*Controller) BulkConfirmComment

func (c *Controller) BulkConfirmComment(w http.ResponseWriter, r *http.Request)

BulkConfirmComment shows confirmation page for bulk comment actions

func (*Controller) BulkConfirmContent

func (c *Controller) BulkConfirmContent(w http.ResponseWriter, r *http.Request)

BulkConfirmContent shows confirmation page for bulk content actions

func (*Controller) BulkConfirmModeration

func (c *Controller) BulkConfirmModeration(w http.ResponseWriter, r *http.Request)

BulkConfirmModeration shows confirmation for bulk actions from the moderation queue (same API as content).

func (*Controller) BulkConfirmPeople

func (c *Controller) BulkConfirmPeople(w http.ResponseWriter, r *http.Request)

BulkConfirmPeople shows confirmation page for bulk people actions

func (*Controller) BulkExecuteComments

func (c *Controller) BulkExecuteComments(w http.ResponseWriter, r *http.Request)

BulkExecuteComments handles POST /api/admin/bulk/comments

func (*Controller) BulkExecuteContent

func (c *Controller) BulkExecuteContent(w http.ResponseWriter, r *http.Request)

BulkExecuteContent handles POST /api/admin/bulk/content

func (*Controller) BulkExecutePeople

func (c *Controller) BulkExecutePeople(w http.ResponseWriter, r *http.Request)

BulkExecutePeople handles POST /api/admin/bulk/people

func (*Controller) CaptchaPage

func (c *Controller) CaptchaPage(w http.ResponseWriter, r *http.Request)

CaptchaPage handles GET/POST /admin/config/captcha: reCAPTCHA keys and the forms that show it. Full-access roles only: the page holds the secret key, which is never shown back.

func (*Controller) CommentAction

func (c *Controller) CommentAction(w http.ResponseWriter, r *http.Request)

CommentAction handles POST /admin/content/comment/{id}/{action}: a comment approved or marked as spam from its row ("administer comments"), then back to the list (the form's "back").

func (*Controller) CommentList

func (c *Controller) CommentList(w http.ResponseWriter, r *http.Request)

CommentList handles GET /admin/content/comment: the comments of a status tab (?status=), sorted by creation or update, a page at a time.

func (*Controller) CommentSettingsPage

func (c *Controller) CommentSettingsPage(w http.ResponseWriter, r *http.Request)

CommentSettingsPage handles GET/POST /admin/config/comments: what is done with suspicious comments ("administer comments").

func (*Controller) ContentList

func (c *Controller) ContentList(w http.ResponseWriter, r *http.Request)

ContentList handles GET /admin/content: the content, filtered by status (or scheduled), moderation, type and a part of the title or address (q), sorted by the column chosen, a page at a time.

func (*Controller) ContentTypeCreate

func (c *Controller) ContentTypeCreate(w http.ResponseWriter, r *http.Request)

ContentTypeCreate handles POST /admin/config/content-types.

func (*Controller) ContentTypeDelete

func (c *Controller) ContentTypeDelete(w http.ResponseWriter, r *http.Request)

ContentTypeDelete handles POST /admin/config/content-types/{id}/delete.

func (*Controller) ContentTypeEdit

func (c *Controller) ContentTypeEdit(w http.ResponseWriter, r *http.Request)

ContentTypeEdit handles GET /admin/config/content-types/{id} - the type's settings page (label, description, URL pattern, status, default comment mode); the form posts to ContentTypeUpdate.

func (*Controller) ContentTypeFieldAttach

func (c *Controller) ContentTypeFieldAttach(w http.ResponseWriter, r *http.Request)

ContentTypeFieldAttach handles POST /admin/config/content-types/{id}/fields/attach - the "Add existing field" form: attaches an existing FieldStorageDef to this content type (see AttachExistingField). label/required are per-type instance settings; machine_name/field_type/config come from the storage.

func (*Controller) ContentTypeFieldCardinality

func (c *Controller) ContentTypeFieldCardinality(w http.ResponseWriter, r *http.Request)

ContentTypeFieldCardinality renders GET /admin/config/content-types/{id}/fields/{field_id}/cardinality - the confirmation for switching a field between one and several values (service.ContentTypeService.SetFieldMultiple): what changes, the content types sharing the field and, when going to one value, the content that still has several (it blocks the change). Posts to ContentTypeFieldCardinalitySave.

func (*Controller) ContentTypeFieldCardinalitySave

func (c *Controller) ContentTypeFieldCardinalitySave(w http.ResponseWriter, r *http.Request)

ContentTypeFieldCardinalitySave handles POST /admin/config/content-types/{id}/fields/{field_id}/cardinality: "multiple" = 1 - several values, 0 - one. Back to the field's page when done, to the confirmation with the reason when refused.

func (*Controller) ContentTypeFieldCreate

func (c *Controller) ContentTypeFieldCreate(w http.ResponseWriter, r *http.Request)

ContentTypeFieldCreate handles POST /admin/config/content-types/{id}/fields.

func (*Controller) ContentTypeFieldDelete

func (c *Controller) ContentTypeFieldDelete(w http.ResponseWriter, r *http.Request)

ContentTypeFieldDelete handles POST /admin/config/content-types/{id}/fields/{field_id}/delete.

func (*Controller) ContentTypeFieldDeleteConfirm

func (c *Controller) ContentTypeFieldDeleteConfirm(w http.ResponseWriter, r *http.Request)

ContentTypeFieldDeleteConfirm renders GET /admin/config/content-types/{id}/fields/{field_id}/delete - a confirmation page showing how many values are stored for the field, since deleting it drops them irrecoverably. Posts to ContentTypeFieldDelete.

func (*Controller) ContentTypeFieldEdit

func (c *Controller) ContentTypeFieldEdit(w http.ResponseWriter, r *http.Request)

ContentTypeFieldEdit renders GET /admin/config/content-types/{id}/fields/{field_id}/edit - one field's settings (label, type-specific config, required, hidden, group scope); submits to ContentTypeFieldUpdate.

func (*Controller) ContentTypeFieldList

func (c *Controller) ContentTypeFieldList(w http.ResponseWriter, r *http.Request)

ContentTypeFieldList renders GET /admin/config/content-types/{id}/fields - the "Fields" tab.

func (*Controller) ContentTypeFieldUpdate

func (c *Controller) ContentTypeFieldUpdate(w http.ResponseWriter, r *http.Request)

ContentTypeFieldUpdate handles POST /admin/config/content-types/{id}/fields/{field_id}. field_type is immutable (changing it would orphan the typed value table holding the data). Redirects back to ContentTypeFieldEdit.

func (*Controller) ContentTypeFieldsDetailDisplay

func (c *Controller) ContentTypeFieldsDetailDisplay(w http.ResponseWriter, r *http.Request)

ContentTypeFieldsDetailDisplay renders GET /admin/config/content-types/{id}/fields/display-detail - the "Detail page" tab; its form posts to ContentTypeFieldsDetailDisplayUpdate.

func (*Controller) ContentTypeFieldsDetailDisplayUpdate

func (c *Controller) ContentTypeFieldsDetailDisplayUpdate(w http.ResponseWriter, r *http.Request)

ContentTypeFieldsDetailDisplayUpdate handles POST /admin/config/content-types/{id}/fields/display-detail - the detail tab's bulk form: "order" (CSV of field IDs in final order, becoming DisplayOrder), per-field checkboxes (show_on_detail_<id>/show_label_<id>/ renders_in_body_<id>), how it shows (detail_image_style_<id>, detail_formatter_<id>, detail_layout_<id>) and the parent group select (parent_group_id_<id>). One UpdateFieldDetailDisplay call per field.

func (*Controller) ContentTypeFieldsSortOrderUpdate

func (c *Controller) ContentTypeFieldsSortOrderUpdate(w http.ResponseWriter, r *http.Request)

ContentTypeFieldsSortOrderUpdate handles POST /admin/config/content-types/{id}/fields/reorder - the "Fields" tab's drag-and-drop: position in "order" becomes the field's SortOrder (form order) and "form_group_id_<id>" its FormGroupID; one UpdateFieldSortOrder call per field.

func (*Controller) ContentTypeList

func (c *Controller) ContentTypeList(w http.ResponseWriter, r *http.Request)

ContentTypeList renders GET /admin/config/content-types - the list of admin-defined content types.

func (*Controller) ContentTypeUpdate

func (c *Controller) ContentTypeUpdate(w http.ResponseWriter, r *http.Request)

ContentTypeUpdate handles POST /admin/config/content-types/{id}. machine_name is immutable (it is node.Type of every node of this type).

func (*Controller) Dashboard

func (c *Controller) Dashboard(w http.ResponseWriter, r *http.Request)

Dashboard renders GET /admin, the Overview: the figures (the content, the comments, the users for who manages them, the views while they are counted); what waits (every admin menu item with a count); the recent changes (for who may see the history), today's popular content, the latest comments; the modules' blocks (DashboardBlocks), each for who has its permission. A part that can't load is left out (logged).

func (*Controller) DateFormatDelete

func (c *Controller) DateFormatDelete(w http.ResponseWriter, r *http.Request)

DateFormatDelete handles POST /admin/config/date-formats/{id}/delete: refused for the default format and for one a field chose (listed).

func (*Controller) DateFormatEdit

func (c *Controller) DateFormatEdit(w http.ResponseWriter, r *http.Request)

DateFormatEdit handles GET /admin/config/date-formats/{id}.

func (*Controller) DateFormatList

func (c *Controller) DateFormatList(w http.ResponseWriter, r *http.Request)

DateFormatList handles GET /admin/config/date-formats.

func (*Controller) DateFormatNew

func (c *Controller) DateFormatNew(w http.ResponseWriter, r *http.Request)

DateFormatNew handles GET /admin/config/date-formats/new.

func (*Controller) DateFormatSave

func (c *Controller) DateFormatSave(w http.ResponseWriter, r *http.Request)

DateFormatSave handles POST /admin/config/date-formats (create) and POST /admin/config/date-formats/{id} (update).

func (*Controller) FieldSetCreate

func (c *Controller) FieldSetCreate(w http.ResponseWriter, r *http.Request)

FieldSetCreate handles POST /admin/config/field-sets: a new field set, to its fields.

func (*Controller) FieldSetList

func (c *Controller) FieldSetList(w http.ResponseWriter, r *http.Request)

FieldSetList renders GET /admin/config/field-sets - the field sets (ContentTypeDef.Embedded): the content types of the blocks fields' items, made and listed like the content types.

func (*Controller) ImageStyleCreate

func (c *Controller) ImageStyleCreate(w http.ResponseWriter, r *http.Request)

ImageStyleCreate handles POST /admin/config/image-styles.

func (*Controller) ImageStyleDelete

func (c *Controller) ImageStyleDelete(w http.ResponseWriter, r *http.Request)

ImageStyleDelete handles POST /admin/config/image-styles/{id}/delete. Styles still referenced (display settings, Go call sites) may be deleted: imageurl.Styled handles an unknown style name gracefully (404 + logged error).

func (*Controller) ImageStyleDeleteConfirm

func (c *Controller) ImageStyleDeleteConfirm(w http.ResponseWriter, r *http.Request)

ImageStyleDeleteConfirm renders GET /admin/config/image-styles/{id}/delete - a confirmation page that posts to ImageStyleDelete.

func (*Controller) ImageStyleEdit

func (c *Controller) ImageStyleEdit(w http.ResponseWriter, r *http.Request)

ImageStyleEdit renders GET /admin/config/image-styles/{id}/edit - one style's settings; submits to ImageStyleUpdate.

func (*Controller) ImageStyleList

func (c *Controller) ImageStyleList(w http.ResponseWriter, r *http.Request)

ImageStyleList renders GET /admin/config/image-styles - the editable resize presets used across the site via imageurl.Styled(image, styleName).

func (*Controller) ImageStyleUpdate

func (c *Controller) ImageStyleUpdate(w http.ResponseWriter, r *http.Request)

ImageStyleUpdate handles POST /admin/config/image-styles/{id}. Name is immutable: derivative URLs and Go call sites reference a style by name. Redirects back to ImageStyleEdit.

func (*Controller) IntegrationsPage

func (c *Controller) IntegrationsPage(w http.ResponseWriter, r *http.Request)

IntegrationsPage handles GET and POST /admin/config/integrations.

func (*Controller) InterfaceCatalogCheck

func (c *Controller) InterfaceCatalogCheck(w http.ResponseWriter, r *http.Request)

InterfaceCatalogCheck handles POST /admin/config/translations/check: the translations catalog read again (its updates).

func (*Controller) InterfaceLanguages

func (c *Controller) InterfaceLanguages(w http.ResponseWriter, r *http.Request)

InterfaceLanguages handles GET /admin/config/translations: the interface's languages - how much of the site's strings each translates, the downloaded ones and the translations catalog's others - and what came of a download, an update, a removal (the address's done, error, lang, kept, dropped).

func (*Controller) InterfacePackDelete

func (c *Controller) InterfacePackDelete(w http.ResponseWriter, r *http.Request)

InterfacePackDelete handles POST /admin/config/translations/delete: a downloaded translation removed.

func (*Controller) InterfacePackDownload

func (c *Controller) InterfacePackDownload(w http.ResponseWriter, r *http.Request)

InterfacePackDownload handles POST /admin/config/translations/download: the catalog's translation of a language installed (or updated).

func (*Controller) InterfaceStringReset

func (c *Controller) InterfaceStringReset(w http.ResponseWriter, r *http.Request)

InterfaceStringReset handles POST /admin/config/translations/strings/reset: a string's translation for the site removed (an outdated one too).

func (*Controller) InterfaceStringSave

func (c *Controller) InterfaceStringSave(w http.ResponseWriter, r *http.Request)

InterfaceStringSave handles POST /admin/config/translations/strings: a string's translation for the site; refused - the tab again, the string open with why.

func (*Controller) InterfaceStringsPage

func (c *Controller) InterfaceStringsPage(w http.ResponseWriter, r *http.Request)

InterfaceStringsPage handles GET /admin/config/translations/strings.

func (*Controller) MailLogPage

func (c *Controller) MailLogPage(w http.ResponseWriter, r *http.Request)

MailLogPage renders GET /admin/config/mail/log: the emails sent or tried, newest first, 50 a page - when, to whom, which email and its subject, what came of it; filtered by a part of the address (?to=), the email (?key=) and the result (?status=).

func (*Controller) MailPage

func (c *Controller) MailPage(w http.ResponseWriter, r *http.Request)

MailPage handles GET/POST /admin/config/mail: whether the site sends email, the transport (SMTP, or a module's: service.MailTransport) and the sender address - not while the server config sets the transport (it wins). Secrets are never shown back; an empty field keeps the saved one.

func (*Controller) MailTemplateEdit

func (c *Controller) MailTemplateEdit(w http.ResponseWriter, r *http.Request)

MailTemplateEdit renders GET /admin/config/mail/templates/{key}: the email's subject and text, its placeholders, how it looks with sample values, a test email.

func (*Controller) MailTemplateSave

func (c *Controller) MailTemplateSave(w http.ResponseWriter, r *http.Request)

MailTemplateSave handles POST /admin/config/mail/templates/{key}: the email's subject and text (reset=1 - back to the default's).

func (*Controller) MailTemplateSwitch

func (c *Controller) MailTemplateSwitch(w http.ResponseWriter, r *http.Request)

MailTemplateSwitch handles POST /admin/config/mail/templates/{key}/enabled: an optional email switched on (on=1) or off.

func (*Controller) MailTemplateTest

func (c *Controller) MailTemplateTest(w http.ResponseWriter, r *http.Request)

MailTemplateTest handles POST /admin/config/mail/templates/{key}/test: the email with sample values to the address given (the current user's by default), switched on or not; the page shows the result.

func (*Controller) MailTemplatesPage

func (c *Controller) MailTemplatesPage(w http.ResponseWriter, r *http.Request)

MailTemplatesPage renders GET /admin/config/mail/templates: the site's emails (service.MailDefs), the core's first, then each enabled module's - who gets each, whether it is sent (a switch for an optional one), a link to its text.

func (*Controller) MailTest

func (c *Controller) MailTest(w http.ResponseWriter, r *http.Request)

MailTest handles POST /admin/config/mail/test: a test email to the current admin through the settings in effect; the page shows the result.

func (*Controller) MaintenanceSettings

func (c *Controller) MaintenanceSettings(w http.ResponseWriter, r *http.Request)

MaintenanceSettings handles GET and POST /admin/config/maintenance: the maintenance mode and its message, shown and saved.

func (*Controller) MediaDelete

func (c *Controller) MediaDelete(w http.ResponseWriter, r *http.Request)

MediaDelete handles POST /admin/content/media/{id}/delete: the file and its stored copies, when nothing uses it.

func (*Controller) MediaDeleteUnused

func (c *Controller) MediaDeleteUnused(w http.ResponseWriter, r *http.Request)

MediaDeleteUnused handles POST /admin/content/media/delete-unused: every file nothing uses.

func (*Controller) MediaList

func (c *Controller) MediaList(w http.ResponseWriter, r *http.Request)

MediaList handles GET /admin/content/media: the files uploaded to the site, the newest first, found by name or alt text, kind, uploader or as used nowhere; ?file=<id> - one file's card beside them: its alt text, where it's used, deleting it when nothing uses it.

func (*Controller) MediaUpdate

func (c *Controller) MediaUpdate(w http.ResponseWriter, r *http.Request)

MediaUpdate handles POST /admin/content/media/{id}: the file's alt text, the same wherever the file is used, and its focal point (focal_x, focal_y - percent; both empty - none).

func (*Controller) MenuBlockCreate

func (c *Controller) MenuBlockCreate(w http.ResponseWriter, r *http.Request)

MenuBlockCreate handles POST /admin/config/blocks/menu - places an existing menu as a block at the end of the chosen region (validated against the theme's regions). A theme can give a region's menu blocks its own markup ("menu_block_<region>", region_blocks.html).

func (*Controller) MenuCreate

func (c *Controller) MenuCreate(w http.ResponseWriter, r *http.Request)

MenuCreate handles POST /admin/config/menus - the machine name is transliterated from the label, as in TextFormatCreate.

func (*Controller) MenuDelete

func (c *Controller) MenuDelete(w http.ResponseWriter, r *http.Request)

MenuDelete handles POST /admin/config/menus/{id}/delete.

func (*Controller) MenuDeleteConfirm

func (c *Controller) MenuDeleteConfirm(w http.ResponseWriter, r *http.Request)

MenuDeleteConfirm renders GET /admin/config/menus/{id}/delete - a confirmation page warning that every link in the menu is deleted too.

func (*Controller) MenuEdit

func (c *Controller) MenuEdit(w http.ResponseWriter, r *http.Request)

MenuEdit renders GET /admin/config/menus/{id}/edit - label and description.

func (*Controller) MenuLinkCreate

func (c *Controller) MenuLinkCreate(w http.ResponseWriter, r *http.Request)

MenuLinkCreate handles POST /admin/config/menus/{id}/links - always added at the end of the top level (max weight + 10); see MenuLinksList.

func (*Controller) MenuLinkDelete

func (c *Controller) MenuLinkDelete(w http.ResponseWriter, r *http.Request)

MenuLinkDelete handles POST /admin/config/menus/{id}/links/{link_id}/delete - the link's children are reparented (see entity.MenuRepository.DeleteMenuLink), not deleted.

func (*Controller) MenuLinkDeleteConfirm

func (c *Controller) MenuLinkDeleteConfirm(w http.ResponseWriter, r *http.Request)

MenuLinkDeleteConfirm renders GET /admin/config/menus/{id}/links/{link_id}/delete.

func (*Controller) MenuLinkEdit

func (c *Controller) MenuLinkEdit(w http.ResponseWriter, r *http.Request)

MenuLinkEdit renders GET /admin/config/menus/{id}/links/{link_id}/edit.

func (*Controller) MenuLinkUpdate

func (c *Controller) MenuLinkUpdate(w http.ResponseWriter, r *http.Request)

MenuLinkUpdate handles POST /admin/config/menus/{id}/links/{link_id}. Weight/ParentID are deliberately untouched: they are set only via MenuLinksList's drag-and-drop/"Parent" select.

func (c *Controller) MenuLinksList(w http.ResponseWriter, r *http.Request)

MenuLinksList renders GET /admin/config/menus/{id}/links - the menu's drag-and-drop tree plus a quick-add form for a new top-level link. Nesting a new link is a separate step (the row's "Parent" select or drag).

func (*Controller) MenuLinksReorder

func (c *Controller) MenuLinksReorder(w http.ResponseWriter, r *http.Request)

MenuLinksReorder handles POST /admin/config/menus/{id}/links/reorder - bulk Weight/ParentID update from the drag-and-drop tree: "order" is a CSV of IDs plus a "parent_<id>" value per row (each row's parent select, kept in sync by admin.js's tree-sortable).

func (*Controller) MenuList

func (c *Controller) MenuList(w http.ResponseWriter, r *http.Request)

MenuList renders GET /admin/config/menus - the list of menus with a label-only quick-add; machine name and description are set on the menu's edit form.

func (*Controller) MenuPlacementEdit

func (c *Controller) MenuPlacementEdit(w http.ResponseWriter, r *http.Request)

MenuPlacementEdit renders GET /admin/config/blocks/menu/{id}/edit - region, visibility, start level and depth of a menu placement. The menu itself can't be changed; delete and re-add instead. "Placement" (not "Block") because plugin/view/menu placements have no owning BlockDef.

func (*Controller) MenuPlacementUpdate

func (c *Controller) MenuPlacementUpdate(w http.ResponseWriter, r *http.Request)

MenuPlacementUpdate handles POST /admin/config/blocks/menu/{id}.

func (*Controller) MenuUpdate

func (c *Controller) MenuUpdate(w http.ResponseWriter, r *http.Request)

MenuUpdate handles POST /admin/config/menus/{id}. The machine name is an identity string and is immutable.

func (*Controller) ModerationList

func (c *Controller) ModerationList(w http.ResponseWriter, r *http.Request)

ModerationList handles GET /admin/moderation: the content awaiting moderation, filtered by status and type, sorted by the column chosen, a page at a time.

func (*Controller) ModuleContentDelete

func (c *Controller) ModuleContentDelete(w http.ResponseWriter, r *http.Request)

ModuleContentDelete handles POST /admin/config/modules/{name}/delete-content: the module's content (its content types' items, each with everything attached) is deleted before the uninstall, confirmed by the machine name; a large site takes several runs.

func (*Controller) ModuleUninstallPage

func (c *Controller) ModuleUninstallPage(w http.ResponseWriter, r *http.Request)

ModuleUninstallPage handles GET/POST /admin/config/modules/{name}/uninstall: what uninstalling the module removes, confirmed by typing its machine name; POST uninstalls it (service.ModuleUninstall).

func (*Controller) ModulesPage

func (c *Controller) ModulesPage(w http.ResponseWriter, r *http.Request)

ModulesPage handles GET/POST /admin/config/modules: switching the built-in modules on and off.

func (*Controller) OAuthPage

func (c *Controller) OAuthPage(w http.ResponseWriter, r *http.Request)

OAuthPage handles GET/POST /admin/config/oauth: each social login provider's switch and keys. Full-access roles only: the page holds the client secrets, which are never shown back.

func (*Controller) PeopleApprove

func (c *Controller) PeopleApprove(w http.ResponseWriter, r *http.Request)

PeopleApprove activates a pending user (POST /admin/people/{id}/approve).

func (*Controller) PeopleCreate

func (c *Controller) PeopleCreate(w http.ResponseWriter, r *http.Request)

PeopleCreate handles POST /admin/people/create.

func (*Controller) PeopleCreateForm

func (c *Controller) PeopleCreateForm(w http.ResponseWriter, r *http.Request)

PeopleCreateForm shows the admin form to create a user (GET /admin/people/create).

func (*Controller) PeopleInviteCancel

func (c *Controller) PeopleInviteCancel(w http.ResponseWriter, r *http.Request)

PeopleInviteCancel handles POST /admin/people/{id}/invite/cancel: an invitation not accepted withdrawn - its account, never used, deleted.

func (*Controller) PeopleInviteResend

func (c *Controller) PeopleInviteResend(w http.ResponseWriter, r *http.Request)

PeopleInviteResend handles POST /admin/people/{id}/invite: the invitation sent again with a new link (the earlier one stops working).

func (*Controller) PeopleList

func (c *Controller) PeopleList(w http.ResponseWriter, r *http.Request)

PeopleList handles GET /admin/people: the accounts, filtered by status and role, sorted by creation or last access, a page at a time, with their two-factor state and pending invitations.

func (*Controller) PerformanceClearThumbnails

func (c *Controller) PerformanceClearThumbnails(w http.ResponseWriter, r *http.Request)

PerformanceClearThumbnails handles POST: removes resize/ and the image style caches (styles/).

func (*Controller) PerformanceRefreshMemoryCache

func (c *Controller) PerformanceRefreshMemoryCache(w http.ResponseWriter, r *http.Request)

PerformanceRefreshMemoryCache handles POST: synchronously refreshes CacheService (sidebar, View blocks).

func (*Controller) PerformanceSettings

func (c *Controller) PerformanceSettings(w http.ResponseWriter, r *http.Request)

PerformanceSettings renders GET /admin/config/performance - the performance actions page.

func (*Controller) PermissionsPage

func (c *Controller) PermissionsPage(w http.ResponseWriter, r *http.Request)

PermissionsPage renders GET /admin/people/permissions.

func (*Controller) PermissionsSave

func (c *Controller) PermissionsSave(w http.ResponseWriter, r *http.Request)

PermissionsSave handles POST /admin/people/permissions: each checked box is a "grant" value "<role id>|<permission>".

func (*Controller) PluginBlockCreate

func (c *Controller) PluginBlockCreate(w http.ResponseWriter, r *http.Request)

PluginBlockCreate handles POST /admin/config/blocks/plugin - places a plugin block (see entity.PluginBlockID) at the end of the chosen region. Unlike BlockCreate, the region is picked up front.

func (*Controller) PluginPlacementDelete

func (c *Controller) PluginPlacementDelete(w http.ResponseWriter, r *http.Request)

PluginPlacementDelete handles POST /admin/config/blocks/placement/{id}/delete - removes a plugin block's placement directly (there is no owning BlockDef to cascade through, unlike BlockDelete).

func (*Controller) PluginPlacementEdit

func (c *Controller) PluginPlacementEdit(w http.ResponseWriter, r *http.Request)

PluginPlacementEdit handles GET /admin/config/blocks/plugin/{id}/edit - a plugin placement's title and visibility. The plugin itself can't be changed after creation.

func (*Controller) PluginPlacementUpdate

func (c *Controller) PluginPlacementUpdate(w http.ResponseWriter, r *http.Request)

PluginPlacementUpdate handles POST /admin/config/blocks/plugin/{id}/edit.

func (*Controller) PopularContent

func (c *Controller) PopularContent(w http.ResponseWriter, r *http.Request)

PopularContent renders GET /admin/reports/popular: the published content viewed most in a period (?period= - entity.PopularPeriods, today's by default) of a content type (?type=), most first, its views in the period and in all. keepDays - how long the views by day are kept: a longer period than that counts only those.

func (*Controller) RedirectCreate

func (c *Controller) RedirectCreate(w http.ResponseWriter, r *http.Request)

RedirectCreate handles POST /admin/config/redirects: a redirect added from one path to another.

func (*Controller) RedirectDelete

func (c *Controller) RedirectDelete(w http.ResponseWriter, r *http.Request)

RedirectDelete handles POST /admin/config/redirects/delete/{id}: the redirect deleted.

func (*Controller) RedirectImport

func (c *Controller) RedirectImport(w http.ResponseWriter, r *http.Request)

RedirectImport handles POST /admin/config/redirects/import: redirects added, one per line: "from -> to" or a RewriteRule line (parseRedirectBulk); a duplicate is skipped.

func (*Controller) RedirectList

func (c *Controller) RedirectList(w http.ResponseWriter, r *http.Request)

RedirectList renders GET /admin/config/redirects: the form adding one, the import, and the redirects whose from or to path contains the search (q), by from path, a page at a time.

func (*Controller) RobotsRulesSave

func (c *Controller) RobotsRulesSave(w http.ResponseWriter, r *http.Request)

RobotsRulesSave handles POST /admin/config/robots/rules: the site's own robots.txt rules (service.RobotsTxt).

func (*Controller) RoleCreate

func (c *Controller) RoleCreate(w http.ResponseWriter, r *http.Request)

RoleCreate handles POST /admin/people/roles.

func (*Controller) RoleDelete

func (c *Controller) RoleDelete(w http.ResponseWriter, r *http.Request)

RoleDelete handles POST /admin/people/roles/{id}/delete.

func (*Controller) RoleRename

func (c *Controller) RoleRename(w http.ResponseWriter, r *http.Request)

RoleRename handles POST /admin/people/roles/{id}/rename.

func (*Controller) RolesPage

func (c *Controller) RolesPage(w http.ResponseWriter, r *http.Request)

RolesPage renders GET /admin/people/roles.

func (*Controller) SEODefaultSave

func (c *Controller) SEODefaultSave(w http.ResponseWriter, r *http.Request)

SEODefaultSave handles POST /admin/config/seo/default.

func (*Controller) SEOPage

func (c *Controller) SEOPage(w http.ResponseWriter, r *http.Request)

SEOPage renders GET /admin/config/seo.

func (*Controller) SEORuleCreate

func (c *Controller) SEORuleCreate(w http.ResponseWriter, r *http.Request)

SEORuleCreate handles POST /admin/config/seo/rules; a rule with a field goes on to its edit page to pick the terms.

func (*Controller) SEORuleDelete

func (c *Controller) SEORuleDelete(w http.ResponseWriter, r *http.Request)

SEORuleDelete handles POST /admin/config/seo/rules/{id}/delete.

func (*Controller) SEORuleDeleteConfirm

func (c *Controller) SEORuleDeleteConfirm(w http.ResponseWriter, r *http.Request)

SEORuleDeleteConfirm renders GET /admin/config/seo/rules/{id}/delete.

func (*Controller) SEORuleEdit

func (c *Controller) SEORuleEdit(w http.ResponseWriter, r *http.Request)

SEORuleEdit renders GET /admin/config/seo/rules/{id}/edit.

func (*Controller) SEORuleReorder

func (c *Controller) SEORuleReorder(w http.ResponseWriter, r *http.Request)

SEORuleReorder handles POST /admin/config/seo/rules/reorder - the drag-and-drop order as a CSV of IDs in "order".

func (*Controller) SEORuleUpdate

func (c *Controller) SEORuleUpdate(w http.ResponseWriter, r *http.Request)

SEORuleUpdate handles POST /admin/config/seo/rules/{id}.

func (*Controller) SEOTermDefaultSave

func (c *Controller) SEOTermDefaultSave(w http.ResponseWriter, r *http.Request)

SEOTermDefaultSave handles POST /admin/config/seo/term-default.

func (*Controller) SEOTypeEdit

func (c *Controller) SEOTypeEdit(w http.ResponseWriter, r *http.Request)

SEOTypeEdit renders GET /admin/config/seo/types/{id}/edit.

func (*Controller) SEOTypeSave

func (c *Controller) SEOTypeSave(w http.ResponseWriter, r *http.Request)

SEOTypeSave handles POST /admin/config/seo/types/{id}.

func (*Controller) SEOVocabularyEdit

func (c *Controller) SEOVocabularyEdit(w http.ResponseWriter, r *http.Request)

SEOVocabularyEdit renders GET /admin/config/seo/vocabularies/{id}/edit.

func (*Controller) SEOVocabularySave

func (c *Controller) SEOVocabularySave(w http.ResponseWriter, r *http.Request)

SEOVocabularySave handles POST /admin/config/seo/vocabularies/{id}.

func (*Controller) SearchConfigPage

func (c *Controller) SearchConfigPage(w http.ResponseWriter, r *http.Request)

SearchConfigPage renders GET /admin/config/search.

func (*Controller) SearchSettingsSave

func (c *Controller) SearchSettingsSave(w http.ResponseWriter, r *http.Request)

SearchSettingsSave handles POST /admin/config/search/settings.

func (*Controller) SearchTypeAdd

func (c *Controller) SearchTypeAdd(w http.ResponseWriter, r *http.Request)

SearchTypeAdd handles POST /admin/config/search/types: the type goes last with defaults and opens its form.

func (*Controller) SearchTypeDelete

func (c *Controller) SearchTypeDelete(w http.ResponseWriter, r *http.Request)

SearchTypeDelete handles POST /admin/config/search/types/{type}/delete - the type is left out of the search (switched off, its settings kept).

func (*Controller) SearchTypeEdit

func (c *Controller) SearchTypeEdit(w http.ResponseWriter, r *http.Request)

SearchTypeEdit renders GET /admin/config/search/types/{type}/edit.

func (*Controller) SearchTypeSave

func (c *Controller) SearchTypeSave(w http.ResponseWriter, r *http.Request)

SearchTypeSave handles POST /admin/config/search/types/{type}.

func (*Controller) SearchTypesReorder

func (c *Controller) SearchTypesReorder(w http.ResponseWriter, r *http.Request)

SearchTypesReorder handles POST /admin/config/search/types/reorder - the drag-and-drop order as a CSV of node types in "order".

func (*Controller) SiteInformationSettings

func (c *Controller) SiteInformationSettings(w http.ResponseWriter, r *http.Request)

SiteInformationSettings handles GET and POST /admin/config/system/site-information: the site's name, slogan, email, address, front page feed, time zone, default language, error pages, logo, icon and who runs it (schema.org), shown and saved.

func (*Controller) StatisticsSettings

func (c *Controller) StatisticsSettings(w http.ResponseWriter, r *http.Request)

StatisticsSettings GET/POST /admin/config/statistics

func (*Controller) StatusReportPage

func (c *Controller) StatusReportPage(w http.ResponseWriter, r *http.Request)

StatusReportPage GET /admin/reports/status - the engine's build, the environment, the modules and every check (service.StatusReport).

func (*Controller) TaxonomyTermCreate

func (c *Controller) TaxonomyTermCreate(w http.ResponseWriter, r *http.Request)

TaxonomyTermCreate handles POST /admin/config/taxonomy/{vid}/terms.

func (*Controller) TaxonomyTermDelete

func (c *Controller) TaxonomyTermDelete(w http.ResponseWriter, r *http.Request)

TaxonomyTermDelete handles POST /admin/config/taxonomy/{vid}/terms/{id}/delete. Errors redirect back to the term's delete-confirmation page so the reason is shown next to the term.

func (*Controller) TaxonomyTermDeleteConfirm

func (c *Controller) TaxonomyTermDeleteConfirm(w http.ResponseWriter, r *http.Request)

TaxonomyTermDeleteConfirm renders GET /admin/config/taxonomy/{vid}/terms/{id}/delete - a confirmation page showing how many nodes use the term and which child terms it has, the two conditions DeleteTerm refuses on (ErrTaxonomyTermInUse / ErrTaxonomyTermHasChildren).

func (*Controller) TaxonomyTermEdit

func (c *Controller) TaxonomyTermEdit(w http.ResponseWriter, r *http.Request)

TaxonomyTermEdit renders GET /admin/config/taxonomy/{vid}/terms/{id}/edit - one term's name/slug/description/weight/parent (the list itself only offers drag-and-drop). Submits to TaxonomyTermUpdate.

func (*Controller) TaxonomyTermList

func (c *Controller) TaxonomyTermList(w http.ResponseWriter, r *http.Request)

TaxonomyTermList renders GET /admin/config/taxonomy/{vid}/terms - the terms of one vocabulary.

func (*Controller) TaxonomyTermUpdate

func (c *Controller) TaxonomyTermUpdate(w http.ResponseWriter, r *http.Request)

TaxonomyTermUpdate handles POST /admin/config/taxonomy/{vid}/terms/{id} and redirects back to the term's edit page.

func (*Controller) TaxonomyTermsSortOrderUpdate

func (c *Controller) TaxonomyTermsSortOrderUpdate(w http.ResponseWriter, r *http.Request)

TaxonomyTermsSortOrderUpdate handles POST /admin/config/taxonomy/{vid}/terms/reorder - the terms list's drag-and-drop: "order" lists every term ID in its final depth-first position (becoming its Weight), and "parent_id_<id>" carries a moved term's new parent. The script moves a subtree as one block, so a term can't become a child of its own descendant (UpdateTermSortOrder refuses it anyway). Uses UpdateTermSortOrder rather than UpdateTerm so name/slug/description are never touched (nor re-validated, e.g. an over-long stored description).

func (*Controller) TaxonomyVocabulariesSortOrderUpdate

func (c *Controller) TaxonomyVocabulariesSortOrderUpdate(w http.ResponseWriter, r *http.Request)

TaxonomyVocabulariesSortOrderUpdate handles POST /admin/config/taxonomy/reorder - the vocabularies list's drag-and-drop: "order" lists every vocabulary ID in its final position, which becomes its Weight. Uses UpdateVocabularySortOrder so name/slug/description are never touched.

func (*Controller) TaxonomyVocabularyCreate

func (c *Controller) TaxonomyVocabularyCreate(w http.ResponseWriter, r *http.Request)

TaxonomyVocabularyCreate handles POST /admin/config/taxonomy.

func (*Controller) TaxonomyVocabularyDelete

func (c *Controller) TaxonomyVocabularyDelete(w http.ResponseWriter, r *http.Request)

TaxonomyVocabularyDelete handles POST /admin/config/taxonomy/{id}/delete.

func (*Controller) TaxonomyVocabularyDeleteConfirm

func (c *Controller) TaxonomyVocabularyDeleteConfirm(w http.ResponseWriter, r *http.Request)

TaxonomyVocabularyDeleteConfirm renders GET /admin/config/taxonomy/{id}/delete - a confirmation page. Shows how many terms remain, since DeleteVocabulary refuses while any exist (ErrTaxonomyVocabularyHasTerms); the confirm button is hidden then.

func (*Controller) TaxonomyVocabularyEdit

func (c *Controller) TaxonomyVocabularyEdit(w http.ResponseWriter, r *http.Request)

TaxonomyVocabularyEdit renders GET /admin/config/taxonomy/{id}/edit - one vocabulary's settings; submits to TaxonomyVocabularyUpdate.

func (*Controller) TaxonomyVocabularyList

func (c *Controller) TaxonomyVocabularyList(w http.ResponseWriter, r *http.Request)

TaxonomyVocabularyList renders GET /admin/config/taxonomy - the list of taxonomy dictionaries.

func (*Controller) TaxonomyVocabularyUpdate

func (c *Controller) TaxonomyVocabularyUpdate(w http.ResponseWriter, r *http.Request)

TaxonomyVocabularyUpdate handles POST /admin/config/taxonomy/{id} and redirects back to the vocabulary's edit page.

func (*Controller) TextFormatCreate

func (c *Controller) TextFormatCreate(w http.ResponseWriter, r *http.Request)

TextFormatCreate handles POST /admin/config/text-formats - the list page's label-only quick-add; everything else is configured on the edit page. The machine name is transliterated from the label. The new format starts inert (no allowed tags, i.e. plain text; everything else off) with the lowest Weight, so it sorts first and wins picker fallbacks (see entity.TextFormatDef.Weight).

func (*Controller) TextFormatDelete

func (c *Controller) TextFormatDelete(w http.ResponseWriter, r *http.Request)

TextFormatDelete handles POST /admin/config/text-formats/{id}/delete. Formats still referenced may be deleted: saved content stays sanitized as it was, and the fields' allowed-format lists and the editor picker drop the missing ID (see entity.FieldInstanceDef.AllowedTextFormatIDs and TextFormatRepository.DeleteTextFormat).

func (*Controller) TextFormatDeleteConfirm

func (c *Controller) TextFormatDeleteConfirm(w http.ResponseWriter, r *http.Request)

TextFormatDeleteConfirm renders GET /admin/config/text-formats/{id}/delete - a confirmation page.

func (*Controller) TextFormatEdit

func (c *Controller) TextFormatEdit(w http.ResponseWriter, r *http.Request)

TextFormatEdit renders GET /admin/config/text-formats/{id}/edit - one format's settings.

func (*Controller) TextFormatList

func (c *Controller) TextFormatList(w http.ResponseWriter, r *http.Request)

TextFormatList renders GET /admin/config/text-formats - the editable text formats used by FieldTypeText's per-value format picker (see entity.TextFormatDef).

func (*Controller) TextFormatUpdate

func (c *Controller) TextFormatUpdate(w http.ResponseWriter, r *http.Request)

TextFormatUpdate handles POST /admin/config/text-formats/{id}. The machine name is an identity string and is immutable (fields reference formats by ID in WidgetConfig["allowed_text_formats"]).

func (*Controller) TextFormatsReorder

func (c *Controller) TextFormatsReorder(w http.ResponseWriter, r *http.Request)

TextFormatsReorder handles POST /admin/config/text-formats/reorder - the drag-and-drop table: "order" is a CSV of IDs. The first ID gets the lowest Weight (step 10), matching TextFormats()' ascending sort, so the top row sorts first and wins picker fallbacks.

func (*Controller) TrashEmpty

func (c *Controller) TrashEmpty(w http.ResponseWriter, r *http.Request)

TrashEmpty handles POST /admin/content/trash/empty: everything in the trash deleted for good.

func (*Controller) TrashList

func (c *Controller) TrashList(w http.ResponseWriter, r *http.Request)

TrashList handles GET /admin/content/trash: the deleted content, the latest first - its type, author, who deleted it and when - each restored or deleted for good, and the trash emptied (service.NodeDeleteService).

func (*Controller) TrashPurge

func (c *Controller) TrashPurge(w http.ResponseWriter, r *http.Request)

TrashPurge handles POST /admin/content/trash/{id}/delete: deleted for good.

func (*Controller) TrashRestore

func (c *Controller) TrashRestore(w http.ResponseWriter, r *http.Request)

TrashRestore handles POST /admin/content/trash/{id}/restore.

func (*Controller) TwoFactorReset

func (c *Controller) TwoFactorReset(w http.ResponseWriter, r *http.Request)

TwoFactorReset handles POST /admin/people/{id}/two-factor/reset: the user's two-factor sign-in turned off (they lost the phone and the codes); they turn it on again after signing in. Back to their form.

func (*Controller) URLAliasList

func (c *Controller) URLAliasList(w http.ResponseWriter, r *http.Request)

URLAliasList handles GET /admin/config/url-aliases: the nodes' addresses by address, filtered by a part of it (q) and the type.

func (*Controller) URLPatternList

func (c *Controller) URLPatternList(w http.ResponseWriter, r *http.Request)

URLPatternList handles GET /admin/config/url-aliases/patterns: every content type's URL pattern, edited together.

func (*Controller) URLPatternsSave

func (c *Controller) URLPatternsSave(w http.ResponseWriter, r *http.Request)

URLPatternsSave handles POST /admin/config/url-aliases/patterns: the patterns (pattern_<type ID>) checked all first (ValidateNodePathPattern against each type's fields); one invalid - the page again with the submitted patterns and the errors, nothing saved; else the changed ones saved.

func (*Controller) URLRebuild

func (c *Controller) URLRebuild(w http.ResponseWriter, r *http.Request)

URLRebuild handles POST /admin/config/url-aliases/rebuild: one step of the type's rebuild (until the request's time runs out), its totals added to the earlier steps' (checked, changed); the page then offers to continue (more) or reports it done.

func (*Controller) URLRebuildPage

func (c *Controller) URLRebuildPage(w http.ResponseWriter, r *http.Request)

URLRebuildPage handles GET /admin/config/url-aliases/rebuild: a type and whether to include the addresses set by hand; with preview=1 the addresses that would change (a dry run of one step: the request's time may not reach every node); after a rebuild its totals (done, checked, changed, more - continue from after).

func (*Controller) UploadSettingsPage

func (c *Controller) UploadSettingsPage(w http.ResponseWriter, r *http.Request)

UploadSettingsPage handles GET/POST /admin/config/upload-settings - the site-wide upload policy (max file size, max image dimension, allowed MIME types) applied by every upload path. Avatar/slider output sizes are fixed layout targets, not policy (see entity.UploadSettings).

func (*Controller) UserFieldCreate

func (c *Controller) UserFieldCreate(w http.ResponseWriter, r *http.Request)

UserFieldCreate handles POST /admin/people/fields.

func (*Controller) UserFieldDelete

func (c *Controller) UserFieldDelete(w http.ResponseWriter, r *http.Request)

UserFieldDelete handles POST /admin/people/fields/{id}/delete - the field and every user's value of it.

func (*Controller) UserFieldUpdate

func (c *Controller) UserFieldUpdate(w http.ResponseWriter, r *http.Request)

UserFieldUpdate handles POST /admin/people/fields/{id}/edit.

func (*Controller) UserFieldsPage

func (c *Controller) UserFieldsPage(w http.ResponseWriter, r *http.Request)

UserFieldsPage renders GET /admin/people/fields.

func (*Controller) UserFilesBrowse

func (c *Controller) UserFilesBrowse(w http.ResponseWriter, r *http.Request)

UserFilesBrowse handles GET /admin/content/files/{id}: the file browser on that user's folder.

func (*Controller) UserFilesList

func (c *Controller) UserFilesList(w http.ResponseWriter, r *http.Request)

UserFilesList handles GET /admin/content/files: users with files, the largest folders first; ?q= narrows to matching user names.

func (*Controller) ViewAddDisplay

func (c *Controller) ViewAddDisplay(w http.ResponseWriter, r *http.Request)

ViewAddDisplay handles POST /admin/config/views/{id}/add-display - the "Add display" button (see views.DefaultService.AddDisplay). {id} is the display it was clicked from (any display in the group, including Default); the new sibling joins that display's View.

func (*Controller) ViewBlockCreate

func (c *Controller) ViewBlockCreate(w http.ResponseWriter, r *http.Request)

ViewBlockCreate handles POST /admin/config/blocks/view - places a View's Block display (entity.ViewDisplayTypeBlock) at the end of the chosen region. Visibility can be set here too, not only later on ViewPlacementEdit.

func (*Controller) ViewClone

func (c *Controller) ViewClone(w http.ResponseWriter, r *http.Request)

ViewClone handles POST /admin/config/views/{id}/clone - the only way to create a grouped display (see views.DefaultService.CloneDisplay). Redirects to the new sibling's edit page.

func (*Controller) ViewCreate

func (c *Controller) ViewCreate(w http.ResponseWriter, r *http.Request)

ViewCreate handles POST /admin/config/views. Collects only what's needed to create the row, then redirects to ViewEdit for the rest. An empty url_path is generated from the label (resolveSlug) and editable later.

func (*Controller) ViewDelete

func (c *Controller) ViewDelete(w http.ResponseWriter, r *http.Request)

ViewDelete handles POST /admin/config/views/{id}/delete.

func (*Controller) ViewDeleteConfirm

func (c *Controller) ViewDeleteConfirm(w http.ResponseWriter, r *http.Request)

ViewDeleteConfirm renders GET /admin/config/views/{id}/delete - a confirmation page.

func (*Controller) ViewDiscardChanges

func (c *Controller) ViewDiscardChanges(w http.ResponseWriter, r *http.Request)

ViewDiscardChanges handles POST /admin/config/views/{id}/discard - "Discard changes". Always a plain redirect (admin_views.js doesn't intercept it): discarding rewrites all four cards, so a full reload is simpler than a multi-fragment JSON response.

func (*Controller) ViewEdit

func (c *Controller) ViewEdit(w http.ResponseWriter, r *http.Request)

ViewEdit renders GET /admin/config/views/{id} - the single-page Views editor (admin/views/page.html) with Settings/Filters/Fields cards; Views is the one admin section not split into tabs (see admin/views/tabs.html).

func (*Controller) ViewFieldCreate

func (c *Controller) ViewFieldCreate(w http.ResponseWriter, r *http.Request)

ViewFieldCreate handles POST /admin/config/views/{id}/fields (viewRows.add).

func (*Controller) ViewFieldDelete

func (c *Controller) ViewFieldDelete(w http.ResponseWriter, r *http.Request)

ViewFieldDelete handles POST /admin/config/views/{id}/fields/{field_id}/delete (viewRows.remove).

func (*Controller) ViewFieldDeleteConfirm

func (c *Controller) ViewFieldDeleteConfirm(w http.ResponseWriter, r *http.Request)

ViewFieldDeleteConfirm renders GET /admin/config/views/{id}/fields/{field_id}/delete (viewRows.deletePage).

func (*Controller) ViewFieldUpdate

func (c *Controller) ViewFieldUpdate(w http.ResponseWriter, r *http.Request)

ViewFieldUpdate handles POST /admin/config/views/{id}/fields/{field_id} (viewRows.edit).

func (*Controller) ViewFieldsOverride

func (c *Controller) ViewFieldsOverride(w http.ResponseWriter, r *http.Request)

ViewFieldsOverride and ViewFieldsRevert handle POST /admin/config/views/{id}/fields/override and .../revert.

func (*Controller) ViewFieldsReorder

func (c *Controller) ViewFieldsReorder(w http.ResponseWriter, r *http.Request)

ViewFieldsReorder handles POST /admin/config/views/{id}/fields/reorder (viewRows.reorder).

func (*Controller) ViewFieldsRevert

func (c *Controller) ViewFieldsRevert(w http.ResponseWriter, r *http.Request)

ViewFieldsRevert handles POST /admin/config/views/{id}/fields/revert: the display's fields follow its View's Default again.

func (*Controller) ViewFilterCreate

func (c *Controller) ViewFilterCreate(w http.ResponseWriter, r *http.Request)

ViewFilterCreate handles POST /admin/config/views/{id}/filters (viewRows.add); target - parseFilterTarget.

func (*Controller) ViewFilterDelete

func (c *Controller) ViewFilterDelete(w http.ResponseWriter, r *http.Request)

ViewFilterDelete handles POST /admin/config/views/{id}/filters/{filter_id}/delete (viewRows.remove).

func (*Controller) ViewFilterDeleteConfirm

func (c *Controller) ViewFilterDeleteConfirm(w http.ResponseWriter, r *http.Request)

ViewFilterDeleteConfirm renders GET /admin/config/views/{id}/filters/{filter_id}/delete (viewRows.deletePage).

func (*Controller) ViewFilterUpdate

func (c *Controller) ViewFilterUpdate(w http.ResponseWriter, r *http.Request)

ViewFilterUpdate handles POST /admin/config/views/{id}/filters/{filter_id} (viewRows.edit).

func (*Controller) ViewFiltersOverride

func (c *Controller) ViewFiltersOverride(w http.ResponseWriter, r *http.Request)

ViewFiltersOverride and ViewFiltersRevert handle POST /admin/config/views/{id}/filters/override and .../revert.

func (*Controller) ViewFiltersReorder

func (c *Controller) ViewFiltersReorder(w http.ResponseWriter, r *http.Request)

ViewFiltersReorder handles POST /admin/config/views/{id}/filters/reorder (viewRows.reorder).

func (*Controller) ViewFiltersRevert

func (c *Controller) ViewFiltersRevert(w http.ResponseWriter, r *http.Request)

ViewFiltersRevert handles POST /admin/config/views/{id}/filters/revert: the display's filters follow its View's Default again.

func (*Controller) ViewGroupDelete

func (c *Controller) ViewGroupDelete(w http.ResponseWriter, r *http.Request)

ViewGroupDelete handles POST /admin/config/view-groups/{id}/delete - id is the View container's ID. One DeleteViewContainer call; ON DELETE CASCADE removes the rest.

func (*Controller) ViewGroupDeleteConfirm

func (c *Controller) ViewGroupDeleteConfirm(w http.ResponseWriter, r *http.Request)

ViewGroupDeleteConfirm renders GET /admin/config/view-groups/{id}/delete - id is the View container's (entity.View) ID. Unlike ViewDelete (one display), this removes the whole View: the container, its Default and every display, with their filters, sorts and fields.

func (*Controller) ViewList

func (c *Controller) ViewList(w http.ResponseWriter, r *http.Request)

ViewList renders GET /admin/config/views - the list of Views.

func (*Controller) ViewPlacementEdit

func (c *Controller) ViewPlacementEdit(w http.ResponseWriter, r *http.Request)

ViewPlacementEdit handles GET /admin/config/blocks/view/{id}/edit - a View placement's title and visibility. The View itself can't be changed after creation.

func (*Controller) ViewPlacementUpdate

func (c *Controller) ViewPlacementUpdate(w http.ResponseWriter, r *http.Request)

ViewPlacementUpdate handles POST /admin/config/blocks/view/{id}/edit.

func (*Controller) ViewPublishChanges

func (c *Controller) ViewPublishChanges(w http.ResponseWriter, r *http.Request)

ViewPublishChanges handles POST /admin/config/views/{id}/publish - "Publish changes".

func (*Controller) ViewPublishStatus

func (c *Controller) ViewPublishStatus(w http.ResponseWriter, r *http.Request)

ViewPublishStatus handles GET /admin/config/views/{id}/publish-status - a read-only refresh of the publish/discard action bar. admin_views.js calls it after every save, reorder or delete, since any of them can change whether there are unpublished changes.

func (*Controller) ViewSettingsOverride

func (c *Controller) ViewSettingsOverride(w http.ResponseWriter, r *http.Request)

ViewSettingsOverride and ViewSettingsRevert handle POST /admin/config/views/{id}/settings/override and .../revert - the "Page settings" card's override/revert banner (see views.DefaultService.OverrideSettings/RevertSettings).

func (*Controller) ViewSettingsRevert

func (c *Controller) ViewSettingsRevert(w http.ResponseWriter, r *http.Request)

ViewSettingsRevert handles POST /admin/config/views/{id}/settings/revert: the display's settings follow its View's Default again.

func (*Controller) ViewSortCreate

func (c *Controller) ViewSortCreate(w http.ResponseWriter, r *http.Request)

ViewSortCreate handles POST /admin/config/views/{id}/sorts (viewRows.add).

func (*Controller) ViewSortDelete

func (c *Controller) ViewSortDelete(w http.ResponseWriter, r *http.Request)

ViewSortDelete handles POST /admin/config/views/{id}/sorts/{sort_id}/delete (viewRows.remove).

func (*Controller) ViewSortOverride

func (c *Controller) ViewSortOverride(w http.ResponseWriter, r *http.Request)

ViewSortOverride and ViewSortRevert handle POST /admin/config/views/{id}/sorts/override and .../revert.

func (*Controller) ViewSortRevert

func (c *Controller) ViewSortRevert(w http.ResponseWriter, r *http.Request)

ViewSortRevert handles POST /admin/config/views/{id}/sorts/revert: the display's sort criteria follow its View's Default again.

func (*Controller) ViewSortUpdate

func (c *Controller) ViewSortUpdate(w http.ResponseWriter, r *http.Request)

ViewSortUpdate handles POST /admin/config/views/{id}/sorts/{sort_id} (viewRows.edit).

func (*Controller) ViewSortsReorder

func (c *Controller) ViewSortsReorder(w http.ResponseWriter, r *http.Request)

ViewSortsReorder handles POST /admin/config/views/{id}/sorts/reorder (viewRows.reorder): sorts[0] is the primary key, later entries are tie-breakers.

func (*Controller) ViewUpdate

func (c *Controller) ViewUpdate(w http.ResponseWriter, r *http.Request)

ViewUpdate handles POST /admin/config/views/{id} (a new MachineName renames the display: views.DefaultService.UpdateView). Answers with JSON+a re-rendered settings-card summary when the request came from the page's AJAX settings modal (wantsJSON) - the classic full-page redirect stays as the non-JS fallback.

type Deps

type Deps struct {
	CommentsRepo entity.CommentsRepository
	// Dashboard, Revisions - the Overview's figures and recent changes.
	Dashboard entity.DashboardRepository
	Revisions *service.NodeRevisionService
	// Dynamic - a content type's items with their fields (the SEO page's
	// sample of the schema.org markup).
	Dynamic func(entity.ContentTypeDef, entity.FieldInstanceDefs) entity.DynamicContentRepository
	// TwoFactor - two-factor sign-in: the roles that need it, a reset.
	TwoFactor        *twofactor.Service
	UserRepo         entity.UserRepository
	RoleRepo         entity.RoleRepository
	AdminBulkService service.AdminBulkService
	// NodeDeleter - the trash: its page, restoring, deleting for good.
	NodeDeleter *service.NodeDeleteService
	// Media - the media library: the files, their uses, deleting.
	Media               *service.MediaLibrary
	RedirectService     service.RedirectService
	PathRebuilder       *service.NodePathRebuilder
	BlockedBotService   service.BlockedBotService
	BlockedIPService    service.BlockedIPService
	MaintenanceService  service.MaintenanceService
	AccountSettings     *accounts.AccountPolicyService
	ImageStorage        imagestyle.DerivativeCaches
	TaxonomyService     service.TaxonomyService
	ContentTypeService  service.ContentTypeService
	ImageStyleService   service.ImageStyleService
	UploadSettingsRepo  entity.UploadSettingsRepository
	ViewService         views.Service
	FileUploadService   files.FileUploadService
	FileRepo            entity.FileRepository
	TextFormatService   service.TextFormatService
	MenuService         service.MenuService
	BlockService        service.BlockService
	UserDeletionService *service.UserDeletionService
	BreadcrumbService   *service.BreadcrumbService
	SeoService          *service.SEOService
	SearchService       *service.SearchService
	Permissions         *service.PermissionService
	Integrations        *service.IntegrationSettingsService
	ThemeSettings       *themes.SettingsService
	DateFormats         *service.DateFormatService
	UserFields          *accounts.UserFieldService
	Registration        *accounts.RegistrationService
	SwitchTheme         func(dir string)
	ThemeCatalog        *themes.CatalogService
	SiteURL             *service.SiteURL
	UserFiles           *files.UserFilesService
	CaptchaService      *service.CaptchaService
	CommentSettings     entity.CommentSettingsRepository
	MailService         *service.MailService
	OAuthSettings       *sociallogin.SettingsService
	OAuthRedirects      oauthRedirectURLs
	Modules             entity.ModuleRepository
	ModulesChanged      func()
	InstallModule       func(ctx context.Context, module string) error
	ModuleUninstall     *service.ModuleUninstall
	// Cache - the blocks' cache: refreshed after a change, cleared on the
	// Performance page.
	Cache *service.CacheService
	// InterfaceStrings - the interface's strings and the site's own
	// translations of them (Interface translations).
	InterfaceStrings *service.InterfaceStrings
}

Deps - what NewController needs besides the BaseDeps.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL