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
diff options
context:
space:
mode:
authorAlex Braha Stoll <alexbrahastoll@gmail.com>2016-12-16 07:12:21 +0300
committerAlex Braha Stoll <alexbrahastoll@gmail.com>2016-12-31 21:55:50 +0300
commit8bf52a4ae3aebc8c58f51cff696e99ecafe9c7c8 (patch)
tree498f99458cfdb5dc4ff83f2abec6eee5c4136e51 /app/controllers/projects/wikis_controller.rb
parent8dc2163ce580f1d71be1cf45e5dfcb2b4763d7bb (diff)
Show directory hierarchy when listing wiki pages
Diffstat (limited to 'app/controllers/projects/wikis_controller.rb')
-rw-r--r--app/controllers/projects/wikis_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/projects/wikis_controller.rb b/app/controllers/projects/wikis_controller.rb
index c3353446fd1..45a42400b2a 100644
--- a/app/controllers/projects/wikis_controller.rb
+++ b/app/controllers/projects/wikis_controller.rb
@@ -8,6 +8,7 @@ class Projects::WikisController < Projects::ApplicationController
def pages
@wiki_pages = Kaminari.paginate_array(@project_wiki.pages).page(params[:page])
+ @wiki_directories = WikiPage.group_by_directory(@wiki_pages)
end
def show
@@ -116,7 +117,7 @@ class Projects::WikisController < Projects::ApplicationController
# Call #wiki to make sure the Wiki Repo is initialized
@project_wiki.wiki
- @sidebar_wiki_pages = @project_wiki.pages.first(15)
+ @sidebar_wiki_directories = WikiPage.group_by_directory(@project_wiki.pages.first(15))
rescue ProjectWiki::CouldNotCreateWikiError
flash[:notice] = "Could not create Wiki Repository at this time. Please try again later."
redirect_to project_path(@project)