Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorRubén Dávila <rdavila84@gmail.com>2016-02-23 04:39:36 +0300
committerRubén Dávila <rdavila84@gmail.com>2016-03-05 06:37:03 +0300
commit70028d36bee51a9ed86d20fe5d6c895772cc476a (patch)
tree979a8a3e2b505aa25301af3090691f4f081c67bd /app/views
parenta056dfa9a077def4c3ffb958d3f86f7c9d7c2096 (diff)
Recator Issues Tab into a custom partial.
Diffstat (limited to 'app/views')
-rw-r--r--app/views/groups/milestones/show.html.haml15
-rw-r--r--app/views/projects/milestones/show.html.haml9
-rw-r--r--app/views/shared/milestones/_issue.html.haml (renamed from app/views/projects/milestones/_issue.html.haml)5
-rw-r--r--app/views/shared/milestones/_issues.html.haml (renamed from app/views/projects/milestones/_issues.html.haml)2
-rw-r--r--app/views/shared/milestones/_issues_tab.html.haml7
5 files changed, 14 insertions, 24 deletions
diff --git a/app/views/groups/milestones/show.html.haml b/app/views/groups/milestones/show.html.haml
index 405df1d3433..0114e68b19d 100644
--- a/app/views/groups/milestones/show.html.haml
+++ b/app/views/groups/milestones/show.html.haml
@@ -68,20 +68,9 @@
Participants
%span.badge= @milestone.participants.count
-.tab-content
+.tab-content.milestone-content
.tab-pane.active#tab-issues
- .gray-content-block.middle-block
- .pull-right
- = link_to 'Browse Issues', issues_group_path(@group, milestone_title: @milestone.title), class: "btn btn-grouped"
-
- .oneline
- All issues in this milestone
-
- .row.prepend-top-default
- .col-md-6
- = render 'issues', title: "Open", issues: @milestone.opened_issues
- .col-md-6
- = render 'issues', title: "Closed", issues: @milestone.closed_issues
+ = render 'shared/milestones/issues_tab', unassigned: @milestone.opened_issues.unassigned, assigned: @milestone.opened_issues.assigned, closed: @milestone.closed_issues
.tab-pane#tab-merge-requests
.gray-content-block.middle-block
diff --git a/app/views/projects/milestones/show.html.haml b/app/views/projects/milestones/show.html.haml
index 2cae1ac4e2c..2322946894e 100644
--- a/app/views/projects/milestones/show.html.haml
+++ b/app/views/projects/milestones/show.html.haml
@@ -94,14 +94,7 @@
.tab-content.milestone-content
.tab-pane.active#tab-issues
- .row.prepend-top-default
- .col-md-4
- = render('issues', title: 'Unstarted Issues (open and unassigned)', issues: @issues.opened.unassigned, id: 'unassigned')
- .col-md-4
- = render('issues', title: 'Ongoing Issues (open and assigned)', issues: @issues.opened.assigned, id: 'ongoing')
- .col-md-4
- = render('issues', title: 'Completed Issues (closed)', issues: @issues.closed, id: 'closed')
-
+ = render 'shared/milestones/issues_tab', unassigned: @issues.opened.unassigned, assigned: @issues.opened.assigned, closed: @issues.closed
.tab-pane#tab-merge-requests
.row.prepend-top-default
.col-md-3
diff --git a/app/views/projects/milestones/_issue.html.haml b/app/views/shared/milestones/_issue.html.haml
index ca51b8c745d..07880404c9a 100644
--- a/app/views/projects/milestones/_issue.html.haml
+++ b/app/views/shared/milestones/_issue.html.haml
@@ -1,8 +1,9 @@
+- project = issue.project
%li{ id: dom_id(issue, 'sortable'), class: 'issue-row', 'data-iid' => issue.iid, 'data-url' => issue_path(issue) }
%span
- = link_to_gfm issue.title, [@project.namespace.becomes(Namespace), @project, issue], title: issue.title
+ = link_to_gfm issue.title, [project.namespace.becomes(Namespace), project, issue], title: issue.title
.issue-detail
- = link_to [@project.namespace.becomes(Namespace), @project, issue] do
+ = link_to [project.namespace.becomes(Namespace), project, issue] do
%span.issue-number ##{issue.iid}
- issue.labels.each do |label|
= render_colored_label(label)
diff --git a/app/views/projects/milestones/_issues.html.haml b/app/views/shared/milestones/_issues.html.haml
index 6f8a341e478..e1b5c2eb66c 100644
--- a/app/views/projects/milestones/_issues.html.haml
+++ b/app/views/shared/milestones/_issues.html.haml
@@ -4,4 +4,4 @@
.pull-right= issues.size
%ul{ class: "well-list issues-sortable-list", id: "issues-list-#{id}", "data-state" => id }
- issues.sort_by(&:position).each do |issue|
- = render 'issue', issue: issue
+ = render 'shared/milestones/issue', issue: issue
diff --git a/app/views/shared/milestones/_issues_tab.html.haml b/app/views/shared/milestones/_issues_tab.html.haml
new file mode 100644
index 00000000000..3e98a809ad5
--- /dev/null
+++ b/app/views/shared/milestones/_issues_tab.html.haml
@@ -0,0 +1,7 @@
+.row.prepend-top-default
+ .col-md-4
+ = render('shared/milestones/issues', title: 'Unstarted Issues (open and unassigned)', issues: unassigned, id: 'unassigned')
+ .col-md-4
+ = render('shared/milestones/issues', title: 'Ongoing Issues (open and assigned)', issues: assigned, id: 'ongoing')
+ .col-md-4
+ = render('shared/milestones/issues', title: 'Completed Issues (closed)', issues: closed, id: 'closed')