]> source.dussan.org Git - gitea.git/commitdiff
Bug fix
authorUnknown <joe2010xtmf@163.com>
Fri, 21 Mar 2014 08:13:32 +0000 (04:13 -0400)
committerUnknown <joe2010xtmf@163.com>
Fri, 21 Mar 2014 08:13:32 +0000 (04:13 -0400)
CONTRIBUTING.md [new file with mode: 0644]
routers/admin/admin.go
templates/admin/config.tmpl
templates/admin/dashboard.tmpl
templates/repo/nav.tmpl

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644 (file)
index 0000000..08013d3
--- /dev/null
@@ -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
index 547883f7bc3a078e9d691716cc8a33902901cb7f..6d3831a9f39f142cec8e015df5b1a60072a9ae4e 100644 (file)
@@ -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")
 }
index 9593a545f8f24244a2de47b1a6b8b113ab09ee42..7013c201ae9610c70ba1174007dfa9b11acc2cf1 100644 (file)
@@ -57,6 +57,7 @@
             </div>
 
             <div class="panel-body">
+                <div><b>Enabled:</b> <i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></div>
                 <div><b>Name:</b> {{.Mailer.Name}}</div>
                 <div><b>Host:</b> {{.Mailer.Host}}</div>
                 <div><b>User:</b> {{.Mailer.User}}</div>
index 8950f50cac8a39d03bd8f7b0415baf13c9a1dfb5..6088487d62ee931bf1dfdbc544c7e4b19672b56e 100644 (file)
                 Gogs database has <b>{{.Stats.Counter.User}}</b> users, <b>{{.Stats.Counter.PublicKey}}</b> SSH keys, <b>{{.Stats.Counter.Repo}}</b> repositories, <b>{{.Stats.Counter.Watch}}</b> watches, <b>{{.Stats.Counter.Action}}</b> actions, and <b>{{.Stats.Counter.Access}}</b> accesses.
             </div>
         </div>
+
+        <div class="panel panel-default">
+            <div class="panel-heading">
+                System Status
+            </div>
+
+            <div class="panel-body">
+            </div>
+        </div>
     </div>
 </div>
 {{template "base/footer" .}}
\ No newline at end of file
index 718c429a2be5bea770c12188dc7949fd7dbbc2eb..c61051af25320f9eaf5ce5786f01c9500188a75b 100644 (file)
@@ -5,8 +5,8 @@
                 <h3 class="name"><i class="fa fa-book fa-lg"></i><a href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a> / {{.Repository.Name}}</h3>
                 <p class="desc">{{.Repository.Description}}{{if .Repository.Website}}<a href="{{.Repository.Website}}">{{.Repository.Website}}</a>{{end}}</p>
             </div>
-            {{if not .IsBareRepo}}
             <div class="col-md-6 actions text-right">
+                {{if not .IsBareRepo}}
                 <div class="btn-group" id="gogs-repo-clone">
                     <button type="button" class="btn btn-default"><i class="fa fa-download fa-lg fa-m"></i></button>
                     <button type="button" class="btn btn-default dropdown-toggle" data-container="body" data-toggle="popover" data-placement="bottom" data-content="<label>SSH:</label><div class='input-group'><input type='text' class='form-control' value='{{.CloneLink.SSH}}'></div>" data-html="1">
                 <div class="btn-group">
                     <button type="button" class="btn btn-default"><i class="fa fa-star"></i>Star&nbsp;&nbsp;{{.Repository.NumStars}}</button>
                 </div>
+                {{end}}
                 <div class="btn-group">
-                    <button type="button" class="btn btn-default"><i class="fa fa-code-fork"></i>Fork&nbsp;&nbsp;{{.Repository.NumForks}}</button>
+                    <a type="button" {{if not .IsRepositoryOwner}}href="/{{.Username}}/{{.Reponame}}/fork"{{end}} class="btn btn-default"><i class="fa fa-code-fork"></i>Fork&nbsp;&nbsp;{{.Repository.NumForks}}</a>
                 </div>
             </div>
-            {{end}}
         </div>
     </div>
 </div>
\ No newline at end of file