diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/.VERSION | 2 | ||||
-rw-r--r-- | templates/repo/header.tmpl | 41 |
2 files changed, 23 insertions, 20 deletions
diff --git a/templates/.VERSION b/templates/.VERSION index 38133b40a6..3afe67a377 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.5.5.1018 Beta
\ No newline at end of file +0.5.6.1019 Beta
\ No newline at end of file diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl index 884910d1c5..c2caf4b015 100644 --- a/templates/repo/header.tmpl +++ b/templates/repo/header.tmpl @@ -1,11 +1,13 @@ +{{with .Repository}} <div id="repo-header" class="clear"> <div class="container clear"> <h1 id="repo-header-name" class="left public"> - <i class="mega-octicon octicon-{{if .Repository.IsPrivate}}lock{{else if .Repository.IsMirror}}repo-clone{{else}}repo{{end}}"></i> + <i class="mega-octicon octicon-{{if .IsPrivate}}lock{{else if .IsMirror}}repo-clone{{else if .IsFork}}repo-forked{{else}}repo{{end}}"></i> <a class="author" href="{{AppSubUrl}}/{{.Owner.Name}}">{{.Owner.Name}}</a> <span class="divider">/</span> - <a class="repo text-bold" href="{{.RepoLink}}">{{.Repository.Name}}</a> - {{if .Repository.IsMirror}}<span class="label label-gray">{{.i18n.Tr "mirror"}}</span>{{end}} + <a class="repo text-bold" href="{{$.RepoLink}}">{{.Name}}</a> + {{if .IsMirror}}<span class="label label-gray">{{$.i18n.Tr "mirror"}}</span>{{end}} + {{if .IsFork}}<span class="fork-flag">forked from <a href="{{.ForkRepo.RepoLink}}">{{SubStr .ForkRepo.RepoLink 1 -1}}</a></span>{{end}} </h1> <ul id="repo-header-meta" class="right menu menu-line"> <li id="repo-header-download" class="drop"> @@ -16,43 +18,44 @@ </a> <div id="repo-header-download-drop" class="drop-down"> <div id="repo-clone" class="clear"> - <button class="btn btn-blue left left btn-left-radius" id="repo-clone-ssh" data-link="{{.CloneLink.SSH}}">SSH</button> - <button class="btn btn-gray left" id="repo-clone-https" data-link="{{.CloneLink.HTTPS}}">HTTPS</button> - <input id="repo-clone-url" class="ipt ipt-disabled left" value="{{.CloneLink.SSH}}" readonly /> - <button id="repo-clone-copy" class="btn btn-black left btn-right-radius" data-copy-val="val" data-copy-from="#repo-clone-url" original-title="{{.i18n.Tr "repo.click_to_copy"}}" data-original-title="{{.i18n.Tr "repo.click_to_copy"}}" data-after-title="{{.i18n.Tr "repo.copied"}}">{{.i18n.Tr "repo.copy_link"}}</button> - <p class="text-center" id="repo-clone-help">{{.i18n.Tr "repo.clone_helper" | Str2html}}</p> + <button class="btn btn-blue left left btn-left-radius" id="repo-clone-ssh" data-link="{{$.CloneLink.SSH}}">SSH</button> + <button class="btn btn-gray left" id="repo-clone-https" data-link="{{$.CloneLink.HTTPS}}">HTTPS</button> + <input id="repo-clone-url" class="ipt ipt-disabled left" value="{{$.CloneLink.SSH}}" readonly /> + <button id="repo-clone-copy" class="btn btn-black left btn-right-radius" data-copy-val="val" data-copy-from="#repo-clone-url" original-title="{{$.i18n.Tr "repo.click_to_copy"}}" data-original-title="{{$.i18n.Tr "repo.click_to_copy"}}" data-after-title="{{$.i18n.Tr "repo.copied"}}">{{$.i18n.Tr "repo.copy_link"}}</button> + <p class="text-center" id="repo-clone-help">{{$.i18n.Tr "repo.clone_helper" | Str2html}}</p> <hr/> <div class="text-center" id="repo-clone-zip"> - <a class="btn btn-green btn-radius" href="{{.RepoLink}}/archive/{{.BranchName}}.zip"><i class="octicon octicon-file-zip"></i>ZIP</a> - <a class="btn btn-green btn-radius" href="{{.RepoLink}}/archive/{{.BranchName}}.tar.gz"><i class="octicon octicon-file-zip"></i>TAR.GZ</a> + <a class="btn btn-green btn-radius" href="{{$.RepoLink}}/archive/{{$.BranchName}}.zip"><i class="octicon octicon-file-zip"></i>ZIP</a> + <a class="btn btn-green btn-radius" href="{{$.RepoLink}}/archive/{{$.BranchName}}.tar.gz"><i class="octicon octicon-file-zip"></i>TAR.GZ</a> </div> </div> </div> </li> <li id="repo-header-watch"> - <a id="repo-header-watch-btn" href="{{.RepoLink}}/action/{{if .IsWatchingRepo}}un{{end}}watch"> + <a id="repo-header-watch-btn" href="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch"> <button class="btn btn-gray text-bold btn-radius"> - <i class="octicon octicon-eye-watch"></i>{{if .IsWatchingRepo}}{{.i18n.Tr "repo.unwatch"}}{{else}}{{.i18n.Tr "repo.watch"}}{{end}}<span class="num">{{.Repository.NumWatches}}</span> + <i class="octicon octicon-eye-watch"></i>{{if $.IsWatchingRepo}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{$.i18n.Tr "repo.watch"}}{{end}}<span class="num">{{.NumWatches}}</span> </button> </a> </li> <li id="repo-header-star"> - <a id="repo-header-star-btn" href="{{.RepoLink}}/action/{{if .IsStaringRepo}}un{{end}}star"> + <a id="repo-header-star-btn" href="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star"> <button class="btn btn-gray text-bold btn-radius"> - <i class="octicon octicon-star"></i>{{if .IsStaringRepo}}{{.i18n.Tr "repo.unstar"}}{{else}}{{.i18n.Tr "repo.star"}}{{end}} - <span class="num">{{.Repository.NumStars}}</span> + <i class="octicon octicon-star"></i>{{if $.IsStaringRepo}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{$.i18n.Tr "repo.star"}}{{end}} + <span class="num">{{.NumStars}}</span> </button> </a> </li> <li id="repo-header-fork"> - <a id="repo-header-fork-btn" {{if not .IsRepositoryOwner}} href="{{.RepoLink}}/action/fork"{{end}}> + <a id="repo-header-fork-btn" {{if not $.IsRepositoryTrueOwner}}href="{{.RepoLink}}/action/fork"{{end}}> <button class="btn btn-gray text-bold btn-radius"> - <i class="octicon octicon-repo-forked"></i>{{.i18n.Tr "repo.fork"}} - <span class="num">{{.Repository.NumForks}}</span> + <i class="octicon octicon-repo-forked"></i>{{$.i18n.Tr "repo.fork"}} + <span class="num">{{.NumForks}}</span> </button> </a> </li> </ul> </div> -</div>
\ No newline at end of file +</div> +{{end}}
\ No newline at end of file |