diff options
Diffstat (limited to 'templates/projects')
-rw-r--r-- | templates/projects/list.tmpl | 19 | ||||
-rw-r--r-- | templates/projects/new.tmpl | 2 | ||||
-rw-r--r-- | templates/projects/view.tmpl | 62 |
3 files changed, 40 insertions, 43 deletions
diff --git a/templates/projects/list.tmpl b/templates/projects/list.tmpl index 48083811e7..e769543f6a 100644 --- a/templates/projects/list.tmpl +++ b/templates/projects/list.tmpl @@ -1,5 +1,5 @@ {{if and $.CanWriteProjects (not $.Repository.IsArchived)}} - <div class="tw-flex tw-justify-between tw-mb-4"> + <div class="flex-text-block tw-justify-between tw-mb-4"> <div class="small-menu-items ui compact tiny menu list-header-toggle"> <a class="item{{if not .IsShowClosed}} active{{end}}" href="?state=open&q={{$.Keyword}}"> {{svg "octicon-project-symlink" 16 "tw-mr-2"}} @@ -10,9 +10,7 @@ {{ctx.Locale.PrettyNumber .ClosedCount}} {{ctx.Locale.Tr "repo.issues.closed_title"}} </a> </div> - <div class="tw-text-right"> - <a class="ui small primary button" href="{{$.Link}}/new">{{ctx.Locale.Tr "repo.projects.new"}}</a> - </div> + <a class="ui small primary button" href="{{$.Link}}/new">{{ctx.Locale.Tr "repo.projects.new"}}</a> </div> {{end}} @@ -69,7 +67,7 @@ {{else}} <a class="link-action flex-text-inline" href data-url="{{.Link ctx}}/close">{{svg "octicon-skip" 14}}{{ctx.Locale.Tr "repo.projects.close"}}</a> {{end}} - <a class="delete-button flex-text-inline" href="#" data-url="{{.Link ctx}}/delete">{{svg "octicon-trash" 14}}{{ctx.Locale.Tr "repo.issues.label_delete"}}</a> + <a class="link-action flex-text-inline text red" href data-modal-confirm="#repo-project-delete-modal" data-url="{{.Link ctx}}/delete">{{svg "octicon-trash" 14}}{{ctx.Locale.Tr "repo.issues.label_delete"}}</a> </div> {{end}} </div> @@ -83,14 +81,9 @@ </div> {{if and $.CanWriteProjects (not $.Repository.IsArchived)}} -<div class="ui g-modal-confirm delete modal"> - <div class="header"> - {{svg "octicon-trash"}} - {{ctx.Locale.Tr "repo.projects.deletion"}} - </div> - <div class="content"> - <p>{{ctx.Locale.Tr "repo.projects.deletion_desc"}}</p> - </div> +<div class="ui small modal" id="repo-project-delete-modal"> + <div class="header">{{svg "octicon-trash"}} {{ctx.Locale.Tr "repo.projects.deletion"}}</div> + <div class="content"><p>{{ctx.Locale.Tr "repo.projects.deletion_desc"}}</p></div> {{template "base/modal_actions_confirm" .}} </div> {{end}} diff --git a/templates/projects/new.tmpl b/templates/projects/new.tmpl index a936079c46..f2630be09b 100644 --- a/templates/projects/new.tmpl +++ b/templates/projects/new.tmpl @@ -64,7 +64,7 @@ </div> </div> <div class="divider"></div> - <div class="tw-text-right"> + <div class="flex-text-block tw-justify-end"> <a class="ui cancel button" href="{{$.CancelLink}}"> {{ctx.Locale.Tr "repo.milestones.cancel"}} </a> diff --git a/templates/projects/view.tmpl b/templates/projects/view.tmpl index f4478d544a..692808a32d 100644 --- a/templates/projects/view.tmpl +++ b/templates/projects/view.tmpl @@ -1,27 +1,32 @@ {{$canWriteProject := and .CanWriteProjects (or (not .Repository) (not .Repository.IsArchived))}} -<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> - <div class="project-toolbar-right"> - <div class="ui secondary filter menu labels"> - {{$queryLink := QueryBuild "?" "labels" .SelectLabels "assignee" $.AssigneeID "archived_labels" (Iif $.ShowArchivedLabels "true")}} - - {{template "repo/issue/filter_item_label" dict "Labels" .Labels "QueryLink" $queryLink "SupportArchivedLabel" true}} - - {{template "repo/issue/filter_item_user_assign" dict - "QueryParamKey" "assignee" - "QueryLink" $queryLink - "UserSearchList" $.Assignees - "SelectedUserId" $.AssigneeID - "TextFilterTitle" (ctx.Locale.Tr "repo.issues.filter_assignee") - "TextFilterMatchNone" (ctx.Locale.Tr "repo.issues.filter_assginee_no_assignee") - "TextFilterMatchAny" (ctx.Locale.Tr "repo.issues.filter_assignee_any_assignee") - }} - </div> - </div> +<div class="ui container fluid padded projects-view"> + <div class="ui container flex-text-block project-header"> + <h2>{{.Project.Title}}</h2> + <div class="tw-flex-1"></div> + <div class="ui secondary menu tw-m-0"> + {{$queryLink := QueryBuild "?" "labels" .SelectLabels "assignee" $.AssigneeID "archived_labels" (Iif $.ShowArchivedLabels "true")}} + {{template "repo/issue/filter_item_label" dict "Labels" .Labels "QueryLink" $queryLink "SupportArchivedLabel" true}} + {{template "repo/issue/filter_item_user_assign" dict + "QueryParamKey" "assignee" + "QueryLink" $queryLink + "UserSearchList" $.Assignees + "SelectedUserId" $.AssigneeID + "TextFilterTitle" (ctx.Locale.Tr "repo.issues.filter_assignee") + "TextFilterMatchNone" (ctx.Locale.Tr "repo.issues.filter_assignee_no_assignee") + "TextFilterMatchAny" (ctx.Locale.Tr "repo.issues.filter_assignee_any_assignee") + }} + </div> {{if $canWriteProject}} <div class="ui compact mini menu"> + <a class="item screen-full"> + {{svg "octicon-screen-full"}} + {{ctx.Locale.Tr "projects.enter_fullscreen"}} + </a> + <a class="item screen-normal tw-hidden"> + {{svg "octicon-screen-normal"}} + {{ctx.Locale.Tr "projects.exit_fullscreen"}} + </a> <a class="item" href="{{.Link}}/edit?redirect=project"> {{svg "octicon-pencil"}} {{ctx.Locale.Tr "repo.issues.label_edit"}} @@ -59,13 +64,12 @@ {{end}} </div> - <div class="content">{{$.Project.RenderedContent}}</div> - - <div class="divider"></div> -</div> + <div class="ui container project-description"> + {{$.Project.RenderedContent}} + <div class="divider"></div> + </div> -<div id="project-board" data-project-borad-writable="{{$canWriteProject}}"> - <div class="board {{if $canWriteProject}}sortable{{end}}" {{if $canWriteProject}}data-url="{{$.Link}}/move"{{end}}> + <div id="project-board" class="board {{if $canWriteProject}}sortable{{end}}" data-project-borad-writable="{{$canWriteProject}}" {{if $canWriteProject}}data-url="{{$.Link}}/move"{{end}}> {{range .Columns}} <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}}"> <div class="project-column-header{{if $canWriteProject}} tw-cursor-grab{{end}}"> @@ -126,12 +130,12 @@ <input class="project-column-id" type="hidden" name="id"> <div class="required field"> <label class="project-column-title-label" for="project-column-title-input">title</label> - <input id="project-column-title-input" name="title" value="{{.Title}}" required> + <input id="project-column-title-input" name="title" required> </div> <div class="field"> <label class="project-column-color-label" for="project-column-color-input">color</label> - <div class="js-color-picker-input column"> - <input maxlength="7" placeholder="#c320f6" id="project-column-color-input" name="color" value="{{.Color}}"> + <div class="color-picker-combo" data-global-init="initColorPicker"> + <input maxlength="7" placeholder="#c320f6" id="project-column-color-input" name="color"> {{template "repo/issue/label_precolors"}} </div> </div> |