1
0
mirror of https://github.com/go-gitea/gitea.git synced 2024-12-04 14:46:57 -05:00

minor update

This commit is contained in:
Unknwon 2015-08-26 12:26:01 +08:00
parent 27f7abdd77
commit b3a45693c3
4 changed files with 16 additions and 11 deletions

View File

@ -575,15 +575,22 @@ func initRepository(e Engine, repoPath string, u *User, repo *Repository, initRe
delete(fileName, "license") delete(fileName, "license")
} }
if len(fileName) == 0 {
// Re-fetch the repository from database before updating it (else it would // Re-fetch the repository from database before updating it (else it would
// override changes that were done earlier with sql) // override changes that were done earlier with sql)
if repo, err = getRepositoryByID(e, repo.ID); err != nil { if repo, err = getRepositoryByID(e, repo.ID); err != nil {
return err return fmt.Errorf("getRepositoryByID: %v", err)
} }
if len(fileName) == 0 {
repo.IsBare = true repo.IsBare = true
}
repo.DefaultBranch = "master" repo.DefaultBranch = "master"
return updateRepository(e, repo, false) if err = updateRepository(e, repo, false); err != nil {
return fmt.Errorf("updateRepository: %v", err)
}
// Ignore init process if user choose not to.
if len(fileName) == 0 {
return nil
} }
// Apply changes and commit. // Apply changes and commit.

File diff suppressed because one or more lines are too long

View File

@ -216,6 +216,6 @@ footer {
@media only screen and (max-width: 991px) and (min-width: 768px) { @media only screen and (max-width: 991px) and (min-width: 768px) {
.ui.container { .ui.container {
width: 90%; width: 95%;
} }
} }

View File

@ -14,13 +14,11 @@
{{.SignedUser.Name}} {{.SignedUser.Name}}
</a> </a>
{{range .Orgs}} {{range .Orgs}}
{{if .IsOwnedBy $.SignedUser.Id}}
<a class="{{if eq $.ContextUser.Id .Id}}active selected{{end}} item" href="{{AppSubUrl}}/org/{{.Name}}/issues"> <a class="{{if eq $.ContextUser.Id .Id}}active selected{{end}} item" href="{{AppSubUrl}}/org/{{.Name}}/issues">
<img class="ui image" src="{{.AvatarLink}}"> <img class="ui image" src="{{.AvatarLink}}">
{{.Name}} {{.Name}}
</a> </a>
{{end}} {{end}}
{{end}}
<a class="item" href="{{AppSubUrl}}/org/create"> <a class="item" href="{{AppSubUrl}}/org/create">
<i class="octicon octicon-repo-create"></i>&nbsp;&nbsp;&nbsp;{{.i18n.Tr "new_org"}} <i class="octicon octicon-repo-create"></i>&nbsp;&nbsp;&nbsp;{{.i18n.Tr "new_org"}}
</a> </a>