# HG changeset patch # User Marcin Kuzminski # Date 2019-11-26 11:39:01 # Node ID 24c7dd99959b76727699f932df2cade33a59b3cb # Parent f857226ed09479960a48feec4f359f04ed81d368 pull-requests: added WIP markers in display, and improved a bit ui when creating a pull-request. - add info about WIP markers in title - make description a bigger input to match size of title diff --git a/rhodecode/apps/my_account/views/my_account.py b/rhodecode/apps/my_account/views/my_account.py --- a/rhodecode/apps/my_account/views/my_account.py +++ b/rhodecode/apps/my_account/views/my_account.py @@ -682,7 +682,8 @@ class MyAccountView(BaseAppView, DataGri 'target_repo': _render('pullrequest_target_repo', pr.target_repo.repo_name), 'name': _render('pullrequest_name', - pr.pull_request_id, pr.target_repo.repo_name, + pr.pull_request_id, pr.work_in_progress, + pr.target_repo.repo_name, short=True), 'name_raw': pr.pull_request_id, 'status': _render('pullrequest_status', diff --git a/rhodecode/apps/repository/views/repo_pull_requests.py b/rhodecode/apps/repository/views/repo_pull_requests.py --- a/rhodecode/apps/repository/views/repo_pull_requests.py +++ b/rhodecode/apps/repository/views/repo_pull_requests.py @@ -108,7 +108,8 @@ class RepoPullRequestsView(RepoAppView, data.append({ 'name': _render('pullrequest_name', - pr.pull_request_id, pr.target_repo.repo_name), + pr.pull_request_id, pr.work_in_progress, + pr.target_repo.repo_name), 'name_raw': pr.pull_request_id, 'status': _render('pullrequest_status', pr.calculated_review_status()), diff --git a/rhodecode/templates/data_table/_dt_elements.mako b/rhodecode/templates/data_table/_dt_elements.mako --- a/rhodecode/templates/data_table/_dt_elements.mako +++ b/rhodecode/templates/data_table/_dt_elements.mako @@ -370,8 +370,12 @@ ${comments_nr} -<%def name="pullrequest_name(pull_request_id, target_repo_name, short=False)"> +<%def name="pullrequest_name(pull_request_id, is_wip, target_repo_name, short=False)"> + % if is_wip: + wip + % endif + % if short: !${pull_request_id} % else: diff --git a/rhodecode/templates/pullrequests/pullrequest.mako b/rhodecode/templates/pullrequests/pullrequest.mako --- a/rhodecode/templates/pullrequests/pullrequest.mako +++ b/rhodecode/templates/pullrequests/pullrequest.mako @@ -40,13 +40,16 @@
${h.text('pullrequest_title', c.default_title, class_="medium autogenerated-title")}
+

+ Start the title with WIP: to prevent accidental merge of Work In Progress pull request before it's ready. +

-
+
${dt.markup_form('pullrequest_desc')}