summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2016-07-27 18:07:11 +0800
committerLin Jen-Shin <godfat@godfat.org>2016-07-27 18:07:11 +0800
commit7d3c98e75497f5bb937dda0905b81e42cfe87f23 (patch)
tree9d10eb0e07c7064ffbbcb3011fdf8c12316bde63
parentae0942575479ad1694766d0ec5c4dd61b2bb3550 (diff)
downloadgitlab-ce-7d3c98e75497f5bb937dda0905b81e42cfe87f23.tar.gz
Merge some repeated codes to the partial
-rw-r--r--app/views/projects/issues/_issue_by_email.html.haml4
-rw-r--r--app/views/projects/issues/index.html.haml12
2 files changed, 7 insertions, 9 deletions
diff --git a/app/views/projects/issues/_issue_by_email.html.haml b/app/views/projects/issues/_issue_by_email.html.haml
index 72022881c09..72669372497 100644
--- a/app/views/projects/issues/_issue_by_email.html.haml
+++ b/app/views/projects/issues/_issue_by_email.html.haml
@@ -1,3 +1,7 @@
+.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
diff --git a/app/views/projects/issues/index.html.haml b/app/views/projects/issues/index.html.haml
index 6b7c156b5ae..d0edd2f22ec 100644
--- a/app/views/projects/issues/index.html.haml
+++ b/app/views/projects/issues/index.html.haml
@@ -24,12 +24,9 @@
= render 'shared/issuable/filter', type: :issues
.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
+ = render 'issue_by_email', email: new_issue_email
- else
.blank-state.blank-state-welcome
%h2.blank-state-title.blank-state-welcome-title
@@ -47,7 +44,4 @@
= link_to new_namespace_project_issue_path(@project.namespace, @project), class: "btn btn-new", title: "New Issue", id: "new_issue_link" do
New Issue
- 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
+ = render 'issue_by_email', email: new_issue_email