Added new issue by email modal window
This commit is contained in:
parent
e616fbfd42
commit
7964ea1bad
|
@ -91,3 +91,20 @@ form.edit-issue {
|
|||
.issue-form .select2-container {
|
||||
width: 250px !important;
|
||||
}
|
||||
|
||||
.issues-footer {
|
||||
padding-top: $gl-padding;
|
||||
padding-bottom: 37px;
|
||||
}
|
||||
|
||||
.issue-email-modal-btn {
|
||||
padding: 0;
|
||||
color: $gl-link-color;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -529,7 +529,7 @@ class Project < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def new_issue_address(author)
|
||||
if Gitlab::IncomingEmail.enabled?
|
||||
if Gitlab::IncomingEmail.enabled? && author
|
||||
Gitlab::IncomingEmail.reply_address(
|
||||
"#{path_with_namespace}+#{author.authentication_token}")
|
||||
end
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
#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
|
||||
Write an email to
|
||||
= succeed "." do
|
||||
%a{ href: "mailto:#{email}" }= email
|
||||
(This is a private email address, so keep it secret.)
|
||||
%p
|
||||
Send an email to this address to create an issue.
|
||||
%p
|
||||
Use the subject line as the title of your issue.
|
||||
%p
|
||||
Use the message as the body of your issue (feel free to include some nice markdown).
|
|
@ -1,5 +1,6 @@
|
|||
- @no_container = true
|
||||
- page_title "Issues"
|
||||
- new_issue_email = @project.new_issue_address(current_user)
|
||||
= render "projects/issues/head"
|
||||
|
||||
= content_for :meta_tags do
|
||||
|
@ -24,3 +25,8 @@
|
|||
|
||||
.issues-holder
|
||||
= render "issues"
|
||||
- if new_issue_email
|
||||
.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
|
||||
= render "issue_by_email", email: new_issue_email
|
||||
|
|
Loading…
Reference in New Issue