Commit 642f9f4a authored by Sytse Sijbrandij's avatar Sytse Sijbrandij

Scrum view style milestone view.

parent d0357f3b
$ -> $ ->
$('.milestone-issue-filter li[data-closed]').addClass('hide')
$('.milestone-issue-filter ul.nav li a').click ->
$('.milestone-issue-filter li').toggleClass('active')
$('.milestone-issue-filter li[data-closed]').toggleClass('hide')
false
$('.milestone-merge-requests-filter li[data-closed]').addClass('hide') $('.milestone-merge-requests-filter li[data-closed]').addClass('hide')
$('.milestone-merge-requests-filter ul.nav li a').click -> $('.milestone-merge-requests-filter ul.nav li a').click ->
......
...@@ -28,6 +28,8 @@ class Issue < ActiveRecord::Base ...@@ -28,6 +28,8 @@ class Issue < ActiveRecord::Base
scope :cared, ->(user) { where(assignee_id: user) } scope :cared, ->(user) { where(assignee_id: user) }
scope :authored, ->(user) { where(author_id: user) } scope :authored, ->(user) { where(author_id: user) }
scope :open_for, ->(user) { opened.assigned(user) } scope :open_for, ->(user) { opened.assigned(user) }
scope :assigned, where("assignee_id IS NOT NULL")
scope :unassigned, where("assignee_id IS NULL")
state_machine :state, initial: :opened do state_machine :state, initial: :opened do
event :close do event :close do
......
.span6
.ui-box.milestone-issue-filter
.title
%ul.nav.nav-pills
%li=issues.first
%ul.well-list
- issues.second.each do |issue|
%li{data: {closed: issue.closed?}}
= link_to [@project, issue] do
%span.badge.badge-info ##{issue.id}
&ndash;
= link_to_gfm truncate(issue.title, length: 60), [@project, issue]
\ No newline at end of file
...@@ -56,20 +56,11 @@ ...@@ -56,20 +56,11 @@
.row .row
.span6 =render(:partial => 'issues', :object => ['Unstarted Issues (open and unassigned)', @issues.opened.unassigned])
.ui-box.milestone-issue-filter
.title =render(:partial => 'issues', :object => ['Ongoing Issues (open and assigned) ', @issues.opened.assigned])
%ul.nav.nav-pills
%li.active= link_to('Open Issues', '#')
%li=link_to('All Issues', '#')
%ul.well-list
- @issues.each do |issue|
%li{data: {closed: issue.closed?}}
= link_to [@project, issue] do
%span.badge.badge-info ##{issue.id}
&ndash;
= link_to_gfm truncate(issue.title, length: 60), [@project, issue]
.row
.span6 .span6
.ui-box.milestone-merge-requests-filter .ui-box.milestone-merge-requests-filter
.title .title
...@@ -84,6 +75,8 @@ ...@@ -84,6 +75,8 @@
&ndash; &ndash;
= link_to_gfm truncate(merge_request.title, length: 60), [@project, merge_request] = link_to_gfm truncate(merge_request.title, length: 60), [@project, merge_request]
=render(:partial => 'issues', :object => ['Completed Issues (closed)', @issues.closed])
%hr %hr
%h6 Participants: %h6 Participants:
%div %div
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment