summaryrefslogtreecommitdiff
path: root/system/admin/admin.go
diff options
context:
space:
mode:
authorSteve <nilslice@gmail.com>2016-12-19 11:19:53 -0800
committerGitHub <noreply@github.com>2016-12-19 11:19:53 -0800
commit3791fadda7b761ffba38c567da29e2e71acd1dfb (patch)
tree79d810f9aafa1868ee0760983937470d0eea3db8 /system/admin/admin.go
parentb20c5bdee38682edc851e646d815a34689c3c923 (diff)
[addons] Creating foundation for plugin-like system "Addons" (#24)
* adding addons dir and sample addon which enables the use of a new input element in forms for referencing other content. "addons" is a conceptual plugin-like feature, similar to wordpress "plugins" dir, but not as sophisticated
Diffstat (limited to 'system/admin/admin.go')
-rw-r--r--system/admin/admin.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/system/admin/admin.go b/system/admin/admin.go
index 9ddff84..78f607d 100644
--- a/system/admin/admin.go
+++ b/system/admin/admin.go
@@ -8,10 +8,10 @@ import (
"html/template"
"net/http"
- "github.com/bosssauce/ponzu/content"
"github.com/bosssauce/ponzu/system/admin/user"
"github.com/bosssauce/ponzu/system/api/analytics"
"github.com/bosssauce/ponzu/system/db"
+ "github.com/bosssauce/ponzu/system/item"
)
var startAdminHTML = `<!doctype html>
@@ -104,7 +104,7 @@ func Admin(view []byte) ([]byte, error) {
a := admin{
Logo: string(cfg),
- Types: content.Types,
+ Types: item.Types,
Subview: template.HTML(view),
}
@@ -169,17 +169,17 @@ var initAdminHTML = `
func Init() ([]byte, error) {
html := startAdminHTML + initAdminHTML + endAdminHTML
- cfg, err := db.Config("name")
+ name, err := db.Config("name")
if err != nil {
return nil, err
}
- if cfg == nil {
- cfg = []byte("")
+ if name == nil {
+ name = []byte("")
}
a := admin{
- Logo: string(cfg),
+ Logo: string(name),
}
buf := &bytes.Buffer{}