From 21b9f301c5e1305c3be4e260161d2495bca059de Mon Sep 17 00:00:00 2001 From: Steve Date: Thu, 12 Jan 2017 16:19:00 -0800 Subject: [addons] Expanding basic addon framework (#29) --- system/admin/admin.go | 3 +- system/admin/config/config.go | 12 +- system/admin/handlers.go | 584 +++++++++++++++++++++++++++- system/admin/server.go | 3 + system/admin/static/dashboard/css/admin.css | 17 + system/admin/upload/upload.go | 2 +- 6 files changed, 594 insertions(+), 27 deletions(-) (limited to 'system/admin') diff --git a/system/admin/admin.go b/system/admin/admin.go index e3ae2d6..9c4cfdd 100644 --- a/system/admin/admin.go +++ b/system/admin/admin.go @@ -64,7 +64,8 @@ var mainAdminHTML = `
System
  • settingsConfiguration
  • -
  • supervisor_accountUsers
  • +
  • supervisor_accountAdmin Users
  • +
  • settings_input_svideoAddons
  • diff --git a/system/admin/config/config.go b/system/admin/config/config.go index 2bc80c6..7b57dc0 100644 --- a/system/admin/config/config.go +++ b/system/admin/config/config.go @@ -8,7 +8,6 @@ import ( // Config represents the confirgurable options of the system type Config struct { item.Item - editor editor.Editor Name string `json:"name"` Domain string `json:"domain"` @@ -23,9 +22,6 @@ type Config struct { // String partially implements item.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 } - // MarshalEditor writes a buffer of html to edit a Post and partially implements editor.Editable func (c *Config) MarshalEditor() ([]byte, error) { view, err := editor.Form(c, @@ -90,7 +86,13 @@ func (c *Config) MarshalEditor() ([]byte, error) { return nil, err } - open := []byte(`
    `) + open := []byte(` +
    +
    +
    System Configuration
    +
    + + `) close := []byte(`
    `) script := []byte(`