From 4e5f54cf8f64b849bf2fbdd610012ebeb7786091 Mon Sep 17 00:00:00 2001 From: Steve Manuel Date: Tue, 6 Dec 2016 09:54:14 -0800 Subject: removing ContentName() from editor.Editble and adding String() to content.Identifiable so embedded Items can manage display names by default, but easily overridden --- system/admin/config/config.go | 4 ++-- system/admin/handlers.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'system/admin') diff --git a/system/admin/config/config.go b/system/admin/config/config.go index 0a7103e..b898b49 100644 --- a/system/admin/config/config.go +++ b/system/admin/config/config.go @@ -18,8 +18,8 @@ type Config struct { CacheInvalidate []string `json:"cache"` } -// ContentName partially implements editor.Editable -func (c *Config) ContentName() string { return c.Name } +// String partially implements content.Identifiable and overrides Item's String() +func (c *Config) String() string { return c.Name } // Editor partially implements editor.Editable func (c *Config) Editor() *editor.Editor { return &c.editor } diff --git a/system/admin/handlers.go b/system/admin/handlers.go index 247cca7..7ea018c 100644 --- a/system/admin/handlers.go +++ b/system/admin/handlers.go @@ -1071,7 +1071,7 @@ func adminPostListItem(e editor.Editable, typeName, status string) []byte { post := `
  • - ` + e.ContentName() + ` + ` + i.String() + ` Updated: ` + updatedTime + ` ` + publishTime + ` -- cgit v1.2.3