2023-08-12 10:30:28 +00:00
|
|
|
{{$canWriteProject := and .CanWriteProjects (or (not .Repository) (not .Repository.IsArchived))}}
|
|
|
|
|
2024-04-23 04:17:51 +00:00
|
|
|
<div class="ui container tw-max-w-full">
|
|
|
|
<div class="tw-flex tw-justify-between tw-items-center tw-mb-4 tw-gap-3">
|
|
|
|
<h2 class="tw-mb-0 tw-flex-1 tw-break-anywhere">{{.Project.Title}}</h2>
|
2024-09-12 03:53:40 +00:00
|
|
|
<div class="project-toolbar-right">
|
|
|
|
<div class="ui secondary filter menu labels">
|
|
|
|
<!-- Label -->
|
|
|
|
<div class="ui {{if not .Labels}}disabled{{end}} dropdown jump item label-filter">
|
|
|
|
<span class="text">
|
|
|
|
{{ctx.Locale.Tr "repo.issues.filter_label"}}
|
|
|
|
</span>
|
|
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
|
|
<div class="menu">
|
|
|
|
<div class="ui icon search input">
|
|
|
|
<i class="icon">{{svg "octicon-search" 16}}</i>
|
|
|
|
<input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_label"}}">
|
|
|
|
</div>
|
|
|
|
<div class="ui checkbox compact archived-label-filter">
|
|
|
|
<input name="archived" type="checkbox"
|
|
|
|
id="archived-filter-checkbox"
|
|
|
|
{{if .ShowArchivedLabels}}checked{{end}}
|
|
|
|
>
|
|
|
|
<label for="archived-filter-checkbox">
|
|
|
|
{{ctx.Locale.Tr "repo.issues.label_archived_filter"}}
|
|
|
|
<i class="tw-ml-1" data-tooltip-content={{ctx.Locale.Tr "repo.issues.label_archive_tooltip"}}>
|
|
|
|
{{svg "octicon-info"}}
|
|
|
|
</i>
|
|
|
|
</label>
|
|
|
|
</div>
|
|
|
|
<span class="info">{{ctx.Locale.Tr "repo.issues.filter_label_exclude"}}</span>
|
|
|
|
<div class="divider"></div>
|
|
|
|
<a class="{{if .AllLabels}}active selected {{end}}item" href="?assignee={{$.AssigneeID}}{{if $.ShowArchivedLabels}}&archived=true{{end}}">{{ctx.Locale.Tr "repo.issues.filter_label_no_select"}}</a>
|
|
|
|
<a class="{{if .NoLabel}}active selected {{end}}item" href="?assignee={{$.AssigneeID}}{{if $.ShowArchivedLabels}}&archived=true{{end}}">{{ctx.Locale.Tr "repo.issues.filter_label_select_no_label"}}</a>
|
|
|
|
{{$previousExclusiveScope := "_no_scope"}}
|
|
|
|
{{range .Labels}}
|
|
|
|
{{$exclusiveScope := .ExclusiveScope}}
|
|
|
|
{{if and (ne $previousExclusiveScope $exclusiveScope)}}
|
|
|
|
<div class="divider"></div>
|
|
|
|
{{end}}
|
|
|
|
{{$previousExclusiveScope = $exclusiveScope}}
|
|
|
|
<a class="item label-filter-item tw-flex tw-items-center" {{if .IsArchived}}data-is-archived{{end}} href="?labels={{.QueryString}}&assignee={{$.AssigneeID}}{{if $.ShowArchivedLabels}}&archived=true{{end}}" data-label-id="{{.ID}}">
|
|
|
|
{{if .IsExcluded}}
|
|
|
|
{{svg "octicon-circle-slash"}}
|
|
|
|
{{else if .IsSelected}}
|
|
|
|
{{if $exclusiveScope}}
|
|
|
|
{{svg "octicon-dot-fill"}}
|
|
|
|
{{else}}
|
|
|
|
{{svg "octicon-check"}}
|
|
|
|
{{end}}
|
|
|
|
{{end}}
|
2024-11-05 06:04:26 +00:00
|
|
|
{{ctx.RenderUtils.RenderLabel .}}
|
2024-09-12 03:53:40 +00:00
|
|
|
<p class="tw-ml-auto">{{template "repo/issue/labels/label_archived" .}}</p>
|
|
|
|
</a>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Assignee -->
|
|
|
|
<div class="ui {{if not .Assignees}}disabled{{end}} dropdown jump item">
|
|
|
|
<span class="text">
|
|
|
|
{{ctx.Locale.Tr "repo.issues.filter_assignee"}}
|
|
|
|
</span>
|
|
|
|
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
|
|
|
<div class="menu">
|
|
|
|
<div class="ui icon search input">
|
|
|
|
<i class="icon">{{svg "octicon-search" 16}}</i>
|
|
|
|
<input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_assignee"}}">
|
|
|
|
</div>
|
|
|
|
<a class="{{if not .AssigneeID}}active selected {{end}}item" href="?labels={{.SelectLabels}}{{if $.ShowArchivedLabels}}&archived=true{{end}}">{{ctx.Locale.Tr "repo.issues.filter_assginee_no_select"}}</a>
|
|
|
|
<a class="{{if eq .AssigneeID -1}}active selected {{end}}item" href="?labels={{.SelectLabels}}&assignee=-1{{if $.ShowArchivedLabels}}&archived=true{{end}}">{{ctx.Locale.Tr "repo.issues.filter_assginee_no_assignee"}}</a>
|
|
|
|
<div class="divider"></div>
|
|
|
|
{{range .Assignees}}
|
|
|
|
<a class="{{if eq $.AssigneeID .ID}}active selected{{end}} item tw-flex" href="?labels={{$.SelectLabels}}&assignee={{.ID}}{{if $.ShowArchivedLabels}}&archived=true{{end}}">
|
|
|
|
{{ctx.AvatarUtils.Avatar . 20}}{{template "repo/search_name" .}}
|
|
|
|
</a>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-11-27 17:43:52 +00:00
|
|
|
{{if $canWriteProject}}
|
|
|
|
<div class="ui compact mini menu">
|
|
|
|
<a class="item" href="{{.Link}}/edit?redirect=project">
|
|
|
|
{{svg "octicon-pencil"}}
|
|
|
|
{{ctx.Locale.Tr "repo.issues.label_edit"}}
|
|
|
|
</a>
|
|
|
|
{{if .Project.IsClosed}}
|
|
|
|
<button class="item btn link-action" data-url="{{.Link}}/open">
|
|
|
|
{{svg "octicon-check"}}
|
|
|
|
{{ctx.Locale.Tr "repo.projects.open"}}
|
|
|
|
</button>
|
|
|
|
{{else}}
|
|
|
|
<button class="item btn link-action" data-url="{{.Link}}/close">
|
|
|
|
{{svg "octicon-skip"}}
|
|
|
|
{{ctx.Locale.Tr "repo.projects.close"}}
|
|
|
|
</button>
|
|
|
|
{{end}}
|
|
|
|
<button class="item btn delete-button" data-url="{{.Link}}/delete" data-id="{{.Project.ID}}">
|
|
|
|
{{svg "octicon-trash"}}
|
|
|
|
{{ctx.Locale.Tr "repo.issues.label_delete"}}
|
2023-08-12 10:30:28 +00:00
|
|
|
</button>
|
2023-11-27 17:43:52 +00:00
|
|
|
<button class="item btn show-modal" data-modal="#new-project-column-item">
|
|
|
|
{{svg "octicon-plus"}}
|
|
|
|
{{ctx.Locale.Tr "new_project_column"}}
|
2023-08-12 10:30:28 +00:00
|
|
|
</button>
|
2023-01-20 11:42:33 +00:00
|
|
|
</div>
|
2023-11-27 17:43:52 +00:00
|
|
|
<div class="ui small modal new-project-column-modal" id="new-project-column-item">
|
|
|
|
<div class="header">
|
|
|
|
{{ctx.Locale.Tr "repo.projects.column.new"}}
|
|
|
|
</div>
|
|
|
|
<div class="content">
|
|
|
|
<form class="ui form">
|
|
|
|
<div class="required field">
|
|
|
|
<label for="new_project_column">{{ctx.Locale.Tr "repo.projects.column.new_title"}}</label>
|
|
|
|
<input class="new-project-column" id="new_project_column" name="title" required>
|
|
|
|
</div>
|
2023-01-20 11:42:33 +00:00
|
|
|
|
2023-11-27 17:43:52 +00:00
|
|
|
<div class="field color-field">
|
2024-03-15 13:12:08 +00:00
|
|
|
<label for="new_project_column_color_picker">{{ctx.Locale.Tr "repo.projects.column.color"}}</label>
|
2024-03-29 03:00:07 +00:00
|
|
|
<div class="js-color-picker-input column">
|
|
|
|
<input maxlength="7" placeholder="#c320f6" id="new_project_column_color_picker" name="color">
|
2023-11-27 17:43:52 +00:00
|
|
|
{{template "repo/issue/label_precolors"}}
|
|
|
|
</div>
|
2023-07-07 18:06:49 +00:00
|
|
|
</div>
|
2023-01-20 11:42:33 +00:00
|
|
|
|
2023-11-27 17:43:52 +00:00
|
|
|
<div class="text right actions">
|
|
|
|
<button class="ui cancel button">{{ctx.Locale.Tr "settings.cancel"}}</button>
|
|
|
|
<button data-url="{{$.Link}}" class="ui primary button" id="new_project_column_submit">{{ctx.Locale.Tr "repo.projects.column.new_submit"}}</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
2023-01-20 11:42:33 +00:00
|
|
|
</div>
|
2023-11-27 17:43:52 +00:00
|
|
|
{{end}}
|
|
|
|
</div>
|
2023-07-07 15:27:12 +00:00
|
|
|
|
2024-03-01 07:11:51 +00:00
|
|
|
<div class="content">{{$.Project.RenderedContent}}</div>
|
2023-08-12 10:30:28 +00:00
|
|
|
|
2023-11-27 17:43:52 +00:00
|
|
|
<div class="divider"></div>
|
|
|
|
</div>
|
2023-01-20 11:42:33 +00:00
|
|
|
|
2023-07-07 18:06:49 +00:00
|
|
|
<div id="project-board">
|
2024-05-08 13:44:57 +00:00
|
|
|
<div class="board {{if .CanWriteProjects}}sortable{{end}}"{{if .CanWriteProjects}} data-url="{{$.Link}}/move"{{end}}>
|
2023-08-12 10:30:28 +00:00
|
|
|
{{range .Columns}}
|
2024-06-04 07:46:05 +00:00
|
|
|
<div class="project-column"{{if .Color}} style="background: {{.Color}} !important; color: {{ContrastColor .Color}} !important"{{end}} data-id="{{.ID}}" data-sorting="{{.Sorting}}" data-url="{{$.Link}}/{{.ID}}">
|
2024-03-27 23:20:38 +00:00
|
|
|
<div class="project-column-header{{if $canWriteProject}} tw-cursor-grab{{end}}">
|
2024-05-20 05:21:01 +00:00
|
|
|
<div class="ui circular label project-column-issue-count">
|
|
|
|
{{.NumIssues ctx}}
|
2023-08-12 10:30:28 +00:00
|
|
|
</div>
|
2024-05-20 05:21:01 +00:00
|
|
|
<div class="project-column-title-label gt-ellipsis">{{.Title}}</div>
|
2024-03-27 20:54:32 +00:00
|
|
|
{{if $canWriteProject}}
|
2024-05-20 05:21:01 +00:00
|
|
|
<div class="ui dropdown tw-p-1">
|
|
|
|
{{svg "octicon-kebab-horizontal"}}
|
|
|
|
<div class="menu">
|
2023-08-12 10:30:28 +00:00
|
|
|
<a class="item show-modal button" data-modal="#edit-project-column-modal-{{.ID}}">
|
|
|
|
{{svg "octicon-pencil"}}
|
|
|
|
{{ctx.Locale.Tr "repo.projects.column.edit"}}
|
2023-01-20 11:42:33 +00:00
|
|
|
</a>
|
2023-08-12 10:30:28 +00:00
|
|
|
{{if not .Default}}
|
|
|
|
<a class="item show-modal button default-project-column-show"
|
2024-03-27 20:54:32 +00:00
|
|
|
data-modal="#default-project-column-modal-{{.ID}}"
|
|
|
|
data-modal-default-project-column-header="{{ctx.Locale.Tr "repo.projects.column.set_default"}}"
|
|
|
|
data-modal-default-project-column-content="{{ctx.Locale.Tr "repo.projects.column.set_default_desc"}}"
|
|
|
|
data-url="{{$.Link}}/{{.ID}}/default">
|
2023-08-12 10:30:28 +00:00
|
|
|
{{svg "octicon-pin"}}
|
|
|
|
{{ctx.Locale.Tr "repo.projects.column.set_default"}}
|
|
|
|
</a>
|
2024-03-27 20:54:32 +00:00
|
|
|
<a class="item show-modal button show-delete-project-column-modal"
|
|
|
|
data-modal="#delete-project-column-modal-{{.ID}}"
|
|
|
|
data-url="{{$.Link}}/{{.ID}}">
|
|
|
|
{{svg "octicon-trash"}}
|
|
|
|
{{ctx.Locale.Tr "repo.projects.column.delete"}}
|
2023-08-12 10:30:28 +00:00
|
|
|
</a>
|
|
|
|
{{end}}
|
2023-01-20 11:42:33 +00:00
|
|
|
|
2023-08-12 10:30:28 +00:00
|
|
|
<div class="ui small modal edit-project-column-modal" id="edit-project-column-modal-{{.ID}}">
|
|
|
|
<div class="header">
|
|
|
|
{{ctx.Locale.Tr "repo.projects.column.edit"}}
|
|
|
|
</div>
|
|
|
|
<div class="content">
|
|
|
|
<form class="ui form">
|
|
|
|
<div class="required field">
|
|
|
|
<label for="new_project_column_title">{{ctx.Locale.Tr "repo.projects.column.edit_title"}}</label>
|
|
|
|
<input class="project-column-title-input" id="new_project_column_title" name="title" value="{{.Title}}" required>
|
|
|
|
</div>
|
2023-01-20 11:42:33 +00:00
|
|
|
|
2023-08-12 10:30:28 +00:00
|
|
|
<div class="field color-field">
|
|
|
|
<label for="new_project_column_color">{{ctx.Locale.Tr "repo.projects.column.color"}}</label>
|
2024-03-29 03:00:07 +00:00
|
|
|
<div class="js-color-picker-input column">
|
|
|
|
<input maxlength="7" placeholder="#c320f6" id="new_project_column_color" name="color" value="{{.Color}}">
|
2023-08-28 14:14:51 +00:00
|
|
|
{{template "repo/issue/label_precolors"}}
|
2023-01-20 11:42:33 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2023-08-12 10:30:28 +00:00
|
|
|
<div class="text right actions">
|
|
|
|
<button class="ui cancel button">{{ctx.Locale.Tr "settings.cancel"}}</button>
|
|
|
|
<button data-url="{{$.Link}}/{{.ID}}" class="ui primary button edit-project-column-button">{{ctx.Locale.Tr "repo.projects.column.edit"}}</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div>
|
2023-01-20 11:42:33 +00:00
|
|
|
</div>
|
|
|
|
|
2023-08-12 10:30:28 +00:00
|
|
|
<div class="ui g-modal-confirm modal default-project-column-modal" id="default-project-column-modal-{{.ID}}">
|
|
|
|
<div class="header">
|
|
|
|
<span id="default-project-column-header"></span>
|
|
|
|
</div>
|
|
|
|
<div class="content">
|
|
|
|
<label id="default-project-column-content"></label>
|
|
|
|
</div>
|
2023-09-24 20:31:58 +00:00
|
|
|
{{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
|
2023-01-20 11:42:33 +00:00
|
|
|
</div>
|
|
|
|
|
2023-08-12 10:30:28 +00:00
|
|
|
<div class="ui g-modal-confirm modal" id="delete-project-column-modal-{{.ID}}">
|
|
|
|
<div class="header">
|
|
|
|
{{ctx.Locale.Tr "repo.projects.column.delete"}}
|
|
|
|
</div>
|
|
|
|
<div class="content">
|
|
|
|
<label>
|
|
|
|
{{ctx.Locale.Tr "repo.projects.column.deletion_desc"}}
|
|
|
|
</label>
|
|
|
|
</div>
|
2023-09-24 20:31:58 +00:00
|
|
|
{{template "base/modal_actions_confirm" (dict "ModalButtonTypes" "confirm")}}
|
2023-07-07 18:06:49 +00:00
|
|
|
</div>
|
2023-01-20 11:42:33 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2023-07-07 18:06:49 +00:00
|
|
|
{{end}}
|
2023-08-12 10:30:28 +00:00
|
|
|
</div>
|
2024-04-07 16:19:25 +00:00
|
|
|
<div class="divider"{{if .Color}} style="color: {{ContrastColor .Color}} !important"{{end}}></div>
|
2024-03-27 23:20:38 +00:00
|
|
|
<div class="ui cards" data-url="{{$.Link}}/{{.ID}}" data-project="{{$.Project.ID}}" data-board="{{.ID}}" id="board_{{.ID}}">
|
2023-08-12 10:30:28 +00:00
|
|
|
{{range (index $.IssuesMap .ID)}}
|
2024-06-04 13:57:11 +00:00
|
|
|
<div class="issue-card tw-break-anywhere {{if $canWriteProject}}tw-cursor-grab{{end}}" data-issue="{{.ID}}">
|
2023-08-12 10:30:28 +00:00
|
|
|
{{template "repo/issue/card" (dict "Issue" . "Page" $)}}
|
2023-01-20 11:42:33 +00:00
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
2023-07-07 18:06:49 +00:00
|
|
|
{{end}}
|
2023-01-20 11:42:33 +00:00
|
|
|
</div>
|
2023-07-07 18:06:49 +00:00
|
|
|
</div>
|
|
|
|
|
2023-03-12 13:36:47 +00:00
|
|
|
{{if .CanWriteProjects}}
|
2023-04-24 11:08:59 +00:00
|
|
|
<div class="ui g-modal-confirm delete modal">
|
2023-04-23 09:24:19 +00:00
|
|
|
<div class="header">
|
2023-01-20 11:42:33 +00:00
|
|
|
{{svg "octicon-trash"}}
|
2023-08-12 10:30:28 +00:00
|
|
|
{{ctx.Locale.Tr "repo.projects.deletion"}}
|
2023-01-20 11:42:33 +00:00
|
|
|
</div>
|
|
|
|
<div class="content">
|
2023-08-12 10:30:28 +00:00
|
|
|
<p>{{ctx.Locale.Tr "repo.projects.deletion_desc"}}</p>
|
2023-01-20 11:42:33 +00:00
|
|
|
</div>
|
2023-04-23 09:24:19 +00:00
|
|
|
{{template "base/modal_actions_confirm" .}}
|
2023-01-20 11:42:33 +00:00
|
|
|
</div>
|
|
|
|
{{end}}
|