summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorAlexandru Croitor <acroitor@gitlab.com>2019-06-17 15:58:48 +0300
committerAlexandru Croitor <acroitor@gitlab.com>2019-06-26 12:28:00 +0300
commit0f6c42c5ce165dadf1976ae15a043b87ca533618 (patch)
tree9220ed5a8eb628ca3c5170a0d5f9400870538797 /app/helpers
parent2b9ddc2f99bc0a49967c9ccc5b79ccc53e7559b4 (diff)
downloadgitlab-ce-0f6c42c5ce165dadf1976ae15a043b87ca533618.tar.gz
Move Multiple Issue Boards for Projects to Core53811-issue-boards-to-core-projects-backend-ce
Refactor code to allow multiple issue boards management for projects in CE
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/boards_helper.rb17
1 files changed, 15 insertions, 2 deletions
diff --git a/app/helpers/boards_helper.rb b/app/helpers/boards_helper.rb
index c5130b430b9..8ef68018d23 100644
--- a/app/helpers/boards_helper.rb
+++ b/app/helpers/boards_helper.rb
@@ -15,7 +15,8 @@ module BoardsHelper
root_path: root_path,
bulk_update_path: @bulk_issues_path,
default_avatar: image_path(default_avatar),
- time_tracking_limit_to_hours: Gitlab::CurrentSettings.time_tracking_limit_to_hours.to_s
+ time_tracking_limit_to_hours: Gitlab::CurrentSettings.time_tracking_limit_to_hours.to_s,
+ recent_boards_endpoint: recent_boards_path
}
end
@@ -87,6 +88,18 @@ module BoardsHelper
end
def boards_link_text
- s_("IssueBoards|Board")
+ if current_board_parent.multiple_issue_boards_available?
+ s_("IssueBoards|Boards")
+ else
+ s_("IssueBoards|Board")
+ end
+ end
+
+ def recent_boards_path
+ recent_project_boards_path(@project) if current_board_parent.is_a?(Project)
+ end
+
+ def current_board_json
+ board.to_json
end
end