浏览代码

[Doi] Add doifile check

cgars 8 年之前
父节点
当前提交
f5610ad5cc
共有 2 个文件被更改,包括 5 次插入1 次删除
  1. 4 0
      models/repo.go
  2. 1 1
      templates/repo/header.tmpl

+ 4 - 0
models/repo.go

@@ -195,6 +195,10 @@ type Repository struct {
 	UpdatedUnix int64
 	UpdatedUnix int64
 }
 }
 
 
+func (repo *Repository) CanDoified() bool {
+	return true
+}
+
 func (repo *Repository) BeforeInsert() {
 func (repo *Repository) BeforeInsert() {
 	repo.CreatedUnix = time.Now().Unix()
 	repo.CreatedUnix = time.Now().Unix()
 	repo.UpdatedUnix = repo.CreatedUnix
 	repo.UpdatedUnix = repo.CreatedUnix

+ 1 - 1
templates/repo/header.tmpl

@@ -37,7 +37,7 @@
 							<div class="ui labeled button" tabindex="0">
 							<div class="ui labeled button" tabindex="0">
 								<a class="ui basic button"
 								<a class="ui basic button"
 									 href="https://doi.gin.g-node.org/?repo={{.FullName}}&name={{.Owner.Name}}&token={{$.SessionID}}">
 									 href="https://doi.gin.g-node.org/?repo={{.FullName}}&name={{.Owner.Name}}&token={{$.SessionID}}">
-									<i class="octicon octicon-squirrel"></i>Doify
+									<i class="octicon octicon-squirrel"></i> Doify
 								</a>
 								</a>
 							</div>
 							</div>
 							{{end}}
 							{{end}}