diff options
Diffstat (limited to 'templates/repo/view_file.tmpl')
-rw-r--r-- | templates/repo/view_file.tmpl | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl index 228d10cd99..4e2d4fc64c 100644 --- a/templates/repo/view_file.tmpl +++ b/templates/repo/view_file.tmpl @@ -2,15 +2,23 @@ <p class="panel-header"> {{if .ReadmeExist}} <i class="icon fa fa-book fa-lg"></i> - {{if .ReadmeInHome}} + {{if .ReadmeInList}} <strong class="file-name">{{.FileName}}</strong> {{else}} <strong>{{.FileName}}</strong><span class="file-size">{{FileSize .FileSize}}</span> {{end}} {{else}} - <i class="icon fa fa-file-text-o"></i> - <strong class="file-name">{{.FileName}}</strong><span class="file-size">{{FileSize .FileSize}}</span> + <i class="icon fa fa-file-text-o"></i> + <strong class="file-name">{{.FileName}}</strong><span class="file-size">{{FileSize .FileSize}}</span> {{end}} + {{if not .ReadmeInList}} + <a class="right" href="{{.RepoLink}}/commits/{{.BranchName}}/{{.TreeName}}"> + <button class="btn btn-medium btn-gray btn-right-radius btn-comb">{{.i18n.Tr "repo.file_history"}}</button> + </a> + <a class="right" href="{{.FileLink}}"> + <button class="btn btn-medium btn-gray btn-left-radius btn-comb">{{.i18n.Tr "repo.file_raw"}}</button> + </a> + {{end}} </p> <div class="{{if .ReadmeExist}}panel-content markdown{{end}} code-view" id="repo-code-view"> {{if .ReadmeExist}} @@ -20,7 +28,7 @@ {{if .IsImageFile}} <img src="{{.FileLink}}"> {{else}} - <a href="{{.FileLink}}" rel="nofollow" class="btn btn-gray btn-radius">View Raw</a> + <a href="{{.FileLink}}" rel="nofollow" class="btn btn-gray btn-radius">{{.i18n.Tr "repo.file_view_raw"}}</a> {{end}} </div> {{else if .FileSize}} |