BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
7964ea1b
Commit
7964ea1b
authored
Jun 30, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added new issue by email modal window
parent
e616fbfd
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
1 deletion
+44
-1
issues.scss
app/assets/stylesheets/pages/issues.scss
+17
-0
project.rb
app/models/project.rb
+1
-1
_issue_by_email.html.haml
app/views/projects/issues/_issue_by_email.html.haml
+20
-0
index.html.haml
app/views/projects/issues/index.html.haml
+6
-0
No files found.
app/assets/stylesheets/pages/issues.scss
View file @
7964ea1b
...
@@ -91,3 +91,20 @@ form.edit-issue {
...
@@ -91,3 +91,20 @@ form.edit-issue {
.issue-form
.select2-container
{
.issue-form
.select2-container
{
width
:
250px
!
important
;
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
;
}
}
app/models/project.rb
View file @
7964ea1b
...
@@ -529,7 +529,7 @@ class Project < ActiveRecord::Base
...
@@ -529,7 +529,7 @@ class Project < ActiveRecord::Base
end
end
def
new_issue_address
(
author
)
def
new_issue_address
(
author
)
if
Gitlab
::
IncomingEmail
.
enabled?
if
Gitlab
::
IncomingEmail
.
enabled?
&&
author
Gitlab
::
IncomingEmail
.
reply_address
(
Gitlab
::
IncomingEmail
.
reply_address
(
"
#{
path_with_namespace
}
+
#{
author
.
authentication_token
}
"
)
"
#{
path_with_namespace
}
+
#{
author
.
authentication_token
}
"
)
end
end
...
...
app/views/projects/issues/_issue_by_email.html.haml
0 → 100644
View file @
7964ea1b
#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).
app/views/projects/issues/index.html.haml
View file @
7964ea1b
-
@no_container
=
true
-
@no_container
=
true
-
page_title
"Issues"
-
page_title
"Issues"
-
new_issue_email
=
@project
.
new_issue_address
(
current_user
)
=
render
"projects/issues/head"
=
render
"projects/issues/head"
=
content_for
:meta_tags
do
=
content_for
:meta_tags
do
...
@@ -24,3 +25,8 @@
...
@@ -24,3 +25,8 @@
.issues-holder
.issues-holder
=
render
"issues"
=
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment