diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/org/home.tmpl | 70 | ||||
-rw-r--r-- | templates/org/org.tmpl | 85 | ||||
-rw-r--r-- | templates/repo/create.tmpl | 17 |
3 files changed, 75 insertions, 97 deletions
diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl new file mode 100644 index 0000000000..a3c2326230 --- /dev/null +++ b/templates/org/home.tmpl @@ -0,0 +1,70 @@ +{{template "base/head" .}} +{{template "base/navbar" .}} +<div id="body-nav" class="org-nav"> + <div class="container clearfix"> + <div class="col-md-8" id="org-nav-wrapper"> + <img class="pull-left org-logo" src="{{.Org.AvatarLink}}?s=140" alt="" width="100"/> + <div id="org-nav-info"> + <h2 class="org-name">{{.Org.FullName}}</h2> + {{if .Org.Description}}<p class="org-description">{{.Org.Description}}</p>{{end}} + <ul class="org-meta list-inline"> + {{if .Org.Website}}<li><i class="fa fa-link"></i><a target="_blank" href="{{.Org.Website}}">{{.Org.Website}}</a></li>{{end}} + <li><i class="fa fa-envelope"></i><a href="mailto:{{.Org.Email}}">{{.Org.Email}}</a></li> + </ul> + </div> + </div> + </div> +</div> +<div id="body" class="container"> + <div id="org"> + <div class="org-main col-md-8"> + <div class="org-toolbar clearfix"> + <a class="btn pull-right btn-success" href="/repo/create?org={{.Org.Id}}"><i class="fa fa-plus"></i> New Repository</a> + </div> + <hr style="width: 100%;border-color: #DDD"/> + <div class="org-repo-list" id="org-repo-list"> + {{range .Repos}} + <div class="org-repo-item"> + <div class="org-repo-status pull-right"> + <!-- <ul class="list-inline"> + <li><strong>Go</strong></li> + <li><i class="i fa fa-star"></i><strong>6</strong></li> + <li><i class="fa fa-code-fork"></i><strong>2</strong></li> + </ul> --> + </div> + <h3 class="org-repo-name"><a href="/{{$.Org.Name}}/{{.Name}}">{{.Name}}</a></h3> + <p class="org-repo-description">{{.Description}}</p> + <p class="org-repo-update">Updated {{TimeSince .Updated}}</p> + </div> + {{end}} + </div> + </div> + + <div class="org-sidebar col-md-4"> + <div class="org-panel panel panel-default" id="org-sidebar-members"> + <div class="panel-heading"><strong><a href="/org/{{$.Org.Name}}/members">Members</a></strong></div> + <div class="panel-body"> + {{range .Members}} + <a class="org-member" href="/user/{{.Name}}" data-toggle="tooltip" title="{{.Name}}" data-placement="bottom"><img src="{{.AvatarLink}}?s=140" alt=""/></a> + {{end}} + </div> + </div> + <div class="org-panel panel panel-default" id="org-sidebar-teams"> + <div class="panel-heading"><strong><a href="/org/{{$.Org.Name}}/teams">Teams</a></strong></div> + <div class="panel-body"> + {{range .Teams}} + <div class="org-team"> + <a href="/org/{{$.Org.Name}}/teams/{{.LowerName}}"> + <p class="org-team-name"><strong>{{.Name}}</strong></p> + <p class="org-team-meta"> + {{.NumMembers}} members · {{.NumRepos}} repositories + </p> + </a> + </div> + {{end}} + </div> + </div> + </div> + </div> +</div> +{{template "base/footer" .}} diff --git a/templates/org/org.tmpl b/templates/org/org.tmpl deleted file mode 100644 index 872e50be86..0000000000 --- a/templates/org/org.tmpl +++ /dev/null @@ -1,85 +0,0 @@ -{{template "base/head" .}} -{{template "base/navbar" .}} -<div id="body-nav" class="org-nav"> - <div class="container clearfix"> - <div class="col-md-8" id="org-nav-wrapper"> - <img class="pull-left org-logo" src="https://avatars3.githubusercontent.com/u/6656686?s=140" alt="" width="100"/> - <div id="org-nav-info"> - <h2 class="org-name">Organization Name</h2> - <p class="org-description">Gogs(Go Git Service) is a Self Hosted Git Service in the Go Programming Language.</p> - <ul class="org-meta list-inline"> - <li><i class="fa fa-link"></i><a href="#">http://gogs.io</a></li> - <li><i class="fa fa-envelope"></i><a href="#">info@gogs.io</a></li> - </ul> - </div> - </div> - </div> -</div> -<div id="body" class="container"> - <div id="org"> - <div class="org-main col-md-8"> - <div class="org-toolbar clearfix"> - <button class="btn pull-right btn-success"><i class="fa fa-plus"></i> New Repository</button> - </div> - <hr style="width: 100%;border-color: #DDD"/> - <div class="org-repo-list" id="org-repo-list"> - <div class="org-repo-item"> - <div class="org-repo-status pull-right"> - <ul class="list-inline"> - <li><strong>Go</strong></li> - <li><i class="i fa fa-star"></i><strong>6</strong></li> - <li><i class="fa fa-code-fork"></i><strong>2</strong></li> - </ul> - </div> - <h3 class="org-repo-name"><a href="#">gogs</a></h3> - <p class="org-repo-description">Gogs(Go Git Service) is a Self Hosted Git Service in the Go Programming Language.</p> - <p class="org-repo-update">Updated 17 hours ago</p> - </div> - <div class="org-repo-item"> - <div class="org-repo-status pull-right"> - <ul class="list-inline"> - <li><strong>Go</strong></li> - <li><i class="i fa fa-star"></i><strong>6</strong></li> - <li><i class="fa fa-code-fork"></i><strong>2</strong></li> - </ul> - </div> - <h3 class="org-repo-name"><a href="#">gogs</a></h3> - <p class="org-repo-description">Gogs(Go Git Service) is a Self Hosted Git Service in the Go Programming Language.</p> - <p class="org-repo-update">Updated 17 hours ago</p> - </div> - </div> - </div> - <div class="org-sidebar col-md-4"> - <div class="org-panel panel panel-default" id="org-sidebar-members"> - <div class="panel-heading"><strong>Members</strong></div> - <div class="panel-body"> - <a class="org-member" href="#" data-toggle="tooltip" title="username" data-placement="bottom"><img src="https://avatars3.githubusercontent.com/u/6656686?s=140" alt=""/></a> - <a class="org-member" href="#" data-toggle="tooltip" title="username" data-placement="bottom"><img src="https://avatars3.githubusercontent.com/u/6656686?s=140" alt=""/></a> - <a class="org-member" href="#" data-toggle="tooltip" title="username" data-placement="bottom"><img src="https://avatars3.githubusercontent.com/u/6656686?s=140" alt=""/></a> - </div> - </div> - <div class="org-panel panel panel-default" id="org-sidebar-teams"> - <div class="panel-heading"><strong>Teams</strong></div> - <div class="panel-body"> - <div class="org-team"> - <a href="#"> - <p class="org-team-name"><strong>Team name</strong></p> - <p class="org-team-meta"> - 4 members · 10 repositories - </p> - </a> - </div> - <div class="org-team"> - <a href="#"> - <p class="org-team-name"><strong>Team name</strong></p> - <p class="org-team-meta"> - 4 members · 10 repositories - </p> - </a> - </div> - </div> - </div> - </div> - </div> -</div> -{{template "base/footer" .}} diff --git a/templates/repo/create.tmpl b/templates/repo/create.tmpl index 38b32a3bfc..ed01d9772b 100644 --- a/templates/repo/create.tmpl +++ b/templates/repo/create.tmpl @@ -10,23 +10,16 @@ <div class="col-md-8"> <div class="btn-group" id="repo-owner-switch"> <button type="button" class="btn btn-default" id="repo-owner-current"> - <img src="{{.SignedUser.AvatarLink}}?s=28" alt="user-avatar" title="username" id="repo-owner-avatar"> - <span id="repo-owner-name">{{.SignedUser.Name}}</span> + <img src="{{.ContextUser.AvatarLink}}?s=28" alt="user-avatar" title="username" id="repo-owner-avatar"> + <span id="repo-owner-name">{{.ContextUser.Name}}</span> </button> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown"> <span class="caret"></span> </button> <div class="dropdown-menu clone-group-btn no-propagation"> <ul id="dashboard-switch-menu" class="list-unstyled"> - <li data-uid="{{.SignedUser.Id}}" class="checked"> - <a> - <i class="fa fa-check"></i> - <img src="{{.SignedUser.AvatarLink}}?s=28" alt="user-avatar" title="username"> - {{.SignedUser.Name}} - </a> - </li> - {{range .Orgs}} - <li data-uid="{{.Id}}"> + {{range .AllUsers}} + <li data-uid="{{.Id}}"{{if eq .Id $.ContextUser.Id}}class="checked"{{end}}> <a> <i class="fa fa-check"></i> <img src="{{.AvatarLink}}?s=28" alt="user-avatar" title="username"> @@ -38,7 +31,7 @@ </div> </div> </div> - <input type="hidden" value="{{.SignedUserId}}" name="uid" id="repo-owner-id"/> + <input type="hidden" value="{{.ContextUser.Id}}" name="uid" id="repo-owner-id"/> </div> <div class="form-group {{if .Err_RepoName}}has-error has-feedback{{end}}"> |