Commit 31e50ed3 authored by Marin Jankovski's avatar Marin Jankovski

Add tab for readme and load readme in tab.

parent ff2b0bfa
= render "home_panel"
- readme = @repository.readme
%ul.nav.nav-tabs
%li.active
= link_to project_path(@project) do
= link_to '#tab-activity', 'data-toggle' => 'tab' do
Activity
- if readme
%li
= link_to '#tab-readme', 'data-toggle' => 'tab' do
Readme
.project-home-links
- unless @project.empty_repo?
= link_to pluralize(number_with_delimiter(@repository.commit_count), 'commit'), project_commits_path(@project, @ref || @repository.root_ref)
......@@ -11,7 +16,9 @@
= link_to pluralize(number_with_delimiter(@repository.tag_names.count), 'tag'), project_tags_path(@project)
%span.light.prepend-left-20= repository_size
.row
.tab-content
.tab-pane.active#tab-activity
.row
%section.col-md-9
= render "events/event_last_push", event: @last_push
= render 'shared/event_filter'
......@@ -37,11 +44,6 @@
= link_to project_compare_index_path(@project, from: @repository.root_ref, to: @ref || @repository.root_ref), class: 'btn btn-block' do
Compare code
- if @repository.readme
- readme = @repository.readme
= link_to project_blob_path(@project, tree_join(@repository.root_ref, readme.name)), class: 'btn btn-block' do
= readme.name
- if @repository.version
- version = @repository.version
= link_to project_blob_path(@project, tree_join(@repository.root_ref, version.name)), class: 'btn btn-block' do
......@@ -65,3 +67,14 @@
%hr
= link_to @project.gitlab_ci_service.builds_path do
= image_tag @project.gitlab_ci_service.status_img_path, alt: "build status"
- if readme
.tab-pane#tab-readme
%article.readme-holder#README
= link_to project_blob_path(@project, tree_join(@repository.root_ref, readme.name)) do
%h4.readme-file-title
%i.icon-file
= readme.name
.wiki
= render_readme(readme)
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