Likely the biggest change of the tailwind refactors. Only thing of note is that `tw-flex-1` resolves to `flex: 1 1 0%` while our `gt-f1` was `flex: 1 1 0`, I don't think it will make any difference. Commands I've ran: ```sh perl -p -i -e 's#gt-vm#tw-align-middle#g' web_src/js/**/* templates/**/* models/**/* perl -p -i -e 's#gt-fw#tw-flex-wrap#g' web_src/js/**/* templates/**/* models/**/* perl -p -i -e 's#gt-f1#tw-flex-1#g' web_src/js/**/* templates/**/* models/**/* perl -p -i -e 's#gt-fc#tw-flex-col#g' web_src/js/**/* templates/**/* models/**/* perl -p -i -e 's#gt-sb#tw-justify-between#g' web_src/js/**/* templates/**/* models/**/* perl -p -i -e 's#gt-je#tw-justify-end#g' web_src/js/**/* templates/**/* models/**/* perl -p -i -e 's#gt-jc#tw-justify-center#g' web_src/js/**/* templates/**/* models/**/* perl -p -i -e 's#gt-ac#tw-content-center#g' web_src/js/**/* templates/**/* models/**/* tests/**/* perl -p -i -e 's#gt-df#tw-flex#g' web_src/js/**/* templates/**/* models/**/* tests/**/* perl -p -i -e 's#gt-dib#tw-inline-block#g' web_src/js/**/* templates/**/* models/**/* tests/**/* Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>tags/v1.22.0-rc0
9. Avoid unnecessary `!important` in CSS, add comments to explain why it's necessary if it can't be avoided. | 9. Avoid unnecessary `!important` in CSS, add comments to explain why it's necessary if it can't be avoided. | ||||
10. Avoid mixing different events in one event listener, prefer to use individual event listeners for every event. | 10. Avoid mixing different events in one event listener, prefer to use individual event listeners for every event. | ||||
11. Custom event names are recommended to use `ce-` prefix. | 11. Custom event names are recommended to use `ce-` prefix. | ||||
12. Prefer using Tailwind CSS which is available via `tw-` prefix, e.g. `tw-relative`. Gitea's helper CSS classes use `gt-` prefix (`gt-df`), while Gitea's own private framework-level CSS classes use `g-` prefix (`g-modal-confirm`). | |||||
12. Prefer using Tailwind CSS which is available via `tw-` prefix, e.g. `tw-relative`. Gitea's helper CSS classes use `gt-` prefix (`gt-mono`), while Gitea's own private framework-level CSS classes use `g-` prefix (`g-modal-confirm`). | |||||
13. Avoid inline scripts & styles as much as possible, it's recommended to put JS code into JS files and use CSS classes. If inline scripts & styles are unavoidable, explain the reason why it can't be avoided. | 13. Avoid inline scripts & styles as much as possible, it's recommended to put JS code into JS files and use CSS classes. If inline scripts & styles are unavoidable, explain the reason why it can't be avoided. | ||||
### Accessibility / ARIA | ### Accessibility / ARIA |
9. 避免在 CSS 中使用不必要的`!important`,如果无法避免,添加注释解释为什么需要它。 | 9. 避免在 CSS 中使用不必要的`!important`,如果无法避免,添加注释解释为什么需要它。 | ||||
10. 避免在一个事件监听器中混合不同的事件,优先为每个事件使用独立的事件监听器。 | 10. 避免在一个事件监听器中混合不同的事件,优先为每个事件使用独立的事件监听器。 | ||||
11. 推荐使用自定义事件名称前缀`ce-`。 | 11. 推荐使用自定义事件名称前缀`ce-`。 | ||||
12. 建议使用 Tailwind CSS,它可以通过 `tw-` 前缀获得,例如 `tw-relative`. Gitea 自身的助手类 CSS 使用 `gt-` 前缀(`gt-df`),Gitea 自身的私有框架级 CSS 类使用 `g-` 前缀(`g-modal-confirm`)。 | |||||
12. 建议使用 Tailwind CSS,它可以通过 `tw-` 前缀获得,例如 `tw-relative`. Gitea 自身的助手类 CSS 使用 `gt-` 前缀(`gt-mono`),Gitea 自身的私有框架级 CSS 类使用 `g-` 前缀(`g-modal-confirm`)。 | |||||
13. 尽量避免内联脚本和样式,建议将JS代码放入JS文件中并使用CSS类。如果内联脚本和样式不可避免,请解释无法避免的原因。 | 13. 尽量避免内联脚本和样式,建议将JS代码放入JS文件中并使用CSS类。如果内联脚本和样式不可避免,请解释无法避免的原因。 | ||||
### 可访问性 / ARIA | ### 可访问性 / ARIA |
const ( | const ( | ||||
// DefaultAvatarClass is the default class of a rendered avatar | // DefaultAvatarClass is the default class of a rendered avatar | ||||
DefaultAvatarClass = "ui avatar gt-vm" | |||||
DefaultAvatarClass = "ui avatar tw-align-middle" | |||||
// DefaultAvatarPixelSize is the default size in pixels of a rendered avatar | // DefaultAvatarPixelSize is the default size in pixels of a rendered avatar | ||||
DefaultAvatarPixelSize = 28 | DefaultAvatarPixelSize = 28 | ||||
) | ) |
{{ctx.Locale.Tr "admin.emails.email_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .Total}}) | {{ctx.Locale.Tr "admin.emails.email_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .Total}}) | ||||
</h4> | </h4> | ||||
<div class="ui attached segment"> | <div class="ui attached segment"> | ||||
<div class="ui secondary filter menu gt-ac gt-mx-0"> | |||||
<form class="ui form ignore-dirty gt-f1"> | |||||
<div class="ui secondary filter menu tw-content-center gt-mx-0"> | |||||
<form class="ui form ignore-dirty tw-flex-1"> | |||||
{{template "shared/search/combo" dict "Value" .Keyword}} | {{template "shared/search/combo" dict "Value" .Keyword}} | ||||
</form> | </form> | ||||
<!-- Sort --> | <!-- Sort --> |
<tbody> | <tbody> | ||||
{{range .Notices}} | {{range .Notices}} | ||||
<tr> | <tr> | ||||
<td><div class="ui checkbox gt-df" data-id="{{.ID}}"><input type="checkbox"></div></td> | |||||
<td><div class="ui checkbox tw-flex" data-id="{{.ID}}"><input type="checkbox"></div></td> | |||||
<td>{{.ID}}</td> | <td>{{.ID}}</td> | ||||
<td>{{ctx.Locale.Tr .TrStr}}</td> | <td>{{ctx.Locale.Tr .TrStr}}</td> | ||||
<td class="view-detail auto-ellipsis" style="width: 80%;"><span class="notice-description">{{.Description}}</span></td> | <td class="view-detail auto-ellipsis" style="width: 80%;"><span class="notice-description">{{.Description}}</span></td> |
</div> | </div> | ||||
</h4> | </h4> | ||||
<div class="ui attached segment"> | <div class="ui attached segment"> | ||||
<div class="ui secondary filter menu gt-ac gt-mx-0"> | |||||
<form class="ui form ignore-dirty gt-f1"> | |||||
<div class="ui secondary filter menu tw-content-center gt-mx-0"> | |||||
<form class="ui form ignore-dirty tw-flex-1"> | |||||
{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.org_kind")}} | {{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.org_kind")}} | ||||
</form> | </form> | ||||
<!-- Sort --> | <!-- Sort --> |
- | - | ||||
{{else}} | {{else}} | ||||
{{$sum}} | {{$sum}} | ||||
<form action="{{$.Link}}/remove-all-items" method="post" class="gt-dib gt-ml-4"> | |||||
<form action="{{$.Link}}/remove-all-items" method="post" class="tw-inline-block gt-ml-4"> | |||||
{{$.CsrfTokenHtml}} | {{$.CsrfTokenHtml}} | ||||
<button class="ui tiny basic red button">{{ctx.Locale.Tr "admin.monitor.queue.settings.remove_all_items"}}</button> | <button class="ui tiny basic red button">{{ctx.Locale.Tr "admin.monitor.queue.settings.remove_all_items"}}</button> | ||||
</form> | </form> |
{{if .Dirs}} | {{if .Dirs}} | ||||
<div class="ui aligned divided list"> | <div class="ui aligned divided list"> | ||||
{{range $dirI, $dir := .Dirs}} | {{range $dirI, $dir := .Dirs}} | ||||
<div class="item gt-df gt-ac"> | |||||
<span class="gt-f1"> {{svg "octicon-file-directory-fill"}} {{$dir}}</span> | |||||
<div class="item tw-flex tw-content-center"> | |||||
<span class="tw-flex-1"> {{svg "octicon-file-directory-fill"}} {{$dir}}</span> | |||||
<div> | <div> | ||||
<button class="ui button primary show-modal gt-p-3" data-modal="#adopt-unadopted-modal-{{$dirI}}">{{svg "octicon-plus"}} {{ctx.Locale.Tr "repo.adopt_preexisting_label"}}</button> | <button class="ui button primary show-modal gt-p-3" data-modal="#adopt-unadopted-modal-{{$dirI}}">{{svg "octicon-plus"}} {{ctx.Locale.Tr "repo.adopt_preexisting_label"}}</button> | ||||
<div class="ui g-modal-confirm modal" id="adopt-unadopted-modal-{{$dirI}}"> | <div class="ui g-modal-confirm modal" id="adopt-unadopted-modal-{{$dirI}}"> |
<div class="item"> | <div class="item"> | ||||
<div class="gt-df gt-ac"> | |||||
<div class="tw-flex tw-content-center"> | |||||
<div class="icon gt-ml-3 gt-mr-3"> | <div class="icon gt-ml-3 gt-mr-3"> | ||||
{{if eq .Process.Type "request"}} | {{if eq .Process.Type "request"}} | ||||
{{svg "octicon-globe" 16}} | {{svg "octicon-globe" 16}} | ||||
{{svg "octicon-code" 16}} | {{svg "octicon-code" 16}} | ||||
{{end}} | {{end}} | ||||
</div> | </div> | ||||
<div class="content gt-f1"> | |||||
<div class="content tw-flex-1"> | |||||
<div class="header">{{.Process.Description}}</div> | <div class="header">{{.Process.Description}}</div> | ||||
<div class="description">{{if ne .Process.Type "none"}}{{TimeSince .Process.Start ctx.Locale}}{{end}}</div> | <div class="description">{{if ne .Process.Type "none"}}{{TimeSince .Process.Start ctx.Locale}}{{end}}</div> | ||||
</div> | </div> | ||||
</summary> | </summary> | ||||
<div class="list"> | <div class="list"> | ||||
{{range .Entry}} | {{range .Entry}} | ||||
<div class="item gt-df gt-ac"> | |||||
<div class="item tw-flex tw-content-center"> | |||||
<span class="icon gt-mr-4">{{svg "octicon-dot-fill" 16}}</span> | <span class="icon gt-mr-4">{{svg "octicon-dot-fill" 16}}</span> | ||||
<div class="content gt-f1"> | |||||
<div class="content tw-flex-1"> | |||||
<div class="header"><code>{{.Function}}</code></div> | <div class="header"><code>{{.Function}}</code></div> | ||||
<div class="description"><code>{{.File}}:{{.Line}}</code></div> | <div class="description"><code>{{.File}}:{{.Line}}</code></div> | ||||
</div> | </div> |
{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin monitor")}} | {{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin monitor")}} | ||||
<div class="admin-setting-content"> | <div class="admin-setting-content"> | ||||
<div class="gt-df gt-ac"> | |||||
<div class="gt-f1"> | |||||
<div class="tw-flex tw-content-center"> | |||||
<div class="tw-flex-1"> | |||||
<div class="ui compact small menu"> | <div class="ui compact small menu"> | ||||
<a class="{{if eq .ShowGoroutineList "process"}}active {{end}}item" href="?show=process">{{ctx.Locale.Tr "admin.monitor.process"}}</a> | <a class="{{if eq .ShowGoroutineList "process"}}active {{end}}item" href="?show=process">{{ctx.Locale.Tr "admin.monitor.process"}}</a> | ||||
<a class="{{if eq .ShowGoroutineList "stacktrace"}}active {{end}}item" href="?show=stacktrace">{{ctx.Locale.Tr "admin.monitor.stacktrace"}}</a> | <a class="{{if eq .ShowGoroutineList "stacktrace"}}active {{end}}item" href="?show=stacktrace">{{ctx.Locale.Tr "admin.monitor.stacktrace"}}</a> |
<td><span>{{ctx.Locale.Tr "admin.users.never_login"}}</span></td> | <td><span>{{ctx.Locale.Tr "admin.users.never_login"}}</span></td> | ||||
{{end}} | {{end}} | ||||
<td> | <td> | ||||
<div class="gt-df gt-gap-3"> | |||||
<div class="tw-flex gt-gap-3"> | |||||
<a href="{{$.Link}}/{{.ID}}" data-tooltip-content="{{ctx.Locale.Tr "admin.users.details"}}">{{svg "octicon-person"}}</a> | <a href="{{$.Link}}/{{.ID}}" data-tooltip-content="{{ctx.Locale.Tr "admin.users.details"}}">{{svg "octicon-person"}}</a> | ||||
<a href="{{$.Link}}/{{.ID}}/edit" data-tooltip-content="{{ctx.Locale.Tr "edit"}}">{{svg "octicon-pencil"}}</a> | <a href="{{$.Link}}/{{.ID}}/edit" data-tooltip-content="{{ctx.Locale.Tr "edit"}}">{{svg "octicon-pencil"}}</a> | ||||
</div> | </div> |
<div class="admin-setting-content"> | <div class="admin-setting-content"> | ||||
<div class="admin-responsive-columns"> | <div class="admin-responsive-columns"> | ||||
<div class="gt-f1"> | |||||
<div class="tw-flex-1"> | |||||
<h4 class="ui top attached header"> | <h4 class="ui top attached header"> | ||||
{{.Title}} | {{.Title}} | ||||
<div class="ui right"> | <div class="ui right"> | ||||
{{template "admin/user/view_details" .}} | {{template "admin/user/view_details" .}} | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="gt-f1"> | |||||
<div class="tw-flex-1"> | |||||
<h4 class="ui top attached header"> | <h4 class="ui top attached header"> | ||||
{{ctx.Locale.Tr "admin.emails"}} | {{ctx.Locale.Tr "admin.emails"}} | ||||
<div class="ui right"> | <div class="ui right"> |
<div class="navbar-right ui secondary menu"> | <div class="navbar-right ui secondary menu"> | ||||
{{if and .IsSigned .MustChangePassword}} | {{if and .IsSigned .MustChangePassword}} | ||||
<div class="ui dropdown jump item" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}"> | <div class="ui dropdown jump item" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}"> | ||||
<span class="text gt-df gt-ac"> | |||||
<span class="text tw-flex tw-content-center"> | |||||
{{ctx.AvatarUtils.Avatar .SignedUser 24 "gt-mr-2"}} | {{ctx.AvatarUtils.Avatar .SignedUser 24 "gt-mr-2"}} | ||||
<span class="only-mobile gt-ml-3">{{.SignedUser.Name}}</span> | <span class="only-mobile gt-ml-3">{{.SignedUser.Name}}</span> | ||||
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span> | <span class="not-mobile">{{svg "octicon-triangle-down"}}</span> | ||||
<span class="only-mobile gt-ml-3">{{ctx.Locale.Tr "active_stopwatch"}}</span> | <span class="only-mobile gt-ml-3">{{ctx.Locale.Tr "active_stopwatch"}}</span> | ||||
</a> | </a> | ||||
<div class="active-stopwatch-popup item tippy-target gt-p-3"> | <div class="active-stopwatch-popup item tippy-target gt-p-3"> | ||||
<div class="gt-df gt-ac"> | |||||
<a class="stopwatch-link gt-df gt-ac" href="{{.ActiveStopwatch.IssueLink}}"> | |||||
<div class="tw-flex tw-content-center"> | |||||
<a class="stopwatch-link tw-flex tw-content-center" href="{{.ActiveStopwatch.IssueLink}}"> | |||||
{{svg "octicon-issue-opened" 16 "gt-mr-3"}} | {{svg "octicon-issue-opened" 16 "gt-mr-3"}} | ||||
<span class="stopwatch-issue">{{.ActiveStopwatch.RepoSlug}}#{{.ActiveStopwatch.IssueIndex}}</span> | <span class="stopwatch-issue">{{.ActiveStopwatch.RepoSlug}}#{{.ActiveStopwatch.IssueIndex}}</span> | ||||
<span class="ui primary label stopwatch-time gt-my-0 gt-mx-4" data-seconds="{{.ActiveStopwatch.Seconds}}"> | <span class="ui primary label stopwatch-time gt-my-0 gt-mx-4" data-seconds="{{.ActiveStopwatch.Seconds}}"> | ||||
</div><!-- end dropdown menu create new --> | </div><!-- end dropdown menu create new --> | ||||
<div class="ui dropdown jump item gt-mx-0 gt-pr-3" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}"> | <div class="ui dropdown jump item gt-mx-0 gt-pr-3" data-tooltip-content="{{ctx.Locale.Tr "user_profile_and_more"}}"> | ||||
<span class="text gt-df gt-ac"> | |||||
<span class="text tw-flex tw-content-center"> | |||||
{{ctx.AvatarUtils.Avatar .SignedUser 24 "gt-mr-2"}} | {{ctx.AvatarUtils.Avatar .SignedUser 24 "gt-mr-2"}} | ||||
<span class="only-mobile gt-ml-3">{{.SignedUser.Name}}</span> | <span class="only-mobile gt-ml-3">{{.SignedUser.Name}}</span> | ||||
<span class="not-mobile">{{svg "octicon-triangle-down"}}</span> | <span class="not-mobile">{{svg "octicon-triangle-down"}}</span> |
{{template "base/modal_actions_confirm" (dict "ModalButtonDangerText" "I know and must do this is dangerous operation")}} | {{template "base/modal_actions_confirm" (dict "ModalButtonDangerText" "I know and must do this is dangerous operation")}} | ||||
</div> | </div> | ||||
<div class="modal-buttons flex-text-block gt-fw"></div> | |||||
<div class="modal-buttons flex-text-block tw-flex-wrap"></div> | |||||
<script type="module"> | <script type="module"> | ||||
for (const el of $('.ui.modal')) { | for (const el of $('.ui.modal')) { | ||||
const $btn = $('<button>').text(`${el.id}`).on('click', () => { | const $btn = $('<button>').text(`${el.id}`).on('click', () => { |
{{template "base/head" .}} | {{template "base/head" .}} | ||||
<div class="page-content devtest"> | <div class="page-content devtest"> | ||||
<div class="gt-df"> | |||||
<div class="tw-flex"> | |||||
<div style="width: 80%; "> | <div style="width: 80%; "> | ||||
hello hello hello hello hello hello hello hello hello hello | hello hello hello hello hello hello hello hello hello hello | ||||
</div> | </div> |
<div class="ui small secondary filter menu gt-ac gt-mx-0"> | |||||
<form class="ui form ignore-dirty gt-f1"> | |||||
<div class="ui small secondary filter menu tw-content-center gt-mx-0"> | |||||
<form class="ui form ignore-dirty tw-flex-1"> | |||||
{{if .PageIsExploreUsers}} | {{if .PageIsExploreUsers}} | ||||
{{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.user_kind")}} | {{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.user_kind")}} | ||||
{{else}} | {{else}} |
<div class="flex-list"> | <div class="flex-list"> | ||||
{{range .Users}} | {{range .Users}} | ||||
<div class="flex-item gt-ac"> | |||||
<div class="flex-item tw-content-center"> | |||||
<div class="flex-item-leading"> | <div class="flex-item-leading"> | ||||
{{ctx.AvatarUtils.Avatar . 48}} | {{ctx.AvatarUtils.Avatar . 48}} | ||||
</div> | </div> |
<div class="ui container gt-df"> | |||||
<div class="ui container tw-flex"> | |||||
{{ctx.AvatarUtils.Avatar .Org 100 "org-avatar"}} | {{ctx.AvatarUtils.Avatar .Org 100 "org-avatar"}} | ||||
<div id="org-info" class="gt-df gt-fc"> | |||||
<div id="org-info" class="tw-flex tw-flex-col"> | |||||
<div class="ui header"> | <div class="ui header"> | ||||
{{.Org.DisplayName}} | {{.Org.DisplayName}} | ||||
<span class="org-visibility"> | <span class="org-visibility"> | ||||
{{if .Org.Visibility.IsLimited}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</span>{{end}} | {{if .Org.Visibility.IsLimited}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</span>{{end}} | ||||
{{if .Org.Visibility.IsPrivate}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</span>{{end}} | {{if .Org.Visibility.IsPrivate}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</span>{{end}} | ||||
</span> | </span> | ||||
<span class="gt-df gt-ac gt-gap-2 tw-ml-auto gt-font-16 tw-whitespace-nowrap"> | |||||
<span class="tw-flex tw-content-center gt-gap-2 tw-ml-auto gt-font-16 tw-whitespace-nowrap"> | |||||
{{if .EnableFeed}} | {{if .EnableFeed}} | ||||
<a class="ui basic label button gt-mr-0" href="{{.Org.HomeLink}}.rss" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}"> | <a class="ui basic label button gt-mr-0" href="{{.Org.HomeLink}}.rss" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}"> | ||||
{{svg "octicon-rss" 24}} | {{svg "octicon-rss" 24}} |
<div class="divider"></div> | <div class="divider"></div> | ||||
{{end}} | {{end}} | ||||
{{if .NumMembers}} | {{if .NumMembers}} | ||||
<h4 class="ui top attached header gt-df"> | |||||
<strong class="gt-f1">{{ctx.Locale.Tr "org.members"}}</strong> | |||||
<a class="text grey gt-df gt-ac" href="{{.OrgLink}}/members"><span>{{.NumMembers}}</span> {{svg "octicon-chevron-right"}}</a> | |||||
<h4 class="ui top attached header tw-flex"> | |||||
<strong class="tw-flex-1">{{ctx.Locale.Tr "org.members"}}</strong> | |||||
<a class="text grey tw-flex tw-content-center" href="{{.OrgLink}}/members"><span>{{.NumMembers}}</span> {{svg "octicon-chevron-right"}}</a> | |||||
</h4> | </h4> | ||||
<div class="ui attached segment members"> | <div class="ui attached segment members"> | ||||
{{$isMember := .IsOrganizationMember}} | {{$isMember := .IsOrganizationMember}} | ||||
</div> | </div> | ||||
{{end}} | {{end}} | ||||
{{if .IsOrganizationMember}} | {{if .IsOrganizationMember}} | ||||
<div class="ui top attached header gt-df"> | |||||
<strong class="gt-f1">{{ctx.Locale.Tr "org.teams"}}</strong> | |||||
<a class="text grey gt-df gt-ac" href="{{.OrgLink}}/teams"><span>{{.Org.NumTeams}}</span> {{svg "octicon-chevron-right"}}</a> | |||||
<div class="ui top attached header tw-flex"> | |||||
<strong class="tw-flex-1">{{ctx.Locale.Tr "org.teams"}}</strong> | |||||
<a class="text grey tw-flex tw-content-center" href="{{.OrgLink}}/teams"><span>{{.Org.NumTeams}}</span> {{svg "octicon-chevron-right"}}</a> | |||||
</div> | </div> | ||||
<div class="ui attached table segment teams"> | <div class="ui attached table segment teams"> | ||||
{{range .Teams}} | {{range .Teams}} |
<div class="flex-list"> | <div class="flex-list"> | ||||
{{range .Members}} | {{range .Members}} | ||||
{{$isPublic := index $.MembersIsPublicMember .ID}} | {{$isPublic := index $.MembersIsPublicMember .ID}} | ||||
<div class="flex-item {{if $.PublicOnly}}gt-ac{{end}}"> | |||||
<div class="flex-item {{if $.PublicOnly}}tw-content-center{{end}}"> | |||||
<div class="flex-item-leading"> | <div class="flex-item-leading"> | ||||
<a href="{{.HomeLink}}">{{ctx.AvatarUtils.Avatar . 48}}</a> | <a href="{{.HomeLink}}">{{ctx.AvatarUtils.Avatar . 48}}</a> | ||||
</div> | </div> |
{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings labels")}} | {{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings labels")}} | ||||
<div class="org-setting-content"> | <div class="org-setting-content"> | ||||
<div class="gt-df gt-ac"> | |||||
<div class="gt-f1"> | |||||
<div class="tw-flex tw-content-center"> | |||||
<div class="tw-flex-1"> | |||||
{{ctx.Locale.Tr "org.settings.labels_desc"}} | {{ctx.Locale.Tr "org.settings.labels_desc"}} | ||||
</div> | </div> | ||||
<button class="ui small primary new-label button">{{ctx.Locale.Tr "repo.issues.new_label"}}</button> | <button class="ui small primary new-label button">{{ctx.Locale.Tr "repo.issues.new_label"}}</button> |
{{template "org/team/navbar" .}} | {{template "org/team/navbar" .}} | ||||
{{if .IsOrganizationOwner}} | {{if .IsOrganizationOwner}} | ||||
<div class="ui attached segment"> | <div class="ui attached segment"> | ||||
<form class="ui form ignore-dirty gt-df gt-fw gt-gap-3" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/add" method="post"> | |||||
<form class="ui form ignore-dirty tw-flex tw-flex-wrap gt-gap-3" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/add" method="post"> | |||||
{{.CsrfTokenHtml}} | {{.CsrfTokenHtml}} | ||||
<input type="hidden" name="uid" value="{{.SignedUser.ID}}"> | <input type="hidden" name="uid" value="{{.SignedUser.ID}}"> | ||||
<div id="search-user-box" class="ui search gt-mr-3"{{if .IsEmailInviteEnabled}} data-allow-email="true" data-allow-email-description="{{ctx.Locale.Tr "org.teams.invite_team_member" $.Team.Name}}"{{end}}> | <div id="search-user-box" class="ui search gt-mr-3"{{if .IsEmailInviteEnabled}} data-allow-email="true" data-allow-email-description="{{ctx.Locale.Tr "org.teams.invite_team_member" $.Team.Name}}"{{end}}> | ||||
<div class="ui attached segment"> | <div class="ui attached segment"> | ||||
<div class="flex-list"> | <div class="flex-list"> | ||||
{{range .Team.Members}} | {{range .Team.Members}} | ||||
<div class="flex-item gt-ac"> | |||||
<div class="flex-item tw-content-center"> | |||||
<div class="flex-item-leading"> | <div class="flex-item-leading"> | ||||
<a href="{{.HomeLink}}">{{ctx.AvatarUtils.Avatar . 32}}</a> | <a href="{{.HomeLink}}">{{ctx.AvatarUtils.Avatar . 32}}</a> | ||||
</div> | </div> | ||||
<div class="ui attached segment"> | <div class="ui attached segment"> | ||||
<div class="flex-list"> | <div class="flex-list"> | ||||
{{range .Invites}} | {{range .Invites}} | ||||
<div class="flex-item gt-ac"> | |||||
<div class="flex-item tw-content-center"> | |||||
<div class="flex-item-main"> | <div class="flex-item-main"> | ||||
{{.Email}} | {{.Email}} | ||||
</div> | </div> |
<tr> | <tr> | ||||
<th>{{ctx.Locale.Tr "units.unit"}}</th> | <th>{{ctx.Locale.Tr "units.unit"}}</th> | ||||
<th class="center aligned">{{ctx.Locale.Tr "org.teams.none_access"}} | <th class="center aligned">{{ctx.Locale.Tr "org.teams.none_access"}} | ||||
<span class="gt-vm" data-tooltip-content="{{ctx.Locale.Tr "org.teams.none_access_helper"}}">{{svg "octicon-question" 16 "gt-ml-2"}}</span></th> | |||||
<span class="tw-align-middle" data-tooltip-content="{{ctx.Locale.Tr "org.teams.none_access_helper"}}">{{svg "octicon-question" 16 "gt-ml-2"}}</span></th> | |||||
<th class="center aligned">{{ctx.Locale.Tr "org.teams.read_access"}} | <th class="center aligned">{{ctx.Locale.Tr "org.teams.read_access"}} | ||||
<span class="gt-vm" data-tooltip-content="{{ctx.Locale.Tr "org.teams.read_access_helper"}}">{{svg "octicon-question" 16 "gt-ml-2"}}</span></th> | |||||
<span class="tw-align-middle" data-tooltip-content="{{ctx.Locale.Tr "org.teams.read_access_helper"}}">{{svg "octicon-question" 16 "gt-ml-2"}}</span></th> | |||||
<th class="center aligned">{{ctx.Locale.Tr "org.teams.write_access"}} | <th class="center aligned">{{ctx.Locale.Tr "org.teams.write_access"}} | ||||
<span class="gt-vm" data-tooltip-content="{{ctx.Locale.Tr "org.teams.write_access_helper"}}">{{svg "octicon-question" 16 "gt-ml-2"}}</span></th> | |||||
<span class="tw-align-middle" data-tooltip-content="{{ctx.Locale.Tr "org.teams.write_access_helper"}}">{{svg "octicon-question" 16 "gt-ml-2"}}</span></th> | |||||
</tr> | </tr> | ||||
</thead> | </thead> | ||||
<tbody> | <tbody> |
{{template "org/team/navbar" .}} | {{template "org/team/navbar" .}} | ||||
{{$canAddRemove := and $.IsOrganizationOwner (not $.Team.IncludesAllRepositories)}} | {{$canAddRemove := and $.IsOrganizationOwner (not $.Team.IncludesAllRepositories)}} | ||||
{{if $canAddRemove}} | {{if $canAddRemove}} | ||||
<div class="ui attached segment gt-df gt-fw gt-gap-3"> | |||||
<form class="ui form ignore-dirty gt-f1 gt-df" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/add" method="post"> | |||||
<div class="ui attached segment tw-flex tw-flex-wrap gt-gap-3"> | |||||
<form class="ui form ignore-dirty tw-flex-1 tw-flex" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/add" method="post"> | |||||
{{.CsrfTokenHtml}} | {{.CsrfTokenHtml}} | ||||
<div id="search-repo-box" data-uid="{{.Org.ID}}" class="ui search"> | <div id="search-repo-box" data-uid="{{.Org.ID}}" class="ui search"> | ||||
<div class="ui input"> | <div class="ui input"> | ||||
</div> | </div> | ||||
<button class="ui primary button gt-ml-3">{{ctx.Locale.Tr "add"}}</button> | <button class="ui primary button gt-ml-3">{{ctx.Locale.Tr "add"}}</button> | ||||
</form> | </form> | ||||
<div class="gt-dib"> | |||||
<div class="tw-inline-block"> | |||||
<button class="ui primary button link-action" data-modal-confirm="{{ctx.Locale.Tr "org.teams.add_all_repos_desc"}}" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/addall">{{ctx.Locale.Tr "add_all"}}</button> | <button class="ui primary button link-action" data-modal-confirm="{{ctx.Locale.Tr "org.teams.add_all_repos_desc"}}" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/addall">{{ctx.Locale.Tr "add_all"}}</button> | ||||
<button class="ui red button link-action" data-modal-confirm="{{ctx.Locale.Tr "org.teams.remove_all_repos_desc"}}" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/removeall">{{ctx.Locale.Tr "remove_all"}}</button> | <button class="ui red button link-action" data-modal-confirm="{{ctx.Locale.Tr "org.teams.remove_all_repos_desc"}}" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/removeall">{{ctx.Locale.Tr "remove_all"}}</button> | ||||
</div> | </div> | ||||
<div class="ui attached segment"> | <div class="ui attached segment"> | ||||
<div class="flex-list"> | <div class="flex-list"> | ||||
{{range .Team.Repos}} | {{range .Team.Repos}} | ||||
<div class="flex-item gt-ac"> | |||||
<div class="flex-item tw-content-center"> | |||||
<div class="flex-item-leading"> | <div class="flex-item-leading"> | ||||
{{template "repo/icon" .}} | {{template "repo/icon" .}} | ||||
</div> | </div> |
<a class="tw-float-right" href="{{$.PackageDescriptor.PackageWebLink}}/versions">{{ctx.Locale.Tr "packages.versions.view_all"}}</a> | <a class="tw-float-right" href="{{$.PackageDescriptor.PackageWebLink}}/versions">{{ctx.Locale.Tr "packages.versions.view_all"}}</a> | ||||
<div class="ui relaxed list"> | <div class="ui relaxed list"> | ||||
{{range .LatestVersions}} | {{range .LatestVersions}} | ||||
<div class="item gt-df"> | |||||
<a class="gt-f1 gt-ellipsis" title="{{.Version}}" href="{{$.PackageDescriptor.PackageWebLink}}/{{PathEscape .LowerVersion}}">{{.Version}}</a> | |||||
<div class="item tw-flex"> | |||||
<a class="tw-flex-1 gt-ellipsis" title="{{.Version}}" href="{{$.PackageDescriptor.PackageWebLink}}/{{PathEscape .LowerVersion}}">{{.Version}}</a> | |||||
<span class="text small">{{DateTime "short" .CreatedUnix}}</span> | <span class="text small">{{DateTime "short" .CreatedUnix}}</span> | ||||
</div> | </div> | ||||
{{end}} | {{end}} |
{{if and $.CanWriteProjects (not $.Repository.IsArchived)}} | {{if and $.CanWriteProjects (not $.Repository.IsArchived)}} | ||||
<div class="gt-df gt-sb gt-mb-4"> | |||||
<div class="tw-flex tw-justify-between gt-mb-4"> | |||||
<div class="small-menu-items ui compact tiny menu list-header-toggle"> | <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}}"> | <a class="item{{if not .IsShowClosed}} active{{end}}" href="?state=open&q={{$.Keyword}}"> | ||||
{{svg "octicon-project-symlink" 16 "gt-mr-3"}} | {{svg "octicon-project-symlink" 16 "gt-mr-3"}} |
{{$canWriteProject := and .CanWriteProjects (or (not .Repository) (not .Repository.IsArchived))}} | {{$canWriteProject := and .CanWriteProjects (or (not .Repository) (not .Repository.IsArchived))}} | ||||
<div class="ui container"> | <div class="ui container"> | ||||
<div class="gt-df gt-sb gt-ac gt-mb-4"> | |||||
<div class="tw-flex tw-justify-between tw-content-center gt-mb-4"> | |||||
<h2 class="gt-mb-0">{{.Project.Title}}</h2> | <h2 class="gt-mb-0">{{.Project.Title}}</h2> | ||||
{{if $canWriteProject}} | {{if $canWriteProject}} | ||||
<div class="ui compact mini menu"> | <div class="ui compact mini menu"> |
</div> | </div> | ||||
</div> | </div> | ||||
<div class="twelve wide column content"> | <div class="twelve wide column content"> | ||||
<div class="ui secondary filter menu gt-je gt-df gt-ac"> | |||||
<div class="ui secondary filter menu tw-justify-end tw-flex tw-content-center"> | |||||
<!-- Actor --> | <!-- Actor --> | ||||
<div class="ui{{if not .Actors}} disabled{{end}} dropdown jump item"> | <div class="ui{{if not .Actors}} disabled{{end}} dropdown jump item"> | ||||
<span class="text">{{ctx.Locale.Tr "actions.runs.actor"}}</span> | <span class="text">{{ctx.Locale.Tr "actions.runs.actor"}}</span> |
</div> | </div> | ||||
{{end}} | {{end}} | ||||
{{range .Runs}} | {{range .Runs}} | ||||
<div class="flex-item gt-ac"> | |||||
<div class="flex-item tw-content-center"> | |||||
<div class="flex-item-leading"> | <div class="flex-item-leading"> | ||||
{{template "repo/actions/status" (dict "status" .Status.String)}} | {{template "repo/actions/status" (dict "status" .Status.String)}} | ||||
</div> | </div> |
{{- $className = .className -}} | {{- $className = .className -}} | ||||
{{- end -}} | {{- end -}} | ||||
<span class="gt-df gt-ac" data-tooltip-content="{{ctx.Locale.Tr (printf "actions.status.%s" .status)}}"> | |||||
<span class="tw-flex tw-content-center" data-tooltip-content="{{ctx.Locale.Tr (printf "actions.status.%s" .status)}}"> | |||||
{{if eq .status "success"}} | {{if eq .status "success"}} | ||||
{{svg "octicon-check-circle-fill" $size (printf "text green %s" $className)}} | {{svg "octicon-check-circle-fill" $size (printf "text green %s" $className)}} | ||||
{{else if eq .status "skipped"}} | {{else if eq .status "skipped"}} |
{{end}} | {{end}} | ||||
{{end}} | {{end}} | ||||
<div class="{{TabSizeClass .Editorconfig .FileName}} non-diff-file-content"> | <div class="{{TabSizeClass .Editorconfig .FileName}} non-diff-file-content"> | ||||
<h4 class="file-header ui top attached header gt-df gt-ac gt-sb gt-fw"> | |||||
<div class="file-header-left gt-df gt-ac gt-py-3 gt-pr-4"> | |||||
<h4 class="file-header ui top attached header tw-flex tw-content-center tw-justify-between tw-flex-wrap"> | |||||
<div class="file-header-left tw-flex tw-content-center gt-py-3 gt-pr-4"> | |||||
{{template "repo/file_info" .}} | {{template "repo/file_info" .}} | ||||
</div> | </div> | ||||
<div class="file-header-right file-actions gt-df gt-ac gt-fw"> | |||||
<div class="file-header-right file-actions tw-flex tw-content-center tw-flex-wrap"> | |||||
<div class="ui buttons"> | <div class="ui buttons"> | ||||
<a class="ui tiny button" href="{{$.RawFileLink}}">{{ctx.Locale.Tr "repo.file_raw"}}</a> | <a class="ui tiny button" href="{{$.RawFileLink}}">{{ctx.Locale.Tr "repo.file_raw"}}</a> | ||||
{{if not .IsViewCommit}} | {{if not .IsViewCommit}} |
<button class="btn interact-fg gt-px-2" data-clipboard-text="{{.DefaultBranchBranch.DBBranch.Name}}">{{svg "octicon-copy" 14}}</button> | <button class="btn interact-fg gt-px-2" data-clipboard-text="{{.DefaultBranchBranch.DBBranch.Name}}">{{svg "octicon-copy" 14}}</button> | ||||
{{template "repo/commit_statuses" dict "Status" (index $.CommitStatus .DefaultBranchBranch.DBBranch.CommitID) "Statuses" (index $.CommitStatuses .DefaultBranchBranch.DBBranch.CommitID)}} | {{template "repo/commit_statuses" dict "Status" (index $.CommitStatus .DefaultBranchBranch.DBBranch.CommitID) "Statuses" (index $.CommitStatuses .DefaultBranchBranch.DBBranch.CommitID)}} | ||||
</div> | </div> | ||||
<p class="info gt-df gt-ac gt-my-2">{{svg "octicon-git-commit" 16 "gt-mr-2"}}<a href="{{.RepoLink}}/commit/{{PathEscape .DefaultBranchBranch.DBBranch.CommitID}}">{{ShortSha .DefaultBranchBranch.DBBranch.CommitID}}</a> · <span class="commit-message">{{RenderCommitMessage $.Context .DefaultBranchBranch.DBBranch.CommitMessage (.Repository.ComposeMetas ctx)}}</span> · {{ctx.Locale.Tr "org.repo_updated"}} {{TimeSince .DefaultBranchBranch.DBBranch.CommitTime.AsTime ctx.Locale}}{{if .DefaultBranchBranch.DBBranch.Pusher}} {{template "shared/user/avatarlink" dict "user" .DefaultBranchBranch.DBBranch.Pusher}}{{template "shared/user/namelink" .DefaultBranchBranch.DBBranch.Pusher}}{{end}}</p> | |||||
<p class="info tw-flex tw-content-center gt-my-2">{{svg "octicon-git-commit" 16 "gt-mr-2"}}<a href="{{.RepoLink}}/commit/{{PathEscape .DefaultBranchBranch.DBBranch.CommitID}}">{{ShortSha .DefaultBranchBranch.DBBranch.CommitID}}</a> · <span class="commit-message">{{RenderCommitMessage $.Context .DefaultBranchBranch.DBBranch.CommitMessage (.Repository.ComposeMetas ctx)}}</span> · {{ctx.Locale.Tr "org.repo_updated"}} {{TimeSince .DefaultBranchBranch.DBBranch.CommitTime.AsTime ctx.Locale}}{{if .DefaultBranchBranch.DBBranch.Pusher}} {{template "shared/user/avatarlink" dict "user" .DefaultBranchBranch.DBBranch.Pusher}}{{template "shared/user/namelink" .DefaultBranchBranch.DBBranch.Pusher}}{{end}}</p> | |||||
</td> | </td> | ||||
<td class="right aligned middle aligned overflow-visible"> | <td class="right aligned middle aligned overflow-visible"> | ||||
{{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}} | {{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}} | ||||
</div> | </div> | ||||
{{end}} | {{end}} | ||||
<h4 class="ui top attached header gt-df gt-ac gt-sb"> | |||||
<div class="gt-df gt-ac"> | |||||
<h4 class="ui top attached header tw-flex tw-content-center tw-justify-between"> | |||||
<div class="tw-flex tw-content-center"> | |||||
{{ctx.Locale.Tr "repo.branches"}} | {{ctx.Locale.Tr "repo.branches"}} | ||||
</div> | </div> | ||||
</h4> | </h4> | ||||
<button class="btn interact-fg gt-px-2" data-clipboard-text="{{.DBBranch.Name}}">{{svg "octicon-copy" 14}}</button> | <button class="btn interact-fg gt-px-2" data-clipboard-text="{{.DBBranch.Name}}">{{svg "octicon-copy" 14}}</button> | ||||
{{template "repo/commit_statuses" dict "Status" (index $.CommitStatus .DBBranch.CommitID) "Statuses" (index $.CommitStatuses .DBBranch.CommitID)}} | {{template "repo/commit_statuses" dict "Status" (index $.CommitStatus .DBBranch.CommitID) "Statuses" (index $.CommitStatuses .DBBranch.CommitID)}} | ||||
</div> | </div> | ||||
<p class="info gt-df gt-ac gt-my-2">{{svg "octicon-git-commit" 16 "gt-mr-2"}}<a href="{{$.RepoLink}}/commit/{{PathEscape .DBBranch.CommitID}}">{{ShortSha .DBBranch.CommitID}}</a> · <span class="commit-message">{{RenderCommitMessage $.Context .DBBranch.CommitMessage ($.Repository.ComposeMetas ctx)}}</span> · {{ctx.Locale.Tr "org.repo_updated"}} {{TimeSince .DBBranch.CommitTime.AsTime ctx.Locale}}{{if .DBBranch.Pusher}} {{template "shared/user/avatarlink" dict "user" .DBBranch.Pusher}} {{template "shared/user/namelink" .DBBranch.Pusher}}{{end}}</p> | |||||
<p class="info tw-flex tw-content-center gt-my-2">{{svg "octicon-git-commit" 16 "gt-mr-2"}}<a href="{{$.RepoLink}}/commit/{{PathEscape .DBBranch.CommitID}}">{{ShortSha .DBBranch.CommitID}}</a> · <span class="commit-message">{{RenderCommitMessage $.Context .DBBranch.CommitMessage ($.Repository.ComposeMetas ctx)}}</span> · {{ctx.Locale.Tr "org.repo_updated"}} {{TimeSince .DBBranch.CommitTime.AsTime ctx.Locale}}{{if .DBBranch.Pusher}} {{template "shared/user/avatarlink" dict "user" .DBBranch.Pusher}} {{template "shared/user/namelink" .DBBranch.Pusher}}{{end}}</p> | |||||
{{end}} | {{end}} | ||||
</td> | </td> | ||||
<td class="two wide ui"> | <td class="two wide ui"> | ||||
</a> | </a> | ||||
{{end}} | {{end}} | ||||
{{else}} | {{else}} | ||||
<a href="{{.LatestPullRequest.Issue.Link}}" class="gt-vm ref-issue">{{if not .LatestPullRequest.IsSameRepo}}{{.LatestPullRequest.BaseRepo.FullName}}{{end}}#{{.LatestPullRequest.Issue.Index}}</a> | |||||
<a href="{{.LatestPullRequest.Issue.Link}}" class="tw-align-middle ref-issue">{{if not .LatestPullRequest.IsSameRepo}}{{.LatestPullRequest.BaseRepo.FullName}}{{end}}#{{.LatestPullRequest.Issue.Index}}</a> | |||||
{{if .LatestPullRequest.HasMerged}} | {{if .LatestPullRequest.HasMerged}} | ||||
<a href="{{.LatestPullRequest.Issue.Link}}" class="ui purple large label">{{svg "octicon-git-merge" 16 "gt-mr-2"}}{{ctx.Locale.Tr "repo.pulls.merged"}}</a> | <a href="{{.LatestPullRequest.Issue.Link}}" class="ui purple large label">{{svg "octicon-git-merge" 16 "gt-mr-2"}}{{ctx.Locale.Tr "repo.pulls.merged"}}</a> | ||||
{{else if .LatestPullRequest.Issue.IsClosed}} | {{else if .LatestPullRequest.Issue.IsClosed}} |
<div class="js-branch-tag-selector {{if .ContainerClasses}}{{.ContainerClasses}}{{end}}"> | <div class="js-branch-tag-selector {{if .ContainerClasses}}{{.ContainerClasses}}{{end}}"> | ||||
{{/* show dummy elements before Vue componment is mounted, this code must match the code in BranchTagSelector.vue */}} | {{/* show dummy elements before Vue componment is mounted, this code must match the code in BranchTagSelector.vue */}} | ||||
<div class="ui dropdown custom"> | <div class="ui dropdown custom"> | ||||
<button class="branch-dropdown-button gt-ellipsis ui basic small compact button gt-df gt-m-0"> | |||||
<span class="text gt-df gt-ac gt-mr-2"> | |||||
<button class="branch-dropdown-button gt-ellipsis ui basic small compact button tw-flex gt-m-0"> | |||||
<span class="text tw-flex tw-content-center gt-mr-2"> | |||||
{{if .release}} | {{if .release}} | ||||
{{ctx.Locale.Tr "repo.release.compare"}} | {{ctx.Locale.Tr "repo.release.compare"}} | ||||
{{else}} | {{else}} |
{{range .RecentlyPushedNewBranches}} | {{range .RecentlyPushedNewBranches}} | ||||
<div class="ui positive message gt-df gt-ac"> | |||||
<div class="gt-f1"> | |||||
<div class="ui positive message tw-flex tw-content-center"> | |||||
<div class="tw-flex-1"> | |||||
{{$timeSince := TimeSince .CommitTime.AsTime ctx.Locale}} | {{$timeSince := TimeSince .CommitTime.AsTime ctx.Locale}} | ||||
{{$branchLink := HTMLFormat `<a href="%s/src/branch/%s">%s</a>` $.RepoLink (PathEscapeSegments .Name) .Name}} | {{$branchLink := HTMLFormat `<a href="%s/src/branch/%s">%s</a>` $.RepoLink (PathEscapeSegments .Name) .Name}} | ||||
{{ctx.Locale.Tr "repo.pulls.recently_pushed_new_branches" $branchLink $timeSince}} | {{ctx.Locale.Tr "repo.pulls.recently_pushed_new_branches" $branchLink $timeSince}} |
<div class="branch-and-tag-detail gt-hidden"> | <div class="branch-and-tag-detail gt-hidden"> | ||||
<div class="divider"></div> | <div class="divider"></div> | ||||
<div>{{ctx.Locale.Tr "repo.commit.contained_in"}}</div> | <div>{{ctx.Locale.Tr "repo.commit.contained_in"}}</div> | ||||
<div class="gt-df gt-mt-3"> | |||||
<div class="tw-flex gt-mt-3"> | |||||
<div class="gt-p-2">{{svg "octicon-git-branch"}}</div> | <div class="gt-p-2">{{svg "octicon-git-branch"}}</div> | ||||
<div class="branch-area flex-text-block gt-fw gt-f1"></div> | |||||
<div class="branch-area flex-text-block tw-flex-wrap tw-flex-1"></div> | |||||
</div> | </div> | ||||
<div class="gt-df gt-mt-3"> | |||||
<div class="tw-flex gt-mt-3"> | |||||
<div class="gt-p-2">{{svg "octicon-tag"}}</div> | <div class="gt-p-2">{{svg "octicon-tag"}}</div> | ||||
<div class="tag-area flex-text-block gt-fw gt-f1"></div> | |||||
<div class="tag-area flex-text-block tw-flex-wrap tw-flex-1"></div> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> |
{{end}} | {{end}} | ||||
{{end}} | {{end}} | ||||
<div class="ui top attached header clearing segment tw-relative commit-header {{$class}}"> | <div class="ui top attached header clearing segment tw-relative commit-header {{$class}}"> | ||||
<div class="gt-df gt-mb-4 gt-fw"> | |||||
<h3 class="gt-mb-0 gt-f1"><span class="commit-summary" title="{{.Commit.Summary}}">{{RenderCommitMessage $.Context .Commit.Message ($.Repository.ComposeMetas ctx)}}</span>{{template "repo/commit_statuses" dict "Status" .CommitStatus "Statuses" .CommitStatuses}}</h3> | |||||
<div class="tw-flex gt-mb-4 tw-flex-wrap"> | |||||
<h3 class="gt-mb-0 tw-flex-1"><span class="commit-summary" title="{{.Commit.Summary}}">{{RenderCommitMessage $.Context .Commit.Message ($.Repository.ComposeMetas ctx)}}</span>{{template "repo/commit_statuses" dict "Status" .CommitStatus "Statuses" .CommitStatuses}}</h3> | |||||
{{if not $.PageIsWiki}} | {{if not $.PageIsWiki}} | ||||
<div> | <div> | ||||
<a class="ui primary tiny button" href="{{.SourcePath}}"> | <a class="ui primary tiny button" href="{{.SourcePath}}"> | ||||
{{end}} | {{end}} | ||||
{{template "repo/commit_load_branches_and_tags" .}} | {{template "repo/commit_load_branches_and_tags" .}} | ||||
</div> | </div> | ||||
<div class="ui attached segment gt-df gt-ac gt-sb gt-py-2 commit-header-row gt-fw {{$class}}"> | |||||
<div class="gt-df gt-ac author"> | |||||
<div class="ui attached segment tw-flex tw-content-center tw-justify-between gt-py-2 commit-header-row tw-flex-wrap {{$class}}"> | |||||
<div class="tw-flex tw-content-center author"> | |||||
{{if .Author}} | {{if .Author}} | ||||
{{ctx.AvatarUtils.Avatar .Author 28 "gt-mr-3"}} | {{ctx.AvatarUtils.Avatar .Author 28 "gt-mr-3"}} | ||||
{{if .Author.FullName}} | {{if .Author.FullName}} | ||||
{{end}} | {{end}} | ||||
{{end}} | {{end}} | ||||
</div> | </div> | ||||
<div class="ui horizontal list gt-df gt-ac"> | |||||
<div class="ui horizontal list tw-flex tw-content-center"> | |||||
{{if .Parents}} | {{if .Parents}} | ||||
<div class="item"> | <div class="item"> | ||||
<span>{{ctx.Locale.Tr "repo.diff.parent"}}</span> | <span>{{ctx.Locale.Tr "repo.diff.parent"}}</span> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
{{if .Commit.Signature}} | {{if .Commit.Signature}} | ||||
<div class="ui bottom attached message tw-text-left gt-df gt-ac gt-sb commit-header-row gt-fw gt-mb-0 {{$class}}"> | |||||
<div class="gt-df gt-ac"> | |||||
<div class="ui bottom attached message tw-text-left tw-flex tw-content-center tw-justify-between commit-header-row tw-flex-wrap gt-mb-0 {{$class}}"> | |||||
<div class="tw-flex tw-content-center"> | |||||
{{if .Verification.Verified}} | {{if .Verification.Verified}} | ||||
{{if ne .Verification.SigningUser.ID 0}} | {{if ne .Verification.SigningUser.ID 0}} | ||||
{{svg "gitea-lock" 16 "gt-mr-3"}} | {{svg "gitea-lock" 16 "gt-mr-3"}} | ||||
<span class="ui text">{{ctx.Locale.Tr .Verification.Reason}}</span> | <span class="ui text">{{ctx.Locale.Tr .Verification.Reason}}</span> | ||||
{{end}} | {{end}} | ||||
</div> | </div> | ||||
<div class="gt-df gt-ac"> | |||||
<div class="tw-flex tw-content-center"> | |||||
{{if .Verification.Verified}} | {{if .Verification.Verified}} | ||||
{{if ne .Verification.SigningUser.ID 0}} | {{if ne .Verification.SigningUser.ID 0}} | ||||
{{svg "octicon-verified" 16 "gt-mr-3"}} | {{svg "octicon-verified" 16 "gt-mr-3"}} |
{{if .Statuses}} | {{if .Statuses}} | ||||
{{if and (eq (len .Statuses) 1) .Status.TargetURL}} | {{if and (eq (len .Statuses) 1) .Status.TargetURL}} | ||||
<a class="gt-vm {{.AdditionalClasses}} tw-no-underline" data-tippy="commit-statuses" href="{{.Status.TargetURL}}"> | |||||
<a class="tw-align-middle {{.AdditionalClasses}} tw-no-underline" data-tippy="commit-statuses" href="{{.Status.TargetURL}}"> | |||||
{{template "repo/commit_status" .Status}} | {{template "repo/commit_status" .Status}} | ||||
</a> | </a> | ||||
{{else}} | {{else}} | ||||
<span class="gt-vm {{.AdditionalClasses}}" data-tippy="commit-statuses" tabindex="0"> | |||||
<span class="tw-align-middle {{.AdditionalClasses}}" data-tippy="commit-statuses" tabindex="0"> | |||||
{{template "repo/commit_status" .Status}} | {{template "repo/commit_status" .Status}} | ||||
</span> | </span> | ||||
{{end}} | {{end}} |
<div class="ui container"> | <div class="ui container"> | ||||
{{template "repo/sub_menu" .}} | {{template "repo/sub_menu" .}} | ||||
<div class="repo-button-row"> | <div class="repo-button-row"> | ||||
<div class="gt-df gt-ac"> | |||||
<div class="tw-flex tw-content-center"> | |||||
{{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "gt-mr-2"}} | {{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "gt-mr-2"}} | ||||
<a href="{{.RepoLink}}/graph" class="ui basic small compact button"> | <a href="{{.RepoLink}}/graph" class="ui basic small compact button"> | ||||
{{svg "octicon-git-branch"}} | {{svg "octicon-git-branch"}} |
{{$commitLink:= printf "%s/commit/%s" $.comment.Issue.PullRequest.BaseRepo.Link (PathEscape .ID.String)}} | {{$commitLink:= printf "%s/commit/%s" $.comment.Issue.PullRequest.BaseRepo.Link (PathEscape .ID.String)}} | ||||
<span class="shabox gt-df gt-ac tw-float-right"> | |||||
<span class="shabox tw-flex tw-content-center tw-float-right"> | |||||
{{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses}} | {{template "repo/commit_statuses" dict "Status" .Status "Statuses" .Statuses}} | ||||
{{$class := "ui sha label"}} | {{$class := "ui sha label"}} | ||||
{{if .Signature}} | {{if .Signature}} |
<h4 class="ui top attached header commits-table gt-df gt-ac gt-sb"> | |||||
<div class="commits-table-left gt-df gt-ac"> | |||||
<h4 class="ui top attached header commits-table tw-flex tw-content-center tw-justify-between"> | |||||
<div class="commits-table-left tw-flex tw-content-center"> | |||||
{{if or .PageIsCommits (gt .CommitCount 0)}} | {{if or .PageIsCommits (gt .CommitCount 0)}} | ||||
{{.CommitCount}} {{ctx.Locale.Tr "repo.commits.commits"}} | {{.CommitCount}} {{ctx.Locale.Tr "repo.commits.commits"}} | ||||
{{else if .IsNothingToCompare}} | {{else if .IsNothingToCompare}} |
<tr class="{{.GetHTMLDiffLineType}}-code nl-{{$k}} ol-{{$k}}"> | <tr class="{{.GetHTMLDiffLineType}}-code nl-{{$k}} ol-{{$k}}"> | ||||
{{if eq .GetType 4}} | {{if eq .GetType 4}} | ||||
<td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}"> | <td class="lines-num lines-num-old" data-line-num="{{if $line.LeftIdx}}{{$line.LeftIdx}}{{end}}"> | ||||
<div class="gt-df"> | |||||
<div class="tw-flex"> | |||||
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}} | {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}} | ||||
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=down&wiki={{$.PageIsWiki}}&anchor={{$.Anchor}}"> | <button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=down&wiki={{$.PageIsWiki}}&anchor={{$.Anchor}}"> | ||||
{{svg "octicon-fold-down"}} | {{svg "octicon-fold-down"}} | ||||
<tr class="{{.GetHTMLDiffLineType}}-code nl-{{$k}} ol-{{$k}}"> | <tr class="{{.GetHTMLDiffLineType}}-code nl-{{$k}} ol-{{$k}}"> | ||||
{{if eq .GetType 4}} | {{if eq .GetType 4}} | ||||
<td colspan="2" class="lines-num"> | <td colspan="2" class="lines-num"> | ||||
<div class="gt-df"> | |||||
<div class="tw-flex"> | |||||
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}} | {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}} | ||||
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?data-query={{$line.GetBlobExcerptQuery}}&style=unified&direction=down&wiki={{$.PageIsWiki}}&anchor={{$.Anchor}}"> | <button class="code-expander-button" hx-target="closest tr" hx-get="{{$.RepoLink}}/blob_excerpt/{{PathEscape $.AfterCommitID}}?data-query={{$line.GetBlobExcerptQuery}}&style=unified&direction=down&wiki={{$.PageIsWiki}}&anchor={{$.Anchor}}"> | ||||
{{svg "octicon-fold-down"}} | {{svg "octicon-fold-down"}} |
{{$showFileTree := (and (not .DiffNotAvailable) (gt .Diff.NumFiles 1))}} | {{$showFileTree := (and (not .DiffNotAvailable) (gt .Diff.NumFiles 1))}} | ||||
<div> | <div> | ||||
<div class="diff-detail-box diff-box"> | <div class="diff-detail-box diff-box"> | ||||
<div class="gt-df gt-ac gt-fw gt-gap-3 gt-ml-1"> | |||||
<div class="tw-flex tw-content-center tw-flex-wrap gt-gap-3 gt-ml-1"> | |||||
{{if $showFileTree}} | {{if $showFileTree}} | ||||
<button class="diff-toggle-file-tree-button not-mobile btn interact-fg" data-show-text="{{ctx.Locale.Tr "repo.diff.show_file_tree"}}" data-hide-text="{{ctx.Locale.Tr "repo.diff.hide_file_tree"}}"> | <button class="diff-toggle-file-tree-button not-mobile btn interact-fg" data-show-text="{{ctx.Locale.Tr "repo.diff.show_file_tree"}}" data-hide-text="{{ctx.Locale.Tr "repo.diff.hide_file_tree"}}"> | ||||
{{/* the icon meaning is reversed here, "octicon-sidebar-collapse" means show the file tree */}} | {{/* the icon meaning is reversed here, "octicon-sidebar-collapse" means show the file tree */}} | ||||
</script> | </script> | ||||
{{end}} | {{end}} | ||||
{{if not .DiffNotAvailable}} | {{if not .DiffNotAvailable}} | ||||
<div class="diff-detail-stats gt-df gt-ac gt-fw"> | |||||
<div class="diff-detail-stats tw-flex tw-content-center tw-flex-wrap"> | |||||
{{svg "octicon-diff" 16 "gt-mr-2"}}{{ctx.Locale.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion}} | {{svg "octicon-diff" 16 "gt-mr-2"}}{{ctx.Locale.Tr "repo.diff.stats_desc" .Diff.NumFiles .Diff.TotalAddition .Diff.TotalDeletion}} | ||||
</div> | </div> | ||||
{{end}} | {{end}} | ||||
</div> | </div> | ||||
<div class="diff-detail-actions"> | <div class="diff-detail-actions"> | ||||
{{if and .PageIsPullFiles $.SignedUserID (not .IsArchived) (not .DiffNotAvailable)}} | {{if and .PageIsPullFiles $.SignedUserID (not .IsArchived) (not .DiffNotAvailable)}} | ||||
<div class="not-mobile gt-df gt-ac gt-fc tw-whitespace-nowrap gt-mr-2"> | |||||
<div class="not-mobile tw-flex tw-content-center tw-flex-col tw-whitespace-nowrap gt-mr-2"> | |||||
<label for="viewed-files-summary" id="viewed-files-summary-label" data-text-changed-template="{{ctx.Locale.Tr "repo.pulls.viewed_files_label"}}"> | <label for="viewed-files-summary" id="viewed-files-summary-label" data-text-changed-template="{{ctx.Locale.Tr "repo.pulls.viewed_files_label"}}"> | ||||
{{ctx.Locale.Tr "repo.pulls.viewed_files_label" .Diff.NumViewedFiles .Diff.NumFiles}} | {{ctx.Locale.Tr "repo.pulls.viewed_files_label" .Diff.NumViewedFiles .Diff.NumFiles}} | ||||
</label> | </label> | ||||
{{$isExpandable := or (gt $file.Addition 0) (gt $file.Deletion 0) $file.IsBin}} | {{$isExpandable := or (gt $file.Addition 0) (gt $file.Deletion 0) $file.IsBin}} | ||||
{{$isReviewFile := and $.IsSigned $.PageIsPullFiles (not $.IsArchived) $.IsShowingAllCommits}} | {{$isReviewFile := and $.IsSigned $.PageIsPullFiles (not $.IsArchived) $.IsShowingAllCommits}} | ||||
<div class="diff-file-box diff-box file-content {{TabSizeClass $.Editorconfig $file.Name}} gt-mt-0" id="diff-{{$file.NameHash}}" data-old-filename="{{$file.OldName}}" data-new-filename="{{$file.Name}}" {{if or ($file.ShouldBeHidden) (not $isExpandable)}}data-folded="true"{{end}}> | <div class="diff-file-box diff-box file-content {{TabSizeClass $.Editorconfig $file.Name}} gt-mt-0" id="diff-{{$file.NameHash}}" data-old-filename="{{$file.OldName}}" data-new-filename="{{$file.Name}}" {{if or ($file.ShouldBeHidden) (not $isExpandable)}}data-folded="true"{{end}}> | ||||
<h4 class="diff-file-header sticky-2nd-row ui top attached normal header gt-df gt-ac gt-sb gt-fw"> | |||||
<div class="diff-file-name gt-df gt-ac gt-gap-2 gt-fw"> | |||||
<h4 class="diff-file-header sticky-2nd-row ui top attached normal header tw-flex tw-content-center tw-justify-between tw-flex-wrap"> | |||||
<div class="diff-file-name tw-flex tw-content-center gt-gap-2 tw-flex-wrap"> | |||||
<button class="fold-file btn interact-bg gt-p-2{{if not $isExpandable}} tw-invisible{{end}}"> | <button class="fold-file btn interact-bg gt-p-2{{if not $isExpandable}} tw-invisible{{end}}"> | ||||
{{if $file.ShouldBeHidden}} | {{if $file.ShouldBeHidden}} | ||||
{{svg "octicon-chevron-right" 18}} | {{svg "octicon-chevron-right" 18}} | ||||
{{svg "octicon-chevron-down" 18}} | {{svg "octicon-chevron-down" 18}} | ||||
{{end}} | {{end}} | ||||
</button> | </button> | ||||
<div class="gt-font-semibold gt-df gt-ac gt-mono"> | |||||
<div class="gt-font-semibold tw-flex tw-content-center gt-mono"> | |||||
{{if $file.IsBin}} | {{if $file.IsBin}} | ||||
<span class="gt-ml-1 gt-mr-3"> | <span class="gt-ml-1 gt-mr-3"> | ||||
{{ctx.Locale.Tr "repo.diff.bin"}} | {{ctx.Locale.Tr "repo.diff.bin"}} | ||||
<span class="gt-ml-4 gt-mono">{{ctx.Locale.Tr ($file.ModeTranslationKey $file.Mode)}}</span> | <span class="gt-ml-4 gt-mono">{{ctx.Locale.Tr ($file.ModeTranslationKey $file.Mode)}}</span> | ||||
{{end}} | {{end}} | ||||
</div> | </div> | ||||
<div class="diff-file-header-actions gt-df gt-ac gt-gap-2 gt-fw"> | |||||
<div class="diff-file-header-actions tw-flex tw-content-center gt-gap-2 tw-flex-wrap"> | |||||
{{if $showFileViewToggle}} | {{if $showFileViewToggle}} | ||||
<div class="ui compact icon buttons"> | <div class="ui compact icon buttons"> | ||||
<button class="ui tiny basic button file-view-toggle" data-toggle-selector="#diff-source-{{$file.NameHash}}" data-tooltip-content="{{ctx.Locale.Tr "repo.file_view_source"}}">{{svg "octicon-code"}}</button> | <button class="ui tiny basic button file-view-toggle" data-toggle-selector="#diff-source-{{$file.NameHash}}" data-tooltip-content="{{ctx.Locale.Tr "repo.file_view_source"}}">{{svg "octicon-code"}}</button> | ||||
{{if .Diff.IsIncomplete}} | {{if .Diff.IsIncomplete}} | ||||
<div class="diff-file-box diff-box file-content gt-mt-3" id="diff-incomplete"> | <div class="diff-file-box diff-box file-content gt-mt-3" id="diff-incomplete"> | ||||
<h4 class="ui top attached normal header gt-df gt-ac gt-sb"> | |||||
<h4 class="ui top attached normal header tw-flex tw-content-center tw-justify-between"> | |||||
{{ctx.Locale.Tr "repo.diff.too_many_files"}} | {{ctx.Locale.Tr "repo.diff.too_many_files"}} | ||||
<a class="ui basic tiny button" id="diff-show-more-files" data-href="?skip-to={{.Diff.End}}&file-only=true">{{ctx.Locale.Tr "repo.diff.show_more"}}</a> | <a class="ui basic tiny button" id="diff-show-more-files" data-href="?skip-to={{.Diff.End}}&file-only=true">{{ctx.Locale.Tr "repo.diff.show_more"}}</a> | ||||
</h4> | </h4> |
{{template "shared/user/avatarlink" dict "user" .Poster}} | {{template "shared/user/avatarlink" dict "user" .Poster}} | ||||
{{end}} | {{end}} | ||||
<div class="content comment-container"> | <div class="content comment-container"> | ||||
<div class="ui top attached header comment-header gt-df gt-ac gt-sb"> | |||||
<div class="comment-header-left gt-df gt-ac"> | |||||
<div class="ui top attached header comment-header tw-flex tw-content-center tw-justify-between"> | |||||
<div class="comment-header-left tw-flex tw-content-center"> | |||||
{{if .OriginalAuthor}} | {{if .OriginalAuthor}} | ||||
<span class="text black gt-font-semibold gt-mr-2"> | <span class="text black gt-font-semibold gt-mr-2"> | ||||
{{svg (MigrationIcon $.root.Repository.GetOriginalURLHostname)}} | {{svg (MigrationIcon $.root.Repository.GetOriginalURLHostname)}} | ||||
</span> | </span> | ||||
{{end}} | {{end}} | ||||
</div> | </div> | ||||
<div class="comment-header-right actions gt-df gt-ac"> | |||||
<div class="comment-header-right actions tw-flex tw-content-center"> | |||||
{{if .Invalidated}} | {{if .Invalidated}} | ||||
{{$referenceUrl := printf "%s#%s" $.root.Issue.Link .HashTag}} | {{$referenceUrl := printf "%s#%s" $.root.Issue.Link .HashTag}} | ||||
<a href="{{$referenceUrl}}" class="ui label basic small" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.review.outdated_description"}}"> | <a href="{{$referenceUrl}}" class="ui label basic small" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.review.outdated_description"}}"> |
{{$referenceUrl := printf "%s#%s" $.Issue.Link $comment.HashTag}} | {{$referenceUrl := printf "%s#%s" $.Issue.Link $comment.HashTag}} | ||||
<div class="conversation-holder" data-path="{{$comment.TreePath}}" data-side="{{if lt $comment.Line 0}}left{{else}}right{{end}}" data-idx="{{$comment.UnsignedLine}}"> | <div class="conversation-holder" data-path="{{$comment.TreePath}}" data-side="{{if lt $comment.Line 0}}left{{else}}right{{end}}" data-idx="{{$comment.UnsignedLine}}"> | ||||
{{if $resolved}} | {{if $resolved}} | ||||
<div class="ui attached header resolved-placeholder gt-df gt-ac gt-sb"> | |||||
<div class="ui grey text gt-df gt-ac gt-fw gt-gap-2"> | |||||
<div class="ui attached header resolved-placeholder tw-flex tw-content-center tw-justify-between"> | |||||
<div class="ui grey text tw-flex tw-content-center tw-flex-wrap gt-gap-2"> | |||||
{{svg "octicon-check" 16 "icon gt-mr-2"}} | {{svg "octicon-check" 16 "icon gt-mr-2"}} | ||||
<b>{{$resolveDoer.Name}}</b> {{ctx.Locale.Tr "repo.issues.review.resolved_by"}} | <b>{{$resolveDoer.Name}}</b> {{ctx.Locale.Tr "repo.issues.review.resolved_by"}} | ||||
{{if $invalid}} | {{if $invalid}} | ||||
</a> | </a> | ||||
{{end}} | {{end}} | ||||
</div> | </div> | ||||
<div class="gt-df gt-ac gt-gap-3"> | |||||
<button id="show-outdated-{{$comment.ID}}" data-comment="{{$comment.ID}}" class="ui tiny labeled button show-outdated gt-df gt-ac"> | |||||
<div class="tw-flex tw-content-center gt-gap-3"> | |||||
<button id="show-outdated-{{$comment.ID}}" data-comment="{{$comment.ID}}" class="ui tiny labeled button show-outdated tw-flex tw-content-center"> | |||||
{{svg "octicon-unfold" 16 "gt-mr-3"}} | {{svg "octicon-unfold" 16 "gt-mr-3"}} | ||||
{{ctx.Locale.Tr "repo.issues.review.show_resolved"}} | {{ctx.Locale.Tr "repo.issues.review.show_resolved"}} | ||||
</button> | </button> | ||||
<button id="hide-outdated-{{$comment.ID}}" data-comment="{{$comment.ID}}" class="ui tiny labeled button hide-outdated gt-df gt-ac gt-hidden"> | |||||
<button id="hide-outdated-{{$comment.ID}}" data-comment="{{$comment.ID}}" class="ui tiny labeled button hide-outdated tw-flex tw-content-center gt-hidden"> | |||||
{{svg "octicon-fold" 16 "gt-mr-3"}} | {{svg "octicon-fold" 16 "gt-mr-3"}} | ||||
{{ctx.Locale.Tr "repo.issues.review.hide_resolved"}} | {{ctx.Locale.Tr "repo.issues.review.hide_resolved"}} | ||||
</button> | </button> | ||||
{{template "repo/diff/comments" dict "root" $ "comments" .comments}} | {{template "repo/diff/comments" dict "root" $ "comments" .comments}} | ||||
</ui> | </ui> | ||||
</div> | </div> | ||||
<div class="gt-df gt-je gt-ac gt-fw gt-mt-3"> | |||||
<div class="tw-flex tw-justify-end tw-content-center tw-flex-wrap gt-mt-3"> | |||||
<div class="ui buttons gt-mr-2"> | <div class="ui buttons gt-mr-2"> | ||||
<button class="ui icon tiny basic button previous-conversation"> | <button class="ui icon tiny basic button previous-conversation"> | ||||
{{svg "octicon-arrow-up" 12 "icon"}} {{ctx.Locale.Tr "repo.issues.previous"}} | {{svg "octicon-arrow-up" 12 "icon"}} {{ctx.Locale.Tr "repo.issues.previous"}} |
<div id="review-box"> | <div id="review-box"> | ||||
<button class="ui tiny primary button gt-pr-2 gt-df js-btn-review {{if not $.IsShowingAllCommits}}disabled{{end}}" {{if not $.IsShowingAllCommits}}data-tooltip-content="{{ctx.Locale.Tr "repo.pulls.review_only_possible_for_full_diff"}}"{{end}}> | |||||
<button class="ui tiny primary button gt-pr-2 tw-flex js-btn-review {{if not $.IsShowingAllCommits}}disabled{{end}}" {{if not $.IsShowingAllCommits}}data-tooltip-content="{{ctx.Locale.Tr "repo.pulls.review_only_possible_for_full_diff"}}"{{end}}> | |||||
{{ctx.Locale.Tr "repo.diff.review"}} | {{ctx.Locale.Tr "repo.diff.review"}} | ||||
<span class="ui small label review-comments-counter" data-pending-comment-number="{{.PendingCodeCommentNumber}}">{{.PendingCodeCommentNumber}}</span> | <span class="ui small label review-comments-counter" data-pending-comment-number="{{.PendingCodeCommentNumber}}">{{.PendingCodeCommentNumber}}</span> | ||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}} | {{svg "octicon-triangle-down" 14 "dropdown icon"}} | ||||
<form class="ui form form-fetch-action" action="{{.Link}}/reviews/submit" method="post"> | <form class="ui form form-fetch-action" action="{{.Link}}/reviews/submit" method="post"> | ||||
{{.CsrfTokenHtml}} | {{.CsrfTokenHtml}} | ||||
<input type="hidden" name="commit_id" value="{{.AfterCommitID}}"> | <input type="hidden" name="commit_id" value="{{.AfterCommitID}}"> | ||||
<div class="field gt-df gt-ac"> | |||||
<div class="gt-f1">{{ctx.Locale.Tr "repo.diff.review.header"}}</div> | |||||
<div class="field tw-flex tw-content-center"> | |||||
<div class="tw-flex-1">{{ctx.Locale.Tr "repo.diff.review.header"}}</div> | |||||
<a class="muted close">{{svg "octicon-x" 16}}</a> | <a class="muted close">{{svg "octicon-x" 16}}</a> | ||||
</div> | </div> | ||||
<div class="field"> | <div class="field"> | ||||
<div class="divider"></div> | <div class="divider"></div> | ||||
{{$showSelfTooltip := (and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID))}} | {{$showSelfTooltip := (and $.IsSigned ($.Issue.IsPoster $.SignedUser.ID))}} | ||||
{{if $showSelfTooltip}} | {{if $showSelfTooltip}} | ||||
<span class="gt-dib" data-tooltip-content="{{ctx.Locale.Tr "repo.diff.review.self_approve"}}"> | |||||
<span class="tw-inline-block" data-tooltip-content="{{ctx.Locale.Tr "repo.diff.review.self_approve"}}"> | |||||
<button type="submit" name="type" value="approve" disabled class="ui submit primary tiny button btn-submit">{{ctx.Locale.Tr "repo.diff.review.approve"}}</button> | <button type="submit" name="type" value="approve" disabled class="ui submit primary tiny button btn-submit">{{ctx.Locale.Tr "repo.diff.review.approve"}}</button> | ||||
</span> | </span> | ||||
{{else}} | {{else}} | ||||
{{end}} | {{end}} | ||||
<button type="submit" name="type" value="comment" class="ui submit tiny basic button btn-submit">{{ctx.Locale.Tr "repo.diff.review.comment"}}</button> | <button type="submit" name="type" value="comment" class="ui submit tiny basic button btn-submit">{{ctx.Locale.Tr "repo.diff.review.comment"}}</button> | ||||
{{if $showSelfTooltip}} | {{if $showSelfTooltip}} | ||||
<span class="gt-dib" data-tooltip-content="{{ctx.Locale.Tr "repo.diff.review.self_reject"}}"> | |||||
<span class="tw-inline-block" data-tooltip-content="{{ctx.Locale.Tr "repo.diff.review.self_reject"}}"> | |||||
<button type="submit" name="type" value="reject" disabled class="ui submit red tiny button btn-submit">{{ctx.Locale.Tr "repo.diff.review.reject"}}</button> | <button type="submit" name="type" value="reject" disabled class="ui submit red tiny button btn-submit">{{ctx.Locale.Tr "repo.diff.review.reject"}}</button> | ||||
</span> | </span> | ||||
{{else}} | {{else}} |
<tr class="{{.GetHTMLDiffLineType}}-code nl-{{$k}} ol-{{$k}}" data-line-type="{{.GetHTMLDiffLineType}}"> | <tr class="{{.GetHTMLDiffLineType}}-code nl-{{$k}} ol-{{$k}}" data-line-type="{{.GetHTMLDiffLineType}}"> | ||||
{{if eq .GetType 4}} | {{if eq .GetType 4}} | ||||
<td class="lines-num lines-num-old"> | <td class="lines-num lines-num-old"> | ||||
<div class="gt-df"> | |||||
<div class="tw-flex"> | |||||
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}} | {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}} | ||||
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.root.RepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=down&wiki={{$.root.PageIsWiki}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}"> | <button class="code-expander-button" hx-target="closest tr" hx-get="{{$.root.RepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=down&wiki={{$.root.PageIsWiki}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}"> | ||||
{{svg "octicon-fold-down"}} | {{svg "octicon-fold-down"}} |
{{if eq .GetType 4}} | {{if eq .GetType 4}} | ||||
{{if $.root.AfterCommitID}} | {{if $.root.AfterCommitID}} | ||||
<td colspan="2" class="lines-num"> | <td colspan="2" class="lines-num"> | ||||
<div class="gt-df"> | |||||
<div class="tw-flex"> | |||||
{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}} | {{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}} | ||||
<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.root.RepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=unified&direction=down&wiki={{$.root.PageIsWiki}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}"> | <button class="code-expander-button" hx-target="closest tr" hx-get="{{$.root.RepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=unified&direction=down&wiki={{$.root.PageIsWiki}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}"> | ||||
{{svg "octicon-fold-down"}} | {{svg "octicon-fold-down"}} |
<div role="main" aria-label="{{.Title}}" class="page-content repository"> | <div role="main" aria-label="{{.Title}}" class="page-content repository"> | ||||
{{template "repo/header" .}} | {{template "repo/header" .}} | ||||
<div class="ui container"> | <div class="ui container"> | ||||
<div class="gt-df gt-ac"> | |||||
<div class="tw-flex tw-content-center"> | |||||
<a href="{{$.RepoLink}}">{{.RepoName}}</a> | <a href="{{$.RepoLink}}">{{.RepoName}}</a> | ||||
<span class="gt-mx-3">/</span> | <span class="gt-mx-3">/</span> | ||||
<div class="ui input gt-f1"> | |||||
<div class="ui input tw-flex-1"> | |||||
<input id="repo-file-find-input" type="text" autofocus data-url-data-link="{{.DataLink}}" data-url-tree-link="{{.TreeLink}}"> | <input id="repo-file-find-input" type="text" autofocus data-url-data-link="{{.DataLink}}" data-url-tree-link="{{.TreeLink}}"> | ||||
</div> | </div> | ||||
</div> | </div> |
{{ctx.Locale.Tr "repo.forks"}} | {{ctx.Locale.Tr "repo.forks"}} | ||||
</h2> | </h2> | ||||
{{range .Forks}} | {{range .Forks}} | ||||
<div class="gt-df gt-ac gt-py-3"> | |||||
<div class="tw-flex tw-content-center gt-py-3"> | |||||
<span class="gt-mr-2">{{ctx.AvatarUtils.Avatar .Owner}}</span> | <span class="gt-mr-2">{{ctx.AvatarUtils.Avatar .Owner}}</span> | ||||
<a href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a> / <a href="{{.Link}}">{{.Name}}</a> | <a href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a> / <a href="{{.Link}}">{{.Name}}</a> | ||||
</div> | </div> |
{{- end -}} | {{- end -}} | ||||
</a> | </a> | ||||
</span> | </span> | ||||
<span class="message gt-dib gt-ellipsis gt-mr-3"> | |||||
<span class="message tw-inline-block gt-ellipsis gt-mr-3"> | |||||
<span>{{RenderCommitMessage $.Context $commit.Subject ($.Repository.ComposeMetas ctx)}}</span> | <span>{{RenderCommitMessage $.Context $commit.Subject ($.Repository.ComposeMetas ctx)}}</span> | ||||
</span> | </span> | ||||
<span class="commit-refs gt-df gt-ac gt-mr-2"> | |||||
<span class="commit-refs tw-flex tw-content-center gt-mr-2"> | |||||
{{range $commit.Refs}} | {{range $commit.Refs}} | ||||
{{$refGroup := .RefGroup}} | {{$refGroup := .RefGroup}} | ||||
{{if eq $refGroup "pull"}} | {{if eq $refGroup "pull"}} | ||||
{{end}} | {{end}} | ||||
{{end}} | {{end}} | ||||
</span> | </span> | ||||
<span class="author gt-df gt-ac gt-mr-3"> | |||||
<span class="author tw-flex tw-content-center gt-mr-3"> | |||||
{{$userName := $commit.Commit.Author.Name}} | {{$userName := $commit.Commit.Author.Name}} | ||||
{{if $commit.User}} | {{if $commit.User}} | ||||
{{if $commit.User.FullName}} | {{if $commit.User.FullName}} | ||||
{{$userName}} | {{$userName}} | ||||
{{end}} | {{end}} | ||||
</span> | </span> | ||||
<span class="time gt-df gt-ac">{{DateTime "full" $commit.Date}}</span> | |||||
<span class="time tw-flex tw-content-center">{{DateTime "full" $commit.Date}}</span> | |||||
{{end}} | {{end}} | ||||
</li> | </li> | ||||
{{end}} | {{end}} |
{{with .Repository}} | {{with .Repository}} | ||||
<div class="ui container"> | <div class="ui container"> | ||||
<div class="repo-header"> | <div class="repo-header"> | ||||
<div class="flex-item gt-ac"> | |||||
<div class="flex-item tw-content-center"> | |||||
<div class="flex-item-leading"> | <div class="flex-item-leading"> | ||||
{{template "repo/icon" .}} | {{template "repo/icon" .}} | ||||
</div> | </div> |
</div> | </div> | ||||
{{end}} | {{end}} | ||||
</div> | </div> | ||||
<div class="gt-df gt-ac gt-fw gt-gap-2" id="repo-topics"> | |||||
<div class="tw-flex tw-content-center tw-flex-wrap gt-gap-2" id="repo-topics"> | |||||
{{range .Topics}}<a class="ui repo-topic large label topic gt-m-0" href="{{AppSubUrl}}/explore/repos?q={{.Name}}&topic=1">{{.Name}}</a>{{end}} | {{range .Topics}}<a class="ui repo-topic large label topic gt-m-0" href="{{AppSubUrl}}/explore/repos?q={{.Name}}&topic=1">{{.Name}}</a>{{end}} | ||||
{{if and .Permission.IsAdmin (not .Repository.IsArchived)}}<button id="manage_topic" class="btn interact-fg gt-font-12">{{ctx.Locale.Tr "repo.topic.manage_topics"}}</button>{{end}} | {{if and .Permission.IsAdmin (not .Repository.IsArchived)}}<button id="manage_topic" class="btn interact-fg gt-font-12">{{ctx.Locale.Tr "repo.topic.manage_topics"}}</button>{{end}} | ||||
</div> | </div> | ||||
{{end}} | {{end}} | ||||
{{if and .Permission.IsAdmin (not .Repository.IsArchived)}} | {{if and .Permission.IsAdmin (not .Repository.IsArchived)}} | ||||
<div class="ui form gt-hidden gt-df gt-fc gt-mt-4" id="topic_edit"> | |||||
<div class="field gt-f1 gt-mb-2"> | |||||
<div class="ui fluid multiple search selection dropdown gt-fw" data-text-count-prompt="{{ctx.Locale.Tr "repo.topic.count_prompt"}}" data-text-format-prompt="{{ctx.Locale.Tr "repo.topic.format_prompt"}}"> | |||||
<div class="ui form gt-hidden tw-flex tw-flex-col gt-mt-4" id="topic_edit"> | |||||
<div class="field tw-flex-1 gt-mb-2"> | |||||
<div class="ui fluid multiple search selection dropdown tw-flex-wrap" data-text-count-prompt="{{ctx.Locale.Tr "repo.topic.count_prompt"}}" data-text-format-prompt="{{ctx.Locale.Tr "repo.topic.format_prompt"}}"> | |||||
<input type="hidden" name="topics" value="{{range $i, $v := .Topics}}{{.Name}}{{if Eval $i "+" 1 "<" (len $.Topics)}},{{end}}{{end}}"> | <input type="hidden" name="topics" value="{{range $i, $v := .Topics}}{{.Name}}{{if Eval $i "+" 1 "<" (len $.Topics)}},{{end}}{{end}}"> | ||||
{{range .Topics}} | {{range .Topics}} | ||||
{{/* keey the same layout as Fomantic UI generated labels */}} | {{/* keey the same layout as Fomantic UI generated labels */}} | ||||
<a class="ui label transition visible tw-cursor-default gt-dib" data-value="{{.Name}}">{{.Name}}{{svg "octicon-x" 16 "delete icon"}}</a> | |||||
<a class="ui label transition visible tw-cursor-default tw-inline-block" data-value="{{.Name}}">{{.Name}}{{svg "octicon-x" 16 "delete icon"}}</a> | |||||
{{end}} | {{end}} | ||||
<div class="text"></div> | <div class="text"></div> | ||||
</div> | </div> | ||||
{{end}} | {{end}} | ||||
{{template "repo/sub_menu" .}} | {{template "repo/sub_menu" .}} | ||||
<div class="repo-button-row"> | <div class="repo-button-row"> | ||||
<div class="gt-df gt-ac gt-fw gt-gap-y-3"> | |||||
<div class="tw-flex tw-content-center tw-flex-wrap gt-gap-y-3"> | |||||
{{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "gt-mr-2"}} | {{template "repo/branch_dropdown" dict "root" . "ContainerClasses" "gt-mr-2"}} | ||||
{{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}} | {{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}} | ||||
{{$cmpBranch := ""}} | {{$cmpBranch := ""}} | ||||
</span> | </span> | ||||
{{end}} | {{end}} | ||||
</div> | </div> | ||||
<div class="gt-df gt-ac"> | |||||
<div class="tw-flex tw-content-center"> | |||||
<!-- Only show clone panel in repository home page --> | <!-- Only show clone panel in repository home page --> | ||||
{{if eq $n 0}} | {{if eq $n 0}} | ||||
<div class="clone-panel ui action tiny input"> | <div class="clone-panel ui action tiny input"> |
{{$avatarLink := (.RelAvatarLink ctx)}} | {{$avatarLink := (.RelAvatarLink ctx)}} | ||||
{{if $avatarLink}} | {{if $avatarLink}} | ||||
<img class="ui avatar gt-vm" src="{{$avatarLink}}" width="24" height="24" alt="{{.FullName}}"> | |||||
<img class="ui avatar tw-align-middle" src="{{$avatarLink}}" width="24" height="24" alt="{{.FullName}}"> | |||||
{{else if $.IsMirror}} | {{else if $.IsMirror}} | ||||
{{svg "octicon-mirror" 24}} | {{svg "octicon-mirror" 24}} | ||||
{{else if $.IsFork}} | {{else if $.IsFork}} |
</div> | </div> | ||||
{{end}} | {{end}} | ||||
<div class="content gt-p-0 tw-w-full"> | <div class="content gt-p-0 tw-w-full"> | ||||
<div class="gt-df tw-items-start"> | |||||
<div class="tw-flex tw-items-start"> | |||||
<div class="issue-card-icon"> | <div class="issue-card-icon"> | ||||
{{template "shared/issueicon" .}} | {{template "shared/issueicon" .}} | ||||
</div> | </div> | ||||
<a class="issue-card-title muted issue-title" href="{{.Link}}">{{.Title | RenderEmoji ctx | RenderCodeBlock}}</a> | <a class="issue-card-title muted issue-title" href="{{.Link}}">{{.Title | RenderEmoji ctx | RenderCodeBlock}}</a> | ||||
{{if and $.isPinnedIssueCard $.Page.IsRepoAdmin}} | {{if and $.isPinnedIssueCard $.Page.IsRepoAdmin}} | ||||
<a role="button" class="issue-card-unpin muted gt-df gt-ac" data-tooltip-content={{ctx.Locale.Tr "repo.issues.unpin_issue"}} data-issue-id="{{.ID}}" data-unpin-url="{{$.Page.Link}}/unpin/{{.Index}}"> | |||||
<a role="button" class="issue-card-unpin muted tw-flex tw-content-center" data-tooltip-content={{ctx.Locale.Tr "repo.issues.unpin_issue"}} data-issue-id="{{.ID}}" data-unpin-url="{{$.Page.Link}}/unpin/{{.Index}}"> | |||||
{{svg "octicon-x" 16}} | {{svg "octicon-x" 16}} | ||||
</a> | </a> | ||||
{{end}} | {{end}} | ||||
{{if .MilestoneID}} | {{if .MilestoneID}} | ||||
<div class="meta gt-my-2"> | <div class="meta gt-my-2"> | ||||
<a class="milestone" href="{{.Repo.Link}}/milestone/{{.MilestoneID}}"> | <a class="milestone" href="{{.Repo.Link}}/milestone/{{.MilestoneID}}"> | ||||
{{svg "octicon-milestone" 16 "gt-mr-2 gt-vm"}} | |||||
<span class="gt-vm">{{.Milestone.Name}}</span> | |||||
{{svg "octicon-milestone" 16 "gt-mr-2 tw-align-middle"}} | |||||
<span class="tw-align-middle">{{.Milestone.Name}}</span> | |||||
</a> | </a> | ||||
</div> | </div> | ||||
{{end}} | {{end}} | ||||
{{range index $.Page.LinkedPRs .ID}} | {{range index $.Page.LinkedPRs .ID}} | ||||
<div class="meta gt-my-2"> | <div class="meta gt-my-2"> | ||||
<a href="{{$.Issue.Repo.Link}}/pulls/{{.Index}}"> | <a href="{{$.Issue.Repo.Link}}/pulls/{{.Index}}"> | ||||
<span class="gt-m-0 text {{if .PullRequest.HasMerged}}purple{{else if .IsClosed}}red{{else}}green{{end}}">{{svg "octicon-git-merge" 16 "gt-mr-2 gt-vm"}}</span> | |||||
<span class="gt-vm">{{.Title}} <span class="text light grey">#{{.Index}}</span></span> | |||||
<span class="gt-m-0 text {{if .PullRequest.HasMerged}}purple{{else if .IsClosed}}red{{else}}green{{end}}">{{svg "octicon-git-merge" 16 "gt-mr-2 tw-align-middle"}}</span> | |||||
<span class="tw-align-middle">{{.Title}} <span class="text light grey">#{{.Index}}</span></span> | |||||
</a> | </a> | ||||
</div> | </div> | ||||
{{end}} | {{end}} | ||||
{{$tasks := .GetTasks}} | {{$tasks := .GetTasks}} | ||||
{{if gt $tasks 0}} | {{if gt $tasks 0}} | ||||
<div class="meta gt-my-2"> | <div class="meta gt-my-2"> | ||||
{{svg "octicon-checklist" 16 "gt-mr-2 gt-vm"}} | |||||
<span class="gt-vm">{{.GetTasksDone}} / {{$tasks}}</span> | |||||
{{svg "octicon-checklist" 16 "gt-mr-2 tw-align-middle"}} | |||||
<span class="tw-align-middle">{{.GetTasksDone}} / {{$tasks}}</span> | |||||
</div> | </div> | ||||
{{end}} | {{end}} | ||||
</div> | </div> |
<div class="divider"></div> | <div class="divider"></div> | ||||
{{end}} | {{end}} | ||||
{{$previousExclusiveScope = $exclusiveScope}} | {{$previousExclusiveScope = $exclusiveScope}} | ||||
<div class="item issue-action gt-df gt-sb" data-action="toggle" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/labels"> | |||||
<div class="item issue-action tw-flex tw-justify-between" data-action="toggle" data-element-id="{{.ID}}" data-url="{{$.RepoLink}}/issues/labels"> | |||||
{{if SliceUtils.Contains $.SelLabelIDs .ID}}{{if $exclusiveScope}}{{svg "octicon-dot-fill"}}{{else}}{{svg "octicon-check"}}{{end}}{{end}} {{RenderLabel $.Context ctx.Locale .}} | {{if SliceUtils.Contains $.SelLabelIDs .ID}}{{if $exclusiveScope}}{{svg "octicon-dot-fill"}}{{else}}{{svg "octicon-check"}}{{end}}{{end}} {{RenderLabel $.Context ctx.Locale .}} | ||||
{{template "repo/issue/labels/label_archived" .}} | {{template "repo/issue/labels/label_archived" .}} | ||||
</div> | </div> |
<div class="divider"></div> | <div class="divider"></div> | ||||
{{end}} | {{end}} | ||||
{{$previousExclusiveScope = $exclusiveScope}} | {{$previousExclusiveScope = $exclusiveScope}} | ||||
<a class="item label-filter-item gt-df gt-ac" {{if .IsArchived}}data-is-archived{{end}} href="?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.QueryString}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}{{if $.ShowArchivedLabels}}&archived=true{{end}}" data-label-id="{{.ID}}"> | |||||
<a class="item label-filter-item tw-flex tw-content-center" {{if .IsArchived}}data-is-archived{{end}} href="?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.QueryString}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}{{if $.ShowArchivedLabels}}&archived=true{{end}}" data-label-id="{{.ID}}"> | |||||
{{if .IsExcluded}} | {{if .IsExcluded}} | ||||
{{svg "octicon-circle-slash"}} | {{svg "octicon-circle-slash"}} | ||||
{{else if .IsSelected}} | {{else if .IsSelected}} | ||||
{{ctx.Locale.Tr "repo.issues.new.open_projects"}} | {{ctx.Locale.Tr "repo.issues.new.open_projects"}} | ||||
</div> | </div> | ||||
{{range .OpenProjects}} | {{range .OpenProjects}} | ||||
<a class="{{if $.ProjectID}}{{if eq $.ProjectID .ID}}active selected{{end}}{{end}} item gt-df" href="?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&project={{.ID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}{{if $.ShowArchivedLabels}}&archived=true{{end}}"> | |||||
<a class="{{if $.ProjectID}}{{if eq $.ProjectID .ID}}active selected{{end}}{{end}} item tw-flex" href="?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&project={{.ID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}{{if $.ShowArchivedLabels}}&archived=true{{end}}"> | |||||
{{svg .IconName 18 "gt-mr-3 tw-shrink-0"}}<span class="gt-ellipsis">{{.Title}}</span> | {{svg .IconName 18 "gt-mr-3 tw-shrink-0"}}<span class="gt-ellipsis">{{.Title}}</span> | ||||
</a> | </a> | ||||
{{end}} | {{end}} | ||||
<a class="{{if eq .AssigneeID -1}}active selected {{end}}item" href="?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee=-1&poster={{$.PosterID}}{{if $.ShowArchivedLabels}}&archived=true{{end}}">{{ctx.Locale.Tr "repo.issues.filter_assginee_no_assignee"}}</a> | <a class="{{if eq .AssigneeID -1}}active selected {{end}}item" href="?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee=-1&poster={{$.PosterID}}{{if $.ShowArchivedLabels}}&archived=true{{end}}">{{ctx.Locale.Tr "repo.issues.filter_assginee_no_assignee"}}</a> | ||||
<div class="divider"></div> | <div class="divider"></div> | ||||
{{range .Assignees}} | {{range .Assignees}} | ||||
<a class="{{if eq $.AssigneeID .ID}}active selected{{end}} item gt-df" href="?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{.ID}}&poster={{$.PosterID}}{{if $.ShowArchivedLabels}}&archived=true{{end}}"> | |||||
<a class="{{if eq $.AssigneeID .ID}}active selected{{end}} item tw-flex" href="?type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels={{$.SelectLabels}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{.ID}}&poster={{$.PosterID}}{{if $.ShowArchivedLabels}}&archived=true{{end}}"> | |||||
{{ctx.AvatarUtils.Avatar . 20}}{{template "repo/search_name" .}} | {{ctx.AvatarUtils.Avatar . 20}}{{template "repo/search_name" .}} | ||||
</a> | </a> | ||||
{{end}} | {{end}} |
<div class="precolors"> | <div class="precolors"> | ||||
<div class="gt-df"> | |||||
<div class="tw-flex"> | |||||
<a class="color" style="background-color:#e11d21" data-color-hex="#e11d21"></a> | <a class="color" style="background-color:#e11d21" data-color-hex="#e11d21"></a> | ||||
<a class="color" style="background-color:#eb6420" data-color-hex="#eb6420"></a> | <a class="color" style="background-color:#eb6420" data-color-hex="#eb6420"></a> | ||||
<a class="color" style="background-color:#fbca04" data-color-hex="#fbca04"></a> | <a class="color" style="background-color:#fbca04" data-color-hex="#fbca04"></a> | ||||
<a class="color" style="background-color:#0052cc" data-color-hex="#0052cc"></a> | <a class="color" style="background-color:#0052cc" data-color-hex="#0052cc"></a> | ||||
<a class="color" style="background-color:#5319e7" data-color-hex="#5319e7"></a> | <a class="color" style="background-color:#5319e7" data-color-hex="#5319e7"></a> | ||||
</div> | </div> | ||||
<div class="gt-df"> | |||||
<div class="tw-flex"> | |||||
<a class="color" style="background-color:#f6c6c7" data-color-hex="#f6c6c7"></a> | <a class="color" style="background-color:#f6c6c7" data-color-hex="#f6c6c7"></a> | ||||
<a class="color" style="background-color:#fad8c7" data-color-hex="#fad8c7"></a> | <a class="color" style="background-color:#fad8c7" data-color-hex="#fad8c7"></a> | ||||
<a class="color" style="background-color:#fef2c0" data-color-hex="#fef2c0"></a> | <a class="color" style="background-color:#fef2c0" data-color-hex="#fef2c0"></a> |
<a class="open-issues" href="{{$.RepoLink}}/issues?labels={{.ID}}">{{svg "octicon-issue-opened"}} {{ctx.Locale.Tr "repo.issues.label_open_issues" .NumOpenIssues}}</a> | <a class="open-issues" href="{{$.RepoLink}}/issues?labels={{.ID}}">{{svg "octicon-issue-opened"}} {{ctx.Locale.Tr "repo.issues.label_open_issues" .NumOpenIssues}}</a> | ||||
{{end}} | {{end}} | ||||
</div> | </div> | ||||
<div class="label-operation gt-df"> | |||||
<div class="label-operation tw-flex"> | |||||
{{template "repo/issue/labels/label_archived" .}} | {{template "repo/issue/labels/label_archived" .}} | ||||
<div class="gt-df tw-ml-auto"> | |||||
<div class="tw-flex tw-ml-auto"> | |||||
{{if and (not $.PageIsOrgSettingsLabels) (not $.Repository.IsArchived) (or $.CanWriteIssues $.CanWritePulls)}} | {{if and (not $.PageIsOrgSettingsLabels) (not $.Repository.IsArchived) (or $.CanWriteIssues $.CanWritePulls)}} | ||||
<a class="edit-label-button" href="#" data-id="{{.ID}}" data-title="{{.Name}}" {{if .Exclusive}}data-exclusive{{end}} {{if gt .ArchivedUnix 0}}data-is-archived{{end}} data-num-issues="{{.NumIssues}}" data-description="{{.Description}}" data-color={{.Color}}>{{svg "octicon-pencil"}} {{ctx.Locale.Tr "repo.issues.label_edit"}}</a> | <a class="edit-label-button" href="#" data-id="{{.ID}}" data-title="{{.Name}}" {{if .Exclusive}}data-exclusive{{end}} {{if gt .ArchivedUnix 0}}data-is-archived{{end}} data-num-issues="{{.NumIssues}}" data-description="{{.Description}}" data-color={{.Color}}>{{svg "octicon-pencil"}} {{ctx.Locale.Tr "repo.issues.label_edit"}}</a> | ||||
<a class="delete-button" href="#" data-url="{{$.Link}}/delete" data-id="{{.ID}}">{{svg "octicon-trash"}} {{ctx.Locale.Tr "repo.issues.label_delete"}}</a> | <a class="delete-button" href="#" data-url="{{$.Link}}/delete" data-id="{{.ID}}">{{svg "octicon-trash"}} {{ctx.Locale.Tr "repo.issues.label_delete"}}</a> |
{{template "repo/header" .}} | {{template "repo/header" .}} | ||||
<div class="ui container"> | <div class="ui container"> | ||||
{{template "base/alert" .}} | {{template "base/alert" .}} | ||||
<div class="gt-df"> | |||||
<div class="tw-flex"> | |||||
<h1 class="gt-mb-3">{{.Milestone.Name}}</h1> | <h1 class="gt-mb-3">{{.Milestone.Name}}</h1> | ||||
{{if not .Repository.IsArchived}} | {{if not .Repository.IsArchived}} | ||||
<div class="text right gt-f1"> | |||||
<div class="text right tw-flex-1"> | |||||
{{if or .CanWriteIssues .CanWritePulls}} | {{if or .CanWriteIssues .CanWritePulls}} | ||||
{{if .Milestone.IsClosed}} | {{if .Milestone.IsClosed}} | ||||
<a class="ui primary basic button link-action" href data-url="{{$.RepoLink}}/milestones/{{.MilestoneID}}/open">{{ctx.Locale.Tr "repo.milestones.open"}} | <a class="ui primary basic button link-action" href data-url="{{$.RepoLink}}/milestones/{{.MilestoneID}}/open">{{ctx.Locale.Tr "repo.milestones.open"}} | ||||
{{.Milestone.RenderedContent}} | {{.Milestone.RenderedContent}} | ||||
</div> | </div> | ||||
{{end}} | {{end}} | ||||
<div class="gt-df gt-fc gt-gap-3"> | |||||
<div class="tw-flex tw-flex-col gt-gap-3"> | |||||
<progress class="milestone-progress-big" value="{{.Milestone.Completeness}}" max="100"></progress> | <progress class="milestone-progress-big" value="{{.Milestone.Completeness}}" max="100"></progress> | ||||
<div class="gt-df gt-gap-4"> | |||||
<div classs="gt-df gt-ac"> | |||||
<div class="tw-flex gt-gap-4"> | |||||
<div classs="tw-flex tw-content-center"> | |||||
{{$closedDate:= TimeSinceUnix .Milestone.ClosedDateUnix ctx.Locale}} | {{$closedDate:= TimeSinceUnix .Milestone.ClosedDateUnix ctx.Locale}} | ||||
{{if .IsClosed}} | {{if .IsClosed}} | ||||
{{svg "octicon-clock"}} {{ctx.Locale.Tr "repo.milestones.closed" $closedDate}} | {{svg "octicon-clock"}} {{ctx.Locale.Tr "repo.milestones.closed" $closedDate}} |
{{svg "octicon-milestone" 16}} | {{svg "octicon-milestone" 16}} | ||||
<a class="muted" href="{{$.RepoLink}}/milestone/{{.ID}}">{{.Name}}</a> | <a class="muted" href="{{$.RepoLink}}/milestone/{{.ID}}">{{.Name}}</a> | ||||
</h3> | </h3> | ||||
<div class="gt-df gt-ac"> | |||||
<div class="tw-flex tw-content-center"> | |||||
<span class="gt-mr-3">{{.Completeness}}%</span> | <span class="gt-mr-3">{{.Completeness}}%</span> | ||||
<progress value="{{.Completeness}}" max="100"></progress> | <progress value="{{.Completeness}}" max="100"></progress> | ||||
</div> | </div> |
<div class="selected"> | <div class="selected"> | ||||
{{range .Assignees}} | {{range .Assignees}} | ||||
<a class="item gt-p-2 muted gt-hidden" id="assignee_{{.ID}}" href="{{$.RepoLink}}/issues?assignee={{.ID}}"> | <a class="item gt-p-2 muted gt-hidden" id="assignee_{{.ID}}" href="{{$.RepoLink}}/issues?assignee={{.ID}}"> | ||||
{{ctx.AvatarUtils.Avatar . 28 "gt-mr-3 gt-vm"}}{{.GetDisplayName}} | |||||
{{ctx.AvatarUtils.Avatar . 28 "gt-mr-3 tw-align-middle"}}{{.GetDisplayName}} | |||||
</a> | </a> | ||||
{{end}} | {{end}} | ||||
</div> | </div> |
</a> | </a> | ||||
{{end}} | {{end}} | ||||
<div class="content comment-container"> | <div class="content comment-container"> | ||||
<div class="ui top attached header comment-header gt-df gt-ac gt-sb" role="heading" aria-level="3"> | |||||
<div class="comment-header-left gt-df gt-ac"> | |||||
<div class="ui top attached header comment-header tw-flex tw-content-center tw-justify-between" role="heading" aria-level="3"> | |||||
<div class="comment-header-left tw-flex tw-content-center"> | |||||
{{if .Issue.OriginalAuthor}} | {{if .Issue.OriginalAuthor}} | ||||
<span class="text black gt-font-semibold"> | <span class="text black gt-font-semibold"> | ||||
{{svg (MigrationIcon .Repository.GetOriginalURLHostname)}} | {{svg (MigrationIcon .Repository.GetOriginalURLHostname)}} | ||||
</span> | </span> | ||||
{{end}} | {{end}} | ||||
</div> | </div> | ||||
<div class="comment-header-right actions gt-df gt-ac"> | |||||
<div class="comment-header-right actions tw-flex tw-content-center"> | |||||
{{template "repo/issue/view_content/show_role" dict "ShowRole" .Issue.ShowRole "IgnorePoster" true}} | {{template "repo/issue/view_content/show_role" dict "ShowRole" .Issue.ShowRole "IgnorePoster" true}} | ||||
{{if not $.Repository.IsArchived}} | {{if not $.Repository.IsArchived}} | ||||
{{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index)}} | {{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index)}} |
{{end}} | {{end}} | ||||
{{$hasThumbnails := false}} | {{$hasThumbnails := false}} | ||||
{{- range .Attachments -}} | {{- range .Attachments -}} | ||||
<div class="gt-df"> | |||||
<div class="gt-f1 gt-p-3"> | |||||
<div class="tw-flex"> | |||||
<div class="tw-flex-1 gt-p-3"> | |||||
<a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}" title="{{ctx.Locale.Tr "repo.issues.attachment.open_tab" .Name}}"> | <a target="_blank" rel="noopener noreferrer" href="{{.DownloadURL}}" title="{{ctx.Locale.Tr "repo.issues.attachment.open_tab" .Name}}"> | ||||
{{if FilenameIsImage .Name}} | {{if FilenameIsImage .Name}} | ||||
{{if not (StringUtils.Contains (StringUtils.ToString $.RenderedContent) .UUID)}} | {{if not (StringUtils.Contains (StringUtils.ToString $.RenderedContent) .UUID)}} | ||||
<span><strong>{{.Name}}</strong></span> | <span><strong>{{.Name}}</strong></span> | ||||
</a> | </a> | ||||
</div> | </div> | ||||
<div class="gt-p-3 gt-df gt-ac"> | |||||
<div class="gt-p-3 tw-flex tw-content-center"> | |||||
<span class="ui text grey">{{.Size | FileSize}}</span> | <span class="ui text grey">{{.Size | FileSize}}</span> | ||||
</div> | </div> | ||||
</div> | </div> |
</a> | </a> | ||||
{{end}} | {{end}} | ||||
<div class="content comment-container"> | <div class="content comment-container"> | ||||
<div class="ui top attached header comment-header gt-df gt-ac gt-sb" role="heading" aria-level="3"> | |||||
<div class="comment-header-left gt-df gt-ac"> | |||||
<div class="ui top attached header comment-header tw-flex tw-content-center tw-justify-between" role="heading" aria-level="3"> | |||||
<div class="comment-header-left tw-flex tw-content-center"> | |||||
{{if .OriginalAuthor}} | {{if .OriginalAuthor}} | ||||
<span class="text black gt-font-semibold gt-mr-2"> | <span class="text black gt-font-semibold gt-mr-2"> | ||||
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}} | {{svg (MigrationIcon $.Repository.GetOriginalURLHostname)}} | ||||
</span> | </span> | ||||
{{end}} | {{end}} | ||||
</div> | </div> | ||||
<div class="comment-header-right actions gt-df gt-ac"> | |||||
<div class="comment-header-right actions tw-flex tw-content-center"> | |||||
{{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}} | {{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}} | ||||
{{if not $.Repository.IsArchived}} | {{if not $.Repository.IsArchived}} | ||||
{{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}} | {{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}} | ||||
{{if or .Content .Attachments}} | {{if or .Content .Attachments}} | ||||
<div class="timeline-item comment"> | <div class="timeline-item comment"> | ||||
<div class="content comment-container"> | <div class="content comment-container"> | ||||
<div class="ui top attached header comment-header gt-df gt-ac gt-sb"> | |||||
<div class="comment-header-left gt-df gt-ac"> | |||||
<div class="ui top attached header comment-header tw-flex tw-content-center tw-justify-between"> | |||||
<div class="comment-header-left tw-flex tw-content-center"> | |||||
{{if gt .Poster.ID 0}} | {{if gt .Poster.ID 0}} | ||||
<a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}"> | <a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}"> | ||||
{{ctx.AvatarUtils.Avatar .Poster 24}} | {{ctx.AvatarUtils.Avatar .Poster 24}} | ||||
{{ctx.Locale.Tr "repo.issues.review.left_comment"}} | {{ctx.Locale.Tr "repo.issues.review.left_comment"}} | ||||
</span> | </span> | ||||
</div> | </div> | ||||
<div class="comment-header-right actions gt-df gt-ac"> | |||||
<div class="comment-header-right actions tw-flex tw-content-center"> | |||||
{{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}} | {{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}} | ||||
{{if not $.Repository.IsArchived}} | {{if not $.Repository.IsArchived}} | ||||
{{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}} | {{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}} | ||||
{{if .Content}} | {{if .Content}} | ||||
<div class="timeline-item comment"> | <div class="timeline-item comment"> | ||||
<div class="content"> | <div class="content"> | ||||
<div class="ui top attached header comment-header-left gt-df gt-ac arrow-top"> | |||||
<div class="ui top attached header comment-header-left tw-flex tw-content-center arrow-top"> | |||||
{{if gt .Poster.ID 0}} | {{if gt .Poster.ID 0}} | ||||
<a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}"> | <a class="inline-timeline-avatar" href="{{.Poster.HomeLink}}"> | ||||
{{ctx.AvatarUtils.Avatar .Poster 24}} | {{ctx.AvatarUtils.Avatar .Poster 24}} |
{{$hasReview := and $comment.Review}} | {{$hasReview := and $comment.Review}} | ||||
{{$isReviewPending := and $hasReview (eq $comment.Review.Type 0)}} | {{$isReviewPending := and $hasReview (eq $comment.Review.Type 0)}} | ||||
<div class="ui segments conversation-holder"> | <div class="ui segments conversation-holder"> | ||||
<div class="ui segment collapsible-comment-box gt-py-3 gt-df gt-ac gt-sb"> | |||||
<div class="gt-df gt-ac"> | |||||
<div class="ui segment collapsible-comment-box gt-py-3 tw-flex tw-content-center tw-justify-between"> | |||||
<div class="tw-flex tw-content-center"> | |||||
<a href="{{$comment.CodeCommentLink ctx}}" class="file-comment gt-ml-3 gt-word-break">{{$comment.TreePath}}</a> | <a href="{{$comment.CodeCommentLink ctx}}" class="file-comment gt-ml-3 gt-word-break">{{$comment.TreePath}}</a> | ||||
{{if $invalid}} | {{if $invalid}} | ||||
<span class="ui label basic small gt-ml-3" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.review.outdated_description"}}"> | <span class="ui label basic small gt-ml-3" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.review.outdated_description"}}"> | ||||
</div> | </div> | ||||
<div> | <div> | ||||
{{if or $invalid $resolved}} | {{if or $invalid $resolved}} | ||||
<button id="show-outdated-{{$comment.ID}}" data-comment="{{$comment.ID}}" class="{{if not $resolved}}gt-hidden {{end}}ui compact labeled button show-outdated gt-df gt-ac"> | |||||
<button id="show-outdated-{{$comment.ID}}" data-comment="{{$comment.ID}}" class="{{if not $resolved}}gt-hidden {{end}}ui compact labeled button show-outdated tw-flex tw-content-center"> | |||||
{{svg "octicon-unfold" 16 "gt-mr-3"}} | {{svg "octicon-unfold" 16 "gt-mr-3"}} | ||||
{{if $resolved}} | {{if $resolved}} | ||||
{{ctx.Locale.Tr "repo.issues.review.show_resolved"}} | {{ctx.Locale.Tr "repo.issues.review.show_resolved"}} | ||||
{{ctx.Locale.Tr "repo.issues.review.show_outdated"}} | {{ctx.Locale.Tr "repo.issues.review.show_outdated"}} | ||||
{{end}} | {{end}} | ||||
</button> | </button> | ||||
<button id="hide-outdated-{{$comment.ID}}" data-comment="{{$comment.ID}}" class="{{if $resolved}}gt-hidden {{end}}ui compact labeled button hide-outdated gt-df gt-ac"> | |||||
<button id="hide-outdated-{{$comment.ID}}" data-comment="{{$comment.ID}}" class="{{if $resolved}}gt-hidden {{end}}ui compact labeled button hide-outdated tw-flex tw-content-center"> | |||||
{{svg "octicon-fold" 16 "gt-mr-3"}} | {{svg "octicon-fold" 16 "gt-mr-3"}} | ||||
{{if $resolved}} | {{if $resolved}} | ||||
{{ctx.Locale.Tr "repo.issues.review.hide_resolved"}} | {{ctx.Locale.Tr "repo.issues.review.hide_resolved"}} | ||||
<div class="comment code-comment gt-pb-4" id="{{.HashTag}}"> | <div class="comment code-comment gt-pb-4" id="{{.HashTag}}"> | ||||
<div class="content"> | <div class="content"> | ||||
<div class="header comment-header"> | <div class="header comment-header"> | ||||
<div class="comment-header-left gt-df gt-ac"> | |||||
<div class="comment-header-left tw-flex tw-content-center"> | |||||
{{if not .OriginalAuthor}} | {{if not .OriginalAuthor}} | ||||
<a class="avatar"> | <a class="avatar"> | ||||
{{ctx.AvatarUtils.Avatar .Poster 20}} | {{ctx.AvatarUtils.Avatar .Poster 20}} | ||||
{{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdSubStr}} | {{ctx.Locale.Tr "repo.issues.commented_at" .HashTag $createdSubStr}} | ||||
</span> | </span> | ||||
</div> | </div> | ||||
<div class="comment-header-right actions gt-df gt-ac"> | |||||
<div class="comment-header-right actions tw-flex tw-content-center"> | |||||
{{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}} | {{template "repo/issue/view_content/show_role" dict "ShowRole" .ShowRole}} | ||||
{{if not $.Repository.IsArchived}} | {{if not $.Repository.IsArchived}} | ||||
{{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}} | {{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/comments/%d/reactions" $.RepoLink .ID)}} | ||||
</div> | </div> | ||||
{{end}} | {{end}} | ||||
</div> | </div> | ||||
<div class="code-comment-buttons gt-df gt-ac gt-fw gt-mt-3 gt-mb-2 gt-mx-3"> | |||||
<div class="gt-f1"> | |||||
<div class="code-comment-buttons tw-flex tw-content-center tw-flex-wrap gt-mt-3 gt-mb-2 gt-mx-3"> | |||||
<div class="tw-flex-1"> | |||||
{{if $resolved}} | {{if $resolved}} | ||||
<div class="ui grey text"> | <div class="ui grey text"> | ||||
{{svg "octicon-check" 16 "gt-mr-2"}} | {{svg "octicon-check" 16 "gt-mr-2"}} |
<div class="ui attached merge-section segment {{if not $.LatestCommitStatus}}no-header{{end}} flex-items-block"> | <div class="ui attached merge-section segment {{if not $.LatestCommitStatus}}no-header{{end}} flex-items-block"> | ||||
{{if .Issue.PullRequest.HasMerged}} | {{if .Issue.PullRequest.HasMerged}} | ||||
{{if .IsPullBranchDeletable}} | {{if .IsPullBranchDeletable}} | ||||
<div class="item item-section text gt-f1"> | |||||
<div class="item item-section text tw-flex-1"> | |||||
<div class="item-section-left"> | <div class="item-section-left"> | ||||
<h3 class="gt-mb-3"> | <h3 class="gt-mb-3"> | ||||
{{ctx.Locale.Tr "repo.pulls.merged_success"}} | {{ctx.Locale.Tr "repo.pulls.merged_success"}} | ||||
</div> | </div> | ||||
{{end}} | {{end}} | ||||
{{else if .Issue.IsClosed}} | {{else if .Issue.IsClosed}} | ||||
<div class="item item-section text gt-f1"> | |||||
<div class="item item-section text tw-flex-1"> | |||||
<div class="item-section-left"> | <div class="item-section-left"> | ||||
<h3 class="gt-mb-3">{{ctx.Locale.Tr "repo.pulls.closed"}}</h3> | <h3 class="gt-mb-3">{{ctx.Locale.Tr "repo.pulls.closed"}}</h3> | ||||
<div class="merge-section-info"> | <div class="merge-section-info"> | ||||
</div> | </div> | ||||
{{else if .IsPullWorkInProgress}} | {{else if .IsPullWorkInProgress}} | ||||
<div class="item toggle-wip" data-title="{{.Issue.Title}}" data-wip-prefix="{{.WorkInProgressPrefix}}" data-update-url="{{.Issue.Link}}/title"> | <div class="item toggle-wip" data-title="{{.Issue.Title}}" data-wip-prefix="{{.WorkInProgressPrefix}}" data-update-url="{{.Issue.Link}}/title"> | ||||
<div class="item-section-left flex-text-inline gt-f1"> | |||||
<div class="item-section-left flex-text-inline tw-flex-1"> | |||||
{{svg "octicon-x"}} | {{svg "octicon-x"}} | ||||
{{ctx.Locale.Tr "repo.pulls.cannot_merge_work_in_progress"}} | {{ctx.Locale.Tr "repo.pulls.cannot_merge_work_in_progress"}} | ||||
</div> | </div> |
{{if .Issue.IsPull}} | {{if .Issue.IsPull}} | ||||
<input id="reviewer_id" name="reviewer_id" type="hidden" value="{{.reviewer_id}}"> | <input id="reviewer_id" name="reviewer_id" type="hidden" value="{{.reviewer_id}}"> | ||||
<div class="ui {{if or (and (not .Reviewers) (not .TeamReviewers)) (not .CanChooseReviewer) .Repository.IsArchived}}disabled{{end}} floating jump select-reviewers-modify dropdown"> | <div class="ui {{if or (and (not .Reviewers) (not .TeamReviewers)) (not .CanChooseReviewer) .Repository.IsArchived}}disabled{{end}} floating jump select-reviewers-modify dropdown"> | ||||
<a class="text gt-df gt-ac muted"> | |||||
<a class="text tw-flex tw-content-center muted"> | |||||
<strong>{{ctx.Locale.Tr "repo.issues.review.reviewers"}}</strong> | <strong>{{ctx.Locale.Tr "repo.issues.review.reviewers"}}</strong> | ||||
{{if and .CanChooseReviewer (not .Repository.IsArchived)}} | {{if and .CanChooseReviewer (not .Repository.IsArchived)}} | ||||
{{svg "octicon-gear" 16 "gt-ml-2"}} | {{svg "octicon-gear" 16 "gt-ml-2"}} | ||||
<span class="no-select item {{if or .OriginalReviews .PullReviewers}}gt-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_reviewers"}}</span> | <span class="no-select item {{if or .OriginalReviews .PullReviewers}}gt-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_reviewers"}}</span> | ||||
<div class="selected"> | <div class="selected"> | ||||
{{range .PullReviewers}} | {{range .PullReviewers}} | ||||
<div class="item gt-df gt-ac gt-py-3"> | |||||
<div class="gt-df gt-ac gt-f1"> | |||||
<div class="item tw-flex tw-content-center gt-py-3"> | |||||
<div class="tw-flex tw-content-center tw-flex-1"> | |||||
{{if .User}} | {{if .User}} | ||||
<a class="muted sidebar-item-link" href="{{.User.HomeLink}}">{{ctx.AvatarUtils.Avatar .User 20 "gt-mr-3"}}{{.User.GetDisplayName}}</a> | <a class="muted sidebar-item-link" href="{{.User.HomeLink}}">{{ctx.AvatarUtils.Avatar .User 20 "gt-mr-3"}}{{.User.GetDisplayName}}</a> | ||||
{{else if .Team}} | {{else if .Team}} | ||||
<span class="text">{{svg "octicon-people" 20 "gt-mr-3"}}{{$.Issue.Repo.OwnerName}}/{{.Team.Name}}</span> | <span class="text">{{svg "octicon-people" 20 "gt-mr-3"}}{{$.Issue.Repo.OwnerName}}/{{.Team.Name}}</span> | ||||
{{end}} | {{end}} | ||||
</div> | </div> | ||||
<div class="gt-df gt-ac gt-gap-3"> | |||||
<div class="tw-flex tw-content-center gt-gap-3"> | |||||
{{if (and $.Permission.IsAdmin (or (eq .Review.Type 1) (eq .Review.Type 3)) (not $.Issue.IsClosed))}} | {{if (and $.Permission.IsAdmin (or (eq .Review.Type 1) (eq .Review.Type 3)) (not $.Issue.IsClosed))}} | ||||
<a href="#" class="ui muted icon gt-df gt-ac show-modal" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dismiss_review"}}" data-modal="#dismiss-review-modal-{{.Review.ID}}"> | |||||
<a href="#" class="ui muted icon tw-flex tw-content-center show-modal" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dismiss_review"}}" data-modal="#dismiss-review-modal-{{.Review.ID}}"> | |||||
{{svg "octicon-x" 20}} | {{svg "octicon-x" 20}} | ||||
</a> | </a> | ||||
<div class="ui small modal" id="dismiss-review-modal-{{.Review.ID}}"> | <div class="ui small modal" id="dismiss-review-modal-{{.Review.ID}}"> | ||||
</div> | </div> | ||||
{{end}} | {{end}} | ||||
{{range .OriginalReviews}} | {{range .OriginalReviews}} | ||||
<div class="item gt-df gt-ac gt-py-3"> | |||||
<div class="gt-df gt-ac gt-f1"> | |||||
<div class="item tw-flex tw-content-center gt-py-3"> | |||||
<div class="tw-flex tw-content-center tw-flex-1"> | |||||
<a class="muted" href="{{$.Repository.OriginalURL}}" data-tooltip-content="{{ctx.Locale.Tr "repo.migrated_from_fake" $.Repository.GetOriginalURLHostname}}"> | <a class="muted" href="{{$.Repository.OriginalURL}}" data-tooltip-content="{{ctx.Locale.Tr "repo.migrated_from_fake" $.Repository.GetOriginalURLHostname}}"> | ||||
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname) 20 "gt-mr-3"}} | {{svg (MigrationIcon $.Repository.GetOriginalURLHostname) 20 "gt-mr-3"}} | ||||
{{.OriginalAuthor}} | {{.OriginalAuthor}} | ||||
</a> | </a> | ||||
</div> | </div> | ||||
<div class="gt-df gt-ac gt-gap-3"> | |||||
<div class="tw-flex tw-content-center gt-gap-3"> | |||||
{{svg (printf "octicon-%s" .Type.Icon) 16 (printf "text %s" (.HTMLTypeColorName))}} | {{svg (printf "octicon-%s" .Type.Icon) 16 (printf "text %s" (.HTMLTypeColorName))}} | ||||
</div> | </div> | ||||
</div> | </div> | ||||
{{if .Participants}} | {{if .Participants}} | ||||
<span class="text"><strong>{{ctx.Locale.Tr "repo.issues.num_participants" .NumParticipants}}</strong></span> | <span class="text"><strong>{{ctx.Locale.Tr "repo.issues.num_participants" .NumParticipants}}</strong></span> | ||||
<div class="ui list gt-df gt-fw"> | |||||
<div class="ui list tw-flex tw-flex-wrap"> | |||||
{{range .Participants}} | {{range .Participants}} | ||||
<a {{if gt .ID 0}}href="{{.HomeLink}}"{{end}} data-tooltip-content="{{.GetDisplayName}}"> | <a {{if gt .ID 0}}href="{{.HomeLink}}"{{end}} data-tooltip-content="{{.GetDisplayName}}"> | ||||
{{ctx.AvatarUtils.Avatar . 28 "gt-my-1 gt-mr-2"}} | {{ctx.AvatarUtils.Avatar . 28 "gt-my-1 gt-mr-2"}} | ||||
</div> | </div> | ||||
{{if ne .Issue.DeadlineUnix 0}} | {{if ne .Issue.DeadlineUnix 0}} | ||||
<p> | <p> | ||||
<div class="gt-df gt-sb gt-ac"> | |||||
<div class="tw-flex tw-justify-between tw-content-center"> | |||||
<div class="due-date {{if .Issue.IsOverdue}}text red{{end}}" {{if .Issue.IsOverdue}}data-tooltip-content="{{ctx.Locale.Tr "repo.issues.due_date_overdue"}}"{{end}}> | <div class="due-date {{if .Issue.IsOverdue}}text red{{end}}" {{if .Issue.IsOverdue}}data-tooltip-content="{{ctx.Locale.Tr "repo.issues.due_date_overdue"}}"{{end}}> | ||||
{{svg "octicon-calendar" 16 "gt-mr-3"}} | {{svg "octicon-calendar" 16 "gt-mr-3"}} | ||||
{{DateTime "long" .Issue.DeadlineUnix.FormatDate}} | {{DateTime "long" .Issue.DeadlineUnix.FormatDate}} | ||||
</span> | </span> | ||||
<div class="ui relaxed divided list"> | <div class="ui relaxed divided list"> | ||||
{{range .BlockingDependencies}} | {{range .BlockingDependencies}} | ||||
<div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} gt-df gt-ac gt-sb"> | |||||
<div class="item-left gt-df gt-jc gt-fc gt-f1 gt-ellipsis"> | |||||
<div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} tw-flex tw-content-center tw-justify-between"> | |||||
<div class="item-left tw-flex tw-justify-center tw-flex-col tw-flex-1 gt-ellipsis"> | |||||
<a class="title muted" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}"> | <a class="title muted" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}"> | ||||
#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}} | #{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}} | ||||
</a> | </a> | ||||
{{.Repository.OwnerName}}/{{.Repository.Name}} | {{.Repository.OwnerName}}/{{.Repository.Name}} | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="item-right gt-df gt-ac gt-m-2"> | |||||
<div class="item-right tw-flex tw-content-center gt-m-2"> | |||||
{{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} | {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} | ||||
<a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blocking" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.remove_info"}}"> | <a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blocking" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.remove_info"}}"> | ||||
{{svg "octicon-trash" 16}} | {{svg "octicon-trash" 16}} | ||||
</div> | </div> | ||||
{{end}} | {{end}} | ||||
{{if .BlockingDependenciesNotPermitted}} | {{if .BlockingDependenciesNotPermitted}} | ||||
<div class="item gt-df gt-ac gt-sb gt-ellipsis"> | |||||
<div class="item tw-flex tw-content-center tw-justify-between gt-ellipsis"> | |||||
<span>{{ctx.Locale.TrN (len .BlockingDependenciesNotPermitted) "repo.issues.dependency.no_permission_1" "repo.issues.dependency.no_permission_n" (len .BlockingDependenciesNotPermitted)}}</span> | <span>{{ctx.Locale.TrN (len .BlockingDependenciesNotPermitted) "repo.issues.dependency.no_permission_1" "repo.issues.dependency.no_permission_n" (len .BlockingDependenciesNotPermitted)}}</span> | ||||
</div> | </div> | ||||
{{end}} | {{end}} | ||||
</span> | </span> | ||||
<div class="ui relaxed divided list"> | <div class="ui relaxed divided list"> | ||||
{{range .BlockedByDependencies}} | {{range .BlockedByDependencies}} | ||||
<div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} gt-df gt-ac gt-sb"> | |||||
<div class="item-left gt-df gt-jc gt-fc gt-f1 gt-ellipsis"> | |||||
<div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} tw-flex tw-content-center tw-justify-between"> | |||||
<div class="item-left tw-flex tw-justify-center tw-flex-col tw-flex-1 gt-ellipsis"> | |||||
<a class="title muted" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}"> | <a class="title muted" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}"> | ||||
#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}} | #{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}} | ||||
</a> | </a> | ||||
{{.Repository.OwnerName}}/{{.Repository.Name}} | {{.Repository.OwnerName}}/{{.Repository.Name}} | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="item-right gt-df gt-ac gt-m-2"> | |||||
<div class="item-right tw-flex tw-content-center gt-m-2"> | |||||
{{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} | {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} | ||||
<a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blockedBy" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.remove_info"}}"> | <a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blockedBy" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.remove_info"}}"> | ||||
{{svg "octicon-trash" 16}} | {{svg "octicon-trash" 16}} | ||||
{{end}} | {{end}} | ||||
{{if $.CanCreateIssueDependencies}} | {{if $.CanCreateIssueDependencies}} | ||||
{{range .BlockedByDependenciesNotPermitted}} | {{range .BlockedByDependenciesNotPermitted}} | ||||
<div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} gt-df gt-ac gt-sb"> | |||||
<div class="item-left gt-df gt-jc gt-fc gt-f1 gt-ellipsis"> | |||||
<div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} tw-flex tw-content-center tw-justify-between"> | |||||
<div class="item-left tw-flex tw-justify-center tw-flex-col tw-flex-1 gt-ellipsis"> | |||||
<div class="gt-ellipsis"> | <div class="gt-ellipsis"> | ||||
<span data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.no_permission.can_remove"}}">{{svg "octicon-lock" 16}}</span> | <span data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.no_permission.can_remove"}}">{{svg "octicon-lock" 16}}</span> | ||||
<span class="title" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}"> | <span class="title" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}"> | ||||
{{.Repository.OwnerName}}/{{.Repository.Name}} | {{.Repository.OwnerName}}/{{.Repository.Name}} | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="item-right gt-df gt-ac gt-m-2"> | |||||
<div class="item-right tw-flex tw-content-center gt-m-2"> | |||||
{{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} | {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}} | ||||
<a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blocking" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.remove_info"}}"> | <a class="delete-dependency-button ci muted" data-id="{{.Issue.ID}}" data-type="blocking" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.remove_info"}}"> | ||||
{{svg "octicon-trash" 16}} | {{svg "octicon-trash" 16}} | ||||
</div> | </div> | ||||
{{end}} | {{end}} | ||||
{{else if .BlockedByDependenciesNotPermitted}} | {{else if .BlockedByDependenciesNotPermitted}} | ||||
<div class="item gt-df gt-ac gt-sb gt-ellipsis"> | |||||
<div class="item tw-flex tw-content-center tw-justify-between gt-ellipsis"> | |||||
<span>{{ctx.Locale.TrN (len .BlockedByDependenciesNotPermitted) "repo.issues.dependency.no_permission_1" "repo.issues.dependency.no_permission_n" (len .BlockedByDependenciesNotPermitted)}}</span> | <span>{{ctx.Locale.TrN (len .BlockedByDependenciesNotPermitted) "repo.issues.dependency.no_permission_1" "repo.issues.dependency.no_permission_n" (len .BlockedByDependenciesNotPermitted)}}</span> | ||||
</div> | </div> | ||||
{{end}} | {{end}} | ||||
<div class="divider"></div> | <div class="divider"></div> | ||||
<div class="ui equal width compact grid"> | <div class="ui equal width compact grid"> | ||||
{{$issueReferenceLink := printf "%s#%d" .Issue.Repo.FullName .Issue.Index}} | {{$issueReferenceLink := printf "%s#%d" .Issue.Repo.FullName .Issue.Index}} | ||||
<div class="row gt-ac" data-tooltip-content="{{$issueReferenceLink}}"> | |||||
<div class="row tw-content-center" data-tooltip-content="{{$issueReferenceLink}}"> | |||||
<span class="text column truncate">{{ctx.Locale.Tr "repo.issues.reference_link" $issueReferenceLink}}</span> | <span class="text column truncate">{{ctx.Locale.Tr "repo.issues.reference_link" $issueReferenceLink}}</span> | ||||
<button class="ui two wide button column gt-p-3" data-clipboard-text="{{$issueReferenceLink}}">{{svg "octicon-copy" 14}}</button> | <button class="ui two wide button column gt-p-3" data-clipboard-text="{{$issueReferenceLink}}">{{svg "octicon-copy" 14}}</button> | ||||
</div> | </div> |
</div> | </div> | ||||
<div class="item-section-right"> | <div class="item-section-right"> | ||||
{{if and $.UpdateAllowed $.UpdateByRebaseAllowed}} | {{if and $.UpdateAllowed $.UpdateByRebaseAllowed}} | ||||
<div class="gt-dib"> | |||||
<div class="tw-inline-block"> | |||||
<div class="ui buttons update-button"> | <div class="ui buttons update-button"> | ||||
<button class="ui button" data-do="{{$.Link}}/update" data-redirect="{{$.Link}}"> | <button class="ui button" data-do="{{$.Link}}/update" data-redirect="{{$.Link}}"> | ||||
<span class="button-text"> | <span class="button-text"> |
<h1 class="gt-word-break"> | <h1 class="gt-word-break"> | ||||
<span id="issue-title">{{RenderIssueTitle $.Context .Issue.Title ($.Repository.ComposeMetas ctx) | RenderCodeBlock}} <span class="index">#{{.Issue.Index}}</span> | <span id="issue-title">{{RenderIssueTitle $.Context .Issue.Title ($.Repository.ComposeMetas ctx) | RenderCodeBlock}} <span class="index">#{{.Issue.Index}}</span> | ||||
</span> | </span> | ||||
<div id="edit-title-input" class="ui input gt-f1 gt-hidden"> | |||||
<div id="edit-title-input" class="ui input tw-flex-1 gt-hidden"> | |||||
<input value="{{.Issue.Title}}" maxlength="255" autocomplete="off"> | <input value="{{.Issue.Title}}" maxlength="255" autocomplete="off"> | ||||
</div> | </div> | ||||
</h1> | </h1> |
{{template "repo/migrate/helper" .}} | {{template "repo/migrate/helper" .}} | ||||
<div class="ui cards migrate-entries"> | <div class="ui cards migrate-entries"> | ||||
{{range .Services}} | {{range .Services}} | ||||
<a class="ui card migrate-entry gt-df gt-ac" href="{{AppSubUrl}}/repo/migrate?service_type={{.}}&org={{$.Org}}&mirror={{$.Mirror}}"> | |||||
<a class="ui card migrate-entry tw-flex tw-content-center" href="{{AppSubUrl}}/repo/migrate?service_type={{.}}&org={{$.Org}}&mirror={{$.Mirror}}"> | |||||
{{if eq .Name "github"}} | {{if eq .Name "github"}} | ||||
{{svg "octicon-mark-github" 184 "gt-p-4"}} | {{svg "octicon-mark-github" 184 "gt-p-4"}} | ||||
{{else if eq .Name "gitlab"}} | {{else if eq .Name "gitlab"}} |
<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 "repo/header" .}} | {{template "repo/header" .}} | ||||
<div class="ui container padded"> | <div class="ui container padded"> | ||||
<div class="gt-df gt-sb gt-ac gt-mb-4"> | |||||
<div class="tw-flex tw-justify-between tw-content-center gt-mb-4"> | |||||
{{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 class="inline field"> | <div class="inline field"> | ||||
<label>{{ctx.Locale.Tr "repo.fork_from"}}</label> | <label>{{ctx.Locale.Tr "repo.fork_from"}}</label> | ||||
<a href="{{.ForkRepo.Link}}" class="gt-dib">{{.ForkRepo.FullName}}</a> | |||||
<a href="{{.ForkRepo.Link}}" class="tw-inline-block">{{.ForkRepo.FullName}}</a> | |||||
</div> | </div> | ||||
<div class="inline required field {{if .Err_RepoName}}error{{end}}"> | <div class="inline required field {{if .Err_RepoName}}error{{end}}"> | ||||
<label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label> | <label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label> |
{{ctx.Locale.Tr "repo.pulls.tab_files"}} | {{ctx.Locale.Tr "repo.pulls.tab_files"}} | ||||
<span class="ui small label">{{if .NumFiles}}{{.NumFiles}}{{else}}-{{end}}</span> | <span class="ui small label">{{if .NumFiles}}{{.NumFiles}}{{else}}-{{end}}</span> | ||||
</a> | </a> | ||||
<span class="item tw-ml-auto gt-pr-0 gt-font-bold gt-df gt-ac gt-gap-3"> | |||||
<span class="item tw-ml-auto gt-pr-0 gt-font-bold tw-flex tw-content-center gt-gap-3"> | |||||
<span><span class="text green">{{if .Diff.TotalAddition}}+{{.Diff.TotalAddition}}{{end}}</span> <span class="text red">{{if .Diff.TotalDeletion}}-{{.Diff.TotalDeletion}}{{end}}</span></span> | <span><span class="text green">{{if .Diff.TotalAddition}}+{{.Diff.TotalAddition}}{{end}}</span> <span class="text red">{{if .Diff.TotalDeletion}}-{{.Diff.TotalDeletion}}{{end}}</span></span> | ||||
<span class="diff-stats-bar"> | <span class="diff-stats-bar"> | ||||
<div class="diff-stats-add-bar" style="width: {{Eval 100 "*" .Diff.TotalAddition "/" "(" .Diff.TotalAddition "+" .Diff.TotalDeletion "+" 0.0 ")"}}%"></div> | <div class="diff-stats-add-bar" style="width: {{Eval 100 "*" .Diff.TotalAddition "/" "(" .Diff.TotalAddition "+" .Diff.TotalDeletion "+" 0.0 ")"}}%"></div> |
{{end}} | {{end}} | ||||
</div> | </div> | ||||
<div class="ui twelve wide column detail"> | <div class="ui twelve wide column detail"> | ||||
<div class="gt-df gt-ac gt-sb gt-fw gt-mb-3"> | |||||
<div class="tw-flex tw-content-center tw-justify-between tw-flex-wrap gt-mb-3"> | |||||
<h4 class="release-list-title gt-word-break"> | <h4 class="release-list-title gt-word-break"> | ||||
{{if $.PageIsSingleTag}}{{$release.Title}}{{else}}<a href="{{$.RepoLink}}/releases/tag/{{$release.TagName | PathEscapeSegments}}">{{$release.Title}}</a>{{end}} | {{if $.PageIsSingleTag}}{{$release.Title}}{{else}}<a href="{{$.RepoLink}}/releases/tag/{{$release.TagName | PathEscapeSegments}}">{{$release.Title}}</a>{{end}} | ||||
{{template "repo/commit_statuses" dict "Status" $info.CommitStatus "Statuses" $info.CommitStatuses "AdditionalClasses" "gt-df"}} | |||||
{{template "repo/commit_statuses" dict "Status" $info.CommitStatus "Statuses" $info.CommitStatuses "AdditionalClasses" "tw-flex"}} | |||||
{{if $release.IsDraft}} | {{if $release.IsDraft}} | ||||
<span class="ui yellow label">{{ctx.Locale.Tr "repo.release.draft"}}</span> | <span class="ui yellow label">{{ctx.Locale.Tr "repo.release.draft"}}</span> | ||||
{{else if $release.IsPrerelease}} | {{else if $release.IsPrerelease}} |
{{else}} | {{else}} | ||||
<input id="tag-name" name="tag_name" value="{{.tag_name}}" aria-label="{{ctx.Locale.Tr "repo.release.tag_name"}}" placeholder="{{ctx.Locale.Tr "repo.release.tag_name"}}" autofocus required maxlength="255"> | <input id="tag-name" name="tag_name" value="{{.tag_name}}" aria-label="{{ctx.Locale.Tr "repo.release.tag_name"}}" placeholder="{{ctx.Locale.Tr "repo.release.tag_name"}}" autofocus required maxlength="255"> | ||||
<input id="tag-name-editor" type="hidden" data-existing-tags="{{JsonUtils.EncodeToString .Tags}}" data-tag-helper="{{ctx.Locale.Tr "repo.release.tag_helper"}}" data-tag-helper-new="{{ctx.Locale.Tr "repo.release.tag_helper_new"}}" data-tag-helper-existing="{{ctx.Locale.Tr "repo.release.tag_helper_existing"}}"> | <input id="tag-name-editor" type="hidden" data-existing-tags="{{JsonUtils.EncodeToString .Tags}}" data-tag-helper="{{ctx.Locale.Tr "repo.release.tag_helper"}}" data-tag-helper-new="{{ctx.Locale.Tr "repo.release.tag_helper_new"}}" data-tag-helper-existing="{{ctx.Locale.Tr "repo.release.tag_helper_existing"}}"> | ||||
<div id="tag-target-selector" class="gt-dib"> | |||||
<div id="tag-target-selector" class="tw-inline-block"> | |||||
<span class="at">@</span> | <span class="at">@</span> | ||||
<div class="ui selection dropdown"> | <div class="ui selection dropdown"> | ||||
<input type="hidden" name="tag_target" value="{{.tag_target}}"> | <input type="hidden" name="tag_target" value="{{.tag_target}}"> | ||||
</div> | </div> | ||||
{{range .attachments}} | {{range .attachments}} | ||||
<div class="field flex-text-block" id="attachment-{{.ID}}"> | <div class="field flex-text-block" id="attachment-{{.ID}}"> | ||||
<div class="flex-text-inline gt-f1"> | |||||
<div class="flex-text-inline tw-flex-1"> | |||||
<input name="attachment-edit-{{.UUID}}" class="attachment_edit" required value="{{.Name}}"> | <input name="attachment-edit-{{.UUID}}" class="attachment_edit" required value="{{.Name}}"> | ||||
<input name="attachment-del-{{.UUID}}" type="hidden" value="false"> | <input name="attachment-del-{{.UUID}}" type="hidden" value="false"> | ||||
<span class="ui text grey tw-whitespace-nowrap">{{.Size | FileSize}}</span> | <span class="ui text grey tw-whitespace-nowrap">{{.Size | FileSize}}</span> | ||||
</div> | </div> | ||||
<span class="help">{{ctx.Locale.Tr "repo.release.prerelease_helper"}}</span> | <span class="help">{{ctx.Locale.Tr "repo.release.prerelease_helper"}}</span> | ||||
<div class="divider gt-mt-0"></div> | <div class="divider gt-mt-0"></div> | ||||
<div class="gt-df gt-je"> | |||||
<div class="tw-flex tw-justify-end"> | |||||
{{if .PageIsEditRelease}} | {{if .PageIsEditRelease}} | ||||
<a class="ui small button" href="{{.RepoLink}}/releases"> | <a class="ui small button" href="{{.RepoLink}}/releases"> | ||||
{{ctx.Locale.Tr "repo.release.cancel"}} | {{ctx.Locale.Tr "repo.release.cancel"}} |
{{$canReadCode := $.Permission.CanRead $.UnitTypeCode}} | {{$canReadCode := $.Permission.CanRead $.UnitTypeCode}} | ||||
{{if $canReadReleases}} | {{if $canReadReleases}} | ||||
<div class="gt-df"> | |||||
<div class="gt-f1 gt-df gt-ac"> | |||||
<div class="tw-flex"> | |||||
<div class="tw-flex-1 tw-flex tw-content-center"> | |||||
<h2 class="ui compact small menu header small-menu-items"> | <h2 class="ui compact small menu header small-menu-items"> | ||||
<a class="{{if and .PageIsReleaseList (not .PageIsSingleTag)}}active {{end}}item" href="{{.RepoLink}}/releases">{{ctx.Locale.PrettyNumber .NumReleases}} {{ctx.Locale.TrN .NumReleases "repo.release" "repo.releases"}}</a> | <a class="{{if and .PageIsReleaseList (not .PageIsSingleTag)}}active {{end}}item" href="{{.RepoLink}}/releases">{{ctx.Locale.PrettyNumber .NumReleases}} {{ctx.Locale.TrN .NumReleases "repo.release" "repo.releases"}}</a> | ||||
{{if $canReadCode}} | {{if $canReadCode}} |
<p> | <p> | ||||
{{ctx.Locale.Tr "repo.settings.default_branch_desc"}} | {{ctx.Locale.Tr "repo.settings.default_branch_desc"}} | ||||
</p> | </p> | ||||
<form class="gt-df" action="{{.Link}}" method="post"> | |||||
<form class="tw-flex" action="{{.Link}}" method="post"> | |||||
{{.CsrfTokenHtml}} | {{.CsrfTokenHtml}} | ||||
<input type="hidden" name="action" value="default_branch"> | <input type="hidden" name="action" value="default_branch"> | ||||
{{if not .Repository.IsEmpty}} | {{if not .Repository.IsEmpty}} | ||||
<div class="ui dropdown selection search gt-f1 gt-mr-3 tw-max-w-96"> | |||||
<div class="ui dropdown selection search tw-flex-1 gt-mr-3 tw-max-w-96"> | |||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}} | {{svg "octicon-triangle-down" 14 "dropdown icon"}} | ||||
<input type="hidden" name="branch" value="{{.Repository.DefaultBranch}}"> | <input type="hidden" name="branch" value="{{.Repository.DefaultBranch}}"> | ||||
<div class="default text">{{.Repository.DefaultBranch}}</div> | <div class="default text">{{.Repository.DefaultBranch}}</div> | ||||
<div class="ui attached segment"> | <div class="ui attached segment"> | ||||
<div class="flex-list"> | <div class="flex-list"> | ||||
{{range .ProtectedBranches}} | {{range .ProtectedBranches}} | ||||
<div class="flex-item gt-ac"> | |||||
<div class="flex-item tw-content-center"> | |||||
<div class="flex-item-main"> | <div class="flex-item-main"> | ||||
<div class="flex-item-title"> | <div class="flex-item-title"> | ||||
<div class="ui basic primary label">{{.RuleName}}</div> | <div class="ui basic primary label">{{.RuleName}}</div> |
<div class="ui attached segment"> | <div class="ui attached segment"> | ||||
<div class="flex-list"> | <div class="flex-list"> | ||||
{{range .Collaborators}} | {{range .Collaborators}} | ||||
<div class="flex-item gt-ac"> | |||||
<div class="flex-item tw-content-center"> | |||||
<div class="flex-item-leading"> | <div class="flex-item-leading"> | ||||
<a href="{{.HomeLink}}">{{ctx.AvatarUtils.Avatar . 32}}</a> | <a href="{{.HomeLink}}">{{ctx.AvatarUtils.Avatar . 32}}</a> | ||||
</div> | </div> | ||||
<div class="ui bottom attached segment"> | <div class="ui bottom attached segment"> | ||||
<form class="ui form" id="repo-collab-form" action="{{.Link}}" method="post"> | <form class="ui form" id="repo-collab-form" action="{{.Link}}" method="post"> | ||||
{{.CsrfTokenHtml}} | {{.CsrfTokenHtml}} | ||||
<div id="search-user-box" class="ui search input gt-vm"> | |||||
<div id="search-user-box" class="ui search input tw-align-middle"> | |||||
<input class="prompt" name="collaborator" placeholder="{{ctx.Locale.Tr "search.team_kind"}}" autocomplete="off" autofocus required> | <input class="prompt" name="collaborator" placeholder="{{ctx.Locale.Tr "search.team_kind"}}" autocomplete="off" autofocus required> | ||||
</div> | </div> | ||||
<button class="ui primary button">{{ctx.Locale.Tr "repo.settings.add_collaborator"}}</button> | <button class="ui primary button">{{ctx.Locale.Tr "repo.settings.add_collaborator"}}</button> | ||||
{{if $allowedToChangeTeams}} | {{if $allowedToChangeTeams}} | ||||
<form class="ui form" id="repo-collab-team-form" action="{{.Link}}/team" method="post"> | <form class="ui form" id="repo-collab-team-form" action="{{.Link}}/team" method="post"> | ||||
{{.CsrfTokenHtml}} | {{.CsrfTokenHtml}} | ||||
<div id="search-team-box" class="ui search input gt-vm" data-org-name="{{.OrgName}}"> | |||||
<div id="search-team-box" class="ui search input tw-align-middle" data-org-name="{{.OrgName}}"> | |||||
<input class="prompt" name="team" placeholder="{{ctx.Locale.Tr "search.team_kind"}}" autocomplete="off" autofocus required> | <input class="prompt" name="team" placeholder="{{ctx.Locale.Tr "search.team_kind"}}" autocomplete="off" autofocus required> | ||||
</div> | </div> | ||||
<button class="ui primary button">{{ctx.Locale.Tr "repo.settings.add_team"}}</button> | <button class="ui primary button">{{ctx.Locale.Tr "repo.settings.add_team"}}</button> |
{{range .Hooks}} | {{range .Hooks}} | ||||
<div class="item truncated-item-container"> | <div class="item truncated-item-container"> | ||||
<span class="text {{if .IsActive}}green{{else}}grey{{end}} gt-mr-3">{{svg "octicon-dot-fill" 22}}</span> | <span class="text {{if .IsActive}}green{{else}}grey{{end}} gt-mr-3">{{svg "octicon-dot-fill" 22}}</span> | ||||
<span class="text truncate gt-f1 gt-mr-3">{{.Name}}</span> | |||||
<span class="text truncate tw-flex-1 gt-mr-3">{{.Name}}</span> | |||||
<a class="muted tw-float-right gt-p-3" href="{{$.RepoLink}}/settings/hooks/git/{{.Name|PathEscape}}"> | <a class="muted tw-float-right gt-p-3" href="{{$.RepoLink}}/settings/hooks/git/{{.Name|PathEscape}}"> | ||||
{{svg "octicon-pencil"}} | {{svg "octicon-pencil"}} | ||||
</a> | </a> |
<td>{{ctx.Locale.Tr "repo.settings.mirror_settings.direction.pull"}}</td> | <td>{{ctx.Locale.Tr "repo.settings.mirror_settings.direction.pull"}}</td> | ||||
<td>{{DateTime "full" .PullMirror.UpdatedUnix}}</td> | <td>{{DateTime "full" .PullMirror.UpdatedUnix}}</td> | ||||
<td class="right aligned"> | <td class="right aligned"> | ||||
<form method="post" class="gt-dib"> | |||||
<form method="post" class="tw-inline-block"> | |||||
{{.CsrfTokenHtml}} | {{.CsrfTokenHtml}} | ||||
<input type="hidden" name="action" value="mirror-sync"> | <input type="hidden" name="action" value="mirror-sync"> | ||||
<button class="ui primary tiny button inline text-thin">{{ctx.Locale.Tr "repo.settings.sync_mirror"}}</button> | <button class="ui primary tiny button inline text-thin">{{ctx.Locale.Tr "repo.settings.sync_mirror"}}</button> | ||||
> | > | ||||
{{svg "octicon-pencil" 14}} | {{svg "octicon-pencil" 14}} | ||||
</button> | </button> | ||||
<form method="post" class="gt-dib"> | |||||
<form method="post" class="tw-inline-block"> | |||||
{{$.CsrfTokenHtml}} | {{$.CsrfTokenHtml}} | ||||
<input type="hidden" name="action" value="push-mirror-sync"> | <input type="hidden" name="action" value="push-mirror-sync"> | ||||
<input type="hidden" name="push_mirror_id" value="{{.ID}}"> | <input type="hidden" name="push_mirror_id" value="{{.ID}}"> | ||||
<button class="ui primary tiny button" data-tooltip-content="{{ctx.Locale.Tr "repo.settings.sync_mirror"}}">{{svg "octicon-sync" 14}}</button> | <button class="ui primary tiny button" data-tooltip-content="{{ctx.Locale.Tr "repo.settings.sync_mirror"}}">{{svg "octicon-sync" 14}}</button> | ||||
</form> | </form> | ||||
<form method="post" class="gt-dib"> | |||||
<form method="post" class="tw-inline-block"> | |||||
{{$.CsrfTokenHtml}} | {{$.CsrfTokenHtml}} | ||||
<input type="hidden" name="action" value="push-mirror-remove"> | <input type="hidden" name="action" value="push-mirror-remove"> | ||||
<input type="hidden" name="push_mirror_id" value="{{.ID}}"> | <input type="hidden" name="push_mirror_id" value="{{.ID}}"> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
{{if not .Repository.IsMirror}} | {{if not .Repository.IsMirror}} | ||||
<div class="flex-item gt-ac"> | |||||
<div class="flex-item tw-content-center"> | |||||
<div class="flex-item-main"> | <div class="flex-item-main"> | ||||
{{if .Repository.IsArchived}} | {{if .Repository.IsArchived}} | ||||
<div class="flex-item-title">{{ctx.Locale.Tr "repo.settings.unarchive.header"}}</div> | <div class="flex-item-title">{{ctx.Locale.Tr "repo.settings.unarchive.header"}}</div> |
</td> | </td> | ||||
<td class="right aligned"> | <td class="right aligned"> | ||||
<a class="ui tiny primary button" href="{{$.RepoLink}}/settings/tags/{{.ID}}">{{ctx.Locale.Tr "edit"}}</a> | <a class="ui tiny primary button" href="{{$.RepoLink}}/settings/tags/{{.ID}}">{{ctx.Locale.Tr "edit"}}</a> | ||||
<form class="gt-dib" action="{{$.RepoLink}}/settings/tags/delete" method="post"> | |||||
<form class="tw-inline-block" action="{{$.RepoLink}}/settings/tags/delete" method="post"> | |||||
{{$.CsrfTokenHtml}} | {{$.CsrfTokenHtml}} | ||||
<input type="hidden" name="id" value="{{.ID}}"> | <input type="hidden" name="id" value="{{.ID}}"> | ||||
<button class="ui tiny red button">{{ctx.Locale.Tr "remove"}}</button> | <button class="ui tiny red button">{{ctx.Locale.Tr "remove"}}</button> |
{{range .Webhooks}} | {{range .Webhooks}} | ||||
<div class="item truncated-item-container"> | <div class="item truncated-item-container"> | ||||
<span class="text {{if eq .LastStatus 1}}green{{else if eq .LastStatus 2}}red{{else}}grey{{end}} gt-mr-3">{{svg "octicon-dot-fill" 22}}</span> | <span class="text {{if eq .LastStatus 1}}green{{else if eq .LastStatus 2}}red{{else}}grey{{end}} gt-mr-3">{{svg "octicon-dot-fill" 22}}</span> | ||||
<div class="text truncate gt-f1 gt-mr-3"> | |||||
<div class="text truncate tw-flex-1 gt-mr-3"> | |||||
<a title="{{.URL}}" href="{{$.BaseLink}}/{{.ID}}">{{.URL}}</a> | <a title="{{.URL}}" href="{{$.BaseLink}}/{{.ID}}">{{.URL}}</a> | ||||
</div> | </div> | ||||
<a class="muted gt-p-3" href="{{$.BaseLink}}/{{.ID}}">{{svg "octicon-pencil"}}</a> | <a class="muted gt-p-3" href="{{$.BaseLink}}/{{.ID}}">{{svg "octicon-pencil"}}</a> |
<div class="ui list"> | <div class="ui list"> | ||||
{{range .History}} | {{range .History}} | ||||
<div class="item"> | <div class="item"> | ||||
<div class="flex-text-block gt-sb"> | |||||
<div class="flex-text-block tw-justify-between"> | |||||
<div class="flex-text-inline"> | <div class="flex-text-inline"> | ||||
{{if .IsSucceed}} | {{if .IsSucceed}} | ||||
<span class="text green">{{svg "octicon-check"}}</span> | <span class="text green">{{svg "octicon-check"}}</span> |
{{template "base/alert" .}} | {{template "base/alert" .}} | ||||
{{template "repo/release_tag_header" .}} | {{template "repo/release_tag_header" .}} | ||||
<h4 class="ui top attached header"> | <h4 class="ui top attached header"> | ||||
<div class="five wide column gt-df gt-ac"> | |||||
<div class="five wide column tw-flex tw-content-center"> | |||||
{{svg "octicon-tag" 16 "gt-mr-2"}}{{ctx.Locale.Tr "repo.release.tags"}} | {{svg "octicon-tag" 16 "gt-mr-2"}}{{ctx.Locale.Tr "repo.release.tags"}} | ||||
</div> | </div> | ||||
</h4> | </h4> | ||||
<td class="tag"> | <td class="tag"> | ||||
<h3 class="release-tag-name gt-mb-3"> | <h3 class="release-tag-name gt-mb-3"> | ||||
{{if $canReadReleases}} | {{if $canReadReleases}} | ||||
<a class="gt-df gt-ac" href="{{$.RepoLink}}/releases/tag/{{.TagName | PathEscapeSegments}}" rel="nofollow">{{.TagName}}</a> | |||||
<a class="tw-flex tw-content-center" href="{{$.RepoLink}}/releases/tag/{{.TagName | PathEscapeSegments}}" rel="nofollow">{{.TagName}}</a> | |||||
{{else}} | {{else}} | ||||
<a class="gt-df gt-ac" href="{{$.RepoLink}}/src/tag/{{.TagName | PathEscapeSegments}}" rel="nofollow">{{.TagName}}</a> | |||||
<a class="tw-flex tw-content-center" href="{{$.RepoLink}}/src/tag/{{.TagName | PathEscapeSegments}}" rel="nofollow">{{.TagName}}</a> | |||||
{{end}} | {{end}} | ||||
</h3> | </h3> | ||||
<div class="download gt-df gt-ac"> | |||||
<div class="download tw-flex tw-content-center"> | |||||
{{if $.Permission.CanRead $.UnitTypeCode}} | {{if $.Permission.CanRead $.UnitTypeCode}} | ||||
{{if .CreatedUnix}} | {{if .CreatedUnix}} | ||||
<span class="gt-mr-3">{{svg "octicon-clock" 16 "gt-mr-2"}}{{TimeSinceUnix .CreatedUnix ctx.Locale}}</span> | <span class="gt-mr-3">{{svg "octicon-clock" 16 "gt-mr-2"}}{{TimeSinceUnix .CreatedUnix ctx.Locale}}</span> |
</div> | </div> | ||||
{{end}} | {{end}} | ||||
<h4 class="file-header ui top attached header gt-df gt-ac gt-sb gt-fw"> | |||||
<div class="file-header-left gt-df gt-ac gt-py-3 gt-pr-4"> | |||||
<h4 class="file-header ui top attached header tw-flex tw-content-center tw-justify-between tw-flex-wrap"> | |||||
<div class="file-header-left tw-flex tw-content-center gt-py-3 gt-pr-4"> | |||||
{{if .ReadmeInList}} | {{if .ReadmeInList}} | ||||
{{svg "octicon-book" 16 "gt-mr-3"}} | {{svg "octicon-book" 16 "gt-mr-3"}} | ||||
<strong><a class="default-link muted" href="#readme">{{.FileName}}</a></strong> | <strong><a class="default-link muted" href="#readme">{{.FileName}}</a></strong> | ||||
{{template "repo/file_info" .}} | {{template "repo/file_info" .}} | ||||
{{end}} | {{end}} | ||||
</div> | </div> | ||||
<div class="file-header-right file-actions gt-df gt-ac gt-fw"> | |||||
<div class="file-header-right file-actions tw-flex tw-content-center tw-flex-wrap"> | |||||
{{if .HasSourceRenderedToggle}} | {{if .HasSourceRenderedToggle}} | ||||
<div class="ui compact icon buttons"> | <div class="ui compact icon buttons"> | ||||
<a href="?display=source" class="ui mini basic button {{if .IsDisplayingSource}}active{{end}}" data-tooltip-content="{{ctx.Locale.Tr "repo.file_view_source"}}">{{svg "octicon-code" 15}}</a> | <a href="?display=source" class="ui mini basic button {{if .IsDisplayingSource}}active{{end}}" data-tooltip-content="{{ctx.Locale.Tr "repo.file_view_source"}}">{{svg "octicon-code" 15}}</a> |
{{template "repo/header" .}} | {{template "repo/header" .}} | ||||
<div class="ui container"> | <div class="ui container"> | ||||
{{template "base/alert" .}} | {{template "base/alert" .}} | ||||
<div class="ui header flex-text-block gt-sb"> | |||||
<div class="ui header flex-text-block tw-justify-between"> | |||||
{{ctx.Locale.Tr "repo.wiki.new_page"}} | {{ctx.Locale.Tr "repo.wiki.new_page"}} | ||||
{{if .PageIsWikiEdit}} | {{if .PageIsWikiEdit}} | ||||
<a class="ui tiny primary button" href="{{.RepoLink}}/wiki?action=_new">{{ctx.Locale.Tr "repo.wiki.new_page_button"}}</a> | <a class="ui tiny primary button" href="{{.RepoLink}}/wiki?action=_new">{{ctx.Locale.Tr "repo.wiki.new_page_button"}}</a> |
<div role="main" aria-label="{{.Title}}" class="page-content repository wiki pages"> | <div role="main" aria-label="{{.Title}}" class="page-content repository wiki pages"> | ||||
{{template "repo/header" .}} | {{template "repo/header" .}} | ||||
<div class="ui container"> | <div class="ui container"> | ||||
<h2 class="ui header gt-df gt-ac gt-sb"> | |||||
<h2 class="ui header tw-flex tw-content-center tw-justify-between"> | |||||
<span>{{ctx.Locale.Tr "repo.wiki.pages"}}</span> | <span>{{ctx.Locale.Tr "repo.wiki.pages"}}</span> | ||||
<span> | <span> | ||||
{{if and .CanWriteWiki (not .Repository.IsMirror)}} | {{if and .CanWriteWiki (not .Repository.IsMirror)}} |
{{$title := .title}} | {{$title := .title}} | ||||
<div class="ui container"> | <div class="ui container"> | ||||
<div class="repo-button-row"> | <div class="repo-button-row"> | ||||
<div class="gt-df gt-ac"> | |||||
<div class="tw-flex tw-content-center"> | |||||
<div class="ui floating filter dropdown" data-no-results="{{ctx.Locale.Tr "no_results_found"}}"> | <div class="ui floating filter dropdown" data-no-results="{{ctx.Locale.Tr "no_results_found"}}"> | ||||
<div class="ui basic small button"> | <div class="ui basic small button"> | ||||
<span class="text"> | <span class="text"> |
{{template "base/disable_form_autofill"}} | {{template "base/disable_form_autofill"}} | ||||
{{.CsrfTokenHtml}} | {{.CsrfTokenHtml}} | ||||
<div class="runner-basic-info"> | <div class="runner-basic-info"> | ||||
<div class="field gt-dib gt-mr-4"> | |||||
<div class="field tw-inline-block gt-mr-4"> | |||||
<label>{{ctx.Locale.Tr "actions.runners.status"}}</label> | <label>{{ctx.Locale.Tr "actions.runners.status"}}</label> | ||||
<span class="ui {{if .Runner.IsOnline}}green{{else}}basic{{end}} label">{{.Runner.StatusLocaleName ctx.Locale}}</span> | <span class="ui {{if .Runner.IsOnline}}green{{else}}basic{{end}} label">{{.Runner.StatusLocaleName ctx.Locale}}</span> | ||||
</div> | </div> | ||||
<div class="field gt-dib gt-mr-4"> | |||||
<div class="field tw-inline-block gt-mr-4"> | |||||
<label>{{ctx.Locale.Tr "actions.runners.last_online"}}</label> | <label>{{ctx.Locale.Tr "actions.runners.last_online"}}</label> | ||||
<span>{{if .Runner.LastOnline}}{{TimeSinceUnix .Runner.LastOnline ctx.Locale}}{{else}}{{ctx.Locale.Tr "never"}}{{end}}</span> | <span>{{if .Runner.LastOnline}}{{TimeSinceUnix .Runner.LastOnline ctx.Locale}}{{else}}{{ctx.Locale.Tr "never"}}{{end}}</span> | ||||
</div> | </div> | ||||
<div class="field gt-dib gt-mr-4"> | |||||
<div class="field tw-inline-block gt-mr-4"> | |||||
<label>{{ctx.Locale.Tr "actions.runners.labels"}}</label> | <label>{{ctx.Locale.Tr "actions.runners.labels"}}</label> | ||||
<span> | <span> | ||||
{{range .Runner.AgentLabels}} | {{range .Runner.AgentLabels}} | ||||
{{end}} | {{end}} | ||||
</span> | </span> | ||||
</div> | </div> | ||||
<div class="field gt-dib gt-mr-4"> | |||||
<div class="field tw-inline-block gt-mr-4"> | |||||
<label>{{ctx.Locale.Tr "actions.runners.owner_type"}}</label> | <label>{{ctx.Locale.Tr "actions.runners.owner_type"}}</label> | ||||
<span data-tooltip-content="{{.Runner.BelongsToOwnerName}}">{{.Runner.BelongsToOwnerType.LocaleString ctx.Locale}}</span> | <span data-tooltip-content="{{.Runner.BelongsToOwnerName}}">{{.Runner.BelongsToOwnerType.LocaleString ctx.Locale}}</span> | ||||
</div> | </div> |
<div class="flex-text-block gt-fw"> | |||||
<div class="flex-text-block tw-flex-wrap"> | |||||
{{range $term := .SearchResultLanguages}} | {{range $term := .SearchResultLanguages}} | ||||
<a class="ui {{if eq $.Language $term.Language}}primary{{end}} basic label gt-m-0" | <a class="ui {{if eq $.Language $term.Language}}primary{{end}} basic label gt-m-0" | ||||
href="?q={{$.Keyword}}{{if ne $.Language $term.Language}}&l={{$term.Language}}{{end}}&fuzzy={{$.IsFuzzy}}"> | href="?q={{$.Keyword}}{{if ne $.Language $term.Language}}&l={{$term.Language}}{{end}}&fuzzy={{$.IsFuzzy}}"> | ||||
{{range $result := .SearchResults}} | {{range $result := .SearchResults}} | ||||
{{$repo := or $.Repo (index $.RepoMaps .RepoID)}} | {{$repo := or $.Repo (index $.RepoMaps .RepoID)}} | ||||
<div class="diff-file-box diff-box file-content non-diff-file-content repo-search-result"> | <div class="diff-file-box diff-box file-content non-diff-file-content repo-search-result"> | ||||
<h4 class="ui top attached normal header gt-df gt-fw"> | |||||
<h4 class="ui top attached normal header tw-flex tw-flex-wrap"> | |||||
{{if not $.Repo}} | {{if not $.Repo}} | ||||
<span class="file gt-f1"> | |||||
<span class="file tw-flex-1"> | |||||
<a rel="nofollow" href="{{$repo.Link}}">{{$repo.FullName}}</a> | <a rel="nofollow" href="{{$repo.Link}}">{{$repo.FullName}}</a> | ||||
{{if $repo.IsArchived}} | {{if $repo.IsArchived}} | ||||
<span class="ui basic label">{{ctx.Locale.Tr "repo.desc.archived"}}</span> | <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.archived"}}</span> | ||||
- {{.Filename}} | - {{.Filename}} | ||||
</span> | </span> | ||||
{{else}} | {{else}} | ||||
<span class="file gt-f1">{{.Filename}}</span> | |||||
<span class="file tw-flex-1">{{.Filename}}</span> | |||||
{{end}} | {{end}} | ||||
<a role="button" class="ui basic tiny button" rel="nofollow" href="{{$repo.Link}}/src/commit/{{$result.CommitID | PathEscape}}/{{.Filename | PathEscapeSegments}}">{{ctx.Locale.Tr "repo.diff.view_file"}}</a> | <a role="button" class="ui basic tiny button" rel="nofollow" href="{{$repo.Link}}/src/commit/{{$result.CommitID | PathEscape}}/{{.Filename | PathEscapeSegments}}">{{ctx.Locale.Tr "repo.diff.view_file"}}</a> | ||||
</h4> | </h4> |
<div class="ui bottom attached table segment gt-df gt-ac gt-sb"> | |||||
<div class="gt-df gt-ac gt-ml-4"> | |||||
<div class="ui bottom attached table segment tw-flex tw-content-center tw-justify-between"> | |||||
<div class="tw-flex tw-content-center gt-ml-4"> | |||||
{{if .result.Language}} | {{if .result.Language}} | ||||
<i class="color-icon gt-mr-3" style="background-color: {{.result.Color}}"></i>{{.result.Language}} | <i class="color-icon gt-mr-3" style="background-color: {{.result.Color}}"></i>{{.result.Language}} | ||||
{{end}} | {{end}} |
{{if .Secrets}} | {{if .Secrets}} | ||||
<div class="flex-list"> | <div class="flex-list"> | ||||
{{range .Secrets}} | {{range .Secrets}} | ||||
<div class="flex-item gt-ac"> | |||||
<div class="flex-item tw-content-center"> | |||||
<div class="flex-item-leading"> | <div class="flex-item-leading"> | ||||
{{svg "octicon-key" 32}} | {{svg "octicon-key" 32}} | ||||
</div> | </div> |
<div class="ui container"> | <div class="ui container"> | ||||
<div class="ui vertically grid head"> | <div class="ui vertically grid head"> | ||||
<div class="column"> | <div class="column"> | ||||
<div class="ui header gt-df gt-ac gt-word-break"> | |||||
<div class="ui header tw-flex tw-content-center gt-word-break"> | |||||
{{ctx.AvatarUtils.Avatar . 100}} | {{ctx.AvatarUtils.Avatar . 100}} | ||||
<span class="text thin grey"><a href="{{.HomeLink}}">{{.DisplayName}}</a></span> | <span class="text thin grey"><a href="{{.HomeLink}}">{{.DisplayName}}</a></span> | ||||
<span class="org-visibility"> | <span class="org-visibility"> |
<div id="profile-avatar-card" class="ui card"> | <div id="profile-avatar-card" class="ui card"> | ||||
<div id="profile-avatar" class="content gt-df"> | |||||
<div id="profile-avatar" class="content tw-flex"> | |||||
{{if eq .SignedUserID .ContextUser.ID}} | {{if eq .SignedUserID .ContextUser.ID}} | ||||
<a class="image" href="{{AppSubUrl}}/user/settings" data-tooltip-content="{{ctx.Locale.Tr "user.change_avatar"}}"> | <a class="image" href="{{AppSubUrl}}/user/settings" data-tooltip-content="{{ctx.Locale.Tr "user.change_avatar"}}"> | ||||
{{/* the size doesn't take affect (and no need to take affect), image size(width) should be controlled by the parent container since this is not a flex layout*/}} | {{/* the size doesn't take affect (and no need to take affect), image size(width) should be controlled by the parent container since this is not a flex layout*/}} | ||||
{{if .ContextUser.Location}} | {{if .ContextUser.Location}} | ||||
<li> | <li> | ||||
{{svg "octicon-location"}} | {{svg "octicon-location"}} | ||||
<span class="gt-f1">{{.ContextUser.Location}}</span> | |||||
<span class="tw-flex-1">{{.ContextUser.Location}}</span> | |||||
{{if .ContextUserLocationMapURL}} | {{if .ContextUserLocationMapURL}} | ||||
<a href="{{.ContextUserLocationMapURL}}" rel="nofollow noreferrer" data-tooltip-content="{{ctx.Locale.Tr "user.show_on_map"}}"> | <a href="{{.ContextUserLocationMapURL}}" rel="nofollow noreferrer" data-tooltip-content="{{ctx.Locale.Tr "user.show_on_map"}}"> | ||||
{{svg "octicon-link-external"}} | {{svg "octicon-link-external"}} | ||||
{{if (eq .SignedUserID .ContextUser.ID)}} | {{if (eq .SignedUserID .ContextUser.ID)}} | ||||
<li> | <li> | ||||
{{svg "octicon-mail"}} | {{svg "octicon-mail"}} | ||||
<a class="gt-f1" href="mailto:{{.ContextUser.Email}}" rel="nofollow">{{.ContextUser.Email}}</a> | |||||
<a class="tw-flex-1" href="mailto:{{.ContextUser.Email}}" rel="nofollow">{{.ContextUser.Email}}</a> | |||||
<a href="{{AppSubUrl}}/user/settings#privacy-user-settings"> | <a href="{{AppSubUrl}}/user/settings#privacy-user-settings"> | ||||
{{if .ShowUserEmail}} | {{if .ShowUserEmail}} | ||||
<i data-tooltip-content="{{ctx.Locale.Tr "user.email_visibility.limited"}}"> | <i data-tooltip-content="{{ctx.Locale.Tr "user.email_visibility.limited"}}"> |
{{if .Variables}} | {{if .Variables}} | ||||
<div class="flex-list"> | <div class="flex-list"> | ||||
{{range .Variables}} | {{range .Variables}} | ||||
<div class="flex-item gt-ac"> | |||||
<div class="flex-item tw-content-center"> | |||||
<div class="flex-item-leading"> | <div class="flex-item-leading"> | ||||
{{svg "octicon-pencil" 32}} | {{svg "octicon-pencil" 32}} | ||||
</div> | </div> |
<body> | <body> | ||||
<div class="full height"> | <div class="full height"> | ||||
<nav class="ui secondary menu"> | <nav class="ui secondary menu"> | ||||
<div class="ui container gt-df"> | |||||
<div class="item gt-f1"> | |||||
<div class="ui container tw-flex"> | |||||
<div class="item tw-flex-1"> | |||||
<a href="{{AppSubUrl}}/" aria-label="{{ctx.Locale.Tr "home"}}"> | <a href="{{AppSubUrl}}/" aria-label="{{ctx.Locale.Tr "home"}}"> | ||||
<img width="30" height="30" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}" aria-hidden="true"> | <img width="30" height="30" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}" aria-hidden="true"> | ||||
</a> | </a> |
{{ctx.Locale.Tr "sign_in_or"}} | {{ctx.Locale.Tr "sign_in_or"}} | ||||
</div> | </div> | ||||
<div id="oauth2-login-navigator" class="gt-py-2"> | <div id="oauth2-login-navigator" class="gt-py-2"> | ||||
<div class="gt-df gt-fc gt-jc"> | |||||
<div id="oauth2-login-navigator-inner" class="gt-df gt-fc gt-fw gt-ac gt-gap-3"> | |||||
<div class="tw-flex tw-flex-col tw-justify-center"> | |||||
<div id="oauth2-login-navigator-inner" class="tw-flex tw-flex-col tw-flex-wrap tw-content-center gt-gap-3"> | |||||
{{range $provider := .OAuth2Providers}} | {{range $provider := .OAuth2Providers}} | ||||
<a class="{{$provider.Name}} ui button gt-df gt-ac gt-jc gt-py-3 tw-w-full oauth-login-link" href="{{AppSubUrl}}/user/oauth2/{{$provider.DisplayName}}"> | |||||
<a class="{{$provider.Name}} ui button tw-flex tw-content-center tw-justify-center gt-py-3 tw-w-full oauth-login-link" href="{{AppSubUrl}}/user/oauth2/{{$provider.DisplayName}}"> | |||||
{{$provider.IconHTML 28}} | {{$provider.IconHTML 28}} | ||||
{{ctx.Locale.Tr "sign_in_with_provider" $provider.DisplayName}} | {{ctx.Locale.Tr "sign_in_with_provider" $provider.DisplayName}} | ||||
</a> | </a> |
{{ctx.Locale.Tr "sign_in_or"}} | {{ctx.Locale.Tr "sign_in_or"}} | ||||
</div> | </div> | ||||
<div id="oauth2-login-navigator" class="gt-py-2"> | <div id="oauth2-login-navigator" class="gt-py-2"> | ||||
<div class="gt-df gt-fc gt-jc"> | |||||
<div id="oauth2-login-navigator-inner" class="gt-df gt-fc gt-fw gt-ac gt-gap-3"> | |||||
<div class="tw-flex tw-flex-col tw-justify-center"> | |||||
<div id="oauth2-login-navigator-inner" class="tw-flex tw-flex-col tw-flex-wrap tw-content-center gt-gap-3"> | |||||
{{range $provider := .OAuth2Providers}} | {{range $provider := .OAuth2Providers}} | ||||
<a class="{{$provider.Name}} ui button gt-df gt-ac gt-jc gt-py-3 tw-w-full oauth-login-link" href="{{AppSubUrl}}/user/oauth2/{{$provider.DisplayName}}"> | |||||
<a class="{{$provider.Name}} ui button tw-flex tw-content-center tw-justify-center gt-py-3 tw-w-full oauth-login-link" href="{{AppSubUrl}}/user/oauth2/{{$provider.DisplayName}}"> | |||||
{{$provider.IconHTML 28}} | {{$provider.IconHTML 28}} | ||||
{{ctx.Locale.Tr "sign_in_with_provider" $provider.DisplayName}} | {{ctx.Locale.Tr "sign_in_with_provider" $provider.DisplayName}} | ||||
</a> | </a> |
{{template "base/alert" .}} | {{template "base/alert" .}} | ||||
<p>{{ctx.Locale.Tr "webauthn_sign_in"}}</p> | <p>{{ctx.Locale.Tr "webauthn_sign_in"}}</p> | ||||
</div> | </div> | ||||
<div class="ui attached segment gt-df gt-ac gt-jc gt-gap-2 gt-py-3"> | |||||
<div class="ui attached segment tw-flex tw-content-center tw-justify-center gt-gap-2 gt-py-3"> | |||||
<div class="is-loading" style="width: 40px; height: 40px"></div> | <div class="is-loading" style="width: 40px; height: 40px"></div> | ||||
{{ctx.Locale.Tr "webauthn_press_button"}} | {{ctx.Locale.Tr "webauthn_press_button"}} | ||||
</div> | </div> |