diff --git a/public/js/index.js b/public/js/index.js index 1bad33e08d..1372afa425 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -1687,13 +1687,33 @@ function initVueComponents(){ type: Number, required: true }, + organizations: { + type: Array, + default: [] + }, + isOrganization: { + type: Boolean, + default: true + }, + canCreateOrganization: { + type: Boolean, + default: false + }, + organizationsTotalCount: { + type: Number, + default: 0 + }, + moreReposLink: { + type: String, + default: '' + } }, data: function() { return { tab: 'repos', repos: [], - reposTotal: 0, + reposTotalCount: 0, reposFilter: 'all', searchQuery: '', isLoading: false @@ -1741,7 +1761,7 @@ function initVueComponents(){ if (searchedQuery == self.searchQuery) { self.repos = result.data; if (searchedQuery == "") { - self.reposTotal = request.getResponseHeader('X-Total-Count'); + self.reposTotalCount = request.getResponseHeader('X-Total-Count'); } } }).always(function() { diff --git a/templates/user/dashboard/dashboard.tmpl b/templates/user/dashboard/dashboard.tmpl index e76b1378dc..f88ad67056 100644 --- a/templates/user/dashboard/dashboard.tmpl +++ b/templates/user/dashboard/dashboard.tmpl @@ -8,19 +8,34 @@ {{template "user/dashboard/feeds" .}}
- -
- {{if not .ContextUser.IsOrganization}} - + + ]" + :is-organization="false" + :organizations-total-count="{{.ContextUser.GetOrganizationCount}}" + :can-create-organization="{{.SignedUser.CanCreateOrganization}}" + {{end}} + inline-template + v-cloak + > +
+ +

- {{.i18n.Tr "home.my_repos"}} ${ reposTotal } + {{.i18n.Tr "home.my_repos"}} ${reposTotalCount} - - {{if not .ContextUser.IsOrganization}} -
-

- {{.i18n.Tr "home.my_orgs"}} {{.ContextUser.GetOrganizationCount}} -
- {{if .SignedUser.CanCreateOrganization}} - - - {{.i18n.Tr "new_org"}} - - {{end}} -
-

-
- +
+

+ {{.i18n.Tr "home.my_orgs"}} ${organizationsTotalCount} + +

+ - {{end}} +