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

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid O'Regan <doregan@gitlab.com>2021-03-24 20:15:08 +0300
committerSuzanne Selhorn <sselhorn@gitlab.com>2021-03-24 20:15:08 +0300
commitfde9952a8ebb75227d1879b3999203dca672a26f (patch)
treee73a871e26ba09b25267e1eb58f66ae944e480f4 /lib
parent89883be9e9cfad350b3959b281583ae8728e4da2 (diff)
Feat: Update left navigation to allow more levels
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/navigation/doc.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/navigation/doc.rb b/lib/gitlab/navigation/doc.rb
index 8bed2d43..27c75d7d 100644
--- a/lib/gitlab/navigation/doc.rb
+++ b/lib/gitlab/navigation/doc.rb
@@ -25,8 +25,12 @@ module Gitlab
doc[:ee_tier]
end
+ def has_children?
+ !children.empty?
+ end
+
def children
- []
+ @children ||= doc.fetch(:docs, []).map { |doc| Doc.new(doc) }
end
private