aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2023-01-20 19:42:33 +0800
committerGitHub <noreply@github.com>2023-01-20 19:42:33 +0800
commit6fe3c8b3980f850c9789f9fa62bdfee7b2708ff0 (patch)
tree5e11864dd63c60564080506291ca93e465c19940 /templates
parent0c048e554ba42d99bd66c07447de5f35cf6c981b (diff)
downloadgitea-6fe3c8b3980f850c9789f9fa62bdfee7b2708ff0.tar.gz
gitea-6fe3c8b3980f850c9789f9fa62bdfee7b2708ff0.zip
Support org/user level projects (#22235)
Fix #13405 <img width="1151" alt="image" src="https://user-images.githubusercontent.com/81045/209442911-7baa3924-c389-47b6-b63b-a740803e640e.png"> Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'templates')
-rw-r--r--templates/org/menu.tmpl3
-rw-r--r--templates/org/projects/list.tmpl6
-rw-r--r--templates/org/projects/new.tmpl6
-rw-r--r--templates/org/projects/view.tmpl6
-rw-r--r--templates/projects/list.tmpl98
-rw-r--r--templates/projects/new.tmpl66
-rw-r--r--templates/projects/view.tmpl279
-rw-r--r--templates/repo/issue/view_content/sidebar.tmpl12
-rw-r--r--templates/user/overview/header.tmpl3
-rw-r--r--templates/user/profile.tmpl3
10 files changed, 476 insertions, 6 deletions
diff --git a/templates/org/menu.tmpl b/templates/org/menu.tmpl
index 87242b94d3..5f543424fc 100644
--- a/templates/org/menu.tmpl
+++ b/templates/org/menu.tmpl
@@ -3,6 +3,9 @@
<a class="{{if .PageIsViewRepositories}}active {{end}}item" href="{{$.Org.HomeLink}}">
{{svg "octicon-repo"}} {{.locale.Tr "user.repositories"}}
</a>
+ <a class="{{if .PageIsViewProjects}}active {{end}}item" href="{{$.Org.HomeLink}}/-/projects">
+ {{svg "octicon-project"}} {{.locale.Tr "user.projects"}}
+ </a>
{{if .IsPackageEnabled}}
<a class="item" href="{{$.Org.HomeLink}}/-/packages">
{{svg "octicon-package"}} {{.locale.Tr "packages.title"}}
diff --git a/templates/org/projects/list.tmpl b/templates/org/projects/list.tmpl
new file mode 100644
index 0000000000..544ed38742
--- /dev/null
+++ b/templates/org/projects/list.tmpl
@@ -0,0 +1,6 @@
+{{template "base/head" .}}
+<div class="page-content repository packages">
+ {{template "user/overview/header" .}}
+ {{template "projects/list" .}}
+</div>
+{{template "base/footer" .}}
diff --git a/templates/org/projects/new.tmpl b/templates/org/projects/new.tmpl
new file mode 100644
index 0000000000..b3d6c6001e
--- /dev/null
+++ b/templates/org/projects/new.tmpl
@@ -0,0 +1,6 @@
+{{template "base/head" .}}
+<div class="page-content repository packages">
+ {{template "user/overview/header" .}}
+ {{template "projects/new" .}}
+</div>
+{{template "base/footer" .}}
diff --git a/templates/org/projects/view.tmpl b/templates/org/projects/view.tmpl
new file mode 100644
index 0000000000..03327e2530
--- /dev/null
+++ b/templates/org/projects/view.tmpl
@@ -0,0 +1,6 @@
+{{template "base/head" .}}
+<div class="page-content repository packages">
+ {{template "user/overview/header" .}}
+ {{template "projects/view" .}}
+</div>
+{{template "base/footer" .}}
diff --git a/templates/projects/list.tmpl b/templates/projects/list.tmpl
new file mode 100644
index 0000000000..ae2eaec6ea
--- /dev/null
+++ b/templates/projects/list.tmpl
@@ -0,0 +1,98 @@
+<div class="page-content repository projects">
+ <div class="ui container">
+ {{if .CanWriteProjects}}
+ <div class="navbar">
+ <div class="ui right">
+ <a class="ui green button" href="{{$.Link}}/new">{{.locale.Tr "repo.projects.new"}}</a>
+ </div>
+ </div>
+ <div class="ui divider"></div>
+ {{end}}
+
+ {{template "base/alert" .}}
+ <div class="ui compact tiny menu">
+ <a class="item{{if not .IsShowClosed}} active{{end}}" href="{{$.Link}}?state=open">
+ {{svg "octicon-project" 16 "mr-3"}}
+ {{JsPrettyNumber .OpenCount}}&nbsp;{{.locale.Tr "repo.issues.open_title"}}
+ </a>
+ <a class="item{{if .IsShowClosed}} active{{end}}" href="{{$.Link}}?state=closed">
+ {{svg "octicon-check" 16 "mr-3"}}
+ {{JsPrettyNumber .ClosedCount}}&nbsp;{{.locale.Tr "repo.issues.closed_title"}}
+ </a>
+ </div>
+
+ <div class="ui right floated secondary filter menu">
+ <!-- Sort -->
+ <div class="ui dropdown type jump item">
+ <span class="text">
+ {{.locale.Tr "repo.issues.filter_sort"}}
+ {{svg "octicon-triangle-down" 14 "dropdown icon"}}
+ </span>
+ <div class="menu">
+ <a class="{{if eq .SortType "oldest"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&sort=oldest&state={{$.State}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a>
+ <a class="{{if eq .SortType "recentupdate"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&sort=recentupdate&state={{$.State}}">{{.locale.Tr "repo.issues.filter_sort.recentupdate"}}</a>
+ <a class="{{if eq .SortType "leastupdate"}}active {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&sort=leastupdate&state={{$.State}}">{{.locale.Tr "repo.issues.filter_sort.leastupdate"}}</a>
+ </div>
+ </div>
+ </div>
+ <div class="milestone list">
+ {{range .Projects}}
+ <li class="item">
+ {{svg "octicon-project"}} <a href="{{$.Link}}/{{.ID}}">{{.Title}}</a>
+ <div class="meta">
+ {{$closedDate:= TimeSinceUnix .ClosedDateUnix $.locale}}
+ {{if .IsClosed}}
+ {{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate|Str2html}}
+ {{end}}
+ <span class="issue-stats">
+ {{svg "octicon-issue-opened" 16 "mr-3"}}
+ {{JsPrettyNumber .NumOpenIssues}}&nbsp;{{$.locale.Tr "repo.issues.open_title"}}
+ {{svg "octicon-check" 16 "mr-3"}}
+ {{JsPrettyNumber .NumClosedIssues}}&nbsp;{{$.locale.Tr "repo.issues.closed_title"}}
+ </span>
+ </div>
+ {{if and (or $.CanWriteIssues $.CanWritePulls) (not $.Repository.IsArchived)}}
+ <div class="ui right operate">
+ <a href="{{$.Link}}/{{.ID}}/edit" data-id={{.ID}} data-title={{.Title}}>{{svg "octicon-pencil"}} {{$.locale.Tr "repo.issues.label_edit"}}</a>
+ {{if .IsClosed}}
+ <a class="link-action" href data-url="{{$.Link}}/{{.ID}}/open">{{svg "octicon-check"}} {{$.locale.Tr "repo.projects.open"}}</a>
+ {{else}}
+ <a class="link-action" href data-url="{{$.Link}}/{{.ID}}/close">{{svg "octicon-skip"}} {{$.locale.Tr "repo.projects.close"}}</a>
+ {{end}}
+ <a class="delete-button" href="#" data-url="{{$.RepoLink}}/projects/{{.ID}}/delete" data-id="{{.ID}}">{{svg "octicon-trash"}} {{$.locale.Tr "repo.issues.label_delete"}}</a>
+ </div>
+ {{end}}
+ {{if .Description}}
+ <div class="content">
+ {{.RenderedContent|Str2html}}
+ </div>
+ {{end}}
+ </li>
+ {{end}}
+
+ {{template "base/paginate" .}}
+ </div>
+ </div>
+</div>
+
+{{if or .CanWriteIssues .CanWritePulls}}
+<div class="ui small basic delete modal">
+ <div class="ui icon header">
+ {{svg "octicon-trash"}}
+ {{.locale.Tr "repo.projects.deletion"}}
+ </div>
+ <div class="content">
+ <p>{{.locale.Tr "repo.projects.deletion_desc"}}</p>
+ </div>
+ <div class="actions">
+ <div class="ui red basic inverted cancel button">
+ <i class="remove icon"></i>
+ {{.locale.Tr "modal.no"}}
+ </div>
+ <div class="ui green basic inverted ok button">
+ <i class="checkmark icon"></i>
+ {{.locale.Tr "modal.yes"}}
+ </div>
+ </div>
+</div>
+{{end}}
diff --git a/templates/projects/new.tmpl b/templates/projects/new.tmpl
new file mode 100644
index 0000000000..1069102792
--- /dev/null
+++ b/templates/projects/new.tmpl
@@ -0,0 +1,66 @@
+<div class="page-content repository projects edit-project new milestone">
+ <div class="ui container">
+ <div class="navbar">
+ {{if and .CanWriteProjects .PageIsEditProject}}
+ <div class="ui right floated secondary menu">
+ <a class="ui green button" href="{{$.HomeLink}}/-/projects/new">{{.locale.Tr "repo.milestones.new"}}</a>
+ </div>
+ {{end}}
+ </div>
+ <div class="ui divider"></div>
+ <h2 class="ui dividing header">
+ {{if .PageIsEditProjects}}
+ {{.locale.Tr "repo.projects.edit"}}
+ <div class="sub header">{{.locale.Tr "repo.projects.edit_subheader"}}</div>
+ {{else}}
+ {{.locale.Tr "repo.projects.new"}}
+ <div class="sub header">{{.locale.Tr "repo.projects.new_subheader"}}</div>
+ {{end}}
+ </h2>
+ {{template "base/alert" .}}
+ <form class="ui form grid" action="{{.Link}}" method="post">
+ {{.CsrfTokenHtml}}
+ <div class="eleven wide column">
+ <div class="field {{if .Err_Title}}error{{end}}">
+ <label>{{.locale.Tr "repo.projects.title"}}</label>
+ <input name="title" placeholder="{{.locale.Tr "repo.projects.title"}}" value="{{.title}}" autofocus required>
+ </div>
+ <div class="field">
+ <label>{{.locale.Tr "repo.projects.description"}}</label>
+ <textarea name="content" placeholder="{{.locale.Tr "repo.projects.description_placeholder"}}">{{.content}}</textarea>
+ </div>
+
+ {{if not .PageIsEditProjects}}
+ <label>{{.locale.Tr "repo.projects.template.desc"}}</label>
+ <div class="ui selection dropdown">
+ <input type="hidden" name="board_type" value="{{.type}}">
+ <div class="default text">{{.locale.Tr "repo.projects.template.desc_helper"}}</div>
+ <div class="menu">
+ {{range $element := .ProjectTypes}}
+ <div class="item" data-id="{{$element.BoardType}}" data-value="{{$element.BoardType}}">{{$.locale.Tr $element.Translation}}</div>
+ {{end}}
+ </div>
+ </div>
+ {{end}}
+ </div>
+ <div class="ui container">
+ <div class="ui divider"></div>
+ <div class="ui left">
+ {{if .PageIsEditProjects}}
+ <a class="ui primary basic button" href="{{.RepoLink}}/projects">
+ {{.locale.Tr "repo.milestones.cancel"}}
+ </a>
+ <button class="ui green button">
+ {{.locale.Tr "repo.projects.modify"}}
+ </button>
+ {{else}}
+ <button class="ui green button">
+ {{.locale.Tr "repo.projects.create"}}
+ </button>
+ {{end}}
+ </div>
+ </div>
+
+ </form>
+ </div>
+</div>
diff --git a/templates/projects/view.tmpl b/templates/projects/view.tmpl
new file mode 100644
index 0000000000..ac72acb82b
--- /dev/null
+++ b/templates/projects/view.tmpl
@@ -0,0 +1,279 @@
+<div class="page-content repository projects view-project">
+ <div class="ui container">
+ <div class="ui two column stackable grid">
+ <div class="column">
+ </div>
+ <div class="column right aligned">
+ {{if .CanWriteProjects}}
+ <a class="ui green button show-modal item" data-modal="#new-board-item">{{.locale.Tr "new_project_board"}}</a>
+ {{end}}
+ <div class="ui small modal new-board-modal" id="new-board-item">
+ <div class="header">
+ {{$.locale.Tr "repo.projects.board.new"}}
+ </div>
+ <div class="content">
+ <form class="ui form">
+ <div class="required field">
+ <label for="new_board">{{$.locale.Tr "repo.projects.board.new_title"}}</label>
+ <input class="new-board" id="new_board" name="title" required>
+ </div>
+
+ <div class="field color-field">
+ <label for="new_board_color">{{$.locale.Tr "repo.projects.board.color"}}</label>
+ <div class="color picker column">
+ <input class="color-picker" maxlength="7" placeholder="#c320f6" id="new_board_color_picker" name="color">
+ <div class="column precolors">
+ {{template "repo/issue/label_precolors"}}
+ </div>
+ </div>
+ </div>
+
+ <div class="text right actions">
+ <div class="ui cancel button">{{$.locale.Tr "settings.cancel"}}</div>
+ <button data-url="{{$.Link}}" class="ui green button" id="new_board_submit">{{$.locale.Tr "repo.projects.board.new_submit"}}</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="ui divider"></div>
+ <div class="ui two column stackable grid">
+ <div class="column">
+ <h2 class="project-title">{{$.Project.Title}}</h2>
+ <div class="content project-description">{{$.Project.RenderedContent|Str2html}}</div>
+ </div>
+ {{if or $.CanWriteIssues $.CanWritePulls}}
+ <div class="column right aligned">
+ <div class="ui compact right small menu">
+ <a class="item" href="{{$.Link}}/edit" data-id={{$.Project.ID}} data-title={{$.Project.Title}}>
+ {{svg "octicon-pencil"}}
+ <span class="mx-3">{{$.locale.Tr "repo.issues.label_edit"}}</span>
+ </a>
+ {{if .Project.IsClosed}}
+ <a class="item link-action" href data-url="{{$.Link}}/open">
+ {{svg "octicon-check"}}
+ <span class="mx-3">{{$.locale.Tr "repo.projects.open"}}</span>
+ </a>
+ {{else}}
+ <a class="item link-action" href data-url="{{$.Link}}/close">
+ {{svg "octicon-skip"}}
+ <span class="mx-3">{{$.locale.Tr "repo.projects.close"}}</span>
+ </a>
+ {{end}}
+ <a class="item delete-button" href="#" data-url="{{$.Link}}/delete" data-id="{{.Project.ID}}">
+ {{svg "octicon-trash"}}
+ <span class="mx-3">{{$.locale.Tr "repo.issues.label_delete"}}</span>
+ </a>
+ </div>
+ </div>
+ {{end}}
+ </div>
+ <div class="ui divider"></div>
+ </div>
+ <div class="ui container fluid padded" id="project-board">
+
+ <div class="board">
+ {{range $board := .Boards}}
+
+ <div class="ui segment board-column" style="background: {{.Color}} !important;" data-id="{{.ID}}" data-sorting="{{.Sorting}}" data-url="{{$.Link}}/{{.ID}}">
+ <div class="board-column-header df ac sb">
+ <div class="ui large label board-label py-2">
+ <div class="ui small circular grey label board-card-cnt">
+ {{.NumIssues}}
+ </div>
+ {{.Title}}
+ </div>
+ {{if and $.CanWriteProjects (ne .ID 0)}}
+ <div class="ui dropdown jump item tooltip">
+ <div class="not-mobile px-3" tabindex="-1">
+ {{svg "octicon-kebab-horizontal"}}
+ </div>
+ <div class="menu user-menu" tabindex="-1">
+ <a class="item show-modal button" data-modal="#edit-project-board-modal-{{.ID}}">
+ {{svg "octicon-pencil"}}
+ {{$.locale.Tr "repo.projects.board.edit"}}
+ </a>
+ {{if not .Default}}
+ <a class="item show-modal button" data-modal="#set-default-project-board-modal-{{.ID}}">
+ {{svg "octicon-pin"}}
+ {{$.locale.Tr "repo.projects.board.set_default"}}
+ </a>
+ {{end}}
+ <a class="item show-modal button" data-modal="#delete-board-modal-{{.ID}}">
+ {{svg "octicon-trash"}}
+ {{$.locale.Tr "repo.projects.board.delete"}}
+ </a>
+
+ <div class="ui small modal edit-project-board" id="edit-project-board-modal-{{.ID}}">
+ <div class="header">
+ {{$.locale.Tr "repo.projects.board.edit"}}
+ </div>
+ <div class="content">
+ <form class="ui form">
+ <div class="required field">
+ <label for="new_board_title">{{$.locale.Tr "repo.projects.board.edit_title"}}</label>
+ <input class="project-board-title" id="new_board_title" name="title" value="{{.Title}}" required>
+ </div>
+
+ <div class="field color-field">
+ <label for="new_board_color">{{$.locale.Tr "repo.projects.board.color"}}</label>
+ <div class="color picker column">
+ <input class="color-picker" maxlength="7" placeholder="#c320f6" id="new_board_color" name="color" value="{{.Color}}">
+ <div class="column precolors">
+ {{template "repo/issue/label_precolors"}}
+ </div>
+ </div>
+ </div>
+
+ <div class="text right actions">
+ <div class="ui cancel button">{{$.locale.Tr "settings.cancel"}}</div>
+ <button data-url="{{$.Link}}/{{.ID}}" class="ui red button">{{$.locale.Tr "repo.projects.board.edit"}}</button>
+ </div>
+ </form>
+ </div>
+ </div>
+
+ <div class="ui basic modal" id="set-default-project-board-modal-{{.ID}}">
+ <div class="ui icon header">
+ {{$.locale.Tr "repo.projects.board.set_default"}}
+ </div>
+ <div class="content center">
+ <label>
+ {{$.locale.Tr "repo.projects.board.set_default_desc"}}
+ </label>
+ </div>
+ <div class="text right actions">
+ <div class="ui cancel button">{{$.locale.Tr "settings.cancel"}}</div>
+ <button class="ui red button set-default-project-board" data-url="{{$.Link}}/{{.ID}}/default">{{$.locale.Tr "repo.projects.board.set_default"}}</button>
+ </div>
+ </div>
+
+ <div class="ui basic modal" id="delete-board-modal-{{.ID}}">
+ <div class="ui icon header">
+ {{$.locale.Tr "repo.projects.board.delete"}}
+ </div>
+ <div class="content center">
+ <label>
+ {{$.locale.Tr "repo.projects.board.deletion_desc"}}
+ </label>
+ </div>
+ <div class="text right actions">
+ <div class="ui cancel button">{{$.locale.Tr "settings.cancel"}}</div>
+ <button class="ui red button delete-project-board" data-url="{{$.Link}}/{{.ID}}">{{$.locale.Tr "repo.projects.board.delete"}}</button>
+ </div>
+ </div>
+ </div>
+ </div>
+ {{end}}
+ </div>
+ <div class="ui divider"></div>
+
+ <div class="ui cards board" data-url="{{$.Link}}/{{.ID}}" data-project="{{$.Project.ID}}" data-board="{{.ID}}" id="board_{{.ID}}">
+
+ {{range (index $.IssuesMap .ID)}}
+
+ <!-- start issue card -->
+ <div class="card board-card" data-issue="{{.ID}}">
+ <div class="content p-0">
+ <div class="header">
+ <span class="dif ac vm {{if .IsClosed}}red{{else}}green{{end}}">
+ {{if .IsPull}}
+ {{if .PullRequest.HasMerged}}
+ {{svg "octicon-git-merge" 16 "text purple"}}
+ {{else}}
+ {{if .IsClosed}}
+ {{svg "octicon-git-pull-request" 16 "text red"}}
+ {{else}}
+ {{svg "octicon-git-pull-request" 16 "text green"}}
+ {{end}}
+ {{end}}
+ {{else}}
+ {{if .IsClosed}}
+ {{svg "octicon-issue-closed" 16 "text red"}}
+ {{else}}
+ {{svg "octicon-issue-opened" 16 "text green"}}
+ {{end}}
+ {{end}}
+ </span>
+ <a class="project-board-title vm" href="{{.Link}}">
+ {{.Title}}
+ </a>
+ </div>
+ <div class="meta my-2">
+ <span class="text light grey">
+ {{.Repo.FullName}}#{{.Index}}
+ {{$timeStr := TimeSinceUnix .GetLastEventTimestamp $.locale}}
+ {{if .OriginalAuthor}}
+ {{$.locale.Tr .GetLastEventLabelFake $timeStr (.OriginalAuthor|Escape) | Safe}}
+ {{else if gt .Poster.ID 0}}
+ {{$.locale.Tr .GetLastEventLabel $timeStr (.Poster.HomeLink|Escape) (.Poster.GetDisplayName | Escape) | Safe}}
+ {{else}}
+ {{$.locale.Tr .GetLastEventLabelFake $timeStr (.Poster.GetDisplayName | Escape) | Safe}}
+ {{end}}
+ </span>
+ </div>
+ {{- if .MilestoneID}}
+ <div class="meta my-2">
+ <a class="milestone" href="{{$.RepoLink}}/milestone/{{.MilestoneID}}">
+ {{svg "octicon-milestone" 16 "mr-2 vm"}}
+ <span class="vm">{{.Milestone.Name}}</span>
+ </a>
+ </div>
+ {{- end}}
+ {{- range index $.LinkedPRs .ID}}
+ <div class="meta my-2">
+ <a href="{{$.RepoLink}}/pulls/{{.Index}}">
+ <span class="m-0 {{if .PullRequest.HasMerged}}purple{{else if .IsClosed}}red{{else}}green{{end}}">{{svg "octicon-git-merge" 16 "mr-2 vm"}}</span>
+ <span class="vm">{{.Title}} <span class="text light grey">#{{.Index}}</span></span>
+ </a>
+ </div>
+ {{- end}}
+ </div>
+
+ {{if or .Labels .Assignees}}
+ <div class="extra content labels-list p-0 pt-2">
+ {{range .Labels}}
+ <a class="ui label" target="_blank" href="{{$.RepoLink}}/issues?labels={{.ID}}" style="color: {{.ForegroundColor}}; background-color: {{.Color}};" title="{{.Description | RenderEmojiPlain}}">{{.Name | RenderEmoji}}</a>
+ {{end}}
+ <div class="right floated">
+ {{range .Assignees}}
+ <a class="tooltip" target="_blank" href="{{.HTMLURL}}" data-content="{{$.locale.Tr "repo.projects.board.assigned_to"}} {{.Name}}">{{avatar . 28 "mini mr-3"}}</a>
+ {{end}}
+ </div>
+ </div>
+ {{end}}
+ </div>
+ <!-- stop issue card -->
+
+ {{end}}
+ </div>
+ </div>
+ {{end}}
+ </div>
+
+ </div>
+
+</div>
+
+{{if or .CanWriteIssues .CanWritePulls}}
+ <div class="ui small basic delete modal">
+ <div class="ui icon header">
+ {{svg "octicon-trash"}}
+ {{.locale.Tr "repo.projects.deletion"}}
+ </div>
+ <div class="content">
+ <p>{{.locale.Tr "repo.projects.deletion_desc"}}</p>
+ </div>
+ <div class="actions">
+ <div class="ui red basic inverted cancel button">
+ <i class="remove icon"></i>
+ {{.locale.Tr "modal.no"}}
+ </div>
+ <div class="ui green basic inverted ok button">
+ <i class="checkmark icon"></i>
+ {{.locale.Tr "modal.yes"}}
+ </div>
+ </div>
+ </div>
+{{end}}
diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl
index 6cb00fdd1d..ca947e3612 100644
--- a/templates/repo/issue/view_content/sidebar.tmpl
+++ b/templates/repo/issue/view_content/sidebar.tmpl
@@ -219,8 +219,8 @@
{{.locale.Tr "repo.issues.new.open_projects"}}
</div>
{{range .OpenProjects}}
- <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{$.RepoLink}}/projects/{{.ID}}">
- {{svg "octicon-project" 18 "mr-3"}}
+ <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{.Link}}">
+ {{if .IsOrganizationProject}}{{svg "octicon-project-symlink" 18 "mr-3"}}{{else}}{{svg "octicon-project" 18 "mr-3"}}{{end}}
{{.Title}}
</a>
{{end}}
@@ -231,8 +231,8 @@
{{.locale.Tr "repo.issues.new.closed_projects"}}
</div>
{{range .ClosedProjects}}
- <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{$.RepoLink}}/projects/{{.ID}}">
- {{svg "octicon-project" 18 "mr-3"}}
+ <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{.Link}}">
+ {{if .IsOrganizationProject}}{{svg "octicon-project-symlink" 18 "mr-3"}}{{else}}{{svg "octicon-project" 18 "mr-3"}}{{end}}
{{.Title}}
</a>
{{end}}
@@ -243,8 +243,8 @@
<span class="no-select item {{if .Issue.ProjectID}}hide{{end}}">{{.locale.Tr "repo.issues.new.no_projects"}}</span>
<div class="selected">
{{if .Issue.ProjectID}}
- <a class="item muted sidebar-item-link" href="{{.RepoLink}}/projects/{{.Issue.ProjectID}}">
- {{svg "octicon-project" 18 "mr-3"}}
+ <a class="item muted sidebar-item-link" href="{{.Issue.Project.Link}}">
+ {{if .IsOrganizationProject}}{{svg "octicon-project-symlink" 18 "mr-3"}}{{else}}{{svg "octicon-project" 18 "mr-3"}}{{end}}
{{.Issue.Project.Title}}
</a>
{{end}}
diff --git a/templates/user/overview/header.tmpl b/templates/user/overview/header.tmpl
index 61b19c6032..8fb882718c 100644
--- a/templates/user/overview/header.tmpl
+++ b/templates/user/overview/header.tmpl
@@ -22,6 +22,9 @@
<a class="item" href="{{.ContextUser.HomeLink}}">
{{svg "octicon-repo"}} {{.locale.Tr "user.repositories"}}
</a>
+ <a href="{{.ContextUser.HomeLink}}/-/projects" class="{{if .PageIsViewProjects}}active {{end}}item">
+ {{svg "octicon-project"}} {{.locale.Tr "user.projects"}}
+ </a>
{{if (not .UnitPackagesGlobalDisabled)}}
<a href="{{.ContextUser.HomeLink}}/-/packages" class="{{if .IsPackagesPage}}active {{end}}item">
{{svg "octicon-package"}} {{.locale.Tr "packages.title"}}
diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl
index 6c31723e0f..74211eb67b 100644
--- a/templates/user/profile.tmpl
+++ b/templates/user/profile.tmpl
@@ -106,6 +106,9 @@
<a class='{{if and (ne .TabName "activity") (ne .TabName "following") (ne .TabName "followers") (ne .TabName "stars") (ne .TabName "watching") (ne .TabName "projects") (ne .TabName "code")}}active {{end}}item' href="{{.Owner.HomeLink}}">
{{svg "octicon-repo"}} {{.locale.Tr "user.repositories"}}
</a>
+ <a href="{{.Owner.HomeLink}}/-/projects" class="{{if eq .TabName "projects"}}active {{end}}item">
+ {{svg "octicon-project"}} {{.locale.Tr "user.projects"}}
+ </a>
{{if .IsPackageEnabled}}
<a class='{{if eq .TabName "packages"}}active {{end}}item' href="{{.Owner.HomeLink}}/-/packages">
{{svg "octicon-package"}} {{.locale.Tr "packages.title"}}