2015-11-14 01:05:48 +08:00
|
|
|
{{template "base/head" .}}
|
|
|
|
<div class="dashboard feeds">
|
2015-12-08 06:30:52 +08:00
|
|
|
{{template "user/dashboard/navbar" .}}
|
|
|
|
<div class="ui container">
|
2017-02-08 09:37:23 +08:00
|
|
|
{{template "base/alert" .}}
|
2015-12-08 06:30:52 +08:00
|
|
|
<div class="ui grid">
|
|
|
|
<div class="ten wide column">
|
|
|
|
{{template "user/dashboard/feeds" .}}
|
|
|
|
</div>
|
2017-05-09 08:31:30 +08:00
|
|
|
<div id="dashboard-repo-search" class="six wide column">
|
2017-05-23 15:58:43 +08:00
|
|
|
<div class="ui {{if not .ContextUser.IsOrganization}}three{{else}}two{{end}} item stackable tabable menu">
|
2017-05-09 08:31:30 +08:00
|
|
|
<a :class="{item: true, active: tab === 'repos'}" @click="changeTab('repos')">{{.i18n.Tr "repository"}}</a>
|
2015-12-08 06:30:52 +08:00
|
|
|
{{if not .ContextUser.IsOrganization}}
|
2017-05-09 08:31:30 +08:00
|
|
|
<a :class="{item: true, active: tab === 'orgs'}" @click="changeTab('orgs')">{{.i18n.Tr "organization"}}</a>
|
2015-12-08 06:30:52 +08:00
|
|
|
{{end}}
|
2017-05-09 08:31:30 +08:00
|
|
|
<a :class="{item: true, active: tab === 'mirrors'}" @click="changeTab('mirrors')">{{.i18n.Tr "mirror"}}</a>
|
2015-12-08 06:30:52 +08:00
|
|
|
</div>
|
2017-05-09 08:31:30 +08:00
|
|
|
<div v-if="tab === 'repos'" class="ui tab active list">
|
2017-01-30 13:57:47 +08:00
|
|
|
<div class="ui fluid input">
|
2017-05-09 08:31:30 +08:00
|
|
|
<input @keyUp="searchKeyUp" v-model="searchQuery" id="search_repo" placeholder="{{.i18n.Tr "home.search_repos"}}">
|
2017-01-30 13:57:47 +08:00
|
|
|
</div>
|
2015-12-08 06:30:52 +08:00
|
|
|
<h4 class="ui top attached header">
|
|
|
|
{{.i18n.Tr "home.my_repos"}} <span class="ui grey label">{{.ContextUser.NumRepos}}</span>
|
|
|
|
<div class="ui right">
|
2016-01-30 04:28:24 +08:00
|
|
|
<a class="poping up" href="{{AppSubUrl}}/repo/create" data-content="{{.i18n.Tr "new_repo"}}" data-variation="tiny inverted" data-position="left center">
|
|
|
|
<i class="plus icon"></i>
|
|
|
|
<span class="sr-only">{{.i18n.Tr "new_repo"}}</span>
|
|
|
|
</a>
|
2015-12-08 06:30:52 +08:00
|
|
|
</div>
|
|
|
|
</h4>
|
|
|
|
<div class="ui attached table segment">
|
2017-05-09 08:31:30 +08:00
|
|
|
<ul class="repo-owner-name-list">
|
|
|
|
<li v-for="repo in repos" :class="{'private': repo.private}">
|
|
|
|
<a :href="'{{AppSubUrl}}/' + repo.full_name">
|
|
|
|
<i :class="repoClass(repo)"></i>
|
|
|
|
<strong class="text truncate item-name"><% repo.full_name %></strong>
|
|
|
|
<span class="ui right text light grey">
|
|
|
|
<% repo.stars_count %> <i class="octicon octicon-star rear"></i>
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
2016-07-24 14:32:46 +08:00
|
|
|
{{if gt .ContextUser.NumRepos .MaxShowRepoNum}}
|
|
|
|
<li>
|
|
|
|
<a href="{{.ContextUser.HomeLink}}">{{.i18n.Tr "home.show_more_repos"}}</a>
|
|
|
|
</li>
|
|
|
|
{{end}}
|
2015-12-08 06:30:52 +08:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
2015-11-14 01:05:48 +08:00
|
|
|
|
2015-12-08 06:30:52 +08:00
|
|
|
{{if not .ContextUser.IsOrganization}}
|
2017-05-09 08:31:30 +08:00
|
|
|
<div v-if="tab === 'orgs'" class="ui tab active list">
|
2015-12-08 06:30:52 +08:00
|
|
|
<h4 class="ui top attached header">
|
|
|
|
{{.i18n.Tr "home.my_orgs"}} <span class="ui grey label">{{.ContextUser.GetOrganizationCount}}</span>
|
|
|
|
<div class="ui right">
|
2017-05-12 15:10:25 +08:00
|
|
|
{{if .SignedUser.CanCreateOrganization}}
|
2016-01-30 04:28:24 +08:00
|
|
|
<a class="poping up" href="{{AppSubUrl}}/org/create" data-content="{{.i18n.Tr "new_org"}}" data-variation="tiny inverted" data-position="left center">
|
|
|
|
<i class="plus icon"></i>
|
|
|
|
<span class="sr-only">{{.i18n.Tr "new_org"}}</span>
|
|
|
|
</a>
|
2017-05-12 15:10:25 +08:00
|
|
|
{{end}}
|
2015-12-08 06:30:52 +08:00
|
|
|
</div>
|
|
|
|
</h4>
|
|
|
|
<div class="ui attached table segment">
|
2016-01-11 20:41:43 +08:00
|
|
|
<ul class="repo-owner-name-list">
|
2015-12-08 06:30:52 +08:00
|
|
|
{{range .ContextUser.Orgs}}
|
|
|
|
<li>
|
|
|
|
<a href="{{AppSubUrl}}/{{.Name}}">
|
2016-07-16 12:45:13 +08:00
|
|
|
<i class="octicon octicon-organization"></i>
|
2016-01-11 20:41:43 +08:00
|
|
|
<strong class="text truncate item-name">{{.Name}}</strong>
|
2015-12-08 06:30:52 +08:00
|
|
|
<span class="ui right text light grey">
|
2016-07-16 12:45:13 +08:00
|
|
|
{{.NumRepos}} <i class="octicon octicon-repo rear"></i>
|
2015-12-08 06:30:52 +08:00
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{{end}}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
2015-11-14 01:05:48 +08:00
|
|
|
|
2017-05-09 08:31:30 +08:00
|
|
|
<div v-if="tab === 'mirrors'" class="ui tab active list">
|
2015-12-08 06:30:52 +08:00
|
|
|
<h4 class="ui top attached header">
|
|
|
|
{{.i18n.Tr "home.my_mirrors"}} <span class="ui grey label">{{.MirrorCount}}</span>
|
|
|
|
<div class="ui right">
|
2016-01-30 04:28:24 +08:00
|
|
|
<a class="poping up" href="{{AppSubUrl}}/repo/migrate?mirror=1" data-content="{{.i18n.Tr "new_mirror"}}" data-variation="tiny inverted" data-position="left center">
|
|
|
|
<i class="plus icon"></i>
|
|
|
|
<span class="sr-only">{{.i18n.Tr "new_mirror"}}</span>
|
|
|
|
</a>
|
2015-12-08 06:30:52 +08:00
|
|
|
</div>
|
|
|
|
</h4>
|
|
|
|
<div class="ui attached table segment">
|
2016-01-11 20:41:43 +08:00
|
|
|
<ul class="repo-owner-name-list">
|
2015-12-08 06:30:52 +08:00
|
|
|
{{range .Mirrors}}
|
|
|
|
<li {{if .IsPrivate}}class="private"{{end}}>
|
|
|
|
<a href="{{AppSubUrl}}/{{$.ContextUser.Name}}/{{.Name}}">
|
2016-07-16 12:45:13 +08:00
|
|
|
<i class="octicon octicon-repo-clone"></i>
|
2016-01-11 20:41:43 +08:00
|
|
|
<strong class="text truncate item-name">{{.Name}}</strong>
|
2015-12-08 06:30:52 +08:00
|
|
|
<span class="ui right text light grey">
|
2016-07-16 12:45:13 +08:00
|
|
|
{{.Interval}}H <i class="octicon octicon-sync rear"></i>
|
2015-12-08 06:30:52 +08:00
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{{end}}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2014-07-26 12:24:27 +08:00
|
|
|
</div>
|
2015-12-08 06:30:52 +08:00
|
|
|
{{template "base/footer" .}}
|