Use full width for project boards (#28225)

Inspired by #28182
This commit is contained in:
Denys Konovalov 2023-11-27 18:43:52 +01:00 committed by GitHub
parent a6aed0fee6
commit 4d7c063f9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 61 additions and 55 deletions

View File

@ -2,8 +2,10 @@
<div role="main" aria-label="{{.Title}}" class="page-content repository projects view-project"> <div role="main" aria-label="{{.Title}}" class="page-content repository projects view-project">
{{template "shared/user/org_profile_avatar" .}} {{template "shared/user/org_profile_avatar" .}}
<div class="ui container"> <div class="ui container">
{{template "user/overview/header" .}} {{template "user/overview/header" .}}
{{template "projects/view" .}} </div>
<div class="ui container fluid padded">
{{template "projects/view" .}}
</div> </div>
</div> </div>
{{template "base/footer" .}} {{template "base/footer" .}}

View File

@ -1,66 +1,68 @@
{{$canWriteProject := and .CanWriteProjects (or (not .Repository) (not .Repository.IsArchived))}} {{$canWriteProject := and .CanWriteProjects (or (not .Repository) (not .Repository.IsArchived))}}
<div class="gt-df gt-sb gt-ac gt-mb-4"> <div class="ui container">
<h2 class="gt-mb-0">{{.Project.Title}}</h2> <div class="gt-df gt-sb gt-ac gt-mb-4">
{{if $canWriteProject}} <h2 class="gt-mb-0">{{.Project.Title}}</h2>
<div class="ui compact mini menu"> {{if $canWriteProject}}
<a class="item" href="{{.Link}}/edit?redirect=project"> <div class="ui compact mini menu">
{{svg "octicon-pencil"}} <a class="item" href="{{.Link}}/edit?redirect=project">
{{ctx.Locale.Tr "repo.issues.label_edit"}} {{svg "octicon-pencil"}}
</a> {{ctx.Locale.Tr "repo.issues.label_edit"}}
{{if .Project.IsClosed}} </a>
<button class="item btn link-action" data-url="{{.Link}}/open"> {{if .Project.IsClosed}}
{{svg "octicon-check"}} <button class="item btn link-action" data-url="{{.Link}}/open">
{{ctx.Locale.Tr "repo.projects.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"}}
</button> </button>
{{else}} <button class="item btn show-modal" data-modal="#new-project-column-item">
<button class="item btn link-action" data-url="{{.Link}}/close"> {{svg "octicon-plus"}}
{{svg "octicon-skip"}} {{ctx.Locale.Tr "new_project_column"}}
{{ctx.Locale.Tr "repo.projects.close"}}
</button> </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"}}
</button>
<button class="item btn show-modal" data-modal="#new-project-column-item">
{{svg "octicon-plus"}}
{{ctx.Locale.Tr "new_project_column"}}
</button>
</div>
<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>
<div class="content"> <div class="ui small modal new-project-column-modal" id="new-project-column-item">
<form class="ui form"> <div class="header">
<div class="required field"> {{ctx.Locale.Tr "repo.projects.column.new"}}
<label for="new_project_column">{{ctx.Locale.Tr "repo.projects.column.new_title"}}</label> </div>
<input class="new-project-column" id="new_project_column" name="title" required> <div class="content">
</div> <form class="ui form">
<div class="required field">
<div class="field color-field"> <label for="new_project_column">{{ctx.Locale.Tr "repo.projects.column.new_title"}}</label>
<label for="new_project_column_color">{{ctx.Locale.Tr "repo.projects.column.color"}}</label> <input class="new-project-column" id="new_project_column" name="title" required>
<div class="color picker column">
<input class="color-picker" maxlength="7" placeholder="#c320f6" id="new_project_column_color_picker" name="color">
{{template "repo/issue/label_precolors"}}
</div> </div>
</div>
<div class="text right actions"> <div class="field color-field">
<button class="ui cancel button">{{ctx.Locale.Tr "settings.cancel"}}</button> <label for="new_project_column_color">{{ctx.Locale.Tr "repo.projects.column.color"}}</label>
<button data-url="{{$.Link}}" class="ui primary button" id="new_project_column_submit">{{ctx.Locale.Tr "repo.projects.column.new_submit"}}</button> <div class="color picker column">
</div> <input class="color-picker" maxlength="7" placeholder="#c320f6" id="new_project_column_color_picker" name="color">
</form> {{template "repo/issue/label_precolors"}}
</div>
</div>
<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>
</div> </div>
</div> {{end}}
{{end}} </div>
<div class="content">{{$.Project.RenderedContent|Str2html}}</div>
<div class="divider"></div>
</div> </div>
<div class="content">{{$.Project.RenderedContent|Str2html}}</div>
<div class="divider"></div>
<div id="project-board"> <div id="project-board">
<div class="board {{if .CanWriteProjects}}sortable{{end}}"> <div class="board {{if .CanWriteProjects}}sortable{{end}}">
{{range .Columns}} {{range .Columns}}

View File

@ -6,6 +6,8 @@
{{template "repo/issue/navbar" .}} {{template "repo/issue/navbar" .}}
<a class="ui small primary button" href="{{.RepoLink}}/issues/new/choose?project={{.Project.ID}}">{{ctx.Locale.Tr "repo.issues.new"}}</a> <a class="ui small primary button" href="{{.RepoLink}}/issues/new/choose?project={{.Project.ID}}">{{ctx.Locale.Tr "repo.issues.new"}}</a>
</div> </div>
</div>
<div class="ui container fluid padded">
{{template "projects/view" .}} {{template "projects/view" .}}
</div> </div>
</div> </div>