You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

sidebar.tmpl 30KB

Introduce htmx and use it to avoid full page load on `Subscribe` and `Follow` (#28908) - Closes https://github.com/go-gitea/gitea/issues/28880 This change introduces htmx with the hope we could use it to make Gitea more reactive while keeping our "HTML rendered on the server" approach. - Add `htmx.js` that imports `htmx.org` and initializes error toasts - Place `hx-headers='{"x-csrf-token": "{{.CsrfToken}}"}'` on the `<body>` tag so every request that htmx sends is authenticated - Place `hx-swap="outerHTML"` on the `<body>` tag so the response of each htmx request replaces the tag it targets (as opposed to its inner content) - Place `hx-push-url="false"` on the `<body>` tag so no changes to the URL happen in `<form>` tags - Add the `is-loading` class during request ### Error toasts in action ![errors](https://github.com/go-gitea/gitea/assets/20454870/181a1beb-1cb8-4858-abe8-fa1fc3f5b8f3) ## Don't do a full page load when clicking the subscribe button - Refactor the form around the subscribe button into its own template - Use htmx to perform the form submission - `hx-boost="true"` to prevent the default form submission behavior of a full page load - `hx-sync="this:replace"` to replace the current request (in case the button is clicked again before the response is returned) - `hx-target="this"` to replace the form tag with the new form tag - Change the backend response to return a `<form>` tag instead of a redirect to the issue page ### Before ![subscribe_before](https://github.com/go-gitea/gitea/assets/20454870/cb2439a2-c3c0-425c-8d3c-5d646b1cdc28) ### After ![subscribe_after](https://github.com/go-gitea/gitea/assets/20454870/6fcd77d8-7b11-40b0-af4f-b152aaad787c) ## Don't do a full page load when clicking the follow button - Use htmx to perform the button request - `hx-post="{{.ContextUser.HomeLink}}?action=follow"` to send a POST request to follow the user - `hx-target="#profile-avatar-card"` to target the card div for replacement - `hx-indicator="#profile-avatar-card"` to place the loading indicator on the card - Change the backend response to return a `<div>` tag (the card) instead of a redirect to the user page ### Before ![follow_before](https://github.com/go-gitea/gitea/assets/20454870/a210b643-6e74-4ff9-8e61-d658c62edf1f) ### After ![follow_after](https://github.com/go-gitea/gitea/assets/20454870/5bb19ae9-0d59-4ae3-b538-4c83334e4722) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: 6543 <m.huber@kithara.com> Co-authored-by: Giteabot <teabot@gitea.io>
3 months ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
6 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
6 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
6 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
6 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
6 years ago
Feature: Timetracking (#2211) * Added comment's hashtag to url for mail notifications. * Added explanation to return statement + documentation. * Replacing in-line link generation with HTMLURL. (+gofmt) * Replaced action-based model with nil-based model. (+gofmt) * Replaced mailIssueActionToParticipants with mailIssueCommentToParticipants. * Updating comment for mailIssueCommentToParticipants * Added link to comment in "Dashboard" * Deleting feed entry if a comment is going to be deleted * Added migration * Added improved migration to add a CommentID column to action. * Added improved links to comments in feed entries. * Fixes #1956 by filtering for deleted comments that are referenced in actions. * Introducing "IsDeleted" column to action. * Adding design draft (not functional) * Adding database models for stopwatches and trackedtimes * See go-gitea/gitea#967 * Adding design draft (not functional) * Adding translations and improving design * Implementing stopwatch (for timetracking) * Make UI functional * Add hints in timeline for time tracking events * Implementing timetracking feature * Adding "Add time manual" option * Improved stopwatch * Created report of total spent time by user * Only showing total time spent if theire is something to show. * Adding license headers. * Improved error handling for "Add Time Manual" * Adding @sapks 's changes, refactoring * Adding API for feature tracking * Adding unit test * Adding DISABLE/ENABLE option to Repository settings page * Improving translations * Applying @sapk 's changes * Removing repo_unit and using IssuesSetting for disabling/enabling timetracker * Adding DEFAULT_ENABLE_TIMETRACKER to config, installation and admin menu * Improving documentation * Fixing vendor/ folder * Changing timtracking routes by adding subgroups /times and /times/stopwatch (Proposed by @lafriks ) * Restricting write access to timetracking based on the repo settings (Proposed by @lafriks ) * Fixed minor permissions bug. * Adding CanUseTimetracker and IsTimetrackerEnabled in ctx.Repo * Allow assignees and authors to track there time too. * Fixed some build-time-errors + logical errors. * Removing unused Get...ByID functions * Moving IsTimetrackerEnabled from context.Repository to models.Repository * Adding a seperate file for issue related repo functions * Adding license headers * Fixed GetUserByParams return 404 * Moving /users/:username/times to /repos/:username/:reponame/times/:username for security reasons * Adding /repos/:username/times to get all tracked times of the repo * Updating sdk-dependency * Updating swagger.v1.json * Adding warning if user has already a running stopwatch (auto-timetracker) * Replacing GetTrackedTimesBy... with GetTrackedTimes(options FindTrackedTimesOptions) * Changing code.gitea.io/sdk back to code.gitea.io/sdk * Correcting spelling mistake * Updating vendor.json * Changing GET stopwatch/toggle to POST stopwatch/toggle * Changing GET stopwatch/cancel to POST stopwatch/cancel * Added migration for stopwatches/timetracking * Fixed some access bugs for read-only users * Added default allow only contributors to track time value to config * Fixed migration by chaging x.Iterate to x.Find * Resorted imports * Moved Add Time Manually form to repo_form.go * Removed "Seconds" field from Add Time Manually * Resorted imports * Improved permission checking * Fixed some bugs * Added integration test * gofmt * Adding integration test by @lafriks * Added created_unix to comment fixtures * Using last event instead of a fixed event * Adding another integration test by @lafriks * Fixing bug Timetracker enabled causing error 500 at sidebar.tpl * Fixed a refactoring bug that resulted in hiding "HasUserStopwatch" warning. * Returning TrackedTime instead of AddTimeOption at AddTime. * Updating SDK from go-gitea/go-sdk#69 * Resetting Go-SDK back to default repository * Fixing test-vendor by changing ini back to original repository * Adding "tags" to swagger spec * govendor sync * Removed duplicate * Formatting templates * Adding IsTimetrackingEnabled checks to API * Improving translations / english texts * Improving documentation * Updating swagger spec * Fixing integration test caused be translation-changes * Removed encoding issues in local_en-US.ini. * "Added" copyright line * Moved unit.IssuesConfig().EnableTimetracker into a != nil check * Removed some other encoding issues in local_en-US.ini * Improved javascript by checking if data-context exists * Replaced manual comment creation with CreateComment * Removed unnecessary code * Improved error checking * Small cosmetic changes * Replaced int>string>duration parsing with int>duration parsing * Fixed encoding issues * Removed unused imports Signed-off-by: Jonas Franz <info@jonasfranz.software>
6 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
6 years ago
Issue due date (#3794) * Started adding deadline to ui * Implemented basic issue due date managing * Improved UI for due date managing * Added at least write access to the repo in order to modify issue due dates * Ui improvements * Added issue comments creation when adding/modifying/removing a due date * Show due date in issue list * Added api support for issue due dates * Fixed lint suggestions * Added deadline to sdk * Updated css * Added support for adding/modifiying deadlines for pull requests via api * Fixed comments not created when updating or removing a deadline * update sdk (will do properly once go-gitea/go-sdk#103 is merged) * enhanced updateIssueDeadline * Removed unnessecary Issue.DeadlineString * UI improvements * Small improvments to comment creation + ui & validation improvements * Check if an issue is overdue is now a seperate function * Updated go-sdk with govendor as it was merged * Simplified isOverdue method * removed unessecary deadline to 0 set * Update swagger definitions * Added missing return * Added an explanary comment * Improved updateIssueDeadline method so it'll only update `deadline_unix` * Small changes and improvements * no need to explicitly load the issue when updating a deadline, just use whats already there * small optimisations * Added check if a deadline was modified before updating it * Moved comment creating logic into its own function * Code cleanup for creating deadline comment * locale improvement * When modifying a deadline, the old deadline is saved with the comment * small improvments to xorm session handling when updating an issue deadline + style nitpicks * style nitpicks * Moved checking for if the user has write acces to middleware
6 years ago
Allow cross-repository dependencies on issues (#7901) * in progress changes for #7405, added ability to add cross-repo dependencies * removed unused repolink var * fixed query that was breaking ci tests; fixed check in issue dependency add so that the id of the issue and dependency is checked rather than the indexes * reverted removal of string in local files becasue these are done via crowdin, not updated manually * removed 'Select("issue.*")' from getBlockedByDependencies and getBlockingDependencies based on comments in PR review * changed getBlockedByDependencies and getBlockingDependencies to use a more xorm-like query, also updated the sidebar as a result * simplified the getBlockingDependencies and getBlockedByDependencies methods; changed the sidebar to show the dependencies in a different format where you can see the name of the repository * made some changes to the issue view in the dependencies (issue name on top, repo full name on separate line). Change view of issue in the dependency search results (also showing the full repo name on separate line) * replace call to FindUserAccessibleRepoIDs with SearchRepositoryByName. The former was hardcoded to use isPrivate = false on the repo search, but this code needed it to be true. The SearchRepositoryByName method is used more in the code including on the user's dashboard * some more tweaks to the layout of the issues when showing dependencies and in the search box when you add new dependencies * added Name to the RepositoryMeta struct * updated swagger doc * fixed total count for link header on SearchIssues * fixed indentation * fixed aligment of remove icon on dependencies in issue sidebar * removed unnecessary nil check (unnecessary because issue.loadRepo is called prior to this block) * reverting .css change, somehow missed or forgot that less is used * updated less file and generated css; updated sidebar template with styles to line up delete and issue index * added ordering to the blocked by/depends on queries * fixed sorting in issue dependency search and the depends on/blocks views to show issues from the current repo first, then by created date descending; added a "all cross repository dependencies" setting to allow this feature to be turned off, if turned off, the issue dependency search will work the way it did before (restricted to the current repository) * re-applied my swagger changes after merge * fixed split string condition in issue search * changed ALLOW_CROSS_REPOSITORY_DEPENDENCIES description to sound more global than just the issue dependency search; returning 400 in the cross repo issue search api method if not enabled; fixed bug where the issue count did not respect the state parameter * when adding a dependency to an issue, added a check to make sure the issue and dependency are in the same repo if cross repo dependencies is not enabled * updated sortIssuesSession call in PullRequests, another commit moved this method from pull.go to pull_list.go so I had to re-apply my change here * fixed incorrect setting of user id parameter in search repos call
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691
  1. <div class="issue-content-right ui segment">
  2. {{template "repo/issue/branch_selector_field" .}}
  3. {{if .Issue.IsPull}}
  4. <input id="reviewer_id" name="reviewer_id" type="hidden" value="{{.reviewer_id}}">
  5. <div class="ui {{if or (and (not .Reviewers) (not .TeamReviewers)) (not .CanChooseReviewer) .Repository.IsArchived}}disabled{{end}} floating jump select-reviewers-modify dropdown">
  6. <a class="text tw-flex tw-items-center muted">
  7. <strong>{{ctx.Locale.Tr "repo.issues.review.reviewers"}}</strong>
  8. {{if and .CanChooseReviewer (not .Repository.IsArchived)}}
  9. {{svg "octicon-gear" 16 "tw-ml-1"}}
  10. {{end}}
  11. </a>
  12. <div class="filter menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/request_review">
  13. {{if .Reviewers}}
  14. <div class="ui icon search input">
  15. <i class="icon">{{svg "octicon-search" 16}}</i>
  16. <input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_reviewers"}}">
  17. </div>
  18. {{end}}
  19. {{if .Reviewers}}
  20. {{range .Reviewers}}
  21. {{if .User}}
  22. <a class="{{if not .CanChange}}ui{{end}} item {{if .Checked}}checked{{end}} {{if not .CanChange}}ban-change{{end}}" href="#" data-id="{{.ItemID}}" data-id-selector="#review_request_{{.ItemID}}" {{if not .CanChange}} data-tooltip-content="{{ctx.Locale.Tr "repo.issues.remove_request_review_block"}}"{{end}}>
  23. <span class="octicon-check {{if not .Checked}}tw-invisible{{end}}">{{svg "octicon-check"}}</span>
  24. <span class="text">
  25. {{ctx.AvatarUtils.Avatar .User 28 "tw-mr-2"}}{{template "repo/search_name" .User}}
  26. </span>
  27. </a>
  28. {{end}}
  29. {{end}}
  30. {{end}}
  31. {{if .TeamReviewers}}
  32. {{if .Reviewers}}
  33. <div class="divider"></div>
  34. {{end}}
  35. {{range .TeamReviewers}}
  36. {{if .Team}}
  37. <a class="{{if not .CanChange}}ui{{end}} item {{if .Checked}}checked{{end}} {{if not .CanChange}}ban-change{{end}}" href="#" data-id="{{.ItemID}}" data-id-selector="#review_request_team_{{.Team.ID}}" {{if not .CanChange}} data-tooltip-content="{{ctx.Locale.Tr "repo.issues.remove_request_review_block"}}"{{end}}>
  38. <span class="octicon-check {{if not .Checked}}tw-invisible{{end}}">{{svg "octicon-check" 16}}</span>
  39. <span class="text">
  40. {{svg "octicon-people" 16 "tw-ml-4 tw-mr-1"}}{{$.Issue.Repo.OwnerName}}/{{.Team.Name}}
  41. </span>
  42. </a>
  43. {{end}}
  44. {{end}}
  45. {{end}}
  46. </div>
  47. </div>
  48. <div class="ui assignees list">
  49. <span class="no-select item {{if or .OriginalReviews .PullReviewers}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_reviewers"}}</span>
  50. <div class="selected">
  51. {{range .PullReviewers}}
  52. <div class="item tw-flex tw-items-center tw-py-2">
  53. <div class="tw-flex tw-items-center tw-flex-1">
  54. {{if .User}}
  55. <a class="muted sidebar-item-link" href="{{.User.HomeLink}}">{{ctx.AvatarUtils.Avatar .User 20 "tw-mr-2"}}{{.User.GetDisplayName}}</a>
  56. {{else if .Team}}
  57. <span class="text">{{svg "octicon-people" 20 "tw-mr-2"}}{{$.Issue.Repo.OwnerName}}/{{.Team.Name}}</span>
  58. {{end}}
  59. </div>
  60. <div class="tw-flex tw-items-center tw-gap-2">
  61. {{if (and $.Permission.IsAdmin (or (eq .Review.Type 1) (eq .Review.Type 3)) (not $.Issue.IsClosed) (not $.Issue.PullRequest.HasMerged))}}
  62. <a href="#" class="ui muted icon tw-flex tw-items-center show-modal" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dismiss_review"}}" data-modal="#dismiss-review-modal-{{.Review.ID}}">
  63. {{svg "octicon-x" 20}}
  64. </a>
  65. <div class="ui small modal" id="dismiss-review-modal-{{.Review.ID}}">
  66. <div class="header">
  67. {{ctx.Locale.Tr "repo.issues.dismiss_review"}}
  68. </div>
  69. <div class="content">
  70. <div class="ui warning message">
  71. {{ctx.Locale.Tr "repo.issues.dismiss_review_warning"}}
  72. </div>
  73. <form class="ui form dismiss-review-form" id="dismiss-review-{{.Review.ID}}" action="{{$.RepoLink}}/issues/dismiss_review" method="post">
  74. {{$.CsrfTokenHtml}}
  75. <input type="hidden" name="review_id" value="{{.Review.ID}}">
  76. <div class="field">
  77. <label for="message">{{ctx.Locale.Tr "action.review_dismissed_reason"}}</label>
  78. <input id="message" name="message">
  79. </div>
  80. <div class="text right actions">
  81. <button class="ui cancel button">{{ctx.Locale.Tr "settings.cancel"}}</button>
  82. <button class="ui red button" type="submit">{{ctx.Locale.Tr "ok"}}</button>
  83. </div>
  84. </form>
  85. </div>
  86. </div>
  87. {{end}}
  88. {{if .Review.Stale}}
  89. <span data-tooltip-content="{{ctx.Locale.Tr "repo.issues.is_stale"}}">
  90. {{svg "octicon-hourglass" 16}}
  91. </span>
  92. {{end}}
  93. {{if and .CanChange (or .Checked (and (not $.Issue.IsClosed) (not $.Issue.PullRequest.HasMerged)))}}
  94. <a href="#" class="ui muted icon re-request-review{{if .Checked}} checked{{end}}" data-tooltip-content="{{if .Checked}}{{ctx.Locale.Tr "repo.issues.remove_request_review"}}{{else}}{{ctx.Locale.Tr "repo.issues.re_request_review"}}{{end}}" data-issue-id="{{$.Issue.ID}}" data-id="{{.ItemID}}" data-update-url="{{$.RepoLink}}/issues/request_review">{{if .Checked}}{{svg "octicon-trash"}}{{else}}{{svg "octicon-sync"}}{{end}}</a>
  95. {{end}}
  96. {{svg (printf "octicon-%s" .Review.Type.Icon) 16 (printf "text %s" (.Review.HTMLTypeColorName))}}
  97. </div>
  98. </div>
  99. {{end}}
  100. {{range .OriginalReviews}}
  101. <div class="item tw-flex tw-items-center tw-py-2">
  102. <div class="tw-flex tw-items-center tw-flex-1">
  103. <a class="muted" href="{{$.Repository.OriginalURL}}" data-tooltip-content="{{ctx.Locale.Tr "repo.migrated_from_fake" $.Repository.GetOriginalURLHostname}}">
  104. {{svg (MigrationIcon $.Repository.GetOriginalURLHostname) 20 "tw-mr-2"}}
  105. {{.OriginalAuthor}}
  106. </a>
  107. </div>
  108. <div class="tw-flex tw-items-center tw-gap-2">
  109. {{svg (printf "octicon-%s" .Type.Icon) 16 (printf "text %s" (.HTMLTypeColorName))}}
  110. </div>
  111. </div>
  112. {{end}}
  113. </div>
  114. </div>
  115. {{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .HasMerged) (not .Issue.IsClosed) (not .IsPullWorkInProgress)}}
  116. <div class="toggle-wip" data-title="{{.Issue.Title}}" data-wip-prefix="{{index .PullRequestWorkInProgressPrefixes 0}}" data-update-url="{{.Issue.Link}}/title">
  117. <a class="muted">
  118. {{ctx.Locale.Tr "repo.pulls.still_in_progress"}} {{ctx.Locale.Tr "repo.pulls.add_prefix" (index .PullRequestWorkInProgressPrefixes 0)}}
  119. </a>
  120. </div>
  121. {{end}}
  122. <div class="divider"></div>
  123. {{end}}
  124. {{template "repo/issue/labels/labels_selector_field" .}}
  125. {{template "repo/issue/labels/labels_sidebar" dict "root" $}}
  126. <div class="divider"></div>
  127. <div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-milestone dropdown">
  128. <a class="text muted flex-text-block">
  129. <strong>{{ctx.Locale.Tr "repo.issues.new.milestone"}}</strong>
  130. {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
  131. {{svg "octicon-gear" 16 "tw-ml-1"}}
  132. {{end}}
  133. </a>
  134. <div class="menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/milestone">
  135. {{template "repo/issue/milestone/select_menu" .}}
  136. </div>
  137. </div>
  138. <div class="ui select-milestone list">
  139. <span class="no-select item {{if .Issue.Milestone}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_milestone"}}</span>
  140. <div class="selected">
  141. {{if .Issue.Milestone}}
  142. <a class="item muted sidebar-item-link" href="{{.RepoLink}}/milestone/{{.Issue.Milestone.ID}}">
  143. {{svg "octicon-milestone" 18 "tw-mr-2"}}
  144. {{.Issue.Milestone.Name}}
  145. </a>
  146. {{end}}
  147. </div>
  148. </div>
  149. {{if .IsProjectsEnabled}}
  150. <div class="divider"></div>
  151. <div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-project dropdown">
  152. <a class="text muted flex-text-block">
  153. <strong>{{ctx.Locale.Tr "repo.issues.new.projects"}}</strong>
  154. {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
  155. {{svg "octicon-gear" 16 "tw-ml-1"}}
  156. {{end}}
  157. </a>
  158. <div class="menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/projects">
  159. {{if or .OpenProjects .ClosedProjects}}
  160. <div class="ui icon search input">
  161. <i class="icon">{{svg "octicon-search" 16}}</i>
  162. <input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_projects"}}">
  163. </div>
  164. {{end}}
  165. <div class="no-select item">{{ctx.Locale.Tr "repo.issues.new.clear_projects"}}</div>
  166. {{if .OpenProjects}}
  167. <div class="divider"></div>
  168. <div class="header">
  169. {{ctx.Locale.Tr "repo.issues.new.open_projects"}}
  170. </div>
  171. {{range .OpenProjects}}
  172. <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{.Link ctx}}">
  173. {{svg .IconName 18 "tw-mr-2"}}{{.Title}}
  174. </a>
  175. {{end}}
  176. {{end}}
  177. {{if .ClosedProjects}}
  178. <div class="divider"></div>
  179. <div class="header">
  180. {{ctx.Locale.Tr "repo.issues.new.closed_projects"}}
  181. </div>
  182. {{range .ClosedProjects}}
  183. <a class="item muted sidebar-item-link" data-id="{{.ID}}" data-href="{{.Link ctx}}">
  184. {{svg .IconName 18 "tw-mr-2"}}{{.Title}}
  185. </a>
  186. {{end}}
  187. {{end}}
  188. </div>
  189. </div>
  190. <div class="ui select-project list">
  191. <span class="no-select item {{if .Issue.Project}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_projects"}}</span>
  192. <div class="selected">
  193. {{if .Issue.Project}}
  194. <a class="item muted sidebar-item-link" href="{{.Issue.Project.Link ctx}}">
  195. {{svg .Issue.Project.IconName 18 "tw-mr-2"}}{{.Issue.Project.Title}}
  196. </a>
  197. {{end}}
  198. </div>
  199. </div>
  200. {{end}}
  201. <div class="divider"></div>
  202. <input id="assignee_id" name="assignee_id" type="hidden" value="{{.assignee_id}}">
  203. <div class="ui {{if or (not .HasIssuesOrPullsWritePermission) .Repository.IsArchived}}disabled{{end}} floating jump select-assignees-modify dropdown">
  204. <a class="text muted flex-text-block">
  205. <strong>{{ctx.Locale.Tr "repo.issues.new.assignees"}}</strong>
  206. {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
  207. {{svg "octicon-gear" 16 "tw-ml-1"}}
  208. {{end}}
  209. </a>
  210. <div class="filter menu" data-action="update" data-issue-id="{{$.Issue.ID}}" data-update-url="{{$.RepoLink}}/issues/assignee">
  211. <div class="ui icon search input">
  212. <i class="icon">{{svg "octicon-search" 16}}</i>
  213. <input type="text" placeholder="{{ctx.Locale.Tr "repo.issues.filter_assignees"}}">
  214. </div>
  215. <div class="no-select item">{{ctx.Locale.Tr "repo.issues.new.clear_assignees"}}</div>
  216. {{range .Assignees}}
  217. {{$AssigneeID := .ID}}
  218. <a class="item{{range $.Issue.Assignees}}{{if eq .ID $AssigneeID}} checked{{end}}{{end}}" href="#" data-id="{{.ID}}" data-id-selector="#assignee_{{.ID}}">
  219. {{$checked := false}}
  220. {{range $.Issue.Assignees}}
  221. {{if eq .ID $AssigneeID}}
  222. {{$checked = true}}
  223. {{end}}
  224. {{end}}
  225. <span class="octicon-check {{if not $checked}}tw-invisible{{end}}">{{svg "octicon-check"}}</span>
  226. <span class="text">
  227. {{ctx.AvatarUtils.Avatar . 20 "tw-mr-2"}}{{template "repo/search_name" .}}
  228. </span>
  229. </a>
  230. {{end}}
  231. </div>
  232. </div>
  233. <div class="ui assignees list">
  234. <span class="no-select item {{if .Issue.Assignees}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_assignees"}}</span>
  235. <div class="selected">
  236. {{range .Issue.Assignees}}
  237. <div class="item">
  238. <a class="muted sidebar-item-link" href="{{$.RepoLink}}/{{if $.Issue.IsPull}}pulls{{else}}issues{{end}}?assignee={{.ID}}">
  239. {{ctx.AvatarUtils.Avatar . 28 "tw-mr-2"}}
  240. {{.GetDisplayName}}
  241. </a>
  242. </div>
  243. {{end}}
  244. </div>
  245. </div>
  246. <div class="divider"></div>
  247. {{if .Participants}}
  248. <span class="text"><strong>{{ctx.Locale.Tr "repo.issues.num_participants" .NumParticipants}}</strong></span>
  249. <div class="ui list tw-flex tw-flex-wrap">
  250. {{range .Participants}}
  251. <a {{if gt .ID 0}}href="{{.HomeLink}}"{{end}} data-tooltip-content="{{.GetDisplayName}}">
  252. {{ctx.AvatarUtils.Avatar . 28 "tw-my-0.5 tw-mr-1"}}
  253. </a>
  254. {{end}}
  255. </div>
  256. {{end}}
  257. {{if and $.IssueWatch (not .Repository.IsArchived)}}
  258. <div class="divider"></div>
  259. <div class="ui watching">
  260. <span class="text"><strong>{{ctx.Locale.Tr "notification.notifications"}}</strong></span>
  261. <div class="tw-mt-2">
  262. {{template "repo/issue/view_content/watching" .}}
  263. </div>
  264. </div>
  265. {{end}}
  266. {{if .Repository.IsTimetrackerEnabled $.Context}}
  267. {{if and .CanUseTimetracker (not .Repository.IsArchived)}}
  268. <div class="divider"></div>
  269. <div class="ui timetrack">
  270. <span class="text"><strong>{{ctx.Locale.Tr "repo.issues.tracker"}}</strong></span>
  271. <div class="tw-mt-2">
  272. <form method="post" action="{{.Issue.Link}}/times/stopwatch/toggle" id="toggle_stopwatch_form">
  273. {{$.CsrfTokenHtml}}
  274. </form>
  275. <form method="post" action="{{.Issue.Link}}/times/stopwatch/cancel" id="cancel_stopwatch_form">
  276. {{$.CsrfTokenHtml}}
  277. </form>
  278. {{if $.IsStopwatchRunning}}
  279. <button class="ui fluid button issue-stop-time">
  280. {{svg "octicon-stopwatch" 16 "tw-mr-2"}}
  281. {{ctx.Locale.Tr "repo.issues.stop_tracking"}}
  282. </button>
  283. <button class="ui fluid button issue-cancel-time tw-mt-2">
  284. {{svg "octicon-trash" 16 "tw-mr-2"}}
  285. {{ctx.Locale.Tr "repo.issues.cancel_tracking"}}
  286. </button>
  287. {{else}}
  288. {{if .HasUserStopwatch}}
  289. <div class="ui warning message">
  290. {{ctx.Locale.Tr "repo.issues.tracking_already_started" .OtherStopwatchURL}}
  291. </div>
  292. {{end}}
  293. <button class="ui fluid button issue-start-time" data-tooltip-content='{{ctx.Locale.Tr "repo.issues.start_tracking"}}'>
  294. {{svg "octicon-stopwatch" 16 "tw-mr-2"}}
  295. {{ctx.Locale.Tr "repo.issues.start_tracking_short"}}
  296. </button>
  297. <div class="ui mini modal issue-start-time-modal">
  298. <div class="header">{{ctx.Locale.Tr "repo.issues.add_time"}}</div>
  299. <div class="content">
  300. <form method="post" id="add_time_manual_form" action="{{.Issue.Link}}/times/add" class="ui input fluid tw-gap-2">
  301. {{$.CsrfTokenHtml}}
  302. <input placeholder='{{ctx.Locale.Tr "repo.issues.add_time_hours"}}' type="number" name="hours">
  303. <input placeholder='{{ctx.Locale.Tr "repo.issues.add_time_minutes"}}' type="number" name="minutes" class="ui compact">
  304. </form>
  305. </div>
  306. <div class="actions">
  307. <button class="ui primary approve button">{{ctx.Locale.Tr "repo.issues.add_time_short"}}</button>
  308. <button class="ui cancel button">{{ctx.Locale.Tr "repo.issues.add_time_cancel"}}</button>
  309. </div>
  310. </div>
  311. <button class="ui fluid button issue-add-time tw-mt-2" data-tooltip-content='{{ctx.Locale.Tr "repo.issues.add_time"}}'>
  312. {{svg "octicon-plus" 16 "tw-mr-2"}}
  313. {{ctx.Locale.Tr "repo.issues.add_time_short"}}
  314. </button>
  315. {{end}}
  316. </div>
  317. </div>
  318. {{end}}
  319. {{if .WorkingUsers}}
  320. <div class="divider"></div>
  321. <div class="ui comments">
  322. <span class="text"><strong>{{ctx.Locale.Tr "repo.issues.time_spent_from_all_authors" ($.Issue.TotalTrackedTime | Sec2Time)}}</strong></span>
  323. <div>
  324. {{range $user, $trackedtime := .WorkingUsers}}
  325. <div class="comment tw-mt-2">
  326. <a class="avatar">
  327. {{ctx.AvatarUtils.Avatar $user}}
  328. </a>
  329. <div class="content">
  330. {{template "shared/user/authorlink" $user}}
  331. <div class="text">
  332. {{$trackedtime|Sec2Time}}
  333. </div>
  334. </div>
  335. </div>
  336. {{end}}
  337. </div>
  338. </div>
  339. {{end}}
  340. {{end}}
  341. <div class="divider"></div>
  342. <span class="text"><strong>{{ctx.Locale.Tr "repo.issues.due_date"}}</strong></span>
  343. <div class="ui form" id="deadline-loader">
  344. <div class="ui negative message tw-hidden" id="deadline-err-invalid-date">
  345. {{svg "octicon-x" 16 "close icon"}}
  346. {{ctx.Locale.Tr "repo.issues.due_date_invalid"}}
  347. </div>
  348. {{if ne .Issue.DeadlineUnix 0}}
  349. <p>
  350. <div class="tw-flex tw-justify-between tw-items-center">
  351. <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}}>
  352. {{svg "octicon-calendar" 16 "tw-mr-2"}}
  353. {{DateTime "long" .Issue.DeadlineUnix.FormatDate}}
  354. </div>
  355. <div>
  356. {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
  357. <a class="issue-due-edit muted" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.due_date_form_edit"}}">{{svg "octicon-pencil" 16 "tw-mr-1"}}</a>
  358. <a class="issue-due-remove muted" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.due_date_form_remove"}}">{{svg "octicon-trash"}}</a>
  359. {{end}}
  360. </div>
  361. </div>
  362. </p>
  363. {{else}}
  364. <p>{{ctx.Locale.Tr "repo.issues.due_date_not_set"}}</p>
  365. {{end}}
  366. {{if and .HasIssuesOrPullsWritePermission (not .Repository.IsArchived)}}
  367. <div {{if ne .Issue.DeadlineUnix 0}} class="tw-hidden"{{end}} id="deadlineForm">
  368. <form class="ui fluid action input issue-due-form" action="{{AppSubUrl}}/{{PathEscape .Repository.Owner.Name}}/{{PathEscape .Repository.Name}}/issues/{{.Issue.Index}}/deadline" method="post" id="update-issue-deadline-form">
  369. {{$.CsrfTokenHtml}}
  370. <input required placeholder="{{ctx.Locale.Tr "repo.issues.due_date_form"}}" {{if gt .Issue.DeadlineUnix 0}}value="{{.Issue.DeadlineUnix.FormatDate}}"{{end}} type="date" name="deadlineDate" id="deadlineDate">
  371. <button class="ui icon button">
  372. {{if ne .Issue.DeadlineUnix 0}}
  373. {{svg "octicon-pencil"}}
  374. {{else}}
  375. {{svg "octicon-plus"}}
  376. {{end}}
  377. </button>
  378. </form>
  379. </div>
  380. {{end}}
  381. </div>
  382. {{if .Repository.IsDependenciesEnabled $.Context}}
  383. <div class="divider"></div>
  384. <div class="ui depending">
  385. {{if (and (not .BlockedByDependencies) (not .BlockedByDependenciesNotPermitted) (not .BlockingDependencies) (not .BlockingDependenciesNotPermitted))}}
  386. <span class="text"><strong>{{ctx.Locale.Tr "repo.issues.dependency.title"}}</strong></span>
  387. <br>
  388. <p>
  389. {{if .Issue.IsPull}}
  390. {{ctx.Locale.Tr "repo.issues.dependency.pr_no_dependencies"}}
  391. {{else}}
  392. {{ctx.Locale.Tr "repo.issues.dependency.issue_no_dependencies"}}
  393. {{end}}
  394. </p>
  395. {{end}}
  396. {{if or .BlockingDependencies .BlockingDependenciesNotPermitted}}
  397. <span class="text" data-tooltip-content="{{if .Issue.IsPull}}{{ctx.Locale.Tr "repo.issues.dependency.pr_close_blocks"}}{{else}}{{ctx.Locale.Tr "repo.issues.dependency.issue_close_blocks"}}{{end}}">
  398. <strong>{{ctx.Locale.Tr "repo.issues.dependency.blocks_short"}}</strong>
  399. </span>
  400. <div class="ui relaxed divided list">
  401. {{range .BlockingDependencies}}
  402. <div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} tw-flex tw-items-center tw-justify-between">
  403. <div class="item-left tw-flex tw-justify-center tw-flex-col tw-flex-1 gt-ellipsis">
  404. <a class="title muted" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}">
  405. #{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}
  406. </a>
  407. <div class="text small gt-ellipsis" data-tooltip-content="{{.Repository.OwnerName}}/{{.Repository.Name}}">
  408. {{.Repository.OwnerName}}/{{.Repository.Name}}
  409. </div>
  410. </div>
  411. <div class="item-right tw-flex tw-items-center tw-m-1">
  412. {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}}
  413. <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"}}">
  414. {{svg "octicon-trash" 16}}
  415. </a>
  416. {{end}}
  417. </div>
  418. </div>
  419. {{end}}
  420. {{if .BlockingDependenciesNotPermitted}}
  421. <div class="item tw-flex tw-items-center tw-justify-between gt-ellipsis">
  422. <span>{{ctx.Locale.TrN (len .BlockingDependenciesNotPermitted) "repo.issues.dependency.no_permission_1" "repo.issues.dependency.no_permission_n" (len .BlockingDependenciesNotPermitted)}}</span>
  423. </div>
  424. {{end}}
  425. </div>
  426. {{end}}
  427. {{if or .BlockedByDependencies .BlockedByDependenciesNotPermitted}}
  428. <span class="text" data-tooltip-content="{{if .Issue.IsPull}}{{ctx.Locale.Tr "repo.issues.dependency.pr_closing_blockedby"}}{{else}}{{ctx.Locale.Tr "repo.issues.dependency.issue_closing_blockedby"}}{{end}}">
  429. <strong>{{ctx.Locale.Tr "repo.issues.dependency.blocked_by_short"}}</strong>
  430. </span>
  431. <div class="ui relaxed divided list">
  432. {{range .BlockedByDependencies}}
  433. <div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} tw-flex tw-items-center tw-justify-between">
  434. <div class="item-left tw-flex tw-justify-center tw-flex-col tw-flex-1 gt-ellipsis">
  435. <a class="title muted" href="{{.Issue.Link}}" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}">
  436. #{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}
  437. </a>
  438. <div class="text small gt-ellipsis" data-tooltip-content="{{.Repository.OwnerName}}/{{.Repository.Name}}">
  439. {{.Repository.OwnerName}}/{{.Repository.Name}}
  440. </div>
  441. </div>
  442. <div class="item-right tw-flex tw-items-center tw-m-1">
  443. {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}}
  444. <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"}}">
  445. {{svg "octicon-trash" 16}}
  446. </a>
  447. {{end}}
  448. </div>
  449. </div>
  450. {{end}}
  451. {{if $.CanCreateIssueDependencies}}
  452. {{range .BlockedByDependenciesNotPermitted}}
  453. <div class="item dependency{{if .Issue.IsClosed}} is-closed{{end}} tw-flex tw-items-center tw-justify-between">
  454. <div class="item-left tw-flex tw-justify-center tw-flex-col tw-flex-1 gt-ellipsis">
  455. <div class="gt-ellipsis">
  456. <span data-tooltip-content="{{ctx.Locale.Tr "repo.issues.dependency.no_permission.can_remove"}}">{{svg "octicon-lock" 16}}</span>
  457. <span class="title" data-tooltip-content="#{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}">
  458. #{{.Issue.Index}} {{.Issue.Title | RenderEmoji $.Context}}
  459. </span>
  460. </div>
  461. <div class="text small gt-ellipsis" data-tooltip-content="{{.Repository.OwnerName}}/{{.Repository.Name}}">
  462. {{.Repository.OwnerName}}/{{.Repository.Name}}
  463. </div>
  464. </div>
  465. <div class="item-right tw-flex tw-items-center tw-m-1">
  466. {{if and $.CanCreateIssueDependencies (not $.Repository.IsArchived)}}
  467. <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"}}">
  468. {{svg "octicon-trash" 16}}
  469. </a>
  470. {{end}}
  471. </div>
  472. </div>
  473. {{end}}
  474. {{else if .BlockedByDependenciesNotPermitted}}
  475. <div class="item tw-flex tw-items-center tw-justify-between gt-ellipsis">
  476. <span>{{ctx.Locale.TrN (len .BlockedByDependenciesNotPermitted) "repo.issues.dependency.no_permission_1" "repo.issues.dependency.no_permission_n" (len .BlockedByDependenciesNotPermitted)}}</span>
  477. </div>
  478. {{end}}
  479. </div>
  480. {{end}}
  481. {{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}}
  482. <div>
  483. <form method="post" action="{{.Issue.Link}}/dependency/add" id="addDependencyForm">
  484. {{$.CsrfTokenHtml}}
  485. <div class="ui fluid action input">
  486. <div class="ui search selection dropdown" id="new-dependency-drop-list" data-issue-id="{{.Issue.ID}}">
  487. <input name="newDependency" type="hidden">
  488. {{svg "octicon-triangle-down" 14 "dropdown icon"}}
  489. <input type="text" class="search">
  490. <div class="default text">{{ctx.Locale.Tr "repo.issues.dependency.add"}}</div>
  491. </div>
  492. <button class="ui icon button">
  493. {{svg "octicon-plus"}}
  494. </button>
  495. </div>
  496. </form>
  497. </div>
  498. {{end}}
  499. </div>
  500. {{if and .CanCreateIssueDependencies (not .Repository.IsArchived)}}
  501. <input type="hidden" id="crossRepoSearch" value="{{.AllowCrossRepositoryDependencies}}">
  502. <div class="ui g-modal-confirm modal remove-dependency">
  503. <div class="header">
  504. {{svg "octicon-trash"}}
  505. {{ctx.Locale.Tr "repo.issues.dependency.remove_header"}}
  506. </div>
  507. <div class="content">
  508. <form method="post" action="{{.Issue.Link}}/dependency/delete" id="removeDependencyForm">
  509. {{$.CsrfTokenHtml}}
  510. <input type="hidden" value="" name="removeDependencyID" id="removeDependencyID">
  511. <input type="hidden" value="" name="dependencyType" id="dependencyType">
  512. </form>
  513. <p>{{if .Issue.IsPull}}
  514. {{ctx.Locale.Tr "repo.issues.dependency.pr_remove_text"}}
  515. {{else}}
  516. {{ctx.Locale.Tr "repo.issues.dependency.issue_remove_text"}}
  517. {{end}}</p>
  518. </div>
  519. {{$ModalButtonCancelText := ctx.Locale.Tr "repo.issues.dependency.cancel"}}
  520. {{$ModalButtonOkText := ctx.Locale.Tr "repo.issues.dependency.remove"}}
  521. {{template "base/modal_actions_confirm" (dict "." . "ModalButtonCancelText" $ModalButtonCancelText "ModalButtonOkText" $ModalButtonOkText)}}
  522. </div>
  523. {{end}}
  524. {{end}}
  525. <div class="divider"></div>
  526. <div class="ui equal width compact grid">
  527. {{$issueReferenceLink := printf "%s#%d" .Issue.Repo.FullName .Issue.Index}}
  528. <div class="row tw-items-center" data-tooltip-content="{{$issueReferenceLink}}">
  529. <span class="text column truncate">{{ctx.Locale.Tr "repo.issues.reference_link" $issueReferenceLink}}</span>
  530. <button class="ui two wide button column tw-p-2" data-clipboard-text="{{$issueReferenceLink}}">{{svg "octicon-copy" 14}}</button>
  531. </div>
  532. </div>
  533. {{if and .IsRepoAdmin (not .Repository.IsArchived)}}
  534. <div class="divider"></div>
  535. {{if or .PinEnabled .Issue.IsPinned}}
  536. <form class="tw-mt-1 form-fetch-action single-button-form" method="post" {{if $.NewPinAllowed}}action="{{.Issue.Link}}/pin"{{else}}data-tooltip-content="{{ctx.Locale.Tr "repo.issues.max_pinned"}}"{{end}}>
  537. {{$.CsrfTokenHtml}}
  538. <button class="fluid ui button {{if not $.NewPinAllowed}}disabled{{end}}">
  539. {{if not .Issue.IsPinned}}
  540. {{svg "octicon-pin" 16 "tw-mr-2"}}
  541. {{ctx.Locale.Tr "pin"}}
  542. {{else}}
  543. {{svg "octicon-pin-slash" 16 "tw-mr-2"}}
  544. {{ctx.Locale.Tr "unpin"}}
  545. {{end}}
  546. </button>
  547. </form>
  548. {{end}}
  549. <button class="tw-mt-1 fluid ui show-modal button {{if .Issue.IsLocked}} negative {{end}}" data-modal="#lock">
  550. {{if .Issue.IsLocked}}
  551. {{svg "octicon-key"}}
  552. {{ctx.Locale.Tr "repo.issues.unlock"}}
  553. {{else}}
  554. {{svg "octicon-lock"}}
  555. {{ctx.Locale.Tr "repo.issues.lock"}}
  556. {{end}}
  557. </button>
  558. <div class="ui tiny modal" id="lock">
  559. <div class="header">
  560. {{if .Issue.IsLocked}}
  561. {{ctx.Locale.Tr "repo.issues.unlock.title"}}
  562. {{else}}
  563. {{ctx.Locale.Tr "repo.issues.lock.title"}}
  564. {{end}}
  565. </div>
  566. <div class="content">
  567. <div class="ui warning message">
  568. {{if .Issue.IsLocked}}
  569. {{ctx.Locale.Tr "repo.issues.unlock.notice_1"}}<br>
  570. {{ctx.Locale.Tr "repo.issues.unlock.notice_2"}}<br>
  571. {{else}}
  572. {{ctx.Locale.Tr "repo.issues.lock.notice_1"}}<br>
  573. {{ctx.Locale.Tr "repo.issues.lock.notice_2"}}<br>
  574. {{ctx.Locale.Tr "repo.issues.lock.notice_3"}}<br>
  575. {{end}}
  576. </div>
  577. <form class="ui form form-fetch-action" action="{{.Issue.Link}}{{if .Issue.IsLocked}}/unlock{{else}}/lock{{end}}"
  578. method="post">
  579. {{.CsrfTokenHtml}}
  580. {{if not .Issue.IsLocked}}
  581. <div class="field">
  582. <strong> {{ctx.Locale.Tr "repo.issues.lock.reason"}} </strong>
  583. </div>
  584. <div class="field">
  585. <div class="ui fluid dropdown selection">
  586. <select name="reason">
  587. <option value=""> </option>
  588. {{range .LockReasons}}
  589. <option value="{{.}}">{{.}}</option>
  590. {{end}}
  591. </select>
  592. {{svg "octicon-triangle-down" 14 "dropdown icon"}}
  593. <div class="default text"> </div>
  594. <div class="menu">
  595. {{range .LockReasons}}
  596. <div class="item" data-value="{{.}}">{{.}}</div>
  597. {{end}}
  598. </div>
  599. </div>
  600. </div>
  601. {{end}}
  602. <div class="text right actions">
  603. <button class="ui cancel button">{{ctx.Locale.Tr "settings.cancel"}}</button>
  604. <button class="ui red button">
  605. {{if .Issue.IsLocked}}
  606. {{ctx.Locale.Tr "repo.issues.unlock_confirm"}}
  607. {{else}}
  608. {{ctx.Locale.Tr "repo.issues.lock_confirm"}}
  609. {{end}}
  610. </button>
  611. </div>
  612. </form>
  613. </div>
  614. </div>
  615. <button class="tw-mt-1 fluid ui show-modal button" data-modal="#sidebar-delete-issue">
  616. {{svg "octicon-trash"}}
  617. {{ctx.Locale.Tr "repo.issues.delete"}}
  618. </button>
  619. <div class="ui g-modal-confirm modal" id="sidebar-delete-issue">
  620. <div class="header">
  621. {{if .Issue.IsPull}}
  622. {{ctx.Locale.Tr "repo.pulls.delete.title"}}
  623. {{else}}
  624. {{ctx.Locale.Tr "repo.issues.delete.title"}}
  625. {{end}}
  626. </div>
  627. <div class="content">
  628. <p>
  629. {{if .Issue.IsPull}}
  630. {{ctx.Locale.Tr "repo.pulls.delete.text"}}
  631. {{else}}
  632. {{ctx.Locale.Tr "repo.issues.delete.text"}}
  633. {{end}}
  634. </p>
  635. </div>
  636. <form action="{{.Issue.Link}}/delete" method="post">
  637. {{.CsrfTokenHtml}}
  638. {{template "base/modal_actions_confirm" .}}
  639. </form>
  640. </div>
  641. {{end}}
  642. {{if and .Issue.IsPull .IsIssuePoster (not .Issue.IsClosed) .Issue.PullRequest.HeadRepo}}
  643. {{if and (not (eq .Issue.PullRequest.HeadRepo.FullName .Issue.PullRequest.BaseRepo.FullName)) .CanWriteToHeadRepo}}
  644. <div class="divider"></div>
  645. <div class="inline field">
  646. <div class="ui checkbox" id="allow-edits-from-maintainers"
  647. data-url="{{.Issue.Link}}"
  648. data-tooltip-content="{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers_desc"}}"
  649. data-prompt-error="{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers_err"}}"
  650. >
  651. <label><strong>{{ctx.Locale.Tr "repo.pulls.allow_edits_from_maintainers"}}</strong></label>
  652. <input type="checkbox" {{if .Issue.PullRequest.AllowMaintainerEdit}}checked{{end}}>
  653. </div>
  654. </div>
  655. {{end}}
  656. {{end}}
  657. </div>