Skip to content

Commit

Permalink
Refactor: Add a SelectedPane.
Browse files Browse the repository at this point in the history
  • Loading branch information
edavis10 committed Apr 14, 2010
1 parent f0325be commit 7ed8f8a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/models/kanban.rb
@@ -1,5 +1,5 @@
class Kanban
attr_reader :incoming_pane, :backlog_pane, :quick_pane, :canceled_pane, :finished_pane, :active_pane, :testing_pane
attr_reader :incoming_pane, :backlog_pane, :quick_pane, :canceled_pane, :finished_pane, :active_pane, :testing_pane, :selected_pane

attr_accessor :incoming_issues
attr_accessor :quick_issues
Expand All @@ -20,7 +20,8 @@ def initialize
@finished_pane = KanbanPane::FinishedPane.new
@active_pane = KanbanPane::ActivePane.new
@testing_pane = KanbanPane::TestingPane.new

@selected_pane = KanbanPane::SelectedPane.new

@settings = Setting.plugin_redmine_kanban
@users = get_users
end
Expand Down Expand Up @@ -55,7 +56,7 @@ def backlog_issues
end

def selected_issues
@selected_issues ||= KanbanIssue.find_selected
@selected_issues ||= selected_pane.get_issues
end

def active_issues
Expand Down
6 changes: 6 additions & 0 deletions app/models/kanban_pane/selected_pane.rb
@@ -0,0 +1,6 @@
class KanbanPane::SelectedPane < KanbanPane
def get_issues(options={})
KanbanIssue.find_selected
end
end

0 comments on commit 7ed8f8a

Please sign in to comment.