From e67653cf13857f671de9bf6279453f99cdd60d11 Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 21 Mar 2014 04:13:32 -0400 Subject: [PATCH] Bug fix --- CONTRIBUTING.md | 49 ++++++++++++++++++++++++++++++++++ routers/admin/admin.go | 6 ++++- templates/admin/config.tmpl | 1 + templates/admin/dashboard.tmpl | 9 +++++++ templates/repo/nav.tmpl | 6 ++--- 5 files changed, 67 insertions(+), 4 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..08013d370 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,49 @@ +# Contributing to Gogs + +Want to hack on Gogs? Awesome! Here are instructions to get you +started. They are probably not perfect, please let us know if anything +feels wrong or incomplete. + +## Contribution guidelines + +### Pull requests are always welcome + +We are always thrilled to receive pull requests, and do our best to +process them as fast as possible. Not sure if that typo is worth a pull +request? Do it! We will appreciate it. + +If your pull request is not accepted on the first try, don't be +discouraged! If there's a problem with the implementation, hopefully you +received feedback on what to improve. + +We're trying very hard to keep Gogs lean and focused. We don't want it +to do everything for everybody. This means that we might decide against +incorporating a new feature. + +### Discuss your design on the mailing list + +We recommend discussing your plans [on the mailing +list](https://groups.google.com/forum/#!forum/gogits) +before starting to code - especially for more ambitious contributions. +This gives other contributors a chance to point you in the right +direction, give feedback on your design, and maybe point out if someone +else is working on the same thing. + +We may close your pull request if not first discussed on the mailing +list. We aren't doing this to be jerks. We are doing this to prevent +people from spending large amounts of time on changes that may need +to be designed or architected in a specific way, or may not align with +the vision of the project. + +### Create issues... + +Any significant improvement should be documented as [a GitHub +issue](https://github.com/gogits/gogs/issues) before anybody +starts working on it. + +### ...but check for existing issues first! + +Please take a moment to check that an issue doesn't already exist +documenting your bug report or improvement proposal. If it does, it +never hurts to add a quick "+1" or "I have this problem too". This will +help prioritize the most common problems and requests. \ No newline at end of file diff --git a/routers/admin/admin.go b/routers/admin/admin.go index 547883f7b..6d3831a9f 100644 --- a/routers/admin/admin.go +++ b/routers/admin/admin.go @@ -61,7 +61,11 @@ func Config(ctx *middleware.Context) { ctx.Data["DbCfg"] = models.DbCfg - ctx.Data["Mailer"] = base.MailService + ctx.Data["MailerEnabled"] = false + if base.MailService != nil { + ctx.Data["MailerEnabled"] = true + ctx.Data["Mailer"] = base.MailService + } ctx.HTML(200, "admin/config") } diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl index 9593a545f..7013c201a 100644 --- a/templates/admin/config.tmpl +++ b/templates/admin/config.tmpl @@ -57,6 +57,7 @@
+
Enabled:
Name: {{.Mailer.Name}}
Host: {{.Mailer.Host}}
User: {{.Mailer.User}}
diff --git a/templates/admin/dashboard.tmpl b/templates/admin/dashboard.tmpl index 8950f50ca..6088487d6 100644 --- a/templates/admin/dashboard.tmpl +++ b/templates/admin/dashboard.tmpl @@ -12,6 +12,15 @@ Gogs database has {{.Stats.Counter.User}} users, {{.Stats.Counter.PublicKey}} SSH keys, {{.Stats.Counter.Repo}} repositories, {{.Stats.Counter.Watch}} watches, {{.Stats.Counter.Action}} actions, and {{.Stats.Counter.Access}} accesses.
+ +
+
+ System Status +
+ +
+
+
{{template "base/footer" .}} \ No newline at end of file diff --git a/templates/repo/nav.tmpl b/templates/repo/nav.tmpl index 718c429a2..c61051af2 100644 --- a/templates/repo/nav.tmpl +++ b/templates/repo/nav.tmpl @@ -5,8 +5,8 @@

{{.Owner.Name}} / {{.Repository.Name}}

{{.Repository.Description}}{{if .Repository.Website}}{{.Repository.Website}}{{end}}

- {{if not .IsBareRepo}}
+ {{if not .IsBareRepo}}
+ {{end}}
- + Fork  {{.Repository.NumForks}}
- {{end}} \ No newline at end of file