diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-31 21:06:28 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-31 21:06:28 +0000 |
commit | 8f210aebe1d740e8ee194f171f1f33a6e1fba313 (patch) | |
tree | f43c545801bb96fd0737f18493fb30ab92972627 /app/views | |
parent | 996f700997805b3590da8d8afdd19d193989078a (diff) | |
download | gitlab-ce-8f210aebe1d740e8ee194f171f1f33a6e1fba313.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views')
26 files changed, 102 insertions, 197 deletions
diff --git a/app/views/admin/application_settings/_snowplow.html.haml b/app/views/admin/application_settings/_snowplow.html.haml index 31fd12d191e..dd454ce5dd7 100644 --- a/app/views/admin/application_settings/_snowplow.html.haml +++ b/app/views/admin/application_settings/_snowplow.html.haml @@ -26,5 +26,8 @@ .form-group = f.label :snowplow_cookie_domain, _('Cookie domain'), class: 'label-light' = f.text_field :snowplow_cookie_domain, class: 'form-control' + .form-group + = f.label :snowplow_iglu_registry_url, _('Iglu registry URL (optional)'), class: 'label-light' + = f.text_field :snowplow_iglu_registry_url, class: 'form-control' = f.submit _('Save changes'), class: 'btn btn-success' diff --git a/app/views/layouts/nav/sidebar/_project.html.haml b/app/views/layouts/nav/sidebar/_project.html.haml index fdad2a64a80..2c0cb973542 100644 --- a/app/views/layouts/nav/sidebar/_project.html.haml +++ b/app/views/layouts/nav/sidebar/_project.html.haml @@ -264,7 +264,7 @@ dismiss_endpoint: user_callouts_path } } - if show_cluster_hint .feature-highlight-popover-content - = image_tag 'illustrations/cluster_popover.svg', class: 'feature-highlight-illustration' + = image_tag 'illustrations/cluster_popover.svg', class: 'feature-highlight-illustration', lazy: false, alt: _('Kubernetes popover') .feature-highlight-popover-sub-content %p= _('Allows you to add and manage Kubernetes clusters.') %p @@ -282,14 +282,14 @@ - if project_nav_tab? :wiki - wiki_url = project_wiki_path(@project, :home) - = nav_link(controller: [:wikis, :wiki_pages, :wiki_directories]) do + = nav_link(controller: :wikis) do = link_to wiki_url, class: 'shortcuts-wiki', data: { qa_selector: 'wiki_link' } do .nav-icon-container = sprite_icon('book') %span.nav-item-name = _('Wiki') %ul.sidebar-sub-level-items.is-fly-out-only - = nav_link(controller: [:wikis, :wiki_pages, :wiki_directories], html_options: { class: "fly-out-top-item" } ) do + = nav_link(controller: :wikis, html_options: { class: "fly-out-top-item" } ) do = link_to wiki_url do %strong.fly-out-top-item-name = _('Wiki') diff --git a/app/views/projects/wiki_directories/_pages_wiki_directory.html.haml b/app/views/projects/wiki_directories/_pages_wiki_directory.html.haml deleted file mode 100644 index a9d2f38da88..00000000000 --- a/app/views/projects/wiki_directories/_pages_wiki_directory.html.haml +++ /dev/null @@ -1,15 +0,0 @@ -%li - %span.text-secondary-500.svg-icon.svg-baseline - - if @show_children - = sprite_icon('folder-open', size: 16) - - else - = sprite_icon('folder-o', size: 16) - - = link_to wiki_dir.slug, project_wiki_dir_path(@project, wiki_dir) - - unless @show_children - %span.badge.badge-pill.wiki-dir-page-count= wiki_dir.page_count - .float-right - %small= (s_("Last edited %{date}") % { date: time_ago_with_tooltip(wiki_dir.last_version.authored_date) }).html_safe - - if @show_children - %ul - = render wiki_dir.pages, context: context diff --git a/app/views/projects/wiki_directories/_sidebar_wiki_directory.html.haml b/app/views/projects/wiki_directories/_sidebar_wiki_directory.html.haml deleted file mode 100644 index 2f62e9d4516..00000000000 --- a/app/views/projects/wiki_directories/_sidebar_wiki_directory.html.haml +++ /dev/null @@ -1,7 +0,0 @@ -%li - %span.text-secondary-300.svg-icon.svg-baseline - = sprite_icon('folder-open', size: 16) - - = link_to wiki_dir.slug, project_wiki_dir_path(@project, wiki_dir) - %ul= render wiki_dir.pages, context: context - diff --git a/app/views/projects/wiki_directories/_wiki_directory.html.haml b/app/views/projects/wiki_directories/_wiki_directory.html.haml deleted file mode 100644 index 022c209c5bd..00000000000 --- a/app/views/projects/wiki_directories/_wiki_directory.html.haml +++ /dev/null @@ -1 +0,0 @@ -= render wiki_directory.to_partial_path(context), wiki_dir: wiki_directory, context: context diff --git a/app/views/projects/wiki_directories/empty.html.haml b/app/views/projects/wiki_directories/empty.html.haml deleted file mode 100644 index cab1c3acb60..00000000000 --- a/app/views/projects/wiki_directories/empty.html.haml +++ /dev/null @@ -1,34 +0,0 @@ -- layout_path = 'shared/empty_states/wikis_layout' -- add_to_breadcrumbs _("Wiki"), project_wiki_path(@project, :home) -- add_to_breadcrumbs s_("Wiki|Pages"), project_wikis_pages_path(@project) -- breadcrumb_title s_(@wiki_dir.slug) -- page_title @wiki_dir.slug - -- if can?(current_user, :create_wiki, @project) - - create_path = project_wiki_path(@project, params[:id], { view: 'create', params: { title: "#{params[:id]}/" } }) - - create_link = link_to s_('WikiDirEmpty|Create a page in this directory'), create_path, class: 'btn btn-success qa-create-first-page-link', title: s_('WikiDirEmpty|Create a page') - - = render layout: layout_path, locals: { image_path: 'illustrations/wiki_login_empty.svg' } do - %h4.text-left - = s_('WikiDirEmpty|This directory has no wiki pages') - %p.text-left - = s_("WikiDirEmpty|A wiki is where you can store all the details about your project. This can include why you've created it, its principles, how to use it, and so on.") - = create_link - -- elsif can?(current_user, :read_issue, @project) - - issues_link = link_to s_('WikiEmptyIssueMessage|issue tracker'), project_issues_path(@project) - - new_issue_link = link_to s_('WikiEmpty|Suggest wiki improvement'), new_project_issue_path(@project), class: 'btn btn-success', title: s_('WikiEmptyIssueMessage|Suggest wiki improvement') - - = render layout: layout_path, locals: { image_path: 'illustrations/wiki_logout_empty.svg' } do - %h4 - = s_('WikiDirEmpty|This directory has no wiki pages') - %p.text-left - = s_('WikiEmptyIssueMessage|You must be a project member in order to add wiki pages. If you have suggestions for how to improve the wiki for this project, consider opening an issue in the %{issues_link}.').html_safe % { issues_link: issues_link } - = new_issue_link - -- else - = render layout: layout_path, locals: { image_path: 'illustrations/wiki_logout_empty.svg' } do - %h4 - = s_('WikiDirEmpty|This directory has no wiki pages') - %p - = s_('WikiEmpty|You must be a project member in order to add wiki pages.') diff --git a/app/views/projects/wiki_directories/show.html.haml b/app/views/projects/wiki_directories/show.html.haml deleted file mode 100644 index 4c7978d1216..00000000000 --- a/app/views/projects/wiki_directories/show.html.haml +++ /dev/null @@ -1,6 +0,0 @@ -- add_to_breadcrumbs _("Wiki"), project_wiki_path(@project, :home) -- add_to_breadcrumbs s_("Wiki|Pages"), project_wikis_pages_path(@project) -- breadcrumb_title s_(@wiki_dir.slug) -- page_title @wiki_dir.slug - -= render 'page_listing', { allow_change_nesting: false, wiki_page_title: page_title, page_path: ->(opts) { project_wiki_dir_path(@project, @wiki_dir, opts) } } diff --git a/app/views/projects/wiki_pages/_page_title.html.haml b/app/views/projects/wiki_pages/_page_title.html.haml deleted file mode 100644 index a3b077999e6..00000000000 --- a/app/views/projects/wiki_pages/_page_title.html.haml +++ /dev/null @@ -1,4 +0,0 @@ -= link_to @page.human_title, project_wiki_path(@project, @page) -%span.light - = _('·').html_safe - = subtitle diff --git a/app/views/projects/wiki_pages/_pages_wiki_page.html.haml b/app/views/projects/wiki_pages/_pages_wiki_page.html.haml deleted file mode 100644 index c177d03bee1..00000000000 --- a/app/views/projects/wiki_pages/_pages_wiki_page.html.haml +++ /dev/null @@ -1,8 +0,0 @@ -%li - %span.text-secondary-500.svg-icon.svg-baseline= sprite_icon('book', size: 16) - = wiki_page_link(wiki_page, @nesting, @project) - .float-right - %span.badge.badge-pill.wiki-page-format= _(wiki_page.format) - - if wiki_page.last_version - = '/' - %small= (s_("Last edited %{date}") % { date: time_ago_with_tooltip(wiki_page.last_version.authored_date) }).html_safe diff --git a/app/views/projects/wiki_pages/_sidebar_wiki_page.html.haml b/app/views/projects/wiki_pages/_sidebar_wiki_page.html.haml deleted file mode 100644 index 205c3dd76bf..00000000000 --- a/app/views/projects/wiki_pages/_sidebar_wiki_page.html.haml +++ /dev/null @@ -1,11 +0,0 @@ -- is_active = params[:id] == wiki_page.slug -- icon_active_class = is_active ? 'text-secondary-800' : 'text-secondary-300' - -%li{ class: active_when(is_active) } - %span.svg-icon.svg-baseline{ class: icon_active_class } - = sprite_icon('book', size: 16) - - if is_active - = wiki_page.human_title - - else - = link_to project_wiki_path(@project, wiki_page) do - = wiki_page.human_title diff --git a/app/views/projects/wiki_pages/_wiki_page.html.haml b/app/views/projects/wiki_pages/_wiki_page.html.haml deleted file mode 100644 index 947e96fed6b..00000000000 --- a/app/views/projects/wiki_pages/_wiki_page.html.haml +++ /dev/null @@ -1 +0,0 @@ -= render wiki_page.to_partial_path(context), wiki_page: wiki_page diff --git a/app/views/projects/wiki_pages/show.html.haml b/app/views/projects/wiki_pages/show.html.haml deleted file mode 100644 index 879ddfb03c8..00000000000 --- a/app/views/projects/wiki_pages/show.html.haml +++ /dev/null @@ -1,34 +0,0 @@ -- @content_class = 'wiki-page' + (fluid_layout ? '' : ' limit-container-width') -- breadcrumb_title @page.human_title -- page_title @page.human_title, _("Wiki") -- add_to_breadcrumbs _("Wiki"), project_wiki_path(@project, :home) -- add_to_breadcrumbs s_("Wiki|Pages"), project_wikis_pages_path(@project) -- if @page_dir.present? - - add_to_breadcrumbs _(@page_dir.slug), project_wiki_dir_path(@project, @page_dir) - -.wiki-page-header.top-area.has-sidebar-toggle.flex-column.flex-lg-row - %button.btn.btn-default.sidebar-toggle.js-sidebar-wiki-toggle{ role: "button", type: "button" } - = icon('angle-double-left') - - .nav-text.flex-fill - %h2.wiki-page-title= @page.human_title - %span.wiki-last-edit-by - - if @page.last_version - = (_("Last edited by %{name}") % { name: "<strong>#{@page.last_version.author_name}</strong>" }).html_safe - #{time_ago_with_tooltip(@page.last_version.authored_date)} - - .nav-controls.pb-md-3.pb-lg-0 - = render 'main_links' - -- if @page.historical? - .warning_message - = s_("WikiHistoricalPage|This is an old version of this page.") - - most_recent_link = link_to s_("WikiHistoricalPage|most recent version"), project_wiki_path(@project, @page) - - history_link = link_to s_("WikiHistoricalPage|history"), project_wiki_history_path(@project, @page) - = (s_("WikiHistoricalPage|You can view the %{most_recent_link} or browse the %{history_link}.") % { most_recent_link: most_recent_link, history_link: history_link }).html_safe - -.prepend-top-default.append-bottom-default - .md.md-file.qa-wiki-page-content - = render_wiki_content(@page) - -= render 'sidebar' diff --git a/app/views/projects/wiki_pages/_form.html.haml b/app/views/projects/wikis/_form.html.haml index 8f5757d6d98..a153f527ee0 100644 --- a/app/views/projects/wiki_pages/_form.html.haml +++ b/app/views/projects/wikis/_form.html.haml @@ -1,11 +1,9 @@ - form_classes = 'wiki-form common-note-form prepend-top-default js-quick-submit' - form_classes += ' js-new-wiki-page' unless @page.persisted? -= form_for [@project.namespace.becomes(Namespace), @project, @page], - method: @page.persisted? ? 'put' : 'post', - url: { controller: 'wiki_pages', action: @page.persisted? ? :update : :create }, - html: { class: form_classes }, - data: { uploads_path: uploads_path } do |f| += form_for [@project.namespace.becomes(Namespace), @project, @page], method: @page.persisted? ? :put : :post, + html: { class: form_classes }, + data: { uploads_path: uploads_path } do |f| = form_errors(@page) - if @page.persisted? @@ -14,7 +12,7 @@ .form-group.row .col-sm-12= f.label :title, class: 'control-label-full-width' .col-sm-12 - = f.text_field :title, class: 'form-control qa-wiki-title-textbox', value: @page.title, required: true, autofocus: !@page.persisted?, placeholder: s_('Wiki|Page title') + = f.text_field :title, class: 'form-control qa-wiki-title-textbox', value: @page.title, required: true, autofocus: !@page.persisted?, placeholder: _('Wiki|Page title') %span.d-inline-block.mw-100.prepend-top-5 = icon('lightbulb-o') - if @page.persisted? diff --git a/app/views/shared/wiki/_main_links.html.haml b/app/views/projects/wikis/_main_links.html.haml index 5e41bb6a9cd..2e1e176c42a 100644 --- a/app/views/shared/wiki/_main_links.html.haml +++ b/app/views/projects/wikis/_main_links.html.haml @@ -1,6 +1,6 @@ - if (@page && @page.persisted?) - if can?(current_user, :create_wiki, @project) - = link_to project_wiki_pages_new_path(@project), class: "add-new-wiki btn btn-success", role: "button" do + = link_to project_wikis_new_path(@project), class: "add-new-wiki btn btn-success", role: "button" do = s_("Wiki|New page") = link_to project_wiki_history_path(@project, @page), class: "btn", role: "button" do = s_("Wiki|Page history") diff --git a/app/views/projects/wikis/_pages_wiki_page.html.haml b/app/views/projects/wikis/_pages_wiki_page.html.haml new file mode 100644 index 00000000000..c156f8cbf50 --- /dev/null +++ b/app/views/projects/wikis/_pages_wiki_page.html.haml @@ -0,0 +1,6 @@ +%li + = link_to wiki_page.title, project_wiki_path(@project, wiki_page) + %small (#{wiki_page.format}) + .float-right + - if wiki_page.last_version + %small= (s_("Last edited %{date}") % { date: time_ago_with_tooltip(wiki_page.last_version.authored_date) }).html_safe diff --git a/app/views/shared/wiki/_sidebar.html.haml b/app/views/projects/wikis/_sidebar.html.haml index 83d145444d8..83d145444d8 100644 --- a/app/views/shared/wiki/_sidebar.html.haml +++ b/app/views/projects/wikis/_sidebar.html.haml diff --git a/app/views/projects/wikis/_sidebar_wiki_page.html.haml b/app/views/projects/wikis/_sidebar_wiki_page.html.haml new file mode 100644 index 00000000000..769d869bd53 --- /dev/null +++ b/app/views/projects/wikis/_sidebar_wiki_page.html.haml @@ -0,0 +1,3 @@ +%li{ class: active_when(params[:id] == wiki_page.slug) } + = link_to project_wiki_path(@project, wiki_page) do + = wiki_page.human_title diff --git a/app/views/projects/wikis/_wiki_directory.html.haml b/app/views/projects/wikis/_wiki_directory.html.haml new file mode 100644 index 00000000000..0e5f32ed859 --- /dev/null +++ b/app/views/projects/wikis/_wiki_directory.html.haml @@ -0,0 +1,4 @@ +%li + = wiki_directory.slug + %ul + = render wiki_directory.pages, context: context diff --git a/app/views/projects/wikis/_wiki_page.html.haml b/app/views/projects/wikis/_wiki_page.html.haml new file mode 100644 index 00000000000..c84d06dad02 --- /dev/null +++ b/app/views/projects/wikis/_wiki_page.html.haml @@ -0,0 +1 @@ += render "#{context}_wiki_page", wiki_page: wiki_page diff --git a/app/views/projects/wiki_pages/edit.html.haml b/app/views/projects/wikis/edit.html.haml index 4e5f6a077a4..9ccf5acfefc 100644 --- a/app/views/projects/wiki_pages/edit.html.haml +++ b/app/views/projects/wikis/edit.html.haml @@ -1,10 +1,5 @@ -- @content_class = 'edit-wiki-page' + (fluid_layout ? '' : ' limit-container-width') -- add_to_breadcrumbs _("Wiki"), project_wiki_path(@project, :home) -- add_to_breadcrumbs s_("Wiki|Pages"), project_wikis_pages_path(@project) -- if @page.persisted? && @page_dir.present? - - add_to_breadcrumbs _(@page_dir.slug), project_wiki_dir_path(@project, @page_dir) -- if @page.persisted? - - add_to_breadcrumbs @page.human_title, project_wiki_path(@project, @page) +- @content_class = "limit-container-width" unless fluid_layout +- add_to_breadcrumbs _("Wiki"), project_wiki_path(@project, @page) - breadcrumb_title @page.persisted? ? _("Edit") : _("New") - page_title @page.persisted? ? _("Edit") : _("New"), @page.human_title, _("Wiki") @@ -17,7 +12,10 @@ .nav-text %h2.wiki-page-title - if @page.persisted? - = render partial: 'page_title', locals: { subtitle: s_("Wiki|Edit Page") } + = link_to @page.human_title, project_wiki_path(@project, @page) + %span.light + · + = s_("Wiki|Edit Page") - else = s_("Wiki|Create New Page") diff --git a/app/views/projects/wiki_pages/missing_page.html.haml b/app/views/projects/wikis/empty.html.haml index 62fa6e1907b..62fa6e1907b 100644 --- a/app/views/projects/wiki_pages/missing_page.html.haml +++ b/app/views/projects/wikis/empty.html.haml diff --git a/app/views/projects/wiki_pages/history.html.haml b/app/views/projects/wikis/history.html.haml index d60a32750df..d3a55c53649 100644 --- a/app/views/projects/wiki_pages/history.html.haml +++ b/app/views/projects/wikis/history.html.haml @@ -1,4 +1,3 @@ -- @content_class = 'wiki-history' - page_title _("History"), @page.human_title, _("Wiki") .wiki-page-header.top-area.has-sidebar-toggle.flex-column.flex-lg-row @@ -7,7 +6,10 @@ .nav-text %h2.wiki-page-title - = render partial: 'page_title', locals: { subtitle: _("History") } + = link_to @page.human_title, project_wiki_path(@project, @page) + %span.light + · + = _("History") .table-holder %table.table @@ -37,4 +39,4 @@ = version.format = paginate @page_versions, theme: 'gitlab' -= render 'shared/wiki/sidebar' += render 'sidebar' diff --git a/app/views/projects/wikis/pages.html.haml b/app/views/projects/wikis/pages.html.haml new file mode 100644 index 00000000000..d9dcd8f9acd --- /dev/null +++ b/app/views/projects/wikis/pages.html.haml @@ -0,0 +1,32 @@ +- add_to_breadcrumbs "Wiki", project_wiki_path(@project, :home) +- breadcrumb_title s_("Wiki|Pages") +- page_title s_("Wiki|Pages"), _("Wiki") +- sort_title = wiki_sort_title(params[:sort]) + +.wiki-page-header.top-area.flex-column.flex-lg-row + + .nav-text.flex-fill + %h2.wiki-page-title + = s_("Wiki|Wiki Pages") + + .nav-controls.pb-md-3.pb-lg-0 + = link_to project_wikis_git_access_path(@project), class: 'btn' do + = icon('cloud-download') + = _("Clone repository") + + .dropdown.inline.wiki-sort-dropdown + .btn-group{ role: 'group' } + .btn-group{ role: 'group' } + %button.dropdown-toggle{ type: 'button', data: { toggle: 'dropdown', display: 'static' }, class: 'btn btn-default' } + = sort_title + = icon('chevron-down') + %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable.dropdown-menu-sort + %li + = sortable_item(s_("Wiki|Title"), project_wikis_pages_path(@project, sort: ProjectWiki::TITLE_ORDER), sort_title) + = sortable_item(s_("Wiki|Created date"), project_wikis_pages_path(@project, sort: ProjectWiki::CREATED_AT_ORDER), sort_title) + = wiki_sort_controls(@project, params[:sort], params[:direction]) + +%ul.wiki-pages-list.content-list + = render @wiki_entries, context: 'pages' + += paginate @wiki_pages, theme: 'gitlab' diff --git a/app/views/projects/wikis/show.html.haml b/app/views/projects/wikis/show.html.haml index 9c732a933cf..ebd99cf8605 100644 --- a/app/views/projects/wikis/show.html.haml +++ b/app/views/projects/wikis/show.html.haml @@ -1,5 +1,32 @@ -- add_to_breadcrumbs "Wiki", project_wiki_path(@project, :home) -- breadcrumb_title s_("Wiki|Pages") -- page_title s_("Wiki|Contents"), _("Wiki") +- @content_class = "limit-container-width" unless fluid_layout +- breadcrumb_title @page.human_title +- wiki_breadcrumb_dropdown_links(@page.slug) +- page_title @page.human_title, _("Wiki") +- add_to_breadcrumbs _("Wiki"), project_wiki_path(@project, :home) -= render 'page_listing', { allow_change_nesting: ::Feature.enabled?(:wikis_allow_change_nesting), wiki_page_title: page_title, page_path: ->(opts) { project_wikis_pages_path(@project, opts) } } +.wiki-page-header.top-area.has-sidebar-toggle.flex-column.flex-lg-row + %button.btn.btn-default.sidebar-toggle.js-sidebar-wiki-toggle{ role: "button", type: "button" } + = icon('angle-double-left') + + .nav-text.flex-fill + %h2.wiki-page-title= @page.human_title + %span.wiki-last-edit-by + - if @page.last_version + = (_("Last edited by %{name}") % { name: "<strong>#{@page.last_version.author_name}</strong>" }).html_safe + #{time_ago_with_tooltip(@page.last_version.authored_date)} + + .nav-controls.pb-md-3.pb-lg-0 + = render 'main_links' + +- if @page.historical? + .warning_message + = s_("WikiHistoricalPage|This is an old version of this page.") + - most_recent_link = link_to s_("WikiHistoricalPage|most recent version"), project_wiki_path(@project, @page) + - history_link = link_to s_("WikiHistoricalPage|history"), project_wiki_history_path(@project, @page) + = (s_("WikiHistoricalPage|You can view the %{most_recent_link} or browse the %{history_link}.") % { most_recent_link: most_recent_link, history_link: history_link }).html_safe + +.prepend-top-default.append-bottom-default + .md.md-file{ data: { qa_selector: 'wiki_page_content' } } + = render_wiki_content(@page) + += render 'sidebar' diff --git a/app/views/shared/empty_states/_wikis.html.haml b/app/views/shared/empty_states/_wikis.html.haml index e05230de457..73eedcc1dc9 100644 --- a/app/views/shared/empty_states/_wikis.html.haml +++ b/app/views/shared/empty_states/_wikis.html.haml @@ -1,11 +1,8 @@ - layout_path = 'shared/empty_states/wikis_layout' -- wiki_is_empty = @project_wiki.empty? -- empty_msg = wiki_is_empty ? s_('WikiEmpty|This project has no wiki pages') : s_('WikiEmpty|This page does not exist') -- create_msg = wiki_is_empty ? s_('WikiEmpty|Create your first page') : s_('WikiEmpty|Create this page') - if can?(current_user, :create_wiki, @project) - create_path = project_wiki_path(@project, params[:id], { view: 'create' }) - - create_link = link_to create_msg, create_path, class: 'btn btn-success qa-create-first-page-link', title: create_msg + - create_link = link_to s_('WikiEmpty|Create your first page'), create_path, class: 'btn btn-success qa-create-first-page-link', title: s_('WikiEmpty|Create your first page') = render layout: layout_path, locals: { image_path: 'illustrations/wiki_login_empty.svg' } do %h4.text-left @@ -20,7 +17,7 @@ = render layout: layout_path, locals: { image_path: 'illustrations/wiki_logout_empty.svg' } do %h4 - = empty_msg + = s_('WikiEmpty|This project has no wiki pages') %p.text-left = s_('WikiEmptyIssueMessage|You must be a project member in order to add wiki pages. If you have suggestions for how to improve the wiki for this project, consider opening an issue in the %{issues_link}.').html_safe % { issues_link: issues_link } = new_issue_link @@ -28,6 +25,6 @@ - else = render layout: layout_path, locals: { image_path: 'illustrations/wiki_logout_empty.svg' } do %h4 - = empty_msg + = s_('WikiEmpty|This project has no wiki pages') %p = s_('WikiEmpty|You must be a project member in order to add wiki pages.') diff --git a/app/views/shared/wiki/_page_listing.html.haml b/app/views/shared/wiki/_page_listing.html.haml deleted file mode 100644 index 80f3071a8b2..00000000000 --- a/app/views/shared/wiki/_page_listing.html.haml +++ /dev/null @@ -1,45 +0,0 @@ -- @no_container = true -- current_sorting = params.permit(:sort, :direction) -- sort_title = wiki_sort_title(params[:sort]) - -%div{ class: container_class } - .wiki-page-header.top-area.flex-column.flex-lg-row - - .nav-text.flex-fill - %h2.wiki-page-title - = wiki_page_title - - .nav-controls.pb-md-3.pb-lg-0 - - if can?(current_user, :create_wiki, @project) - = link_to project_wiki_pages_new_path(@project), class: "add-new-wiki btn btn-success" do - = s_("Wiki|New page") - - = link_to project_wikis_git_access_path(@project), class: 'btn qa-clone-repository-link' do - = sprite_icon('download', size: 16) - = _("Clone repository") - - - if @nesting.present? && allow_change_nesting - .dropdown.inline.wiki-nesting-dropdown - .btn-group{ role: 'group' } - %button.dropdown-toggle{ type: 'button', data: { toggle: 'dropdown', display: 'static' }, class: 'btn btn-default' } - = wiki_show_children_icon(@nesting) - = sprite_icon('chevron-down', size: 16) - %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable.dropdown-menu-sort - - ProjectWiki::NESTINGS.each do |choice| - %li= link_to wiki_show_children_icon(choice), page_path.call(current_sorting.merge(show_children: choice)), class: @nesting == choice ? 'is-active' : '' - - .dropdown.inline.wiki-sort-dropdown - .btn-group{ role: 'group' } - %button.dropdown-toggle{ type: 'button', data: { toggle: 'dropdown', display: 'static' }, class: 'btn btn-default' } - = sort_title - = sprite_icon('chevron-down', size: 16) - %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable.dropdown-menu-sort - %li - = sortable_item(s_("Wiki|Title"), page_path.call(sort: ProjectWiki::TITLE_ORDER), sort_title) - = sortable_item(s_("Wiki|Created date"), page_path.call(sort: ProjectWiki::CREATED_AT_ORDER), sort_title) - = wiki_sort_controls(current_sorting.merge(show_children: @nesting), &page_path) - - %ul.wiki-pages-list.content-list - = render @wiki_entries, context: 'pages' - - = paginate @wiki_pages, theme: 'gitlab' |