diff options
author | Riccardo Padovani <riccardo@rpadovani.com> | 2017-09-07 14:18:25 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-09-07 14:18:25 +0000 |
commit | d1cb1bf80d5ec2651ff460902f58643ad369bb8c (patch) | |
tree | 54d5d053deeb60f102fab2b4f516e6515f82dcf7 | |
parent | 0357726d29b51e6593509850c17c01e9c18fa55b (diff) | |
download | gitlab-ce-d1cb1bf80d5ec2651ff460902f58643ad369bb8c.tar.gz |
#34945: add a div id to the readme section in the project overview
-rw-r--r-- | app/views/projects/show.html.haml | 5 | ||||
-rw-r--r-- | app/views/projects/tree/_readme.html.haml | 2 | ||||
-rw-r--r-- | changelogs/unreleased/34945-readme-div-id.yml | 5 |
3 files changed, 9 insertions, 3 deletions
diff --git a/app/views/projects/show.html.haml b/app/views/projects/show.html.haml index 3f0a24cfe83..6ee55bba82a 100644 --- a/app/views/projects/show.html.haml +++ b/app/views/projects/show.html.haml @@ -27,9 +27,10 @@ = link_to project_tags_path(@project) do #{n_('Tag', 'Tags', @repository.tag_count)} (#{number_with_delimiter(@repository.tag_count)}) - - if default_project_view != 'readme' && @repository.readme + - if @repository.readme %li - = link_to _('Readme'), readme_path(@project) + = link_to _('Readme'), + default_project_view != 'readme' ? readme_path(@project) : '#readme' - if @repository.changelog %li diff --git a/app/views/projects/tree/_readme.html.haml b/app/views/projects/tree/_readme.html.haml index 4579a912f39..4daacbe157c 100644 --- a/app/views/projects/tree/_readme.html.haml +++ b/app/views/projects/tree/_readme.html.haml @@ -1,5 +1,5 @@ - if readme.rich_viewer - %article.file-holder.readme-holder{ class: ("limited-width-container" unless fluid_layout) } + %article.file-holder.readme-holder{ id: 'readme', class: ("limited-width-container" unless fluid_layout) } .js-file-title.file-title = blob_icon readme.mode, readme.name = link_to project_blob_path(@project, tree_join(@ref, readme.path)) do diff --git a/changelogs/unreleased/34945-readme-div-id.yml b/changelogs/unreleased/34945-readme-div-id.yml new file mode 100644 index 00000000000..c7d26b746b4 --- /dev/null +++ b/changelogs/unreleased/34945-readme-div-id.yml @@ -0,0 +1,5 @@ +--- +title: Add div id to the readme in the project overview +merge_request: 13735 +author: Riccardo Padovani @rpadovani +type: added |