You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
2.6 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. {{template "base/head" .}}
  2. {{template "base/navbar" .}}
  3. {{template "repo/nav" .}}
  4. {{template "repo/toolbar" .}}
  5. <div id="gogs-body" class="container">
  6. <div id="gogs-source">
  7. <div id="gogs-source-toolbar">
  8. <button class="btn btn-default pull-right"><i class="fa fa-plus-square"></i>Add File</button>
  9. <div class="dropdown branch-switch">
  10. <a href="#" class="btn btn-success dropdown-toggle" data-toggle="dropdown"><i class="fa fa-chain"></i>master&nbsp;&nbsp;
  11. <b class="caret"></b></a>
  12. <ul class="dropdown-menu">
  13. <li><a class="current" href="/{{.RepositoryLink}}/branch/master">master</a></li>
  14. <li><a href="//{{.RepositoryLink}}/branch/develop">develop</a></li>
  15. </ul>
  16. </div>
  17. {{$paths := .Paths}}
  18. {{ $username := .Username}}
  19. {{ $reponame := .Reponame}}
  20. {{ $branchname := .Branchname}}
  21. {{ $treenames := .Treenames}}
  22. {{ $n := len $treenames}}
  23. {{ $l := Subtract $n 1}}
  24. <ol class="breadcrumb">
  25. <li class="root dir"><a href="/{{$username}}/{{$reponame}}/tree/{{$branchname}}">{{.Repository.Name}}</a></li>
  26. {{range $i, $v := $treenames}}
  27. <li class="dir">
  28. {{if eq $i $l}}{{$v}}
  29. {{else}}
  30. <a href="/{{$username}}/{{$reponame}}/tree/{{$branchname}}/{{index $paths $i}}">{{$v}}</a>&nbsp;
  31. {{end}}</li>
  32. {{end}}
  33. </ol>
  34. </div>
  35. <table id="gogs-source-table" class="table table-hover">
  36. <thead class="hidden">
  37. <tr>
  38. <th class="name">Filename</th>
  39. <th class="date">Date modified</th>
  40. <th class="text">Message</th>
  41. </tr>
  42. </thead>
  43. <tbody>
  44. {{range .Files}}
  45. <tr {{if .IsDir}}class="is-dir"{{end}}>
  46. <td class="name"><i class="fa {{if .IsDir}}fa-folder{{else}}fa-file{{end}}"></i>
  47. {{if .IsDir}}
  48. <a href="/{{$username}}/{{$reponame}}/tree/{{$branchname}}/{{.Path}}">{{.Name}}</a>
  49. {{else}}
  50. <a href="#">{{.Name}}</a>
  51. {{end}}</td>
  52. <td class="date"><time datetime="{{.Created}}" data-title="true" title="{{.Created}}">{{TimeSince .Created}}</time></td>
  53. <td class="text">{{.Message}}</td>
  54. </tr>
  55. {{end}}
  56. </tbody>
  57. </table>
  58. </div>
  59. </div>
  60. {{template "base/footer" .}}