From 8cce70730c2fb9c705e1f1177f6d1effc665b3c7 Mon Sep 17 00:00:00 2001 From: Jan Provaznik Date: Thu, 24 Aug 2017 08:20:36 +0200 Subject: Create merge request from email * new merge request can be created by sending an email to the specific email address (similar to creating issues by email) * for the first iteration, source branch must be specified in the mail subject, other merge request parameters can not be set yet * user should enable "Receive notifications about your own activity" in user settings to receive a notification about created merge request Part of #32878 --- .../issues/_by_email_description.html.haml | 6 ++++ .../projects/issues/_issue_by_email.html.haml | 34 ---------------------- app/views/projects/issues/index.html.haml | 4 +-- 3 files changed, 8 insertions(+), 36 deletions(-) create mode 100644 app/views/projects/issues/_by_email_description.html.haml delete mode 100644 app/views/projects/issues/_issue_by_email.html.haml (limited to 'app/views/projects/issues') diff --git a/app/views/projects/issues/_by_email_description.html.haml b/app/views/projects/issues/_by_email_description.html.haml new file mode 100644 index 00000000000..f2d58534903 --- /dev/null +++ b/app/views/projects/issues/_by_email_description.html.haml @@ -0,0 +1,6 @@ +The subject will be used as the title of the new issue, and the message will be the description. + += link_to 'Quick actions', help_page_path('user/project/quick_actions'), target: '_blank', tabindex: -1 +and styling with += link_to 'Markdown', help_page_path('user/markdown'), target: '_blank', tabindex: -1 +are supported. diff --git a/app/views/projects/issues/_issue_by_email.html.haml b/app/views/projects/issues/_issue_by_email.html.haml deleted file mode 100644 index 264032a3a31..00000000000 --- a/app/views/projects/issues/_issue_by_email.html.haml +++ /dev/null @@ -1,34 +0,0 @@ -.issues-footer.text-center - %button.issue-email-modal-btn{ type: "button", data: { toggle: "modal", target: "#issue-email-modal" } } - Email a new issue to this project - -#issue-email-modal.modal.fade{ tabindex: "-1", role: "dialog" } - .modal-dialog{ role: "document" } - .modal-content - .modal-header - %button.close{ type: "button", data: { dismiss: "modal" }, aria: { label: "close" } } - %span{ aria: { hidden: "true" } }= icon("times") - %h4.modal-title - Create new issue by email - .modal-body - %p - You can create a new issue inside this project by sending an email to the following email address: - .email-modal-input-group.input-group - = text_field_tag :issue_email, email, class: "monospace js-select-on-focus form-control", readonly: true - .input-group-btn - = clipboard_button(target: '#issue_email') - %p - The subject will be used as the title of the new issue, and the message will be the description. - - = link_to 'Quick actions', help_page_path('user/project/quick_actions'), target: '_blank', tabindex: -1 - and styling with - = link_to 'Markdown', help_page_path('user/markdown'), target: '_blank', tabindex: -1 - are supported. - - %p - This is a private email address, generated just for you. - - Anyone who gets ahold of it can create issues as if they were you. - You should - = link_to 'reset it', new_issue_address_project_path(@project), class: 'incoming-email-token-reset' - if that ever happens. diff --git a/app/views/projects/issues/index.html.haml b/app/views/projects/issues/index.html.haml index bfaf024428d..193111b4cee 100644 --- a/app/views/projects/issues/index.html.haml +++ b/app/views/projects/issues/index.html.haml @@ -2,7 +2,7 @@ - @can_bulk_update = can?(current_user, :admin_issue, @project) - page_title "Issues" -- new_issue_email = @project.new_issue_address(current_user) +- new_issue_email = @project.new_issuable_address(current_user, 'issue') - content_for :page_specific_javascripts do = webpack_bundle_tag 'common_vue' @@ -25,6 +25,6 @@ .issues-holder = render 'issues' - if new_issue_email - = render 'issue_by_email', email: new_issue_email + = render 'projects/issuable_by_email', email: new_issue_email, issuable_type: 'issue' - else = render 'shared/empty_states/issues', button_path: new_project_issue_path(@project) -- cgit v1.2.1