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.

139 lines
5.8 KiB

9 years ago
{{template "base/head" .}}
<div class="dashboard feeds">
{{template "user/dashboard/navbar" .}}
<div class="ui container">
<div class="ui grid">
<div class="ten wide column">
{{template "user/dashboard/feeds" .}}
{{if .AfterID}}
<button class="ui fluid basic button center ajax-load-button" data-url="{{.Link}}?after_id={{.AfterID}}">More</button>
{{end}}
</div>
<div class="six wide column">
<div class="ui {{if not .ContextUser.IsOrganization}}three{{else}}two{{end}} item tabable menu">
<a class="item active" data-tab="repos">{{.i18n.Tr "repository"}}</a>
{{if not .ContextUser.IsOrganization}}
<a class="item" data-tab="orgs">{{.i18n.Tr "organization"}}</a>
{{end}}
<a class="item" data-tab="mirrors">{{.i18n.Tr "mirror"}}</a>
</div>
<div class="ui tab active list" data-tab="repos">
<div class="ui top attached header">
{{.i18n.Tr "home.my_repos"}} <span class="ui grey label">{{.RepoCount}}</span>
<div class="ui right">
<a class="poping up" href="{{AppSubURL}}/repo/create{{if .ContextUser.IsOrganization}}?org={{.ContextUser.ID}}{{end}}" 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>
</div>
</div>
<div class="ui attached table segment">
<ul class="repo-owner-name-list">
{{range .Repos}}
<li {{if .IsPrivate}}class="private"{{end}}>
<a href="{{AppSubURL}}/{{$.ContextUser.Name}}/{{.Name}}">
repo: support avatars (#5221) * First code for repository avatars * Last code for repository avatars - add new option for repo avatars location on filesystem - add route catch in web - add new fields to repo model - add migration - update settings handlers - update repo header template * Update locale messages * Add repo avatars to home page * Add repo avatars to organization right panel * Show repo avatars in repo list * Remove AvatarEamil field, remove Gravatar support, use generic locale messages * Fix migration * Fix seed and not used tool * Revert public css changes, add them to less files * Latest lessc (2.6.0) don't put result into file but output to stdout So redirect output to file * Simplify things: - migration don't needed, and table changes too - just upload file to repo avatar storage - or generate random image * Fix repo image seed - name not unique * Get rid of not needed model fields * Class value is enough, remove height attribute * Don't generate random avatar for repository - use html and semantic ui icons if no avatar found * Update styles and templates for repo - use repo icon as default avatar - use globe icon for public repos - add micro style for repo avatars at dashboard * Remvoe redundant empty line * Fix nl2br filter - must return string * Fix css style for micro-repo-avatar in dashboard list * Remove `|len`, works fine w/o it. * Update after review 2: - use static route for repository avatar - format images settings block in settings * Update after review 2: - no random avatar for repo * Update after review 2: - no random avatar for repo 2 - update imports - update UploadAvatar* functions * Update after review 2: - update templates * Fix trace call * Remove unused immport since we use static route for repo avatars.
7 years ago
{{if .RelAvatarLink}}<img class="ui micro image" src="{{.RelAvatarLink}}" />{{else}}<i class="octicon octicon-repo"></i>{{end}}
<i class="octicon octicon-{{if .IsFork}}repo-forked{{else if .IsPrivate}}lock{{else if .IsMirror}}repo-clone{{else}}globe{{end}}"></i>
<strong class="text truncate item-name">{{.Name}}</strong>
<span class="ui right text light grey">
{{.NumStars}} <i class="octicon octicon-star rear"></i>
</span>
</a>
</li>
{{end}}
{{if gt .ContextUser.NumRepos .MaxShowRepoNum}}
<li>
<a href="{{.ContextUser.HomeLink}}">{{.i18n.Tr "home.show_more_repos"}}</a>
</li>
{{end}}
</ul>
</div>
9 years ago
{{if not .ContextUser.IsOrganization}}
<h4 class="ui top attached header">
{{.i18n.Tr "home.collaborative_repos"}}
</h4>
<div class="ui attached table segment">
<ul id="collaborative-repo-list">
{{range .CollaborativeRepos}}
<li {{if .IsPrivate}}class="private"{{end}}>
<a href="{{AppSubURL}}/{{.Owner.Name}}/{{.Name}}">
repo: support avatars (#5221) * First code for repository avatars * Last code for repository avatars - add new option for repo avatars location on filesystem - add route catch in web - add new fields to repo model - add migration - update settings handlers - update repo header template * Update locale messages * Add repo avatars to home page * Add repo avatars to organization right panel * Show repo avatars in repo list * Remove AvatarEamil field, remove Gravatar support, use generic locale messages * Fix migration * Fix seed and not used tool * Revert public css changes, add them to less files * Latest lessc (2.6.0) don't put result into file but output to stdout So redirect output to file * Simplify things: - migration don't needed, and table changes too - just upload file to repo avatar storage - or generate random image * Fix repo image seed - name not unique * Get rid of not needed model fields * Class value is enough, remove height attribute * Don't generate random avatar for repository - use html and semantic ui icons if no avatar found * Update styles and templates for repo - use repo icon as default avatar - use globe icon for public repos - add micro style for repo avatars at dashboard * Remvoe redundant empty line * Fix nl2br filter - must return string * Fix css style for micro-repo-avatar in dashboard list * Remove `|len`, works fine w/o it. * Update after review 2: - use static route for repository avatar - format images settings block in settings * Update after review 2: - no random avatar for repo * Update after review 2: - no random avatar for repo 2 - update imports - update UploadAvatar* functions * Update after review 2: - update templates * Fix trace call * Remove unused immport since we use static route for repo avatars.
7 years ago
{{if .RelAvatarLink}}<img class="ui micro image" src="{{.RelAvatarLink}}" />{{else}}<i class="octicon octicon-repo"></i>{{end}}
<i class="octicon octicon-{{if .IsPrivate}}lock{{else if .IsFork}}repo-forked{{else if .IsMirror}}repo-clone{{else}}globe{{end}}"></i>
<span class="text truncate owner-and-repo">
<span class="text truncate owner-name">{{.Owner.Name}}</span> / <strong>{{.Name}}</strong>
</span>
<span class="ui right text light grey">
{{.NumStars}} <i class="octicon octicon-star rear"></i>
</span>
</a>
</li>
{{end}}
</ul>
</div>
{{end}}
</div>
9 years ago
{{if not .ContextUser.IsOrganization}}
<div class="ui tab list" data-tab="orgs">
<div class="ui top attached header">
{{.i18n.Tr "home.my_orgs"}} <span class="ui grey label">{{.ContextUser.GetOrganizationCount}}</span>
<div class="ui right">
<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>
</div>
</div>
<div class="ui attached table segment">
<ul class="repo-owner-name-list">
{{range .ContextUser.Orgs}}
<li>
<a href="{{AppSubURL}}/{{.Name}}">
repo: support avatars (#5221) * First code for repository avatars * Last code for repository avatars - add new option for repo avatars location on filesystem - add route catch in web - add new fields to repo model - add migration - update settings handlers - update repo header template * Update locale messages * Add repo avatars to home page * Add repo avatars to organization right panel * Show repo avatars in repo list * Remove AvatarEamil field, remove Gravatar support, use generic locale messages * Fix migration * Fix seed and not used tool * Revert public css changes, add them to less files * Latest lessc (2.6.0) don't put result into file but output to stdout So redirect output to file * Simplify things: - migration don't needed, and table changes too - just upload file to repo avatar storage - or generate random image * Fix repo image seed - name not unique * Get rid of not needed model fields * Class value is enough, remove height attribute * Don't generate random avatar for repository - use html and semantic ui icons if no avatar found * Update styles and templates for repo - use repo icon as default avatar - use globe icon for public repos - add micro style for repo avatars at dashboard * Remvoe redundant empty line * Fix nl2br filter - must return string * Fix css style for micro-repo-avatar in dashboard list * Remove `|len`, works fine w/o it. * Update after review 2: - use static route for repository avatar - format images settings block in settings * Update after review 2: - no random avatar for repo * Update after review 2: - no random avatar for repo 2 - update imports - update UploadAvatar* functions * Update after review 2: - update templates * Fix trace call * Remove unused immport since we use static route for repo avatars.
7 years ago
{{if .RelAvatarLink}}<img class="ui micro image" src="{{.RelAvatarLink}}" />{{else}}<i class="octicon octicon-repo"></i>{{end}}
<i class="octicon octicon-organization"></i>
<strong class="text truncate item-name">{{.Name}}</strong>
<span class="ui right text light grey">
{{.NumRepos}} <i class="octicon octicon-repo rear"></i>
</span>
</a>
</li>
{{end}}
</ul>
</div>
</div>
{{end}}
9 years ago
<div class="ui tab list" data-tab="mirrors">
<div class="ui top attached header">
{{.i18n.Tr "home.my_mirrors"}} <span class="ui grey label">{{.MirrorCount}}</span>
<div class="ui right">
<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>
</div>
</div>
<div class="ui attached table segment">
<ul class="repo-owner-name-list">
{{range .Mirrors}}
<li {{if .IsPrivate}}class="private"{{end}}>
<a href="{{AppSubURL}}/{{$.ContextUser.Name}}/{{.Name}}">
repo: support avatars (#5221) * First code for repository avatars * Last code for repository avatars - add new option for repo avatars location on filesystem - add route catch in web - add new fields to repo model - add migration - update settings handlers - update repo header template * Update locale messages * Add repo avatars to home page * Add repo avatars to organization right panel * Show repo avatars in repo list * Remove AvatarEamil field, remove Gravatar support, use generic locale messages * Fix migration * Fix seed and not used tool * Revert public css changes, add them to less files * Latest lessc (2.6.0) don't put result into file but output to stdout So redirect output to file * Simplify things: - migration don't needed, and table changes too - just upload file to repo avatar storage - or generate random image * Fix repo image seed - name not unique * Get rid of not needed model fields * Class value is enough, remove height attribute * Don't generate random avatar for repository - use html and semantic ui icons if no avatar found * Update styles and templates for repo - use repo icon as default avatar - use globe icon for public repos - add micro style for repo avatars at dashboard * Remvoe redundant empty line * Fix nl2br filter - must return string * Fix css style for micro-repo-avatar in dashboard list * Remove `|len`, works fine w/o it. * Update after review 2: - use static route for repository avatar - format images settings block in settings * Update after review 2: - no random avatar for repo * Update after review 2: - no random avatar for repo 2 - update imports - update UploadAvatar* functions * Update after review 2: - update templates * Fix trace call * Remove unused immport since we use static route for repo avatars.
7 years ago
{{if .RelAvatarLink}}<img class="ui micro image" src="{{.RelAvatarLink}}" />{{else}}<i class="octicon octicon-repo"></i>{{end}}
<i class="octicon octicon-repo-clone"></i>
<strong class="text truncate item-name">{{.Name}}</strong>
<span class="ui right text light grey">
{{.Interval}}H <i class="octicon octicon-sync rear"></i>
</span>
</a>
</li>
{{end}}
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
{{template "base/footer" .}}