jojo/templates/repo/issue/view_content.tmpl

186 lines
8 KiB
Go HTML Template
Raw Normal View History

<div class="issue-content">
<!-- I know, there is probably a better way to do this (moved from sidebar.tmpl, original author: 6543 @ 2021-02-28) -->
<!-- Agree, there should be a better way, eg: introduce window.config.pageData (original author: wxiaoguang @ 2021-09-05) -->
<input type="hidden" id="repolink" value="{{$.RepoRelPath}}">
<input type="hidden" id="repoId" value="{{.Repository.ID}}">
<input type="hidden" id="issueIndex" value="{{.Issue.Index}}">
<input type="hidden" id="type" value="{{.IssueType}}">
{{$createdStr:= DateUtils.TimeSince .Issue.CreatedUnix}}
<div class="issue-content-left comment-list prevent-before-timeline">
<div class="ui timeline">
<div id="{{.Issue.HashTag}}" class="timeline-item comment first">
{{if .Issue.OriginalAuthor}}
<span class="timeline-avatar">
{{ctx.AvatarUtils.Avatar nil 40}}
</span>
{{else}}
<a class="timeline-avatar" {{if gt .Issue.Poster.ID 0}}href="{{.Issue.Poster.HomeLink}}"{{end}}>
{{ctx.AvatarUtils.Avatar .Issue.Poster 40}}
</a>
{{end}}
<div class="content comment-container">
<div class="ui top attached header comment-header tw-flex tw-items-center tw-justify-between" role="heading" aria-level="3">
<div class="comment-header-left tw-flex tw-items-center">
{{if .Issue.OriginalAuthor}}
<span class="text black tw-font-semibold">
{{svg (MigrationIcon .Repository.GetOriginalURLHostname)}}
{{.Issue.OriginalAuthor}}
</span>
<span class="text grey muted-links">
{{ctx.Locale.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr}}
</span>
<span class="text migrate">
{{if .Repository.OriginalURL}} ({{ctx.Locale.Tr "repo.migrated_from" .Repository.OriginalURL .Repository.GetOriginalURLHostname}}){{end}}
</span>
{{else}}
Improve UI on mobile (#19546) Start making the mobile experience not painful and be actually usable. This contains a few smaller changes to enhance this experience. - Submit buttons on the review forms aren't columns anymore and are now allowed to be displayed on one row. - The label/milestone & New Issue buttons were given each own row even tough, there's enough place to do it one the same row. This commit fixes that. - The issues+Pull tab on repo's has a third item besides the label/milestone & New Issue buttons, the search bar. On desktop there's enough place to do this on one row, for mobile it isn't, currently it was using for each item a new row. This commits fixes that by only giving the searchbar a new row and have the other two buttons on the same row. - The notification table will now be show a scrollbar instead of overflow. - The repo buttons(Watch, Star, Fork) on mobile were showing quite big and the SVG wasn't even displayed on the same line, if the count of those numbers were too high it would even overflow. This commit removes the SVG, as there isn't any place to show them on the same row and allows them to have a new row if the counts of those buttons are high. - The admin page can show you a lot of interesting information, on mobile the System Status + Configuration weren't properly displayed as the margin's were too high. This commit fixes that by reducing the margin to a number that makes sense on mobile. - Fixes to not overflow the tables but instead force them to be scrollable. - When viewing a issue or pull request, the comments aren't full-width but instead 80% and aligned to right, on mobile this is a annoyance as there isn't much width to begin with. This commits fixes that by forcing full-width and removing the avatars on the left side and instead including them inline in the comment header.
2022-05-01 16:11:21 +00:00
<a class="inline-timeline-avatar" href="{{.Issue.Poster.HomeLink}}">
{{ctx.AvatarUtils.Avatar .Issue.Poster 24}}
Improve UI on mobile (#19546) Start making the mobile experience not painful and be actually usable. This contains a few smaller changes to enhance this experience. - Submit buttons on the review forms aren't columns anymore and are now allowed to be displayed on one row. - The label/milestone & New Issue buttons were given each own row even tough, there's enough place to do it one the same row. This commit fixes that. - The issues+Pull tab on repo's has a third item besides the label/milestone & New Issue buttons, the search bar. On desktop there's enough place to do this on one row, for mobile it isn't, currently it was using for each item a new row. This commits fixes that by only giving the searchbar a new row and have the other two buttons on the same row. - The notification table will now be show a scrollbar instead of overflow. - The repo buttons(Watch, Star, Fork) on mobile were showing quite big and the SVG wasn't even displayed on the same line, if the count of those numbers were too high it would even overflow. This commit removes the SVG, as there isn't any place to show them on the same row and allows them to have a new row if the counts of those buttons are high. - The admin page can show you a lot of interesting information, on mobile the System Status + Configuration weren't properly displayed as the margin's were too high. This commit fixes that by reducing the margin to a number that makes sense on mobile. - Fixes to not overflow the tables but instead force them to be scrollable. - When viewing a issue or pull request, the comments aren't full-width but instead 80% and aligned to right, on mobile this is a annoyance as there isn't much width to begin with. This commits fixes that by forcing full-width and removing the avatars on the left side and instead including them inline in the comment header.
2022-05-01 16:11:21 +00:00
</a>
<span class="text grey muted-links">
Timeline and color tweaks (#21799) Followup to https://github.com/go-gitea/gitea/pull/21784. - Restore muted effect on timeline author and issuelist comment icon - Remove whitespace inside shared user templates, fixing link hover underline - Use shared author link template more - Use `bold` class instead of CSS - Fix grey-light color being too dark on arc-green - Add missing black-light color - Fix issuelist progress bar color - Fix various other cases of missing `.muted` <img width="416" alt="Screenshot 2022-11-13 at 12 15 22" src="https://user-images.githubusercontent.com/115237/201519497-1d4725c6-bc8b-47b5-9f68-1278ac9a8c92.png"> <img width="324" alt="Screenshot 2022-11-13 at 12 16 52" src="https://user-images.githubusercontent.com/115237/201519501-c0d03700-f9af-4316-ab46-482f2c7c738b.png"> <img width="79" alt="Screenshot 2022-11-13 at 12 30 55" src="https://user-images.githubusercontent.com/115237/201519502-46dc2d73-bbdf-4a2e-84d3-d2976f793163.png"> <img width="440" alt="Screenshot 2022-11-13 at 12 41 03" src="https://user-images.githubusercontent.com/115237/201519876-ada33948-f84a-4aeb-a40d-5c873f9a49e9.png"> <img width="213" alt="Screenshot 2022-11-13 at 12 52 54" src="https://user-images.githubusercontent.com/115237/201520291-a4d7238e-aeca-46c7-9008-8b644b1b676e.png"> <img width="208" alt="Screenshot 2022-11-13 at 12 56 16" src="https://user-images.githubusercontent.com/115237/201520436-aa8ba109-b959-42fb-831a-021e806c7082.png"> Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-11-19 05:02:30 +01:00
{{template "shared/user/authorlink" .Issue.Poster}}
{{ctx.Locale.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr}}
</span>
{{end}}
</div>
<div class="comment-header-right actions tw-flex tw-items-center">
2024-06-24 20:18:27 +05:00
{{template "repo/issue/view_content/show_role" dict "ShowRole" .Issue.ShowRole "IgnorePoster" true "IsPull" .Issue.IsPull}}
{{if not $.Repository.IsArchived}}
{{template "repo/issue/view_content/add_reaction" dict "ctxData" $ "ActionURL" (printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index)}}
{{end}}
{{template "repo/issue/view_content/context_menu" dict "ctxData" $ "item" .Issue "delete" false "issue" true "diff" false "IsCommentPoster" $.IsIssuePoster}}
</div>
</div>
<div class="ui attached segment comment-body" role="article">
<div id="issue-{{.Issue.ID}}-content" class="render-content markup" {{if or $.Permission.IsAdmin $.HasIssuesOrPullsWritePermission $.IsIssuePoster}}data-can-edit="true"{{end}}>
{{if .Issue.RenderedContent}}
{{.Issue.RenderedContent}}
{{else}}
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
{{end}}
</div>
<div id="issue-{{.Issue.ID}}-raw" class="raw-content tw-hidden">{{.Issue.Content}}</div>
<div class="edit-content-zone tw-hidden" data-update-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/content" data-content-version="{{.Issue.ContentVersion}}" data-context="{{.RepoLink}}" data-attachment-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/attachments" data-view-attachment-url="{{$.RepoLink}}/issues/{{.Issue.Index}}/view-attachments"></div>
{{if .Issue.Attachments}}
{{template "repo/issue/view_content/attachments" dict "Attachments" .Issue.Attachments "RenderedContent" .Issue.RenderedContent}}
{{end}}
</div>
{{$reactions := .Issue.Reactions.GroupByType}}
{{if $reactions}}
{{template "repo/issue/view_content/reactions" dict "ctxData" $ "ActionURL" (printf "%s/issues/%d/reactions" $.RepoLink .Issue.Index) "Reactions" $reactions}}
{{end}}
</div>
</div>
2015-08-12 18:44:09 +08:00
{{template "repo/issue/view_content/comments" .}}
<div id="insert-timeline"></div>
2015-08-13 23:21:43 +08:00
2019-01-23 19:58:38 +01:00
{{if and .Issue.IsPull (not $.Repository.IsArchived)}}
{{template "repo/issue/view_content/pull".}}
{{end}}
Show warning in locked issue discussion (#7726) Closes: #7334 ## Checklist The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org). ### Tests - I added test coverage for Go changes... - [ ] in their respective `*_test.go` for unit tests. - [x] in the `tests/integration` directory if it involves interactions with a live Forgejo server. - I added test coverage for JavaScript changes... - [ ] in `web_src/js/*.test.js` if it can be unit tested. - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)). ### Documentation - [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change. - [x] I did not document these changes and I do not expect someone else to do it. ### Release notes - [ ] I do not want this change to show in the release notes. - [x] I want the title to show in the release notes with a link to this pull request. - [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7726 Reviewed-by: 0ko <0ko@noreply.codeberg.org> Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: Lucas Schwiderski <lucas@lschwiderski.de> Co-committed-by: Lucas Schwiderski <lucas@lschwiderski.de>
2025-04-30 14:03:37 +00:00
{{if .Repository.IsArchived}}
<div class="ui warning message tw-text-center">
{{ctx.Locale.Tr "repo.archive.nocomment"}}
</div>
{{else if .IsBlocked}}
<div class="ui warning message">
{{ctx.Locale.Tr "repo.comment.blocked_by_user"}}
</div>
{{else if and .Issue.IsLocked (not (or .IsRepoAdmin .HasIssuesOrPullsWritePermission))}}
<div class="ui warning message">
{{ctx.Locale.Tr "discussion.locked"}}
</div>
{{else if .IsSigned}}
<div class="timeline-item comment form">
<a class="timeline-avatar" href="{{.SignedUser.HomeLink}}">
{{ctx.AvatarUtils.Avatar .SignedUser 40}}
</a>
<div class="content">
<form class="ui segment form form-fetch-action" id="comment-form" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/comments" method="post">
{{template "repo/issue/comment_tab" .}}
<div class="field footer">
feat(ui): implement new buttons for better cohesiveness (#9359) Followup to https://codeberg.org/forgejo/forgejo/pulls/9317#issuecomment-7214470. Summary of changes: - implement new CSS for buttons that doesn't have problems Fomantic buttons have: - button height doesn't depend on it's content - `min-height:` is used instead of `padding-{top,bottom}:` - no margins to fit right in with the other elements while relying on `display:flex` and `flex-gap:` - other `.button` changes compared to `.ui.button`: - no semi-bold black text for now, I think it looks just as fine with normal weight - no variable `font-size` - should give better readability compared to existing `.small` and `.tiny` buttons - variable height depending on specified size (currently normal or `.small`) and on `@media (pointer: )` - apply the new buttons to areas where there are switches or dropdown openers near them Before: - https://codeberg.org/forgejo/forgejo/attachments/8d9a3941-8889-4420-8f4f-f44cb8c3726f - https://codeberg.org/forgejo/forgejo/attachments/e5804fae-a71f-43ba-918b-20d4f742124c - https://codeberg.org/forgejo/forgejo/attachments/65d4e31c-01b7-4050-89a1-4afe74aa574c - https://codeberg.org/forgejo/forgejo/attachments/c8057262-a834-4b61-a87f-70dab60b5506 - https://codeberg.org/forgejo/forgejo/attachments/aa9508e3-dca1-4ffe-913e-9cbddbb0d6ff - https://codeberg.org/forgejo/forgejo/attachments/4b2daa07-e0ca-4b44-8795-1609dff8968f - https://codeberg.org/forgejo/forgejo/attachments/93f7803f-1338-44dc-a428-e44e26231517 After: - https://codeberg.org/forgejo/forgejo/attachments/ca5426c4-d75e-493d-8b29-64eee1e1c9de - https://codeberg.org/forgejo/forgejo/attachments/f21c7219-6880-4a2e-9117-6267d46b3081 - https://codeberg.org/forgejo/forgejo/attachments/da3ee771-b5d5-4b4f-8c88-9a8de11b1a45 - https://codeberg.org/forgejo/forgejo/attachments/56f974c3-f72e-4f80-9bbd-5bc785a4a624 - https://codeberg.org/forgejo/forgejo/attachments/17f6e360-dfe5-4bb6-a6b5-dd747dbc2af8 - https://codeberg.org/forgejo/forgejo/attachments/91cd10e1-6c5e-4134-be4c-18223ed2a4f4 - https://codeberg.org/forgejo/forgejo/attachments/f0322c5c-ee9d-4889-9840-0c46838566cc - https://codeberg.org/forgejo/forgejo/attachments/96560fe7-3436-46dc-8456-c43bfaee2daf - https://codeberg.org/forgejo/forgejo/attachments/273cf795-6bb4-479f-804f-f40010fae825 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9359 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Reviewed-by: Gusted <gusted@noreply.codeberg.org>
2025-10-05 05:22:32 +02:00
<div class="button-sequence tw-justify-end">
{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .DisableStatusChange)}}
{{if .Issue.IsClosed}}
feat(ui): improve close/reopen/comment buttons (#9598) Related: https://codeberg.org/forgejo/forgejo/issues/2650, https://codeberg.org/forgejo/forgejo/pulls/6044 * improve consistency by getting rid of the less usual button kinds * same as changes to profile buttons in https://codeberg.org/forgejo/forgejo/pulls/9359 * transparent outline button is now secondary * bulb-bright red button is now secondary * I think that actions like Close and Reopen shouldn't attract much attention, so they are secondary * add icons to better visually indicate the action * yes this is inspired by GitHub * unlike in GitHub, the icons are monochrome: * colored icons had bad contrast due to buttons being brighter than the usual areas with colored icons * they are not at all common inside of buttons in our UI * convert the buttons to the new CSS * differences are described in https://codeberg.org/forgejo/forgejo/pulls/9359 * a few general CSS improvements * prevent 1px vertical padding on `<button>` provided by browser defaults * wasn't noticed before because no `<buttons>` were converted yet * increased the default gap (for buttons with such icons) to 0.5rem * looks much better than Fomantic's 0.25rem * I took this opportunity because no buttons with icons were converted yet, so there's no blast radius to worry about yet Preview B: https://codeberg.org/attachments/3cdb2fc8-3887-4e82-8213-45dde42a5b33 A: https://codeberg.org/attachments/133b59c2-470f-4f97-8e85-e374e0a0b52e B: https://codeberg.org/attachments/d814d2dc-d2a2-4daf-ba65-70d9097bb046 A: https://codeberg.org/attachments/2f2e0214-33e5-4ca9-a315-21252dc27525 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9598 Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org> Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-10-10 07:11:53 +02:00
<button id="status-button" class="secondary button" data-status="{{ctx.Locale.Tr "repo.issues.reopen_issue"}}" data-status-and-comment="{{ctx.Locale.Tr "repo.issues.reopen_comment_issue"}}" name="status" value="reopen">
{{svg "octicon-issue-reopened"}}
<span>
{{ctx.Locale.Tr "repo.issues.reopen_issue"}}
</span>
</button>
{{else}}
{{$closeTranslationKey := "repo.issues.close"}}
{{if .Issue.IsPull}}
{{$closeTranslationKey = "repo.pulls.close"}}
{{end}}
feat(ui): improve close/reopen/comment buttons (#9598) Related: https://codeberg.org/forgejo/forgejo/issues/2650, https://codeberg.org/forgejo/forgejo/pulls/6044 * improve consistency by getting rid of the less usual button kinds * same as changes to profile buttons in https://codeberg.org/forgejo/forgejo/pulls/9359 * transparent outline button is now secondary * bulb-bright red button is now secondary * I think that actions like Close and Reopen shouldn't attract much attention, so they are secondary * add icons to better visually indicate the action * yes this is inspired by GitHub * unlike in GitHub, the icons are monochrome: * colored icons had bad contrast due to buttons being brighter than the usual areas with colored icons * they are not at all common inside of buttons in our UI * convert the buttons to the new CSS * differences are described in https://codeberg.org/forgejo/forgejo/pulls/9359 * a few general CSS improvements * prevent 1px vertical padding on `<button>` provided by browser defaults * wasn't noticed before because no `<buttons>` were converted yet * increased the default gap (for buttons with such icons) to 0.5rem * looks much better than Fomantic's 0.25rem * I took this opportunity because no buttons with icons were converted yet, so there's no blast radius to worry about yet Preview B: https://codeberg.org/attachments/3cdb2fc8-3887-4e82-8213-45dde42a5b33 A: https://codeberg.org/attachments/133b59c2-470f-4f97-8e85-e374e0a0b52e B: https://codeberg.org/attachments/d814d2dc-d2a2-4daf-ba65-70d9097bb046 A: https://codeberg.org/attachments/2f2e0214-33e5-4ca9-a315-21252dc27525 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9598 Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org> Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-10-10 07:11:53 +02:00
<button id="status-button" class="secondary button" data-status="{{ctx.Locale.Tr $closeTranslationKey}}" data-status-and-comment="{{ctx.Locale.Tr "repo.issues.close_comment_issue"}}" name="status" value="close">
{{svg "octicon-issue-closed"}}
<span>
{{ctx.Locale.Tr $closeTranslationKey}}
</span>
</button>
{{end}}
{{end}}
feat(ui): improve close/reopen/comment buttons (#9598) Related: https://codeberg.org/forgejo/forgejo/issues/2650, https://codeberg.org/forgejo/forgejo/pulls/6044 * improve consistency by getting rid of the less usual button kinds * same as changes to profile buttons in https://codeberg.org/forgejo/forgejo/pulls/9359 * transparent outline button is now secondary * bulb-bright red button is now secondary * I think that actions like Close and Reopen shouldn't attract much attention, so they are secondary * add icons to better visually indicate the action * yes this is inspired by GitHub * unlike in GitHub, the icons are monochrome: * colored icons had bad contrast due to buttons being brighter than the usual areas with colored icons * they are not at all common inside of buttons in our UI * convert the buttons to the new CSS * differences are described in https://codeberg.org/forgejo/forgejo/pulls/9359 * a few general CSS improvements * prevent 1px vertical padding on `<button>` provided by browser defaults * wasn't noticed before because no `<buttons>` were converted yet * increased the default gap (for buttons with such icons) to 0.5rem * looks much better than Fomantic's 0.25rem * I took this opportunity because no buttons with icons were converted yet, so there's no blast radius to worry about yet Preview B: https://codeberg.org/attachments/3cdb2fc8-3887-4e82-8213-45dde42a5b33 A: https://codeberg.org/attachments/133b59c2-470f-4f97-8e85-e374e0a0b52e B: https://codeberg.org/attachments/d814d2dc-d2a2-4daf-ba65-70d9097bb046 A: https://codeberg.org/attachments/2f2e0214-33e5-4ca9-a315-21252dc27525 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/9598 Reviewed-by: Mathieu Fenniak <mfenniak@noreply.codeberg.org> Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
2025-10-10 07:11:53 +02:00
<button class="primary button">
{{ctx.Locale.Tr "repo.issues.create_comment"}}
</button>
</div>
</div>
</form>
</div>
</div>
Show warning in locked issue discussion (#7726) Closes: #7334 ## Checklist The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org). ### Tests - I added test coverage for Go changes... - [ ] in their respective `*_test.go` for unit tests. - [x] in the `tests/integration` directory if it involves interactions with a live Forgejo server. - I added test coverage for JavaScript changes... - [ ] in `web_src/js/*.test.js` if it can be unit tested. - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)). ### Documentation - [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change. - [x] I did not document these changes and I do not expect someone else to do it. ### Release notes - [ ] I do not want this change to show in the release notes. - [x] I want the title to show in the release notes with a link to this pull request. - [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7726 Reviewed-by: 0ko <0ko@noreply.codeberg.org> Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: Lucas Schwiderski <lucas@lschwiderski.de> Co-committed-by: Lucas Schwiderski <lucas@lschwiderski.de>
2025-04-30 14:03:37 +00:00
{{else}} {{/* not .IsSigned */}}
<div class="ui warning message">
Show warning in locked issue discussion (#7726) Closes: #7334 ## Checklist The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org). ### Tests - I added test coverage for Go changes... - [ ] in their respective `*_test.go` for unit tests. - [x] in the `tests/integration` directory if it involves interactions with a live Forgejo server. - I added test coverage for JavaScript changes... - [ ] in `web_src/js/*.test.js` if it can be unit tested. - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)). ### Documentation - [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change. - [x] I did not document these changes and I do not expect someone else to do it. ### Release notes - [ ] I do not want this change to show in the release notes. - [x] I want the title to show in the release notes with a link to this pull request. - [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7726 Reviewed-by: 0ko <0ko@noreply.codeberg.org> Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: Lucas Schwiderski <lucas@lschwiderski.de> Co-committed-by: Lucas Schwiderski <lucas@lschwiderski.de>
2025-04-30 14:03:37 +00:00
{{ctx.Locale.Tr "repo.issues.sign_in_require_desc" .SignInLink}}
</div>
Show warning in locked issue discussion (#7726) Closes: #7334 ## Checklist The [contributor guide](https://forgejo.org/docs/next/contributor/) contains information that will be helpful to first time contributors. There also are a few [conditions for merging Pull Requests in Forgejo repositories](https://codeberg.org/forgejo/governance/src/branch/main/PullRequestsAgreement.md). You are also welcome to join the [Forgejo development chatroom](https://matrix.to/#/#forgejo-development:matrix.org). ### Tests - I added test coverage for Go changes... - [ ] in their respective `*_test.go` for unit tests. - [x] in the `tests/integration` directory if it involves interactions with a live Forgejo server. - I added test coverage for JavaScript changes... - [ ] in `web_src/js/*.test.js` if it can be unit tested. - [ ] in `tests/e2e/*.test.e2e.js` if it requires interactions with a live Forgejo server (see also the [developer guide for JavaScript testing](https://codeberg.org/forgejo/forgejo/src/branch/forgejo/tests/e2e/README.md#end-to-end-tests)). ### Documentation - [ ] I created a pull request [to the documentation](https://codeberg.org/forgejo/docs) to explain to Forgejo users how to use this change. - [x] I did not document these changes and I do not expect someone else to do it. ### Release notes - [ ] I do not want this change to show in the release notes. - [x] I want the title to show in the release notes with a link to this pull request. - [ ] I want the content of the `release-notes/<pull request number>.md` to be be used for the release notes instead of the title. Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7726 Reviewed-by: 0ko <0ko@noreply.codeberg.org> Reviewed-by: Gusted <gusted@noreply.codeberg.org> Co-authored-by: Lucas Schwiderski <lucas@lschwiderski.de> Co-committed-by: Lucas Schwiderski <lucas@lschwiderski.de>
2025-04-30 14:03:37 +00:00
{{end}}
</div>
</div>
{{template "repo/issue/view_content/sidebar" .}}
2015-08-20 04:31:28 +08:00
</div>
<template id="issue-comment-editor-template">
2015-08-20 04:31:28 +08:00
<div class="ui comment form">
<div class="field">
{{template "shared/combomarkdowneditor" (dict
"MarkdownPreviewUrl" (print .Repository.Link "/markup")
"MarkdownPreviewContext" .RepoLink
"TextareaName" "content"
"DropzoneParentContainer" ".ui.form"
)}}
</div>
{{if .IsAttachmentEnabled}}
<div class="field">
{{template "repo/upload" .}}
</div>
{{end}}
<div class="field">
<div class="text right edit">
2024-12-30 17:33:52 +01:00
<button class="ui basic cancel button" data-button-name="cancel-edit">{{ctx.Locale.Tr "repo.issues.cancel"}}</button>
<button class="ui primary save button" data-button-name="save-edit">{{ctx.Locale.Tr "repo.issues.save"}}</button>
</div>
</div>
2015-08-20 04:31:28 +08:00
</div>
</template>
2015-08-20 04:31:28 +08:00
{{template "repo/issue/view_content/reference_issue_dialog" .}}
<div class="tw-hidden" id="no-content">
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
</div>
<div class="ui g-modal-confirm delete modal" id="delete-branch">
Refactor delete_modal_actions template and use it for project column related actions (#24097) Co-Author: @wxiaoguang This PR is to fix https://github.com/go-gitea/gitea/issues/23318#issuecomment-1506275446 . The way to fix this in this PR is to use `delete_modal_actions.tmpl` here both to fix this issue and keep ui consistency (as suggested by [TODO here](https://github.com/go-gitea/gitea/blob/4299c3b7db61f8741eca0ba3d663bb65745a4acc/templates/projects/view.tmpl#L161)) And this PR also refactors `delete_modal_actions.tmpl` and its related styles, and use the template for more modal actions: 1. Added template attributes: * locale * ModalButtonStyle: "yes" (default) or "confirm" * ModalButtonCancelText * ModalButtonOkText 2. Rename `delete_modal_actions.tmpl` template to `modal_actions_confirm.tmpl` because it is not only used for action modals deletion now. 3. Refactored css related to modals into `web_src/css/modules/modal.css` and improved the styles. 4. Also use the template for PR deletion modal and remove issue dependency modal. 5. Some modals should also use the template, but not sure how to open them, so mark these modal actions by `{{/* TODO: Convert to base/modal_actions_confirm */}}` After (Also tested on arc green): Hovering on the left buttons <img width="711" alt="Screen Shot 2023-04-23 at 15 17 12" src="https://user-images.githubusercontent.com/17645053/233825650-76307e65-9255-44bb-80e8-7062f58ead1b.png"> <img width="786" alt="Screen Shot 2023-04-23 at 15 17 21" src="https://user-images.githubusercontent.com/17645053/233825652-4dc6f7d1-a180-49fb-a468-d60950eaee0d.png"> Test for functionalities: https://user-images.githubusercontent.com/17645053/233826857-76376fda-022c-42d0-b0f3-339c17ca4e59.mov --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2023-04-23 17:24:19 +08:00
<div class="header">
{{svg "octicon-trash"}}
{{ctx.Locale.Tr "repo.branch.delete" .HeadTarget}}
</div>
<div class="content">
<p>{{ctx.Locale.Tr "repo.branch.delete_desc"}}</p>
</div>
Refactor delete_modal_actions template and use it for project column related actions (#24097) Co-Author: @wxiaoguang This PR is to fix https://github.com/go-gitea/gitea/issues/23318#issuecomment-1506275446 . The way to fix this in this PR is to use `delete_modal_actions.tmpl` here both to fix this issue and keep ui consistency (as suggested by [TODO here](https://github.com/go-gitea/gitea/blob/4299c3b7db61f8741eca0ba3d663bb65745a4acc/templates/projects/view.tmpl#L161)) And this PR also refactors `delete_modal_actions.tmpl` and its related styles, and use the template for more modal actions: 1. Added template attributes: * locale * ModalButtonStyle: "yes" (default) or "confirm" * ModalButtonCancelText * ModalButtonOkText 2. Rename `delete_modal_actions.tmpl` template to `modal_actions_confirm.tmpl` because it is not only used for action modals deletion now. 3. Refactored css related to modals into `web_src/css/modules/modal.css` and improved the styles. 4. Also use the template for PR deletion modal and remove issue dependency modal. 5. Some modals should also use the template, but not sure how to open them, so mark these modal actions by `{{/* TODO: Convert to base/modal_actions_confirm */}}` After (Also tested on arc green): Hovering on the left buttons <img width="711" alt="Screen Shot 2023-04-23 at 15 17 12" src="https://user-images.githubusercontent.com/17645053/233825650-76307e65-9255-44bb-80e8-7062f58ead1b.png"> <img width="786" alt="Screen Shot 2023-04-23 at 15 17 21" src="https://user-images.githubusercontent.com/17645053/233825652-4dc6f7d1-a180-49fb-a468-d60950eaee0d.png"> Test for functionalities: https://user-images.githubusercontent.com/17645053/233826857-76376fda-022c-42d0-b0f3-339c17ca4e59.mov --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2023-04-23 17:24:19 +08:00
{{template "base/modal_actions_confirm" .}}
2017-03-14 21:10:35 -04:00
</div>